function initCatalogForm(){var a=document.getElementById("form_catalog");if(a){myinitselect(document.getElementById("category"),getParameter("category"));myinitselect(document.getElementById("type"),getParameter("type"));myinitselect(document.getElementById("length"),getParameter("length"));if(getParameter("q")){a.q.value=getParameter("q")}}}function myinitselect(b,a){for(j=0;j<b.options.length;j++){if(a==b.options[j].value){b.options[j].selected=true}}}var gResultsPage=1;var gResultsPerPage=10;function resultsInit(f){var e=document.getElementById("resultstable");gResultsPage=f||location.hash.replace(/#/,"")||1;if(gResultsPage<1){gResultsPage=1}var a=Math.ceil(e.rows.length/gResultsPerPage);if(gResultsPage>a){gResultsPage=a}location.hash="#"+gResultsPage;var d=gResultsPerPage*(gResultsPage-1);for(var c=0;c<e.rows.length;c++){xcmsAddClassName(e.rows[c],"hide")}var g=gResultsPerPage;for(var c=0;c<e.rows.length&&g;c++){if(d-->0){continue}xcmsRemoveClassName(e.rows[c],"hide");g--}var b="";if(a>1){b+='<li><a href="#" onclick="javascript:return resultsGoToPage(1)"><<</a></li><li><a href="#" onclick="javascript:return resultsGoToPrevPage()">VORIGE</a></li>';for(var c=1;c<=a;c++){if(c==gResultsPage){b+="<li><span>"+c+"</span></li>"}else{b+='<li><a href="#" onclick="javascript:return resultsGoToPage('+c+')">'+c+"</a></li>"}}b+='<li><a href="#" onclick="javascript:return resultsGoToNextPage()">VOLGENDE</a></li><li><a href="#" onclick="javascript:return resultsGoToPage('+a+')">&gt;&gt;</a></li>';document.getElementById("pagingbottom").innerHTML=b;document.getElementById("pagingbottom").style.display="block"}else{document.getElementById("pagingbottom").style.display="none"}}function resultsGoToPage(a){resultsInit(a);return false}function resultsGoToPrevPage(){gResultsPage--;resultsInit(gResultsPage);return false}function resultsGoToNextPage(){gResultsPage++;resultsInit(gResultsPage);return false};