function AddGuestbook(b,c){var a=document.getElementById("guestbookcomment");if($("#guestbookcomment").length>0){if($("#guestbookcomment").val()!=""){$.ajax({url:"/ajaxhandler.php",data:"addgbcomment=1&tid="+b+"&type="+c+"&cmt="+encodeURIComponent(a.value),success:function(d){processCompletedAjaxResponse(d)}})}}}function rateThread(c,a){var b="ratelinks=1&tid="+c+"&pid="+a;$.ajax({url:"/ajaxhandler.php",data:b,success:function(d){processCompletedAjaxResponse(d)}})}function storyVote(b,c){var a="storyVote=1&tid="+b+"&score="+c;$.ajax({url:"/ajaxhandler.php",data:a,success:function(d){processCompletedAjaxResponse(d)}})}function moderateThread(c,a,d){var b="mod=1&tid="+c+"&pid="+a+"&val="+d;$.ajax({url:"/ajaxhandler.php",data:b,success:function(e){processCompletedAjaxResponse(e)}})}function addGbComment(c,a){var b="addgb=1&tid="+c+"&cmt="+a;$.ajax({url:"/ajaxhandler.php",data:b,success:function(d){processCompletedAjaxResponse(d)}})}function approveGuestbook(a,c){var b="gbapprove="+a+"&id="+c;$.ajax({url:"/ajaxhandler.php",data:b,success:function(d){processCompletedAjaxResponse(d)}})}function getPastEvents(b){var a="geteventid="+b;$.ajax({url:"/ajaxhandler.php",data:a,success:function(c){processCompletedAjaxResponse(c)}})}function removeAdmirer(b){var a="removeadmirer="+b;$.ajax({url:"/ajaxhandler.php",data:a,success:function(c){processCompletedAjaxResponse(c)}})}function removeFavorite(b){var a="removefavorite="+b;$.ajax({url:"/ajaxhandler.php",data:a,success:function(c){processCompletedAjaxResponse(c)}})}function removeFavoriteUser(a){var b="user="+a+"&fav=0";$.ajax({url:"/ajaxhandler.php",data:b,success:function(c){processCompletedAjaxResponse(c)}})}function addFavByUsernameToCat(d,a,b){var c="user="+d+"&fav=1&cat="+a;$.ajax({url:"/ajaxhandler.php",data:c,success:function(e){processCompletedAjaxResponse(e)}})}function removeMailStar(c,b){var a="removestar="+c;if(b==1){a+="&inline=1"}$.ajax({url:"/ajaxhandler.php",data:a,success:function(d){processCompletedAjaxResponse(d)}})}function getUserNotes(b){var a="getnotes=1&destid="+b;$.ajax({url:"/ajaxhandler.php",data:a,success:function(c){processCompletedAjaxResponse(c)}})}function saveUserNotes(a,b){$.post("/ajaxhandler.php?newsavenotes",{savenotes:1,destid:a,notetext:encodeURIComponent(b)},function(d,c,e){processCompletedAjaxResponse(d)})}function setMailStar(c,a){var b="mailstar="+c+"&id="+a;$.ajax({url:"/ajaxhandler.php",data:b,success:function(d){processCompletedAjaxResponse(d)}})}function toggleBlock(a){var b="toggleblock=1&uid="+a;$.ajax({url:"/ajaxhandler.php",data:b,success:function(c){processCompletedAjaxResponse(c)}})}function deleteBlock(a){var b="delblock=1&uid="+a;$.ajax({url:"/ajaxhandler.php",data:b,success:function(c){processCompletedAjaxResponse(c)}})}function getForumPage(c,b){var a="viewfm="+c+"&fm=1&fmpage="+b;$.ajax({url:"/ajaxhandler.php",data:a,success:function(d){processCompletedAjaxResponse(d)}})}function getBlocks(c,a){var b="getblocks=1&blpage="+c+"&recent="+a;$.ajax({url:"/ajaxhandler.php",data:b,success:function(d){processCompletedAjaxResponse(d)}})}function getGuestbookPage(d,c,a){var b="viewgb="+d+"&gb=1&gbpage="+c+"&type="+a;$.ajax({url:"/ajaxhandler.php",data:b,success:function(e){processCompletedAjaxResponse(e)}})}function setRateThread(d,b,a,c){sendRateThread(d,b,a)}function addTag(a,c){var b="addtag=1&tagtype="+c+"&tagid="+a;$.ajax({url:"/ajaxhandler.php",data:b,success:function(d){processCompletedAjaxResponse(d)}})}function delTag(a){var b="deltag=1&tagid="+a+"&refresh=true";$.ajax({url:"/ajaxhandler.php",data:b,success:function(c){processCompletedAjaxResponse(c)}})}function ExpandThread(b){var a=document.getElementById("stub_"+b.toString());if(a!=null){a.style.display="none"}a=document.getElementById("post_"+b.toString());if(a!=null){a.style.display=""}a=document.getElementById("subj_"+b.toString());if(a!=null){a.style.display=""}a=document.getElementById("body_"+b.toString());if(a!=null){a.style.display=""}}function sendRateThread(d,b,a){var c="ratethread=1&tid="+d+"&pid="+b+"&rating="+a;$.ajax({url:"/ajaxhandler.php",data:c,success:function(e){processCompletedAjaxResponse(e)}})}function cancelRateThread(c,a){var b="ratethread=1&tid="+c+"&pid="+a+"&cancel=1";$.ajax({url:"/ajaxhandler.php",data:b,success:function(d){processCompletedAjaxResponse(d)}})}function getXmlHttpRequestObject(){var b=false;if(window.XMLHttpRequest){try{b=new window.XMLHttpRequest}catch(a){try{b=new XMLHttpRequest()}catch(a){}}if(b.overrideMimeType){b.overrideMimeType("text/text")}}else{if(window.ActiveXObject){try{b=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{b=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}}}return b}function makeRequest(b,a,d){var c=getXmlHttpRequestObject();if(!c){if((d!=null)&&(d!="")){document.location.href=d;return true}else{alert("Sorry, a browser error occurred whilst trying to use this feature.\r\nPlease ensure JavaScript is enabled. See the tvChix Technical Support forum for advice on fixing this.");return false}}else{c.onreadystatechange=function(){processAjaxResponse(b,c)};c.open("GET",a,true);c.send(null)}}function processCompletedAjaxResponse(responseText){var s,obj,i,fields,lines=responseText.split(/[\r\n]+/);if(lines[0]=="OK"){for(i=1;i<lines.length;i++){if(lines[i].trim!=""){fields=lines[i].split(/[|]+/);if(fields[0]=="eval"){eval(fields[2])}else{if(fields[0]!=""){obj=document.getElementById(fields[0]);if(obj!=null){if(fields[1]=="html"){obj.innerHTML=fields[2]}else{if(fields[1]=="encodedhtml"){obj.innerHTML=decodeURIComponent(fields[2])}else{if(fields[1]=="encodedvalue"){obj.value=decodeURIComponent(fields[2])}else{if(fields[1]=="href"){obj.href=fields[2]}else{if(fields[1]=="src"){obj.src=fields[2]}else{if(fields[1]=="visibility"){obj.style.visibility=fields[2]}else{if(fields[1]=="display"){obj.style.display=fields[2]}else{if(fields[1]=="class"){obj.className=fields[2]}else{if(fields[1]=="cookedhtml"){s=fields[2];s=s.replace(/<BR>/g,"\n");obj.value=s}}}}}}}}}}}}}}}}function processAjaxResponse(b,c){if(c.readyState==4){if(c.status==200){var a=c.responseText;processCompletedAjaxResponse(a)}else{alert("Sorry, there was an error, or the server did not respond.\r\nPlease try again later.")}}};
