if(parent.frames.length>0){parent.location.href=location.href}var url="";function getHTTPObject(){var b;var a=navigator.appName;if(a=="Microsoft Internet Explorer"){b=new ActiveXObject("Microsoft.XMLHTTP")}else{b=new XMLHttpRequest()}return b}var http=getHTTPObject();var http2=getHTTPObject();function setVisibility(c,a,b){if(b!=null){}document.getElementById(c).style.display=a}function MM_goToURL(){var i,args=MM_goToURL.arguments;document.MM_returnValue=false;for(i=0;i<(args.length-1);i+=2){eval(args[i]+".location='"+args[i+1]+"'")}}function setURL(a){url=a}function update(){updateCategory();updateExtensions()}function updateCategory(){var b=document.searchForm.category.value;caturl=url+"getcat.php?ck=cat&cid="+escape(b);if(http){var a=document.searchForm.category.value;http.open("GET",caturl,true);http.onreadystatechange=handleCategoryResponse;http.send(null)}}function updateExtensions(){if(http2){var a=document.searchForm.category.value;caturl=url+"getcat.php?ck=ext&cid="+escape(a);http2.open("GET",caturl,true);http2.onreadystatechange=handleExtensionResponse;http2.send(null)}}function handleCategoryResponse(){if(http.readyState==4){if(http.responseText.indexOf("Invalid Data")==-1){var b=http.responseXML;document.searchForm.subcategory.options.length=0;document.searchForm.subcategory.options.length=b.getElementsByTagName("subcat").length+1;document.searchForm.subcategory.options[0].value="0";document.searchForm.subcategory.options[0].text="Choose... ";for(i=0;i<b.getElementsByTagName("subcat").length;i++){var a=b.getElementsByTagName("subcat").item(i);document.searchForm.subcategory.options[i+1].value=a.getElementsByTagName("subcatid").item(0).firstChild.data;document.searchForm.subcategory.options[i+1].text=a.getElementsByTagName("subcatname").item(0).firstChild.data}}else{document.searchForm.subcategory.options.length=1;document.searchForm.subcategory.options[0].value="0";document.searchForm.subcategory.options[0].text="No Subcategory.."}}else{document.searchForm.subcategory.options.length=1;document.searchForm.subcategory.options[0].value="0";document.searchForm.subcategory.options[0].text="Loading..."}}function handleExtensionResponse(){if(http2.readyState==4){if(http2.responseText.indexOf("Invalid Data")==-1){var b=http2.responseXML;document.searchForm.ext.options.length=0;document.searchForm.ext.options.length=b.getElementsByTagName("ext").length+1;document.searchForm.ext.options[0].value="0";document.searchForm.ext.options[0].text="Choose... ";for(i=0;i<b.getElementsByTagName("ext").length;i++){var a=b.getElementsByTagName("ext").item(i);document.searchForm.ext.options[i+1].value=a.getElementsByTagName("extname").item(0).firstChild.data;document.searchForm.ext.options[i+1].text=a.getElementsByTagName("extvalue").item(0).firstChild.data}}else{document.searchForm.ext.options.length=1;document.searchForm.ext.options[0].value="0";document.searchForm.ext.options[0].text="Choose..."}}else{document.searchForm.ext.options.length=1;document.searchForm.ext.options[0].value="0";document.searchForm.ext.options[0].text="Loading..."}}function toggleSearchBox(){if(document.getElementById("searchOptions")){if(document.getElementById("searchOptions").style.display=="none"){document.getElementById("searchOptions").style.display="";document.getElementById("sbdisplay").innerHTML="<a onClick='toggleSearchBox()'>Hide Search Box</a>"}else{document.getElementById("searchOptions").style.display="none";document.getElementById("sbdisplay").innerHTML="<a onClick='toggleSearchBox()'>Display Search Box</a>"}}}function select_all(d){var b=d.elements["select[]"];if(!b){return}var c=b.length;if(!c){if(d.selectAll.checked==true){b.checked=1}else{b.checked=0}}else{for(var a=0;a<c;a++){if(d.selectAll.checked==true){b[a].checked=1}else{b[a].checked=0}}}}function insertAtCursor(e,c,d){if(document.selection){e.focus();if(d==1){sel=opener.document.selection.createRange()}else{sel=document.selection.createRange()}sel.text=c}else{if(e.selectionStart||e.selectionStart=="0"){var b=e.selectionStart;var a=e.selectionEnd;e.value=e.value.substring(0,b)+c+e.value.substring(a,e.value.length);e.focus()}else{e.value+=c}}}function popUp2(URL,WIDTH,HEIGHT,SCROLL,LEFT,TOP){day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"','scrollbars="+SCROLL+",width="+WIDTH+",height="+HEIGHT+",left = "+LEFT+",top = "+TOP+"');")}function doCalc(c,b,d,a){b=document.getElementById(b);if(c.value.length>d){c.value=c.value.substring(0,d)}if(a!="*"){new_val="";for(i=0;i<c.value.length;i++){if(a.indexOf(c.value.charAt(i),0)!=-1){new_val+=c.value.charAt(i)}}if(c.value!=new_val){c.value=new_val}}b.innerHTML=c.value.length+" / "+d}function reloadCap(){if(document.getElementById){thesrc=document.getElementById("captcha").src;thesrc=thesrc.substring(0,thesrc.lastIndexOf(".")+4);document.getElementById("captcha").src=thesrc+"?"+Math.round(Math.random()*100000)}else{alert("Sorry, cannot autoreload captcha image\nSubmit the form and a new captcha will be reloaded")}};