﻿function addfav(){if(document.all){window.external.addFavorite('http://'+sitedomain,sitedomain+' - Provide with Cheapest game currency farming, and power leveling services')}else if(window.sidebar){window.sidebar.addPanel(sitedomain+' - Provide with Cheapest game currency farming, and power leveling services','http://'+sitedomain,"")}}function buy(d,e,f,g){var h=document.getElementById(d);if(h.value.length<2){alert('please input your character name!');h.focus();return false}else{g.disabled=true;var i=document.getElementById('paypal_payment_info');var j=document.getElementById("selcurrency").value;var k=new Date();var l=0-k.getTimezoneOffset()/60;var m;if(j==1){cc='USD';m=1}if(j==2){cc='EUR';m=rateEur}if(j==3){cc='GBP';m=rateGbp}var n=roundAmount(f*m);i.currency_code.value=cc;i.total.value=n;i.userIP.value=userip;var gamename=document.getElementById('gamename').value;var servername=document.getElementById('servername').value;var proid=d.slice(4);var pro_class=document.getElementById('pro_class'+proid).value;var pro_gold=document.getElementById('pro_gold'+proid).value;var pro_unit=document.getElementById('pro_unit'+proid).value;var gold_unit=document.getElementById('gold_unit'+proid).value;var o="siteid="+siteid+"&gamename="+gamename+"&servername="+servername+"&proname="+encodeURIComponent(e)+"&pro_class="+pro_class+"&pro_gold="+pro_gold+"&pro_unit="+pro_unit+"&gold_unit="+gold_unit+"&price="+n+"&cid="+j+"&char="+encodeURIComponent(h.value)+"&ip="+userip+"&ofix="+ofix+"&tzone="+l+"&cmd=report_order";createXMLHttpRequest();xmlhttp.open("POST","/inc/proxy.asp");xmlhttp.setRequestHeader("content-type","application/x-www-form-urlencoded");xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){var a=xmlhttp.responseXML;var b=a.getElementsByTagName("response")[0].childNodes[0].nodeValue;if(b.length==16){var c=ofix+''+b;i.ordersn.value=c;i.submit()}else{alert("A error occurred,please contact us via livechat.");g.disabled=false}}};xmlhttp.send(o)}}function roundAmount(n){var s=""+Math.round(n*100)/100;var i=s.indexOf('.');if(i<0)return s+".00";var t=s.substring(0,i+1)+s.substring(i+1,i+3);if(i+2==s.length)t+="0";return t}function setcurrency(a){var b=document.getElementById("tbl");var c=b.rows.length;var d=a.value;var e;if(d==1){cc='USD';e=1}if(d==2){cc='EUR';e=rateEur}if(d==3){cc='GBP';e=rateGbp}for(var i=1;i<c;i++){var f=arrPrice[i-1];f=f*e;f=roundAmount(f);b.rows[i].cells[1].innerHTML=f+'  '+cc}}var arrPrice=new Array();function direct(a){var b=a.value;window.location=b}var xmlhttp;function createXMLHttpRequest(){if(window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}else if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}}function setTab(a,b,n){for(i=1;i<=n;i++){var c=document.getElementById(a+i);var d=document.getElementById("con_"+a+"_"+i);c.className=i==b?"hover":"";d.style.display=i==b?"block":"none"}}function prepareprice(){if(!document.getElementById("tbl")){return false};var a=document.getElementById("tbl");var b=a.rows.length;for(var i=1;i<b;i++){var c=parseFloat(a.rows[i].cells[1].innerHTML);c=roundAmount(c);arrPrice.push(c)}setcurrency(document.getElementById("selcurrency"))}addLoadEvent(prepareprice);function addLoadEvent(a){var b=window.onload;if(typeof window.onload!='function'){window.onload=a}else{window.onload=function(){b();a()}}}