var dynamicxmlhttp;var votehttp;function GetXmlHttpObject(){if(window.XMLHttpRequest){return(window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHttp"): new XMLHttpRequest() );} return null;}function DynamicChanged(){if(dynamicxmlhttp.readyState==4){if(dynamicxmlhttp.status==200){var xmlDoc=dynamicxmlhttp.responseXML.documentElement; var el=document.getElementById("news"); if(el!=null){el.innerHTML=xmlDoc.getElementsByTagName("news")[0].firstChild.nodeValue;} el=document.getElementById("auth"); if(el!=null){el.innerHTML=xmlDoc.getElementsByTagName("auth")[0].firstChild.nodeValue;} var viewscount=xmlDoc.getElementsByTagName("vw"); if(viewscount.length>0){el=document.getElementById("vw"); if(el!=null){el.innerHTML=viewscount[0].firstChild.nodeValue;} el=document.getElementById("vote"); if(el!=null){el.innerHTML=xmlDoc.getElementsByTagName("voting")[0].firstChild.nodeValue;} el=document.getElementById("comments"); if(el!=null){el.innerHTML=xmlDoc.getElementsByTagName("comments")[0].firstChild.nodeValue;} el=document.getElementById("artbot"); if(el!=null){el.innerHTML=xmlDoc.getElementsByTagName("artbot")[0].firstChild.nodeValue;}}}}}function UpdateDynamicData(repid){dynamicxmlhttp=GetXmlHttpObject(); if(dynamicxmlhttp==null){return;} dynamicxmlhttp.onreadystatechange=DynamicChanged; if(repid>0){dynamicxmlhttp.open("GET","/dynamic?repid="+repid,true);}else{dynamicxmlhttp.open("GET","/dynamic",true);} dynamicxmlhttp.send(null);}function voted(){if(votehttp.readyState==4){if(votehttp.status==200){var resp=votehttp.responseText; var el=document.getElementById('vote'); if(el!=null){el.innerHTML=resp;}}}}function vote(urllink){votehttp=GetXmlHttpObject(); if(votehttp==null){return;} votehttp.onreadystatechange=voted; votehttp.open("GET",urllink,true); votehttp.send(null);}
