function GetXmlHttpObject(){var http=false;if(typeof ActiveXObject!='undefined'){try{http=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{http=new ActiveXObject("Microsoft.XMLHTTP");}
catch(E){http=false;}}}else if(XMLHttpRequest){try{http=new XMLHttpRequest();}
catch(e){http=false;}}
return http;}
var ratingxmlhttp=GetXmlHttpObject();var favxmlhttp=GetXmlHttpObject();var randomsxmlhttp=GetXmlHttpObject();var shoutlxmlhttp=GetXmlHttpObject();var shoutsxmlhttp=GetXmlHttpObject();var posloadxmlhttp=GetXmlHttpObject();var possavexmlhttp=GetXmlHttpObject();function rateGame(ratinglink){ratingxmlhttp.onreadystatechange=ratingStateChanged;ratingxmlhttp.open("GET",ratinglink,true);ratingxmlhttp.send(null);}
function ratingStateChanged(){if(ratingxmlhttp.readyState==4){document.getElementById("ratingspan").innerHTML=ratingxmlhttp.responseText;}}
function position_load()
{var date=new Date();var random=date.getTime().toString();var load_link="/position.php?action=load&random="+random;posloadxmlhttp.onreadystatechange=position_load_oper;posloadxmlhttp.open("GET",load_link,true);posloadxmlhttp.send(null);}
function position_load_oper()
{if(posloadxmlhttp.readyState==4){var submenu=document.getElementById("lyr1");var anwser=posloadxmlhttp.responseText;if(anwser!="")submenu.style.left=anwser+"px";}}
function random_media()
{var randomxmlhttp=GetXmlHttpObject();var get_random=arguments[0];var random_type=arguments[1];var parent_id=arguments[2];var div_id=arguments[3];var views_on=0;if(arguments[4])views_on=arguments[4];var date=new Date();var random=date.getTime().toString();var link="/index.php?get_random="+get_random+"&random_type="+random_type+"&parent_id="+parent_id+"&views_on="+views_on;randomxmlhttp.open("GET",link+"&random="+random,true);randomxmlhttp.onreadystatechange=function()
{if(randomxmlhttp.readyState==4&&randomxmlhttp.status==200){var random_box=document.getElementById(div_id);random_box.innerHTML=randomxmlhttp.responseText;}};randomxmlhttp.send(null);}
function random_media_post(get_random,random_type,parent_id,div_id)
{var date=new Date();var random=date.getTime().toString();var link="/index.php";var params="get_random="+get_random+"&random_type="+random_type+"&parent_id="+parent_id;randomxmlhttp.open("POST",link,true);randomxmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");randomxmlhttp.setRequestHeader("Content-length",params.length);randomxmlhttp.setRequestHeader("Connection","close");randomxmlhttp.onreadystatechange=function()
{if(randomxmlhttp.readyState==4&&randomxmlhttp.status==200){var random_box=document.getElementById(div_id);random_box.innerHTML=randomxmlhttp.responseText;}};randomxmlhttp.send(params);}
function random_static(static_random,static_type,random_type,div_id)
{var date=new Date();var random=date.getTime().toString();var link="/index.php?static_random="+static_random+"&static_type="+static_type+"&random_type="+random_type;randomsxmlhttp.open("GET",link+"&random="+random,true);randomsxmlhttp.onreadystatechange=function()
{if(randomsxmlhttp.readyState==4&&randomsxmlhttp.status==200){var random_box=document.getElementById(div_id);random_box.innerHTML=randomsxmlhttp.responseText;}};randomsxmlhttp.send(null);}
function shoutbox_refresh()
{var date=new Date();var random=date.getTime().toString();var link="/index.php?shout_query=load";shoutlxmlhttp.open("GET",link+"&random="+random,true);shoutlxmlhttp.onreadystatechange=function()
{if(shoutlxmlhttp.readyState==4&&shoutlxmlhttp.status==200){var shoutbox=document.getElementById("shoutbox");shoutbox.innerHTML=shoutlxmlhttp.responseText;}};shoutlxmlhttp.send(null);}
function shoutbox_send()
{var date=new Date();var random=date.getTime().toString();var link="/index.php?shout_query=save";var shout_nick=document.getElementById("shout_nick");var shout_text=document.getElementById("shout_text");var params="shout_nick="+shout_nick.value+"&shout_text="+shout_text.value;shoutsxmlhttp.open("POST",link,true);shoutsxmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");shoutsxmlhttp.setRequestHeader("Content-length",params.length);shoutsxmlhttp.setRequestHeader("Connection","close");shoutsxmlhttp.onreadystatechange=function()
{if(shoutsxmlhttp.readyState==4&&shoutsxmlhttp.status==200){shout_text.value="";shoutbox_refresh();}};shoutsxmlhttp.send(params);}
function position_save(alias)
{var date=new Date();var random=date.getTime().toString();var submenu=document.getElementById("lyr1");var save_link="/position.php?action=save&random="+random+"&alias="+alias+"&value="+submenu.offsetLeft;possavexmlhttp.onreadystatechange=position_save_oper;possavexmlhttp.open("GET",save_link,true);possavexmlhttp.send(null);}
function position_save_oper()
{if(possavexmlhttp.readyState==4){}}
function modFav(favlink){favxmlhttp.onreadystatechange=favStateChanged;favxmlhttp.open("GET",favlink,true);favxmlhttp.send(null);}
function favStateChanged(){if(favxmlhttp.readyState==4){document.getElementById("favspan").innerHTML=favxmlhttp.responseText;}}
