function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } function toggle(x){if(document.getElementById(x).style.display=='none'){document.getElementById(x).style.display='';}else{document.getElementById(x).style.display='none';}} function showfeedback(x){document.getElementById(x).style.display='inline';} function showgoodfeedback(){if(document.getElementById('feedback-good').style.display=='none'){document.getElementById('feedback-good').style.display='inline';}else{document.getElementById('feedback-good').style.display='none';} document.getElementById('feedback-bad').style.display='none';document.forms.goodtorrentdiv.comment.focus();} function showbadfeedback(){if(document.getElementById('feedback-bad').style.display=='none'){document.getElementById('feedback-bad').style.display='inline';}else{document.getElementById('feedback-bad').style.display='none';} document.getElementById('feedback-good').style.display='none';document.forms.badtorrentdiv.comment.focus();} var count=500;var result;function go(){var field=document.getElementById('comment');var out=document.getElementById('chrleft') result=count-field.value.length;if(result<20)out.style.color="red";else out.style.color="black";if(result<=-1){field.value=field.value.substring(0,count);alert("Sorry, You have reached maximum text for comment");return false;} out.innerHTML=result;return true;} function checkSelect(select){return(select.selectedIndex>0);} function onSubmitForm(f,ext) {var badName="",allBlank=true,rx;rx=new RegExp("[^\.]\."+ext+"\s*$","i");for(var i=0,e=f.elements;i-1){var splits=data.split("[DONE]");toConsole(splits[1],pass_ID);}else{toConsole(data,pass_ID);}}else{if($obj("loading_layer")){var LDG_LYR=$obj("loading_layer");var TBL_LYR=$obj("trackerstable");LDG_LYR.style.display="inline";TBL_LYR.className='table3 fadedtable';}}}}} function xmlhttpPost(strURL,divID){var xmlHttpReq=false;var self=this;if(window.XMLHttpRequest){self.xmlHttpReq=new XMLHttpRequest();} else if(window.ActiveXObject){self.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");} self.xmlHttpReq.open('GET',strURL,true);self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');self.xmlHttpReq.onreadystatechange=function(){if(self.xmlHttpReq.readyState==4){updatepage(self.xmlHttpReq.responseText,divID);}} self.xmlHttpReq.send(null);} function updatepage(str,divID){document.getElementById(divID).innerHTML=str;}