if(typeof infosoftglobal=="undefined"){
var infosoftglobal=new Object();
}
if(typeof infosoftglobal.FusionChartsUtil=="undefined"){
infosoftglobal.FusionChartsUtil=new Object();
}
infosoftglobal.FusionCharts=function(_1,id,w,h,_5,_6,c,_8,_9,_a,_b){
if(!document.getElementById){
return;
}
this.initialDataSet=false;
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){
this.setAttribute("swf",_1);
}
if(id){
this.setAttribute("id",id);
}
_5=_5?_5:0;
this.addVariable("debugMode",_5);
w=w.toString().replace(/\%$/,"%25");
if(w){
this.setAttribute("width",w);
}
h=h.toString().replace(/\%$/,"%25");
if(h){
this.setAttribute("height",h);
}
if(c){
this.addParam("bgcolor",c);
}
this.addParam("quality","high");
this.addParam("allowScriptAccess","always");
this.addVariable("chartWidth",w);
this.addVariable("chartHeight",h);
this.addVariable("DOMId",id);
_6=_6?_6:0;
this.addVariable("registerWithJS",_6);
_8=_8?_8:"noScale";
this.addVariable("scaleMode",_8);
_9=_9?_9:"EN";
this.addVariable("lang",_9);
this.detectFlashVersion=_a?_a:1;
this.autoInstallRedirect=_b?_b:1;
this.installedVer=infosoftglobal.FusionChartsUtil.getPlayerVersion();
if(!window.opera&&document.all&&this.installedVer.major>7){
infosoftglobal.FusionCharts.doPrepUnload=true;
}
};
infosoftglobal.FusionCharts.prototype={setAttribute:function(_c,_d){
this.attributes[_c]=_d;
},getAttribute:function(_e){
return this.attributes[_e];
},addParam:function(_f,_10){
this.params[_f]=_10;
},getParams:function(){
return this.params;
},addVariable:function(_11,_12){
this.variables[_11]=_12;
},getVariable:function(_13){
return this.variables[_13];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _14=new Array();
var key;
var _16=this.getVariables();
for(key in _16){
_14.push(key+"="+_16[key]);
}
return _14;
},getSWFHTML:function(){
var _17="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
_17="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"  ";
_17+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _18=this.getParams();
for(var key in _18){
_17+=[key]+"=\""+_18[key]+"\" ";
}
var _1a=this.getVariablePairs().join("&");
if(_1a.length>0){
_17+="flashvars=\""+_1a+"\"";
}
_17+="/>";
}else{
_17="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_17+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _18=this.getParams();
for(var key in _18){
_17+="<param name=\""+key+"\" value=\""+_18[key]+"\" />";
}
var _1a=this.getVariablePairs().join("&");
if(_1a.length>0){
_17+="<param name=\"flashvars\" value=\""+_1a+"\" />";
}
_17+="</object>";
}
return _17;
},setDataURL:function(_1b){
if(this.initialDataSet==false){
this.addVariable("dataURL",_1b);
this.initialDataSet=true;
}else{
var _1c=infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute("id"));
if(!_1c.setDataURL){
__flash__addCallback(_1c,"setDataURL");
}
_1c.setDataURL(_1b);
}
},encodeDataXML:function(_1d){
var _1e=["\\$","\\+"];
var _1f=_1d.match(/=\s*\".*?\"/g);
if(_1f){
for(var i=0;i<_1f.length;i++){
var _21=_1f[i].replace(/^=\s*\"|\"$/g,"");
_21=_21.replace(/\'/g,"%26apos;");
var _22=_1d.indexOf(_1f[i]);
var _23="='"+_21+"'";
var _24=_1d.substring(0,_22);
var _25=_1d.substring(_22+_1f[i].length);
var _1d=_24+_23+_25;
}
}
_1d=_1d.replace(/\"/g,"%26quot;");
_1d=_1d.replace(/%(?![\da-f]{2}|[\da-f]{4})/ig,"%25");
_1d=_1d.replace(/\&/g,"%26");
return _1d;
},setDataXML:function(_26){
if(this.initialDataSet==false){
this.addVariable("dataXML",this.encodeDataXML(_26));
this.initialDataSet=true;
}else{
var _27=infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute("id"));
_27.setDataXML(_26);
}
},setTransparent:function(_28){
if(typeof _28=="undefined"){
_28=true;
}
if(_28){
this.addParam("WMode","transparent");
}else{
this.addParam("WMode","Opaque");
}
},render:function(_29){
if((this.detectFlashVersion==1)&&(this.installedVer.major<8)){
if(this.autoInstallRedirect==1){
var _2a=window.confirm("You need Adobe Flash Player 8 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. Please click on Ok to install the same.");
if(_2a){
window.location="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
}else{
return false;
}
}else{
return false;
}
}else{
var n=(typeof _29=="string")?document.getElementById(_29):_29;
n.innerHTML=this.getSWFHTML();
if(!document.embeds[this.getAttribute("id")]&&!window[this.getAttribute("id")]){
window[this.getAttribute("id")]=document.getElementById(this.getAttribute("id"));
}
return true;
}
}};
infosoftglobal.FusionChartsUtil.getPlayerVersion=function(){
var _2c=new infosoftglobal.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){
_2c=new infosoftglobal.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));
}
}else{
if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){
var axo=1;
var _2f=3;
while(axo){
try{
_2f++;
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_2f);
_2c=new infosoftglobal.PlayerVersion([_2f,0,0]);
}
catch(e){
axo=null;
}
}
}else{
try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
}
catch(e){
try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_2c=new infosoftglobal.PlayerVersion([6,0,21]);
axo.AllowScriptAccess="always";
}
catch(e){
if(_2c.major==6){
return _2c;
}
}
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
}
catch(e){
}
}
if(axo!=null){
_2c=new infosoftglobal.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
}
}
}
return _2c;
};
infosoftglobal.PlayerVersion=function(_30){
this.major=_30[0]!=null?parseInt(_30[0]):0;
this.minor=_30[1]!=null?parseInt(_30[1]):0;
this.rev=_30[2]!=null?parseInt(_30[2]):0;
};
infosoftglobal.FusionChartsUtil.cleanupSWFs=function(){
var _31=document.getElementsByTagName("OBJECT");
for(var i=_31.length-1;i>=0;i--){
_31[i].style.display="none";
for(var x in _31[i]){
if(typeof _31[i][x]=="function"){
_31[i][x]=function(){
};
}
}
}
};
if(infosoftglobal.FusionCharts.doPrepUnload){
if(!infosoftglobal.unloadSet){
infosoftglobal.FusionChartsUtil.prepUnload=function(){
__flash_unloadHandler=function(){
};
__flash_savedUnloadHandler=function(){
};
window.attachEvent("onunload",infosoftglobal.FusionChartsUtil.cleanupSWFs);
};
window.attachEvent("onbeforeunload",infosoftglobal.FusionChartsUtil.prepUnload);
infosoftglobal.unloadSet=true;
}
}
if(!document.getElementById&&document.all){
document.getElementById=function(id){
return document.all[id];
};
}
if(Array.prototype.push==null){
Array.prototype.push=function(_35){
this[this.length]=_35;
return this.length;
};
}
infosoftglobal.FusionChartsUtil.getChartObject=function(id){
var _37=null;
if(navigator.appName.indexOf("Microsoft Internet")==-1){
if(document.embeds&&document.embeds[id]){
_37=document.embeds[id];
}else{
_37=window.document[id];
}
}else{
_37=window[id];
}
if(!_37){
_37=document.getElementById(id);
}
return _37;
};
var getChartFromId=infosoftglobal.FusionChartsUtil.getChartObject;
var FusionCharts=infosoftglobal.FusionCharts;
var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;
var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;
var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;
function ControlVersion(){
var _38;
var axo;
var e;
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
_38=axo.GetVariable("$version");
}
catch(e){
}
if(!_38){
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_38="WIN 6,0,21,0";
axo.AllowScriptAccess="always";
_38=axo.GetVariable("$version");
}
catch(e){
}
}
if(!_38){
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
_38=axo.GetVariable("$version");
}
catch(e){
}
}
if(!_38){
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
_38="WIN 3,0,18,0";
}
catch(e){
}
}
if(!_38){
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
_38="WIN 2,0,0,11";
}
catch(e){
_38=-1;
}
}
return _38;
};
function GetSwfVer(){
var _3b=-1;
if(navigator.plugins!=null&&navigator.plugins.length>0){
if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
var _3c=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
var _3d=navigator.plugins["Shockwave Flash"+_3c].description;
var _3e=_3d.split(" ");
var _3f=_3e[2].split(".");
var _40=_3f[0];
var _41=_3f[1];
var _42=_3e[3];
if(_42==""){
_42=_3e[4];
}
if(_42[0]=="d"){
_42=_42.substring(1);
}else{
if(_42[0]=="r"){
_42=_42.substring(1);
if(_42.indexOf("d")>0){
_42=_42.substring(0,_42.indexOf("d"));
}
}
}
var _3b=_40+"."+_41+"."+_42;
}
}else{
if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){
_3b=4;
}else{
if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){
_3b=3;
}else{
if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){
_3b=2;
}else{
if(isIE&&isWin&&!isOpera){
_3b=ControlVersion();
}
}
}
}
}
return _3b;
};
function DetectFlashVer(_43,_44,_45){
versionStr=GetSwfVer();
if(versionStr==-1){
return false;
}else{
if(versionStr!=0){
if(isIE&&isWin&&!isOpera){
tempArray=versionStr.split(" ");
tempString=tempArray[1];
versionArray=tempString.split(",");
}else{
versionArray=versionStr.split(".");
}
var _46=versionArray[0];
var _47=versionArray[1];
var _48=versionArray[2];
if(_46>parseFloat(_43)){
return true;
}else{
if(_46==parseFloat(_43)){
if(_47>parseFloat(_44)){
return true;
}else{
if(_47==parseFloat(_44)){
if(_48>=parseFloat(_45)){
return true;
}
}
}
}
}
return false;
}
}
};
function AC_AddExtension(src,ext){
if(src.indexOf("?")!=-1){
return src.replace(/\?/,ext+"?");
}else{
return src+ext;
}
};
function AC_Generateobj(_4b,_4c,_4d){
var str="";
if(isIE&&isWin&&!isOpera){
str+="<object ";
for(var i in _4b){
str+=i+"=\""+_4b[i]+"\" ";
}
str+=">";
for(var i in _4c){
str+="<param name=\""+i+"\" value=\""+_4c[i]+"\" /> ";
}
str+="</object>";
}else{
str+="<embed ";
for(var i in _4d){
str+=i+"=\""+_4d[i]+"\" ";
}
str+="> </embed>";
}
document.write(str);
};
function AC_FL_RunContent(){
var ret=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");
AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);
};
function AC_SW_RunContent(){
var ret=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);
AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);
};
function AC_GetArgs(_52,ext,_54,_55,_56){
var ret=new Object();
ret.embedAttrs=new Object();
ret.params=new Object();
ret.objAttrs=new Object();
for(var i=0;i<_52.length;i=i+2){
var _59=_52[i].toLowerCase();
switch(_59){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[_52[i]]=_52[i+1];
break;
case "src":
case "movie":
_52[i+1]=AC_AddExtension(_52[i+1],ext);
ret.embedAttrs["src"]=_52[i+1];
ret.params[_54]=_52[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblClick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
case "id":
ret.objAttrs[_52[i]]=_52[i+1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[_52[i]]=ret.objAttrs[_52[i]]=_52[i+1];
break;
default:
ret.embedAttrs[_52[i]]=ret.params[_52[i]]=_52[i+1];
}
}
ret.objAttrs["classid"]=_55;
if(_56){
ret.embedAttrs["type"]=_56;
}
return ret;
};
if(typeof deconcept=="undefined"){
var deconcept=new Object();
}
if(typeof deconcept.util=="undefined"){
deconcept.util=new Object();
}
if(typeof deconcept.SWFObjectUtil=="undefined"){
deconcept.SWFObjectUtil=new Object();
}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){
if(!document.getElementById){
return;
}
this.DETECT_KEY=_a?_a:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){
this.setAttribute("swf",_1);
}
if(id){
this.setAttribute("id",id);
}
if(w){
this.setAttribute("width",w);
}
if(h){
this.setAttribute("height",h);
}
if(_5){
this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));
}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(!window.opera&&document.all&&this.installedVer.major>7){
deconcept.SWFObject.doPrepUnload=true;
}
if(c){
this.addParam("bgcolor",c);
}
var q=_7?_7:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",false);
this.setAttribute("doExpressInstall",false);
var _c=(_8)?_8:window.location;
this.setAttribute("xiRedirectUrl",_c);
this.setAttribute("redirectUrl","");
if(_9){
this.setAttribute("redirectUrl",_9);
}
};
deconcept.SWFObject.prototype={useExpressInstall:function(_d){
this.xiSWFPath=!_d?"expressinstall.swf":_d;
this.setAttribute("useExpressInstall",true);
},setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){
_16[_16.length]=key+"="+_18[key];
}
return _16;
},getSWFHTML:function(){
var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");
this.setAttribute("swf",this.xiSWFPath);
}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){
_19+=[key]+"=\""+_1a[key]+"\" ";
}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){
_19+="flashvars=\""+_1c+"\"";
}
_19+="/>";
}else{
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","ActiveX");
this.setAttribute("swf",this.xiSWFPath);
}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){
_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";
}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){
_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";
}
_19+="</object>";
}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);
}
}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();
return true;
}else{
if(this.getAttribute("redirectUrl")!=""){
document.location.replace(this.getAttribute("redirectUrl"));
}
}
return false;
}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){
_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));
}
}else{
if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){
var axo=1;
var _26=3;
while(axo){
try{
_26++;
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);
_23=new deconcept.PlayerVersion([_26,0,0]);
}
catch(e){
axo=null;
}
}
}else{
try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
}
catch(e){
try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);
axo.AllowScriptAccess="always";
}
catch(e){
if(_23.major==6){
return _23;
}
}
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
}
catch(e){
}
}
if(axo!=null){
_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
}
}
}
return _23;
};
deconcept.PlayerVersion=function(_29){
this.major=_29[0]!=null?parseInt(_29[0]):0;
this.minor=_29[1]!=null?parseInt(_29[1]):0;
this.rev=_29[2]!=null?parseInt(_29[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){
return false;
}
if(this.major>fv.major){
return true;
}
if(this.minor<fv.minor){
return false;
}
if(this.minor>fv.minor){
return true;
}
if(this.rev<fv.rev){
return false;
}
return true;
};
deconcept.util={getRequestParameter:function(_2b){
var q=document.location.search||document.location.hash;
if(_2b==null){
return q;
}
if(q){
var _2d=q.substring(1).split("&");
for(var i=0;i<_2d.length;i++){
if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){
return _2d[i].substring((_2d[i].indexOf("=")+1));
}
}
}
return "";
}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){
var _2f=document.getElementsByTagName("OBJECT");
for(var i=_2f.length-1;i>=0;i--){
_2f[i].style.display="none";
for(var x in _2f[i]){
if(typeof _2f[i][x]=="function"){
_2f[i][x]=function(){
};
}
}
}
};
if(deconcept.SWFObject.doPrepUnload){
if(!deconcept.unloadSet){
deconcept.SWFObjectUtil.prepUnload=function(){
__flash_unloadHandler=function(){
};
__flash_savedUnloadHandler=function(){
};
window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);
};
window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);
deconcept.unloadSet=true;
}
}
if(!document.getElementById&&document.all){
document.getElementById=function(id){
return document.all[id];
};
}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;
function ddtabcontent(_89){
this.tabinterfaceid=_89;
this.tabs=document.getElementById(_89).getElementsByTagName("a");
this.enabletabpersistence=true;
this.hottabspositions=[];
this.currentTabIndex=0;
this.subcontentids=[];
this.revcontentids=[];
this.selectedClassTarget="link";
};
ddtabcontent.getCookie=function(_8a){
var re=new RegExp(_8a+"=[^;]+","i");
if(document.cookie.match(re)){
return document.cookie.match(re)[0].split("=")[1];
}
return "";
};
ddtabcontent.setCookie=function(_8c,_8d){
document.cookie=_8c+"="+_8d+";path=/";
};
ddtabcontent.prototype={expandit:function(_8e){
this.cancelautorun();
var _8f="";
try{
if(typeof _8e=="string"&&document.getElementById(_8e).getAttribute("rel")){
_8f=document.getElementById(_8e);
}else{
if(parseInt(_8e)!=NaN&&this.tabs[_8e].getAttribute("rel")){
_8f=this.tabs[_8e];
}
}
}
catch(err){
alert("Invalid Tab ID or position entered!");
}
if(_8f!=""){
this.expandtab(_8f);
}
},cycleit:function(dir,_91){
if(dir=="next"){
var _92=(this.currentTabIndex<this.hottabspositions.length-1)?this.currentTabIndex+1:0;
}else{
if(dir=="prev"){
var _92=(this.currentTabIndex>0)?this.currentTabIndex-1:this.hottabspositions.length-1;
}
}
if(typeof _91=="undefined"){
this.cancelautorun();
}
this.expandtab(this.tabs[this.hottabspositions[_92]]);
},setpersist:function(_93){
this.enabletabpersistence=_93;
},setselectedClassTarget:function(_94){
this.selectedClassTarget=_94||"link";
},getselectedClassTarget:function(_95){
return (this.selectedClassTarget==("linkparent".toLowerCase()))?_95.parentNode:_95;
},urlparamselect:function(_96){
var _97=window.location.search.match(new RegExp(_96+"=(\\d+)","i"));
return (_97==null)?null:parseInt(RegExp.$1);
},expandtab:function(_98){
var _99=_98.getAttribute("rel");
var _9a=(_98.getAttribute("rev"))?","+_98.getAttribute("rev").replace(/\s+/,"")+",":"";
this.expandsubcontent(_99);
this.expandrevcontent(_9a);
for(var i=0;i<this.tabs.length;i++){
this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==_99)?"selected":"";
}
if(this.enabletabpersistence){
ddtabcontent.setCookie(this.tabinterfaceid,_98.tabposition);
}
this.setcurrenttabindex(_98.tabposition);
},expandsubcontent:function(_9c){
for(var i=0;i<this.subcontentids.length;i++){
var _9e=document.getElementById(this.subcontentids[i]);
_9e.style.display=(_9e.id==_9c)?"block":"none";
}
},expandrevcontent:function(_9f){
var _a0=this.revcontentids;
for(var i=0;i<_a0.length;i++){
document.getElementById(_a0[i]).style.display=(_9f.indexOf(","+_a0[i]+",")!=-1)?"block":"none";
}
},setcurrenttabindex:function(_a2){
for(var i=0;i<this.hottabspositions.length;i++){
if(_a2==this.hottabspositions[i]){
this.currentTabIndex=i;
break;
}
}
},autorun:function(){
this.cycleit("next",true);
},cancelautorun:function(){
if(typeof this.autoruntimer!="undefined"){
clearInterval(this.autoruntimer);
}
},init:function(_a4){
var _a5=ddtabcontent.getCookie(this.tabinterfaceid);
var _a6=-1;
var _a7=this.urlparamselect(this.tabinterfaceid);
this.automodeperiod=_a4||0;
for(var i=0;i<this.tabs.length;i++){
this.tabs[i].tabposition=i;
if(this.tabs[i].getAttribute("rel")){
var _a9=this;
this.hottabspositions[this.hottabspositions.length]=i;
this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel");
this.tabs[i].onclick=function(){
_a9.expandtab(this);
_a9.cancelautorun();
return false;
};
if(this.tabs[i].getAttribute("rev")){
this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/));
}
if(_a7==i||this.enabletabpersistence&&_a6==-1&&parseInt(_a5)==i||!this.enabletabpersistence&&_a6==-1&&this.getselectedClassTarget(this.tabs[i]).className=="selected"){
_a6=i;
}
}
}
if(_a6!=-1){
this.expandtab(this.tabs[_a6]);
}else{
this.expandtab(this.tabs[this.hottabspositions[0]]);
}
if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){
this.autoruntimer=setInterval(function(){
_a9.autorun();
},this.automodeperiod);
}
}};
Ext.onReady(function(){
Ext.namespace("SwitchGames","SwitchGames.Home","SwitchGames.Home.NewReleases","SwitchGames.Home.NewListings","SwitchGames.Home.FeaturedBuys","SwitchGames.Home.NewMembers","SwitchGames.Home.RecentTrades");
var _aa=new Ext.TabPanel({renderTo:Ext.get("game_tabs"),activeTab:0,frame:false,deferredRender:false,height:435,width:962,plain:true,defaults:{autoScroll:true,layout:"fit"},items:[{title:"Newest Releases",autoScroll:false,listeners:{"render":{fn:function(_ab){
if(SwitchGames.Search.searchTree==null){
var _ac="";
SwitchGames.Utility.removeVerifiedTooltips(SwitchGames.Home.NewReleases);
Ext.DomHelper.overwrite(_ab.body.dom,"<div style=\"height: 30px; color: #ffffff; padding-top: 7px; padding-left; 5px;\"><div style=\"float: left; padding-right: 5px; font-size: 14px; padding-top: 3px;\">Platform:</div><div style=\"float: left; padding-right: 10px;\" id=\"hp-new-releases-platform-cb\"></div><div style=\"float: left; padding-right: 5px; font-size: 14px; padding-top: 3px;\">Genre:</div><div style=\"float: left; padding-right: 10px;\" id=\"hp-new-releases-genre-cb\"></div></div><div id=\"latest-games\"></div>");
SwitchGames.Search.newReleasesTree=SwitchGames.Search.createSearchTree("latest-games","100%",350,_ac,"data/search/treedata.php","latest","latest",null,null,SwitchGames.Home.NewReleases,"json/latest.json");
SwitchGames.Search.newReleasesPlatformFilter=SwitchGames.Search.createFilter(SwitchGames.Search.platformStore,"tree",SwitchGames.Search.newReleasesTree,"platformName","platform",250,250,true,"hp-new-releases-platform-cb");
SwitchGames.Search.newReleasesGenreFilter=SwitchGames.Search.createFilter(SwitchGames.Search.genreStore,"tree",SwitchGames.Search.newReleasesTree,"genreName","genre",100,100,true,"hp-new-releases-genre-cb");
}
}}}},{title:"New Listings",autoScroll:false,listeners:{"render":{fn:function(_ad){
Ext.DomHelper.overwrite(_ad.body.dom,"<div style=\"height: 30px; color: #ffffff; padding-top: 7px; padding-left; 5px;\" ><div style=\"float: left; padding-right: 5px; font-size: 14px; padding-top: 3px;\">Type:</div><div style=\"float: left; padding-right: 10px; width: 125px;\" id=\"hp-new-listings-type-cb\"></div><div style=\"float: left; padding-right: 5px; font-size: 14px; padding-top: 3px;\">Platform:</div><div style=\"float: left; padding-right: 10px; width: 275px;\" id=\"hp-new-listings-platform-cb\"></div><div style=\"float: left; padding-right: 5px; font-size: 14px; padding-top: 3px;\">Genre:</div><div style=\"float: left; padding-right: 10px; width: 150px;\" id=\"hp-new-listings-genre-cb\"></div></div><div id=\"newlistings\"></div>");
}},"beforeshow":{fn:function(_ae){
if(SwitchGames.Search.newListingTree==null){
var _af="";
SwitchGames.Utility.removeVerifiedTooltips(SwitchGames.Home.NewListings);
if(SwitchGames.Search.newListingTree==null){
SwitchGames.Search.newListingTree=SwitchGames.Search.createSearchTree("newlistings","100%",350,_af,"data/search/treedata.php","newlistings","newlistings",null,null,SwitchGames.Home.NewListings,"json/newlistings.json");
}
if(SwitchGames.Search.newListingsTypeFilter==null){
SwitchGames.Search.newListingsTypeFilter=SwitchGames.Search.createFilter(SwitchGames.Search.typeStore,"tree",SwitchGames.Search.newListingTree,"typeName","type",100,100,true,"hp-new-listings-type-cb");
}
if(SwitchGames.Search.newListingsPlatformFilter==null){
SwitchGames.Search.newListingsPlatformFilter=SwitchGames.Search.createFilter(SwitchGames.Search.platformStore,"tree",SwitchGames.Search.newListingTree,"platformName","platform",250,250,true,"hp-new-listings-platform-cb");
}
if(SwitchGames.Search.newListingsGenreFilter==null){
SwitchGames.Search.newListingsGenreFilter=SwitchGames.Search.createFilter(SwitchGames.Search.genreStore,"tree",SwitchGames.Search.newListingTree,"genreName","genre",100,100,true,"hp-new-listings-genre-cb");
}
}
}},"show":{fn:function(_b0){
var _b1=_b0.body.select("img.has-detail",true);
for(var i=0,len=_b1.elements.length;i<len;i++){
SwitchGames.Utility.scaleAndCenterImageInParent(_b1.elements[i].dom);
}
},options:{scope:this}}}}]});
SwitchGames.Home.FeaturedBuys.store=new Ext.data.JsonStore({url:"json/featured_buys.json",root:"",fields:["listing_id","platform","game_id","name","platform_name",{name:"price",type:"float"},"photo_cover","width","height"]});
SwitchGames.Home.FeaturedBuys.store.load();
var _b4=Ext.get("sg-homepage-featured-buys").dom;
SwitchGames.Home.FeaturedBuys.doFilter=function(){
var _b5=Ext.query("input[@name=\"sg-homepage-featured-buys-filter\"]:checked",_b4);
var _b6=_b5.length;
var _b7="^(";
for(var i=0;i<_b6;i++){
if(i==_b6-1){
_b7+=_b5[i].value+")";
}else{
_b7+=_b5[i].value+"|";
}
}
if(_b6==0){
_b7="^none";
}
var re=new RegExp(_b7);
SwitchGames.Home.FeaturedBuys.store.filter("platform",re);
var _ba=SwitchGames.Home.FeaturedBuys.store.data.length;
var _bb=new Ext.XTemplate("<div style=\"text-align: center; margin: 0; height: 185px;\">","<tpl for=\".\">","<div style=\"float: left; margin-left: 21px; width: 97px; height: 185px; color: #ffffff;\">","<div style=\"width: 97px; height: 129px; display: table-cell; vertical-align: bottom;\">","<a href=\"search.php?game_ids={game_id}&platform_ids=&accessory_ids=&game_name={name}\" style=\"border: 0px solid black;\">","<img l_id=\"{listing_id}\" src=\"{[SwitchGames.Utility.getCoverValue(values.photo_cover)]}\" style=\"cursor: pointer; width: {width}; height: {height};\" ext:qtip=\"{name} for {platform_name}\" />","</a>","</div>","<div style=\"font-size: 12px; margin-top: 15px;\">From: <b>${[SwitchGames.Utility.formatCurrency(values.price)]}</b></div>","<div style=\"font-size: 12px;\"><b>FREE</b> Shipping</div>","<div style=\"font-size: 10px;\">Delivery Guaranteed</b></div>","</div>","</tpl>","</div>");
SwitchGames.Home.FeaturedBuys.panel.items="";
if(_ba>0){
var _bc=SwitchGames.Home.FeaturedBuys.store.data.items;
var _bd=parseInt(_ba/4);
if(_ba%4!=0){
_bd=_bd+1;
}
for(var y=0;y<_bd;y++){
var _bf=new Array();
for(var z=0,x=y*4;x<(y*4)+4;x++,z++){
if(_bc[x]!=null){
_bf[z]=_bc[x].data;
}
}
SwitchGames.Home.FeaturedBuys.panel.add({"html":_bb.apply(_bf),rightSlideText:" ",leftSlideText:" "});
}
}else{
SwitchGames.Home.FeaturedBuys.panel.add({"html":"<br/><br/><br/><div style=\"align: center; font-size: 26px; font-weight: bold; color: #ffffff; text-align: center;\">No games were found</div>"});
}
SwitchGames.Home.FeaturedBuys.panel.scroll("right");
};
if(SwitchGames.Home.FeaturedBuys.panel==null){
SwitchGames.Home.FeaturedBuys.panel=new SwitchGames.Components.SlidePanel({renderTo:Ext.get("sg-homepage-featured-buys-panel"),height:200,width:610,rightSlideText:" ",leftSlideText:" ",items:"",listeners:{"stepchanged":function(_c2,_c3,_c4){
this.page=_c3;
},"beforeslidein":function(_c5,_c6,_c7){
if(_c5.items.length==1){
}else{
if(this.page==_c5.items.length){
this.showRightSlide();
this.enableRightSlide();
}else{
if(this.page==1){
this.showLeftSlide();
this.enableLeftSlide();
}
}
}
},"afterslidein":function(_c8,_c9,_ca){
},"beforeslideout":function(_cb,_cc,_cd){
if(this.page==_cb.items.length&&_cd.direction=="right"){
_cd.targetItem=0;
}else{
if(this.page==1&&_cd.direction=="left"){
_cd.targetItem=parseInt(_cb.items.length)-1;
}
}
}}});
}
var _ce=Ext.query("input[@name=\"sg-homepage-featured-buys-filter\"]",_b4);
for(var n=0,ttl=_ce.length;n<ttl;n++){
Ext.fly(_ce[n]).on("click",SwitchGames.Home.FeaturedBuys.doFilter);
}
SwitchGames.Home.FeaturedBuys.store.on("load",function(e,t){
SwitchGames.Home.FeaturedBuys.store.data.items.shuffle();
SwitchGames.Home.FeaturedBuys.doFilter();
});
SwitchGames.Home.FeaturedBuys.panel.body.on("click",function(e,t){
if(t.getAttribute("lid")==null){
return;
}
SwitchGames.Buy.purchaseItem(t.getAttribute("lid"));
});
SwitchGames.Home.NewMembers.store=new Ext.data.JsonStore({url:"json/homepage-new-members.json",root:"",fields:["screen_name","avatar","member_since"]});
SwitchGames.Home.NewMembers.store.load();
var _d5=Ext.get("sg-homepage-new-members").dom;
SwitchGames.Home.NewMembers.render=function(){
SwitchGames.Home.NewMembers.panel.items="";
var _d6=SwitchGames.Home.NewMembers.store.data.length;
var _d7=new Ext.XTemplate("<div id=\"sg-home-new-members-container\" style=\"color: #ffffff; padding: 10px 0 0 17px;\">","<tpl for=\"data\">","<div style=\"float: left; width: 80px; height: 80px;\"><a href=\"gamer/{screen_name}\" target=\"_blank\"><img style=\"border: 0; width: 80px; height: 80px;\" name=\"sg-home-new-members-avatar\" src=\""+SwitchGames.imageUrl+"avatars/{avatar}\" /></a></div>","<div style=\"float: left; height: 80px; padding: 10px 0 0 15px;\">","<div style=\"font-weight: bold;\">{screen_name}</div>","<div style=\"font-weight: bold; font-size: 12px; color: #777777;\">Member Since <span style=\"font-weight: normal;\">{member_since}</span></div>","<a href=\"gamer/{screen_name}\" target=\"_blank\"><img name=\"sg-home-new-members-gamerpage\" style=\"border: 0;\" src=\""+SwitchGames.imageUrl+"common/buttons/view-gamer-page-large.png\" /></a>","</div>","</tpl>","</div>");
if(_d6>0){
for(var i=0;i<_d6;i++){
SwitchGames.Home.NewMembers.panel.add({"html":_d7.apply(SwitchGames.Home.NewMembers.store.data.items[i]),rightSlideText:" ",leftSlideText:" "});
}
}
SwitchGames.Home.NewMembers.panel.scroll("right");
};
if(SwitchGames.Home.NewMembers.panel==null){
SwitchGames.Home.NewMembers.panel=new SwitchGames.Components.SlidePanelSmall({renderTo:Ext.get("sg-homepage-new-members-panel"),height:104,width:299,rightSlideText:" ",leftSlideText:" ",items:"",listeners:{"stepchanged":function(_d9,_da,_db){
this.page=_da;
},"beforeslidein":function(_dc,_dd,_de){
if(_dc.items.length==1){
}else{
if(this.page==_dc.items.length){
this.showRightSlide();
this.enableRightSlide();
}else{
if(this.page==1){
this.showLeftSlide();
this.enableLeftSlide();
}
}
}
var i=this.page-1;
var _e0=Ext.query("img[@name=\"sg-home-new-members-avatar\"]")[i];
var _e1=Ext.query("img[@name=\"sg-home-new-members-gamerpage\"]")[i];
var _e2=Ext.get(_e0);
SwitchGames.Utility.scaleAndCenterImage(_e2,80,80);
Ext.fly(_e0).on("click",function(){
clearTimeout(SwitchGames.Home.NewMembers.sliderTimer);
SwitchGames.Home.NewMembers.panel.autoScroll=false;
});
Ext.fly(_e1).on("click",function(){
clearTimeout(SwitchGames.Home.NewMembers.sliderTimer);
SwitchGames.Home.NewMembers.panel.autoScroll=false;
});
},"afterslidein":function(_e3,_e4,_e5){
if(_e3.items.length>1&&this.autoScroll!=false){
clearTimeout(SwitchGames.Home.NewMembers.sliderTimer);
SwitchGames.Home.NewMembers.sliderTimer=setTimeout("SwitchGames.Home.NewMembers.panel.scroll('right')",7000);
}
},"beforeslideout":function(_e6,_e7,_e8){
var i=this.page-1;
Ext.fly(Ext.query("img[@name=\"sg-home-new-members-avatar\"]")[i]).un("click");
Ext.fly(Ext.query("img[@name=\"sg-home-new-members-gamerpage\"]")[i]).un("click");
if(this.page==_e6.items.length&&_e8.direction=="right"){
_e8.targetItem=0;
}else{
if(this.page==1&&_e8.direction=="left"){
_e8.targetItem=parseInt(_e6.items.length)-1;
}
}
}}});
}
SwitchGames.Home.NewMembers.store.on("load",function(){
SwitchGames.Home.NewMembers.render();
});
SwitchGames.Home.RecentTrades.store=new Ext.data.JsonStore({url:"json/homepage-recent-trades.json",root:"",fields:["game1","game1_name","game2","game2_name"]});
SwitchGames.Home.RecentTrades.store.load();
var _ea=Ext.get("sg-homepage-recent-trades").dom;
SwitchGames.Home.RecentTrades.render=function(){
SwitchGames.Home.RecentTrades.panel.items="";
var _eb=SwitchGames.Home.RecentTrades.store.data.length;
var _ec=new Ext.XTemplate("<div id=\"sg-home-recent-trades-container\" style=\"color: #ffffff; padding: 10px 0 0 17px;\">","<tpl for=\"data\">","<div style=\"float: left; width: 80px; height: 80px;\"><img name=\"sg-home-recent-trades-game-left\" style=\"width: 60px; height: 80px;\" src=\""+SwitchGames.imageUrl+"covers{game1}\" ext:qtip=\"{game1_name}\" /></div>","<div style=\"float: left; height: 80px; color: #777777; margin: 0 15px; font-size: 14px; font-weight: bold; padding-top: 35px;\">FOR</div>","<div style=\"float: left; width: 80px; height: 80px;\"><img name=\"sg-home-recent-trades-game-right\" style=\"width: 60px; height: 80px;\" src=\""+SwitchGames.imageUrl+"covers{game2}\" ext:qtip=\"{game2_name}\" /></div>","</tpl>","</div>");
if(_eb>0){
for(var i=0;i<_eb;i++){
SwitchGames.Home.RecentTrades.panel.add({"html":_ec.apply(SwitchGames.Home.RecentTrades.store.data.items[i]),rightSlideText:" ",leftSlideText:" "});
}
}
SwitchGames.Home.RecentTrades.panel.scroll("right");
};
if(SwitchGames.Home.RecentTrades.panel==null){
SwitchGames.Home.RecentTrades.panel=new SwitchGames.Components.SlidePanelSmall({renderTo:Ext.get("sg-homepage-recent-trades-panel"),height:104,width:299,rightSlideText:" ",leftSlideText:" ",items:"",listeners:{"stepchanged":function(_ee,_ef,_f0){
this.page=_ef;
},"beforeslidein":function(_f1,_f2,_f3){
if(_f1.items.length==1){
}else{
if(this.page==_f1.items.length){
this.showRightSlide();
this.enableRightSlide();
}else{
if(this.page==1){
this.showLeftSlide();
this.enableLeftSlide();
}
}
}
var i=this.page-1;
var _f5=Ext.query("img[@name=\"sg-home-recent-trades-game-left\"]")[i];
var _f6=Ext.query("img[@name=\"sg-home-recent-trades-game-right\"]")[i];
var _f7=Ext.get(_f5);
var _f8=Ext.get(_f6);
SwitchGames.Utility.scaleAndCenterImage(_f7,80,80);
SwitchGames.Utility.scaleAndCenterImage(_f8,80,80);
_f7.on("click",function(){
clearTimeout(SwitchGames.Home.RecentTrades.sliderTimer);
SwitchGames.Home.RecentTrades.panel.autoScroll=false;
});
_f8.on("click",function(){
clearTimeout(SwitchGames.Home.RecentTrades.sliderTimer);
SwitchGames.Home.RecentTrades.panel.autoScroll=false;
});
},"afterslidein":function(_f9,_fa,_fb){
if(_f9.items.length>1&&this.autoScroll!=false){
clearTimeout(SwitchGames.Home.RecentTrades.sliderTimer);
SwitchGames.Home.RecentTrades.sliderTimer=setTimeout("SwitchGames.Home.RecentTrades.panel.scroll('right')",7000);
}
},"beforeslideout":function(_fc,_fd,_fe){
var i=this.page-1;
Ext.fly(Ext.query("img[@name=\"sg-home-recent-trades-game-left\"]")[i]).un("click");
Ext.fly(Ext.query("img[@name=\"sg-home-recent-trades-game-right\"]")[i]).un("click");
if(this.page==_fc.items.length&&_fe.direction=="right"){
_fe.targetItem=0;
}else{
if(this.page==1&&_fe.direction=="left"){
_fe.targetItem=parseInt(_fc.items.length)-1;
}
}
}}});
}
SwitchGames.Home.RecentTrades.store.on("load",function(){
SwitchGames.Home.RecentTrades.render();
});
});

