var statScript;var statTime;var statMem;var saveSearchOn=false;var modImgFile="";function divhover(c,d){if((d!=1)&&(d!=2)){alert("Devider can not be "+d+"!")}var a=parseInt(c.id.substr(3));var b="files,newsg,pstnfo,pstadd,pstscr,pstgnr,pstdat,pstnum".split(",");for(i=0;i<b.length;i++){document.getElementById(b[i]+a).style.opacity=1/d}var b="pstmod,pstscn,pstlnk".split(",");for(i=0;i<b.length;i++){document.getElementById(b[i]+a).style.opacity=d%2}var b="pstcmt".split(",");for(i=0;i<b.length;i++){if(document.getElementById(b[i]+a).className==b[i]){document.getElementById(b[i]+a).style.opacity=1/d}else{document.getElementById(b[i]+a).style.opacity=d%2}}if(d==2){if(document.getElementById("modImg")){document.getElementById("nzbtable").removeChild(document.getElementById("modImg"))}modImgFile=""}}function selchk(b,a){if(document.getElementById("c"+a).checked!==true){alert("You cannot select this sub-category without selecting\nthe top category first!");return}if(document.getElementById("chkinp"+b).checked!==true){document.getElementById("chkimg"+b).setAttribute("class","catdesel");document.getElementById("chkinp"+b).checked="checked"}else{document.getElementById("chkimg"+b).setAttribute("class","catsel");document.getElementById("chkinp"+b).checked=""}}function seltopcat(b,a){var c=a.split(",");if(b.checked===true){for(i=0;i<c.length;i++){document.getElementById("chkimg"+c[i]).className="catsel";document.getElementById("chkinp"+c[i]).checked=""}}else{for(i=0;i<c.length;i++){document.getElementById("chkimg"+c[i]).className="catdesel";document.getElementById("chkinp"+c[i]).checked="checked"}}}function showcatblock(){if(document.getElementById("cattable").style.display=="none"){document.getElementById("cattable").style.display="block";document.getElementById("catbut").innerHTML="/\\ Hide Categories /\\"}else{document.getElementById("cattable").style.display="none";document.getElementById("catbut").innerHTML="\\/ Show Categories \\/"}}function searchover(a){if((a==1)&&(document.getElementById("schmid").style.display=="none")){document.getElementById("schmid").style.display="block";document.getElementById("searchtext").focus()}else{if((!searchOn)&&(document.getElementById("searchtext").value=="")&&(document.getElementById("schmid").style.display!="none")){document.getElementById("schmid").style.display="none";document.getElementById("searchtext").blur()}}}function fix_search(a){searchOn=true;document.getElementById("schplch").style.height="106px";document.getElementById("schmid").style.display="block";if((a!=0)&&(!saveSearchOn)){document.getElementById("sugbox").style.display="none";document.getElementById("sugbox").innerHTML="";saveSearchOn=false}}function showSett(b){var c=document.getElementById("settblock");c.style.display=(c.style.display=="block"?"none":"block");var a=parseInt(b.style.zIndex);b.style.WebkitTransform="rotate("+(a*360)+"deg)";b.style.zIndex=a+1}function sett_Lang(){var a=document.getElementById("lang_ops0").checked;for(i=1;i<9;i++){document.getElementById("lang_ops"+i).disabled=(a?"":"disabled");document.getElementById("lang_ops"+i).parentNode.parentNode.style.color=(a?"black":"gray")}}var loadingObj='<div id="loadbox">Loading...<div id="loader"></div></div>';function loadBar(){if(document.getElementById("loader")){var a=document.getElementById("loader");if(a.style.left=="1px"){a.style.left="178px"}else{a.style.left="1px"}}}setInterval("loadBar()",2000);function showLoader(a){document.getElementById("nzbtabletop").style.display="block";document.getElementById("floater_inner").innerHTML=loadingObj;loadBar();document.getElementById("floater").style.display="inline-block";positionObj("floater",a,false)}function positionObj(f,b,j){var h=document.getElementById("nzbtable").offsetWidth;var l=document.getElementById(f).offsetWidth;var d=parseInt((h-l)/2);document.getElementById(f).style.left=d+"px";var g=0;g+=parseInt(document.getElementById("header_logo").offsetHeight);g+=parseInt(document.getElementById("header_sep").offsetHeight);g+=parseInt(document.getElementById("header_info").offsetHeight);g+=parseInt(document.getElementById("topmenu").offsetHeight);g+=15;g+=parseInt(document.getElementById("notify_container").offsetHeight);g+=parseInt(document.getElementById("nzbtable").offsetTop);if(navigator.appName=="Microsoft Internet Explorer"){window.scrollY=document.body.scrollTop}if(j){if(window.scrollY<g){document.getElementById(f).style.top="0px";document.getElementById(f).style.bottom="auto"}else{if(parseInt(navigator.appVersion)>3){if(navigator.appName.indexOf("Microsoft")!=-1){window.innerHeight=document.body.offsetHeight}}if((document.getElementById(f).offsetHeight+40)<window.innerHeight){document.getElementById(f).style.top=(window.scrollY-g)+"px";document.getElementById(f).style.bottom="auto"}else{var c=(window.innerHeight-(document.getElementById(f).offsetHeight+40))/2;document.getElementById(f).style.top=((window.scrollY-g)+c)+"px";document.getElementById(f).style.bottom="auto"}}}else{var k=b.clientY+window.scrollY;var e=k-g;if((e-70)<0){document.getElementById(f).style.top="0px";document.getElementById(f).style.bottom="auto"}else{var a=document.getElementById("nzbtable").offsetHeight-(e-70);if(a<(document.getElementById(f).offsetHeight+30)){document.getElementById(f).style.bottom="0px";document.getElementById(f).style.top="auto"}else{document.getElementById(f).style.top=(e-70)+"px";document.getElementById(f).style.bottom="auto"}}}if(parseInt(document.getElementById(f).style.top)<0){document.getElementById(f).style.top="0px";document.getElementById(f).style.bottom="auto"}}function view_nfo(f,e,d){var c=new Date();var b=c.getTime();var a=getMouseButton(d);if(a==2){if(/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){setTimeout("window.open(obj.href)",100)}else{window.open(e.href)}}if(a!=1){return false}showLoader(d);xmlhttp=startHTTP();xmlhttp.open("GET","nzbbrowse_ajax.php?action=nfo&id="+f+"&rand="+b,true);xmlhttp.send();xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){document.getElementById("floater_inner").innerHTML=decodeURIComponent(xmlhttp.responseText);positionObj("floater",d,true);var g=new Date();statScript="view_nfo";statTime=(g.getTime()-b)/1000+" s";statMem="-"}else{if(xmlhttp.readyState==4&&xmlhttp.status!=200){document.getElementById("floater_inner").innerHTML="The server did not respond. Please try again later."}}}}function startDelete(e,d){var c=new Date();var b=c.getTime();showLoader(d);var a=encodeURIComponent(strip_tags(document.getElementById("name"+e).innerHTML));xmlhttp=startHTTP();xmlhttp.open("GET","nzbbrowse_ajax.php?action=delete&id="+e+"&name="+a+"&rand="+b,true);xmlhttp.send();xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){document.getElementById("floater_inner").innerHTML=xmlhttp.responseText;positionObj("floater",d);var f=new Date();statScript="startDelete";statTime=(f.getTime()-b)/1000+" s";statMem="-"}else{if(xmlhttp.readyState==4&&xmlhttp.status!=200){document.getElementById("floater_inner").innerHTML="The server did not respond. Please try again later."}}}}function takeSettings(d){var c=new Date();var b=c.getTime();d.submit_sett.disabled="disabled";d.submit_sett.style.color="gray";var a;a="catman="+(d.catman.checked?"yes":"no");a+="&browse_js="+(d.exsearch.checked?"1":"0")+","+(d.ajsearch.checked?"1":"0")+","+(d.ajpagin.checked?"1":"0");a+="&nametype="+(d.imdb.checked?"1":"0")+","+(d.ign.checked?"1":"0");a+="&newwindow="+(d.newwid.checked?"yes":"no");a+="&lang_ops="+(document.getElementById("lang_ops0").checked?"1":"0");for(i=1;i<9;i++){a+=","+(document.getElementById("lang_ops"+i).checked?"1":"0")}a+="&rand="+b;xmlhttp=startHTTP();xmlhttp.open("POST","nzbbrowse_ajax.php?action=updatesett",true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlhttp.send(a);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){if(xmlhttp.responseText=="0"){window.location.reload(true)}else{if(xmlhttp.responseText=="1"){alert("Inproper request elements received!")}else{alert(xmlhttp.responseText)}}var e=new Date();statScript="takeSettings";statTime=(e.getTime()-b)/1000+" s";statMem="-"}else{if(xmlhttp.readyState==4&&xmlhttp.status!=200){alert("The server did not respond. Please try again later.")}}};return false}function takeDelete(f){var a=-1;for(i=0;i<f.reasontype.length;i++){if(f.reasontype[i].checked){a=f.reasontype[i].value}}if(a==-1){alert("Please make a selection!");return false}if(document.forms.deletenzb["reason["+a+"]"].value==""){alert("Please give a reason!");return false}var c=document.forms.deletenzb["reason["+a+"]"].value;f.subm.disabled="disabled";f.subm.style.color="grey";f.subm.value="Submitting...";f.canc.disabled="disabled";f.canc.style.color="grey";var b;var e=new Date();var d=e.getTime();b="id="+f.id.value;b+="&log=yes";b+="&reasontype="+a;b+="&reason="+encodeURIComponent(c);b+="&ajax=1";b+="&r="+d;xmlhttp=startHTTP();xmlhttp.open("POST","nzbdelete.php",true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlhttp.send(b);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){if(xmlhttp.responseText.substr(-1)==0){document.getElementById("floater_inner").innerHTML=xmlhttp.responseText.substr(0,(xmlhttp.responseText.length-1));positionObj("floater",event,true)}else{if(xmlhttp.responseText.substr(-1)==1){document.getElementById("floater_inner").innerHTML=xmlhttp.responseText.substr(0,(xmlhttp.responseText.length-1));document.getElementById("name"+f.id.value).innerHTML=strip_tags(document.getElementById("name"+f.id.value).innerHTML);document.getElementById("name"+f.id.value).style.textDecoration="line-through";positionObj("floater",event,true)}else{alert("Your request wasn't processed properly....I think")}}var g=new Date();statScript="takeDelete";statTime=(g.getTime()-d)/1000+" s";statMem="-"}else{if(xmlhttp.readyState==4&&xmlhttp.status!=200){alert("The server did not respond. Please try again later.")}}};return false}function startEdit(f,e,d){var c=new Date();var b=c.getTime();var a=getMouseButton(d);if(a==2){if(/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){setTimeout("window.open(obj.href)",100)}else{window.open(e.href)}}if(a!=1){return false}showLoader(d);xmlhttp=startHTTP();xmlhttp.open("GET","nzbbrowse_ajax.php?action=edit&id="+f+"&rand="+b,true);xmlhttp.send();xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){if(xmlhttp.responseText.substr(xmlhttp.responseText.length-1)==0){document.getElementById("floater_inner").innerHTML=xmlhttp.responseText.substr(0,(xmlhttp.responseText.length-1));positionObj("floater",d,true)}else{if(xmlhttp.responseText.substr(xmlhttp.responseText.length-1)==1){document.getElementById("floater_inner").innerHTML=xmlhttp.responseText.substr(0,(xmlhttp.responseText.length-1));runjss(1);positionObj("floater",d,true)}else{alert("Your request wasn't processed properly....I think")}}var g=new Date();statScript="startEdit";statTime=(g.getTime()-b)/1000+" s";statMem="-"}else{if(xmlhttp.readyState==4&&xmlhttp.status!=200){document.getElementById("floater_inner").innerHTML="The server did not respond. Please try again later."}}}}function takeEdit(e){var b;var d=new Date();var c=d.getTime();b="id="+e.id.value;b+="&name="+encodeURIComponent(e.name.value);b+="&url="+encodeURIComponent(e.url.value);for(i=0;i<e.format.length;i++){if(e.format[i].checked){b+="&format="+e.format[i].value}}for(i=0;i<e.lang_ops.length;i++){if(e.lang_ops[i].checked){b+="&lang_ops="+e.lang_ops[i].value}}b+="&lang_no="+(e.lang_no.checked?"yes":"");b+="&subtitled="+(e.subtitled.checked?"yes":"");b+="&genre_field="+encodeURIComponent(document.editnzb.genre_field.value);b+="&addtext="+encodeURIComponent(e.addtext.value);b+="&descr="+encodeURIComponent(e.descr.value);for(i=0;i<e.nfoaction.length;i++){if(e.nfoaction[i].checked){b+="&nfoaction="+e.nfoaction[i].value}}b+="&category="+e.category.value;var a=document.getElementById(formPage+"_subidspan").innerHTML.split(",");for(i=0;i<a.length;i++){if(document.getElementById(formPage+"_subchk"+a[i]).checked){b+="&sub"+a[i]+"=yes"}}b+="&ajax=1";b+="&rand="+c;document.getElementById(formPage+"_submit").value="Processing...";document.getElementById(formPage+"_submit").disabled="disabled";document.getElementById(formPage+"_submit").style.color="gray";document.getElementById(formPage+"_revert").disabled="disabled";document.getElementById(formPage+"_revert").style.color="gray";xmlhttp=startHTTP();xmlhttp.open("POST","takenzbedit.php",true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlhttp.send(b);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){if(xmlhttp.responseText.substr(xmlhttp.responseText.length-1)==1){var f=strip_tags(document.getElementById("name"+e.id.value).innerHTML).split("&nbsp;");f=f[f.length-1];document.getElementById("name"+e.id.value).innerHTML=document.getElementById("name"+e.id.value).innerHTML.replace(f,e.name.value)}document.getElementById("floater_inner").innerHTML=xmlhttp.responseText.substr(0,xmlhttp.responseText.length-1);positionObj("floater",event,true);var g=new Date();statScript="takeEdit";statTime=(g.getTime()-c)/1000+" s";statMem="-"}else{if(xmlhttp.readyState==4&&xmlhttp.status!=200){document.getElementById("floater_inner").innerHTML="The server did not respond. Please try again later."}}};return false}function takeSearch_JSON(d,c){if(d.searchtext.value==""){alert("Please enter a search term first");return false}if(userBrowseJS[1]==0){return true}document.getElementById("sugbox").style.display="none";showLoader(c);document.getElementById("searchtext").value=d.searchtext.value.ucwords();var b=new Date();var a="action=search_json";a+="&searchwhere="+d.searchwhere.value;a+="&searchtext="+encodeURIComponent(d.searchtext.value.ucwords());a+="&cat="+d.cat.value;a+="&listname="+d.listname.value;for(i=0;i<9;i++){if(document.getElementById("lang"+i).checked){a+="&lang"+i+"=1"}}a+="&rand="+b.getTime();xmlhttp=startHTTP();xmlhttp.open("POST","nzbbrowse_ajax.php",true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlhttp.send(a);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){if(xmlhttp.responseText.indexOf('"table"')!=-1){var e=JSON.parse(xmlhttp.responseText);document.getElementById("pagertop").innerHTML=decodeURIComponent(e.top);document.getElementById("pagerbot").innerHTML=decodeURIComponent(e.bot);showTable(e.table);statScript="search_JSON";statTime=e.time;statMem=decodeURIComponent(e.mem);document.getElementById("lastQuery").innerHTML="<b>Query (search_JSON):</b> "+decodeURIComponent(e.query);window.location=location.protocol+"//"+location.host+location.pathname+location.search+"#schplch";document.getElementById("sresult").innerHTML='<h2>Search results for "'+decodeURIComponent(e.sterm)+'":</h2>';document.getElementById("sresult").style.display="block";document.title="NZBs'R'US :: Search results for: "+decodeURIComponent(e.sterm)}else{var e=JSON.parse(xmlhttp.responseText);document.getElementById("lastQuery").innerHTML="<b>Query (search_JSON):</b> "+decodeURIComponent(e.query);document.getElementById("floater_inner").innerHTML=decodeURIComponent(e.noresults)}positionObj("floater",c,true)}else{if(xmlhttp.readyState==4&&xmlhttp.status!=200){document.getElementById("floater_inner").innerHTML="The server did not respond. Please try again later."}}};return false}function takeSearch(d,c){if(d.searchtext.value==""){alert("Please enter a search term first");return false}if(userBrowseJS[1]==0){return true}document.getElementById("sugbox").style.display="none";showLoader(c);document.getElementById("searchtext").value=d.searchtext.value.ucwords();var b=new Date();var a="action=search";a+="&searchwhere="+d.searchwhere.value;a+="&searchtext="+encodeURIComponent(d.searchtext.value.ucwords());a+="&cat="+d.cat.value;a+="&listname="+d.listname.value;for(i=0;i<9;i++){a+="&lang"+i+"="+(document.getElementById("lang"+i).checked?"1":"")}a+="&rand="+b.getTime();xmlhttp=startHTTP();xmlhttp.open("POST","nzbbrowse_ajax.php",true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlhttp.send(a);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){if(xmlhttp.responseText.indexOf("</span>")!=-1){document.getElementById("nzbtable").innerHTML=xmlhttp.responseText;document.getElementById("pagertop").innerHTML=document.getElementById("newpagertop").innerHTML;document.getElementById("pagerbot").innerHTML=document.getElementById("newpagerbot").innerHTML;window.location=location.protocol+"//"+location.host+location.pathname+location.search+"#schplch";document.getElementById("sresult").innerHTML='<h2>Search results for "'+d.searchtext.value.ucwords()+'":</h2>';document.getElementById("sresult").style.display="block";document.title="NZBs'R'US :: Search results for: \""+d.searchtext.value.ucwords()+'"'}else{document.getElementById("floater_inner").innerHTML=xmlhttp.responseText}positionObj("floater",c,true)}else{if(xmlhttp.readyState==4&&xmlhttp.status!=200){document.getElementById("floater_inner").innerHTML="The server did not respond. Please try again later."}}};return false}var modClick=false;var objValue="";var objTerm="";var oriSrch="";var lastChar="";var sugAct=false;var sugID=-1;var sug_get="srchsug";function srchsug(j,h){var c=0;for(i=4;i>=0;i--){if(document.getElementById("sug"+i)!=null){c=i;break}}var a=(h.keyCode?h.keyCode:h.charCode);if((a==38)||(a==40)||(a==13)){if(a==13){addSug()}else{if(a==38){if(sugID==0){setSug(-1);document.getElementById("searchtext").value=oriSrch}else{if(sugID==-1){setSug(c)}else{setSug(sugID-1)}}}else{if(sugID==c){setSug(-1);document.getElementById("searchtext").value=oriSrch}else{setSug(sugID+1)}}}return false}objValue=j.value.trim();if(objValue!=objTerm){var b=new RegExp("^[0-9a-z +<>()\"'.:_~-]+$","i");if(!b.test(objValue)){var f="";for(i=0;i<objValue.length;i++){if(b.test(objValue[i])){f+=objValue[i]}}document.getElementById("searchtext").value=f;objValue=f}}oriSrch=j.value;if(objValue.length>=3){if(objValue==objTerm){return false}if(sugAct){return false}sugAct=true;objTerm=objValue;var d=objValue.replace('"',"");d=objValue.replace("<","");d=objValue.replace(">","");d=objValue.replace(",","");d=objValue.replace("."," ");var g=new Date();xmlhttp=startHTTP();xmlhttp.open("GET","nzbbrowse_ajax.php?action="+sug_get+"&term="+encodeURIComponent(d)+"&rand="+g.getTime(),true);xmlhttp.send();xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){if(xmlhttp.responseText!=0){var m="<ul>";var e=d.toLowerCase().split(" ");var l=d.ucwords().split(" ").rsortWordLen();var k=JSON.parse(xmlhttp.responseText);for(i=0;i<k.length;i++){if(k[i]==null){continue}k[i]=decodeURIComponent(k[i]).ucwords().replace("&Amp;","&");sugOri=k[i];m+='<li class="sug" id="sug'+i+'" onmouseover="setSug('+i+', true);" onclick="addSug();">';for(s=0;s<e.length;s++){k[i]=k[i].replace(e[s],"<b>"+e[s]+"</b>")}for(s=0;s<l.length;s++){k[i]=k[i].replace(l[s],"<b>"+l[s]+"</b>")}m+=k[i];m+="</li>"}m+="</ul>";document.getElementById("sugbox").innerHTML=m;document.getElementById("sugbox").style.left=document.getElementById("searchtext").offsetLeft+"px";document.getElementById("sugbox").style.display="block";sugID=-1;sugAct=false;if(objValue!=objTerm){srchsug(j,h)}}else{document.getElementById("sugbox").style.display="none";sugID=-1;sugAct=false}}else{if(xmlhttp.readyState==4&&xmlhttp.status!=200){sugAct=false}}}}else{document.getElementById("sugbox").style.display="none";sugAct=false}}function setSug(b,a){for(i=0;i<5;i++){if(document.getElementById("sug"+i)){document.getElementById("sug"+i).setAttribute("class","sug")}}sugID=b;if(b>=0){sugName=strip_tags(document.getElementById("sug"+b).innerHTML);if(!a){document.getElementById("searchtext").value=sugName.replace("&amp;","&")}document.getElementById("sug"+b).setAttribute("class","sugHover")}}function addSug(){if(modClick){modClick=false;return false}if(sugID!=-1){sugName=strip_tags(document.getElementById("sug"+sugID).innerHTML);document.getElementById("searchtext").value=sugName.replace("&amp;","&");document.getElementById("sugbox").style.display="none";document.getElementById("sugbox").innerHTML="";oriSrch="";sugID=-1;sugAct=false}}function remSug(a){modClick=true;var b=new Date();xmlhttp=startHTTP();xmlhttp.open("GET","nzbbrowse_ajax.php?action=remsug&term="+encodeURIComponent(a)+"&rand="+b.getTime(),true);xmlhttp.send();xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){modClick=false;if(xmlhttp.responseText==0){alert("Done")}else{alert("Failed: "+xmlhttp.responseText)}}}}function pager_JSON(c){if(userBrowseJS[2]==0){return true}showLoader(window.event);var a=c.href.split(".php?");var b=new Date();xmlhttp=startHTTP();xmlhttp.open("GET","nzbbrowse_ajax.php?action=pager_json&"+a[1]+"&rand="+b.getTime(),true);xmlhttp.send();xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){if(xmlhttp.responseText.indexOf('"table"')!=-1){var d=JSON.parse(xmlhttp.responseText);document.getElementById("pagertop").innerHTML=decodeURIComponent(d.top);document.getElementById("pagerbot").innerHTML=decodeURIComponent(d.bot);showTable(d.table);statScript="pager_JSON";statTime=d.time;statMem=decodeURIComponent(d.mem);document.getElementById("lastQuery").innerHTML="<b>Query (pager_JSON):</b> "+decodeURIComponent(d.query);window.location=location.protocol+"//"+location.host+location.pathname+location.search+"#pagertop"}else{document.getElementById("floater_inner").innerHTML=xmlhttp.responseText;positionObj("floater",event,true)}}else{if(xmlhttp.readyState==4){document.getElementById("floater_inner").innerHTML="The server did not respond. Please try again later."}}return false}}function pager(c){if(userBrowseJS[2]==0){return true}showLoader(event);var a=c.href.split(".php?");var b=new Date();xmlhttp=startHTTP();xmlhttp.open("GET","nzbbrowse_ajax.php?action=pager&"+a[1]+"&rand="+b.getTime(),true);xmlhttp.setRequestHeader("Content-Type","text/xml");xmlhttp.send();xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){if(xmlhttp.responseText.indexOf("</span>")!=-1){document.getElementById("nzbtable").innerHTML=xmlhttp.responseText;document.getElementById("pagertop").innerHTML=document.getElementById("newpagertop").innerHTML;document.getElementById("pagerbot").innerHTML=document.getElementById("newpagerbot").innerHTML;window.location=location.protocol+"//"+location.host+location.pathname+location.search+"#pagertop"}else{document.getElementById("floater_inner").innerHTML=xmlhttp.responseText;positionObj("floater",event,true)}}else{if(xmlhttp.readyState==4&&xmlhttp.status!=200){document.getElementById("floater_inner").innerHTML="The server did not respond. Please try again later. Status: "+xmlhttp.status}}return false}}function close_float(a){document.getElementById("floater").style.display="none";a.style.display="none"}function showTable(b){var f='<div id="nzbtabletop" title="Click here to close the info frame" onclick="close_float(this)"></div>';f+='<div id="floater"><div id="floater_inner"></div></div>';var k=JSON.parse(b);var e=location.pathname;var h=decodeURIComponent(k.nfolink);delete k.nfolink;var d=decodeURIComponent(k.modstuf);delete k.modstuf;var c=decodeURIComponent(k.nocomlk);delete k.nocomlk;var a=decodeURIComponent(k.docomlk);delete k.docomlk;var g=decodeURIComponent(k.numlink);delete k.numlink;var j="";for(nRow in k){j=template;for(key in k[nRow]){if((key=="nzbid")||(key=="commcnt")||(key=="numfile")){continue}if(key=="nfoshow"){j=j.replace("{nfolink}",((k[nRow]["nfoshow"]!=0)?h:""));continue}if(key=="commnum"){j=j.replace("{comlink}",((k[nRow]["commnum"]!=0)?a:c));j=j.replace("{commnum}",(k[nRow]["commnum"]==1?k[nRow]["commnum"]+" Cmt":k[nRow]["commnum"]+" Cmts"))}if(key=="filenum"){j=j.replace("{filenum}",g)}while(j.indexOf("{"+key+"}")!=-1){j=j.replace("{"+key+"}",decodeURIComponent(k[nRow][key]))}}j=j.replace(/{iRow}/gi,nRow);j=j.replace(/{target}/gi,e);j=j.replace(/{modstuf}/gi,d);j=j.replace(/{nzbid}/gi,k[nRow]["nzbid"]);f+=j}document.getElementById("nzbtable").innerHTML=f}function showSearchLangs(){var e=new Array("ALL","[SUBBED]","MULTI","EN","GER","DUT","ASIAN","OTHER","FRENCH");var d='Language(s): <span id="schLangs" style="font-weight: bold; cursor: pointer;" onMouseOver="showLangs(true)" onMouseOut="showLangs(false)">';var a=" &nabla;</span>";if(!document.getElementById("lang0").checked){var b=d+e[0]+a;document.getElementById("langCell0").setAttribute("class","langCellSel");for(i=1;i<9;i++){document.getElementById("lang"+i).checked="";document.getElementById("langCell"+i).setAttribute("class","langCell")}}else{document.getElementById("langCell0").setAttribute("class","langCell");var b=d;var f=0;for(i=2;i<9;i++){if(document.getElementById("lang"+i).checked){b+=(f!=0?", ":"")+e[i];document.getElementById("langCell"+i).setAttribute("class","langCellSel");f++}else{document.getElementById("langCell"+i).setAttribute("class","langCell")}}if(f==0){document.getElementById("lang0").checked="";showSearchLangs();return}else{if(document.getElementById("lang1").checked){b+=" - "+e[1];document.getElementById("langCell1").setAttribute("class","langCellSel")}else{document.getElementById("langCell1").setAttribute("class","langCell")}b+=a}}document.getElementById("search_langs").innerHTML=b}function setUserLangs(a){a=a.split(",");if(a[0]!=0){for(i=0;i<a.length;i++){document.getElementById("lang"+i).checked=(a[i]==1?"checked":"")}}showSearchLangs()}function setSearchLang(a){if(a==0){document.getElementById("lang0").checked=""}else{document.getElementById("lang0").checked="checked";document.getElementById("lang"+a).checked=(document.getElementById("lang"+a).checked?"":"checked")}showSearchLangs()}function showLangs(a){if(!a){showLangBlck=false;setTimeout("hideLangs()",200)}else{if(moveLangBlck){if(document.getElementById("schLangs").offsetLeft==0){document.getElementById("search_langOps").style.left="385px"}else{document.getElementById("search_langOps").style.left=document.getElementById("schLangs").offsetLeft+document.getElementById("schLangs").offsetWidth+8+"px"}}document.getElementById("search_langOps").style.top="25px";document.getElementById("search_langOps").style.display="table";showLangBlck=true;moveLangBlck=false}}function hideLangs(){if(!showLangBlck){document.getElementById("search_langOps").style.display="none";moveLangBlck=true}}function setSearch(){if(varsGET.searchtext!=undefined){fix_search()}if(varsGET.cat!=undefined){document.getElementById("cat").value=varsGET.cat}if(varsGET.lang0!=undefined){for(i=0;i<9;i++){document.getElementById("lang"+i).checked=(varsGET["lang"+i]==1?"checked":"")}}if(varsGET.searchwhere!=undefined){document.getElementById("searchwhere").value=varsGET.searchwhere}if(varsGET.listname!=undefined){document.getElementById("listname").value=varsGET.listname}if(userBrowseJS[0]==1){fix_search()}if(typeof(localStorage)!="undefined"){if(localStorage.getItem("savedSearch"+CURUSER_ID)!=null){var a=document.getElementById("moreSearch");a.setAttribute("class","sideblock_arrdown");a.setAttribute("title","Show Saved Searches");a.setAttribute("onclick","showSavedSearch();");a.removeAttribute("style");a.style.cursor="pointer"}}}function ajaxStatus(){alert("Script : "+statScript+"\nTime   : "+statTime+" s\nMem   : "+statMem)}function saveSearch(){var b=document.getElementById("searchtext").value;var d=false;document.getElementById("sugbox").innerHTML="";document.getElementById("sugbox").style.display="none";if((b=="")||b.length<3){alert("Search could not be saved: Search too short!");return false}if(CURUSER_ID==0){alert("Search could not be saved: You are not a registered user!");return false}if(typeof(localStorage)=="undefined"){alert("Your browser does not support HTML5 localStorage. Try upgrading.");return false}else{var a=new Array();if(localStorage.getItem("savedSearch"+CURUSER_ID)!=null){savedSearches=localStorage.getItem("savedSearch"+CURUSER_ID).split(";");for(i=0;i<savedSearches.length;i++){if(savedSearches[i]!=""){a.push(savedSearches[i])}}}if(a.length!=0){d=true}a.push(b);try{localStorage.setItem("savedSearch"+CURUSER_ID,a.join(";"))}catch(f){if(f==QUOTA_EXCEEDED_ERR){alert("Search could not be saved: Too many saved searches!");return false}}if(!d){var c=document.getElementById("moreSearch");c.setAttribute("class","sideblock_arrdown");c.setAttribute("title","Show Saved Searches");c.setAttribute("onclick","showSavedSearch();");c.removeAttribute("style");c.style.cursor="pointer"}}}function showSavedSearch(){if(typeof(localStorage)=="undefined"){alert("Your browser does not support HTML5 localStorage. Try upgrading.");return false}if(CURUSER_ID==0){alert("Feature not available: You are not a registered user!");return false}if(localStorage.getItem("savedSearch"+CURUSER_ID)==null){alert("No searches were saved in this browser!");return false}var b="<ul>";var a=localStorage.getItem("savedSearch"+CURUSER_ID).split(";").sort();for(i=0;i<a.length;i++){if(a[i]!=""){b+="<li>";b+='<span id="sug'+i+'" onmouseover="setSug('+i+', true);" onclick="addSug();" style="cursor: pointer;">'+a[i]+"</span>";b+=' <span class="remSavSrch" onclick="remSavedSearch('+i+')" title="Remove saved search">[ &mdash; ]</span>';b+="</li>"}}b+="</ul>";document.getElementById("sugbox").innerHTML=b;document.getElementById("sugbox").style.left=document.getElementById("searchtext").offsetLeft+"px";document.getElementById("sugbox").style.display="block";saveSearchOn=true}function remSavedSearch(d){if(typeof(localStorage)=="undefined"){alert("Your browser does not support HTML5 localStorage. Try upgrading.");return false}if(CURUSER_ID==0){alert("Feature not available: You are not a registered user!");return false}if(localStorage.getItem("savedSearch"+CURUSER_ID)==null){alert("No searches were saved in this browser!");return false}var c=new Array();var a=localStorage.getItem("savedSearch"+CURUSER_ID).split(";");for(i=0;i<a.length;i++){if(i!=d){c.push(a[i])}}if(c.length==0){localStorage.removeItem("savedSearch"+CURUSER_ID);document.getElementById("sugbox").innerHTML="";document.getElementById("sugbox").style.display="none";var b=document.getElementById("moreSearch");b.removeAttribute("style");b.removeAttribute("class");b.removeAttribute("title");b.removeAttribute("onclick");b.style.display="none"}else{localStorage.setItem("savedSearch"+CURUSER_ID,c.join(";"));showSavedSearch()}}function modImg(a,b){modImgFile=a;setTimeout(function(){modImgDo(a,b)},500)}function modImgDo(a,b){if((a!="")&&(document.getElementById("modImg")===null)&&(modImgFile==a)){imghttp=startHTTP();imghttp.open("HEAD",a+".jpeg",false);imghttp.send();if(imghttp.status==200){var c=b.pageY-window.scrollY-5;var d=b.pageX-window.scrollX;document.getElementById("nzbtable").innerHTML+='<div id="modImg" class="floater" style="display: inline-block; position: fixed; z-index: 1; top: '+c+"px; left: "+d+'px;"><div id="modImgLoad" class="floater_inner" style="padding: 3px;"><b>Loading...</b></div><img src="'+a+'.jpeg" height="150" onload="modImgShow(this);" style="display: none; border: 1px solid #226688;" /></div>'}else{if(imghttp.status==404){return}}}}function modImgShow(a){if(document.getElementById("floater").style.display!="inline-block"){document.getElementById("modImgLoad").style.display="none";a.style.display="block"}else{document.getElementById("nzbtable").removeChild(document.getElementById("modImg"))}};
