function as_click(){re_purchase_tag=true;re_("6615m-zfaf8zu1l9");}
if(typeof window.addEventListener!='undefined')
{window.addEventListener('load',adsense_init,false);}
else if(typeof document.addEventListener!='undefined')
{document.addEventListener('load',adsense_init,false);}
else if(typeof window.attachEvent!='undefined')
{window.attachEvent('onload',adsense_init);}
else
{if(typeof window.onload=='function')
{var existing=onload;window.onload=function()
{existing();adsense_init();};}
else
{window.onload=adsense_init;}}
function adsense_init(){if(document.all){var el=document.getElementsByTagName("iframe");for(var i=0;i<el.length;i++){if(el[i].src.indexOf('googlesyndication.com')>-1){el[i].onfocus=as_click;}}}else{window.addEventListener('beforeunload',doPageExit,false);window.addEventListener('mousemove',getMouse,true);}}
var px;var py;function getMouse(e){px=e.pageX;py=e.clientY;}
function findY(obj){var y=0;while(obj){y+=obj.offsetTop;obj=obj.offsetParent;}
return(y);}
function findX(obj){var x=0;while(obj){x+=obj.offsetLeft;obj=obj.offsetParent;}
return(x);}
function doPageExit(e){ad=document.getElementsByTagName("iframe");for(i=0;i<ad.length;i++){var adLeft=findX(ad[i]);var adTop=findY(ad[i]);var inFrameX=(px>(adLeft-10)&&px<(parseInt(adLeft)+parseInt(ad[i].width)+15));var inFrameY=(py>(adTop-10)&&py<(parseInt(adTop)+parseInt(ad[i].height)+10));if(inFrameY&&inFrameX){re_purchase_tag=true;re_("6615m-zfaf8zu1l9");}}}
function get_client(){if(window.XMLHttpRequest){try{xmlHttpRequest=new XMLHttpRequest();}
catch(e){return null;}}
else if(window.ActiveXObject){try{xmlHttpRequest=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{xmlHttpRequest=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){return null;}}}
else return null;return xmlHttpRequest;}
function get_url(url){client=get_client();if(client==null){alert('client is null');}
client.onreadystatechange=function(){try{if(client.readyState==4){if(client.status==200){process(client.responseText);}
else{alert('retcode != 200');}}}
catch(e){alert('cannot determine client state')}}
client.open("GET",url,true);try{client.send(null);}
catch(e){alert('cannot send request');}}
function process(text){mydiv=document.getElementById('rbody');mydiv.innerHTML=text;window.scroll(0,0);}
function sack(file){this.xmlhttp=null;this.resetData=function(){this.method="POST";this.queryStringSeparator="?";this.argumentSeparator="&";this.URLString="";this.encodeURIString=true;this.execute=false;this.element=null;this.elementObj=null;this.requestFile=file;this.vars=new Object();this.responseStatus=new Array(2);};this.resetFunctions=function(){this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.onError=function(){};this.onFail=function(){};};this.reset=function(){this.resetFunctions();this.resetData();};this.createAJAX=function(){if(document.all){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e1){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){this.xmlhttp=null;}}}
if(!this.xmlhttp){if(typeof XMLHttpRequest!="undefined"){this.xmlhttp=new XMLHttpRequest();}else{this.failed=true;}}};this.setVar=function(name,value){this.vars[name]=Array(value,false);};this.encVar=function(name,value,returnvars){if(true==returnvars){return Array(encodeURIComponent(name),encodeURIComponent(value));}else{this.vars[encodeURIComponent(name)]=Array(encodeURIComponent(value),true);}}
this.processURLString=function(string,encode){encoded=encodeURIComponent(this.argumentSeparator);regexp=new RegExp(this.argumentSeparator+"|"+encoded);varArray=string.split(regexp);for(i=0;i<varArray.length;i++){urlVars=varArray[i].split("=");if(true==encode){this.encVar(urlVars[0],urlVars[1]);}else{this.setVar(urlVars[0],urlVars[1]);}}}
this.createURLString=function(urlstring){if(this.encodeURIString&&this.URLString.length){this.processURLString(this.URLString,true);}
if(urlstring){if(this.URLString.length){this.URLString+=this.argumentSeparator+urlstring;}else{this.URLString=urlstring;}}
this.setVar("rndval",new Date().getTime());urlstringtemp=new Array();for(key in this.vars){if(false==this.vars[key][1]&&true==this.encodeURIString){encoded=this.encVar(key,this.vars[key][0],true);delete this.vars[key];this.vars[encoded[0]]=Array(encoded[1],true);key=encoded[0];}
urlstringtemp[urlstringtemp.length]=key+"="+this.vars[key][0];}
if(urlstring){this.URLString+=this.argumentSeparator+urlstringtemp.join(this.argumentSeparator);}else{this.URLString+=urlstringtemp.join(this.argumentSeparator);}}
this.runResponse=function(){eval(this.response);}
this.runAJAX=function(urlstring){if(this.failed){this.onFail();}else{this.createURLString(urlstring);if(this.element){this.elementObj=document.getElementById(this.element);}
if(this.xmlhttp){var self=this;if(this.method=="GET"){totalurlstring=this.requestFile+this.queryStringSeparator+this.URLString;this.xmlhttp.open(this.method,totalurlstring,true);}else{this.xmlhttp.open(this.method,this.requestFile,true);try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(e){}}
this.xmlhttp.onreadystatechange=function(){switch(self.xmlhttp.readyState){case 1:self.onLoading();break;case 2:self.onLoaded();break;case 3:self.onInteractive();break;case 4:self.response=self.xmlhttp.responseText;self.responseXML=self.xmlhttp.responseXML;self.responseStatus[0]=self.xmlhttp.status;self.responseStatus[1]='';if(self.execute){self.runResponse();}
if(self.elementObj){elemNodeName=self.elementObj.nodeName;elemNodeName.toLowerCase();if(elemNodeName=="input"||elemNodeName=="select"||elemNodeName=="option"||elemNodeName=="textarea"){self.elementObj.value=self.response;}else{self.elementObj.innerHTML=self.response;}}
if(self.responseStatus[0]=="200"){self.onCompletion();}else{self.onError();}
self.URLString="";break;}};this.xmlhttp.send(this.URLString);}}};this.reset();this.createAJAX();}
window.ajax=new sack();window.dlajax=new sack();function vote(themeid,link){window.ajax.vars={};window.ajax.setVar("ajax",1);window.ajax.method="POST";window.ajax.requestFile="/upload.php";window.ajax.execute=true;window.ajax.setVar("vote_id",themeid);window.ajax.runAJAX();link.innerHTML='';}
function updateData(){var ins=document.getElementsByTagName('ins');var ids='';if(ins.length>0){for(i=0;i<ins.length;i++){ids+=((ids!='')?',':'')+ins[i].id.substr(2);}
window.ajax.vars={};window.ajax.setVar("ajax",1);window.ajax.method="POST";window.ajax.requestFile="/upload.php";window.ajax.execute=true;window.ajax.setVar("d_ids",ids);window.ajax.runAJAX();}}
function countdownload(fileurl){window.dlajax.setVar("zzz",fileurl);window.dlajax.setVar("ajax",1);window.dlajax.method="POST";window.dlajax.execute=false;window.dlajax.requestFile="http://count.onsmartphone.com/";setTimeout('window.dlajax.runAJAX()',2000);}
