"use strict";
if(!this.JSON){
this.JSON={};
}
(function(){
function f(n){
return n<10?"0"+n:n;
};
if(typeof Date.prototype.toJSON!=="function"){
Date.prototype.toJSON=function(_1){
return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;
};
String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(_2){
return this.valueOf();
};
}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_3=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_4,_5,_6={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},_7;
function _8(_9){
_3.lastIndex=0;
return _3.test(_9)?"\""+_9.replace(_3,function(a){
var c=_6[a];
return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
})+"\"":"\""+_9+"\"";
};
function _a(_b,_c){
var i,k,v,_d,_e=_4,_f,_10=_c[_b];
if(_10&&typeof _10==="object"&&typeof _10.toJSON==="function"){
_10=_10.toJSON(_b);
}
if(typeof _7==="function"){
_10=_7.call(_c,_b,_10);
}
switch(typeof _10){
case "string":
return _8(_10);
case "number":
return isFinite(_10)?String(_10):"null";
case "boolean":
case "null":
return String(_10);
case "object":
if(!_10){
return "null";
}
_4+=_5;
_f=[];
if(Object.prototype.toString.apply(_10)==="[object Array]"){
_d=_10.length;
for(i=0;i<_d;i+=1){
_f[i]=_a(i,_10)||"null";
}
v=_f.length===0?"[]":_4?"[\n"+_4+_f.join(",\n"+_4)+"\n"+_e+"]":"["+_f.join(",")+"]";
_4=_e;
return v;
}
if(_7&&typeof _7==="object"){
_d=_7.length;
for(i=0;i<_d;i+=1){
k=_7[i];
if(typeof k==="string"){
v=_a(k,_10);
if(v){
_f.push(_8(k)+(_4?": ":":")+v);
}
}
}
}else{
for(k in _10){
if(Object.hasOwnProperty.call(_10,k)){
v=_a(k,_10);
if(v){
_f.push(_8(k)+(_4?": ":":")+v);
}
}
}
}
v=_f.length===0?"{}":_4?"{\n"+_4+_f.join(",\n"+_4)+"\n"+_e+"}":"{"+_f.join(",")+"}";
_4=_e;
return v;
}
};
if(typeof JSON.stringify!=="function"){
JSON.stringify=function(_11,_12,_13){
var i;
_4="";
_5="";
if(typeof _13==="number"){
for(i=0;i<_13;i+=1){
_5+=" ";
}
}else{
if(typeof _13==="string"){
_5=_13;
}
}
_7=_12;
if(_12&&typeof _12!=="function"&&(typeof _12!=="object"||typeof _12.length!=="number")){
throw new Error("JSON.stringify");
}
return _a("",{"":_11});
};
}
if(typeof JSON.parse!=="function"){
JSON.parse=function(_14,_15){
var j;
function _16(_17,key){
var k,v,_18=_17[key];
if(_18&&typeof _18==="object"){
for(k in _18){
if(Object.hasOwnProperty.call(_18,k)){
v=_16(_18,k);
if(v!==undefined){
_18[k]=v;
}else{
delete _18[k];
}
}
}
}
return _15.call(_17,key,_18);
};
cx.lastIndex=0;
if(cx.test(_14)){
_14=_14.replace(cx,function(a){
return "\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
});
}
if(/^[\],:{}\s]*$/.test(_14.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){
j=eval("("+_14+")");
return typeof _15==="function"?_16({"":j},""):j;
}
throw new SyntaxError("JSON.parse");
};
}
}());
function getTop(_19){
var _1a=_19;
var _1b=0;
while(_1a.tagName!="HTML"){
_1b+=(_1a.offsetTop||0)+(_1a.scrollTop||0);
if(_1a.offsetParent){
_1a=_1a.offsetParent;
}else{
break;
}
}
return _1b;
};
function getLeft(_1c){
var _1d=_1c;
var _1e=0;
while(_1d.tagName!="HTML"){
_1e+=(_1d.offsetLeft||0)+(_1d.scrollLeft||0);
if(_1d.offsetParent){
_1d=_1d.offsetParent;
}else{
break;
}
}
return _1e;
};
function createXMLHttpRequest(){
var _1f;
try{
_1f=new XMLHttpRequest();
}
catch(e){
try{
_1f=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
_1f=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
return false;
}
}
}
return _1f;
};
function ajaxRequest(_20){
this.req=new XMLHttpRequest();
this.req.parent=this;
this.req.onreadystatechange=grsc;
this.req._vars={};
if(_20){
this.postParse=_20;
}else{
this.postParse=function(req,_21){
alert(_21.header.msg);
};
}
};
function grsc(_22){
var req=_22.target.parent;
var _23=req.getVar("sbtn");
if(req.req.readyState==1){
if(_23){
_23.mgr.animate();
}
}else{
if(req.req.readyState==4){
if(_23){
_23.mgr.stop();
}
try{
req.postParse(req,JSON.parse(req.req.responseText));
}
catch(e){
alert("Temporary error:\n\n"+e+"\n\nPlease try again in a few minutes!");
}
delete req.req._vars;
delete req.req.parent;
delete req.req.onreadystatechange;
delete this.postParse;
}
}
};
ajaxRequest.prototype.setVar=function(vr,val){
this.req._vars[vr]=val;
};
ajaxRequest.prototype.setVars=function(vrs){
for(var vr in vrs){
this.req._vars[vr]=vrs[vr];
}
};
ajaxRequest.prototype.getVar=function(vr){
return this.req._vars[vr];
};
ajaxRequest.prototype.open=function(_24,url,_25){
this.method=_24?_24.toUpperCase():"GET";
_25=_25?_25:true;
this.req.open(this.method,url,_25);
};
ajaxRequest.prototype.send=function(_26){
if(this.method=="GET"){
this.req.send(null);
}else{
if(_26===null||typeof (_26)!="object"){
_26={};
}
this.req.setRequestHeader("Content-type","application/x-www-form-urlencoded");
this.req.send(urlFromParams(_26,false));
}
};
ajaxRequest.prototype.rsc=function(_27){
if(_27){
this.req.onreadystatechange=_27;
}
};
function actionButton(_28,_29){
this.el=_28;
this.loadImg=document.getElementById("ajax_prog").cloneNode(false);
this.loadImg.removeAttribute("id");
this.animating=false;
this.disableWhenAnimated=_29?true:false;
};
actionButton.prototype.animate=function(){
if(this.animating){
return;
}
this.origText=this.el.innerHTML;
this.elSetWidth=this.el.style.width.length?this.el.style.width:"";
this.el.style.width=this.el.clientWidth+"px";
for(var i=this.el.childNodes.length-1;i>=0;i--){
this.el.removeChild(this.el.childNodes[i]);
}
this.el.appendChild(this.loadImg);
this.animating=true;
if(this.disableWhenAnimated){
this.el.setAttribute("disabled","disabled");
}
};
actionButton.prototype.stop=function(){
this.el.innerHTML=this.origText;
this.el.style.width=this.elSetWidth;
this.animating=false;
if(this.disableWhenAnimated){
this.el.removeAttribute("disabled");
}
};
function urlFromParams(_2a,key){
var _2b=[];
for(var i in _2a){
if(typeof (_2a[i])=="object"){
_2b=_2b.concat(urlFromParams(_2a[i],i));
}else{
_2b[_2b.length]=(key?encodeURIComponent(key+"["+i+"]"):encodeURIComponent(i))+"="+encodeURIComponent(_2a[i]);
}
}
return _2b.join("&");
};
function navTo(){
alert("This content is not available on the website\nPlease view in-game!");
return false;
};
var eventScoper={"addEventListener":function(_2c,_2d,_2e,_2f){
var _30=_2f?function(e){
_2e.apply(_2f,[e]);
}:_2e;
_2c.addEventListener(_2d,_30,false);
}};

