var SITETYPE_GENESYS=0;var SITETYPE_INTERCALL=1;var CONTROL_FRAME_PLACE_RIGHT=0;var CONTROL_FRAME_PLACE_LEFT=1;var CONTROL_FRAME_PLACE_DEFAULT=CONTROL_FRAME_PLACE_RIGHT;var CONTROL_FRAME_WIDTH=300;var POPUP_TYPE_INTERNAL="internal";var POPUP_TYPE_ALERT="alert";var POPUP_TYPE_CONFIRM="confirm";var POPUP_TYPE_PROMPT="prompt";var oBrowser=null;var UA_IE=1;var UA_IE7=2;var UA_NS8IE=4;var UA_NS8FX=8;var UA_OPERA=16;var UA_MOZILLA=32;var UA_FIREFOX=64;var UA_FIREFOXMAC=128;var UA_SAFARI=256;var UA_IE6=512;var UA_IE55=1024;var UA_FIREFOX2=2048;var UA_FIREFOXLINUX=4096;var UA_FIREFOX3=8192;var UA_IE8=16384;var UA_IPHONE=32768;var UA_MAXBIT=UA_IPHONE;var gClientUserAgent=null;function searchReplaceUChar(c,s,callLocation,UnicodeString){while(s.indexOf(c)>=0){s=s.replace(c,"");if(callLocation!="")if(gConsole!=null)gConsole.display("An invalid unicode character has been removed from chat. Char was: "+UnicodeString,TYPE_WARNING,callLocation);}return s;}function BlockInvalidUnicode(item,callLocation){if(item==null||item=="")return;if(callLocation==null)callLocation="";var tUnicode=new Array("\u0001","\u0002","\u0003","\u0004","\u0005","\u0006","\u0007","\u0008","\u000B","\u000C","\u000E","\u000F","\u0010","\u0011","\u0012","\u0013","\u0014","\u0015","\u0016","\u0017","\u0018","\u0019","\u001A","\u001B","\u001C","\u001D","\u001E","\u001F");var tUnicodeString=new Array("u0001","u0002","u0003","u0004","u0005","u0006","u0007","u0008","u000B","u000C","u000E","u000F","u0010","u0011","u0012","u0013","u0014","u0015","u0016","u0017","u0018","u0019","u001A","u001B","u001C","u001D","u001E","u001F");var str=item;if(callLocation==""){var FormElement=document.getElementById(item);if(!FormElement)str=item;else str=FormElement.value;}if(str!=null&&str!=""){for(var i=0,l=tUnicode.length;i<l;i++)str=searchReplaceUChar(tUnicode[i],str,callLocation,tUnicodeString[i]);}if(callLocation==""&&FormElement)FormElement.value=str;else return str;}function URLParamObj(){this.gArgs=null;URLParamObj.prototype.Init=function(){var argstring=window.location.search;if(argstring.charAt(0)!='?')return;argstring=argstring.substring(1,argstring.length);this.gArgs=new Array();var argarray=argstring.split('&');var singlearg;for(var i=0,l=argarray.length;i<l;++i){singlearg=argarray[i].split('=');if(singlearg.length!=2)continue;var key=singlearg[0];var value=singlearg[1];this.gArgs[key]=value;}};URLParamObj.prototype.GetParam=function(name){if(this.gArgs==null)return"";return this.gArgs[name];};}function URLDecode(encoded){var HEXCHARS="0123456789ABCDEFabcdef",plaintext="",i=0,l=encoded.length;while(i<l){var ch=encoded.charAt(i);if(ch=="+"){plaintext+=" ";i++;}else if(ch=="%"){if(i<(encoded.length-2)&&HEXCHARS.indexOf(encoded.charAt(i+1))!=-1&&HEXCHARS.indexOf(encoded.charAt(i+2))!=-1){plaintext+=unescape(encoded.substr(i,3));i+=3;}else{gErrorMgr.raiseError(genError("URLDecode()",ERROR_DATAERR,getStr(ERR_URL_DECODE)+encoded.substr(i),'',ERROR_NOTIFY_MGR,false));plaintext+="%[ERROR]";i++;}}else{plaintext+=ch;i++;}}return plaintext;}function getDomain(nbLevel){if(document&&document.location&&document.location.hostname){var h=document.location.hostname;var urlinfo=h.split(".");var l=urlinfo.length,i=1,domain="";while(((l-i)>=0)&&(i<=nbLevel)){domain="."+urlinfo[l-i]+domain;i++;}domain=domain.substring(1,domain.length);if(!domain||domain=="")return"getDomain: domain is null";return domain;}return"getDomain: cannot access document properties";}function checkDomain(nbLevel){if(bPhoneGap==true)return"";var argstring="";try{if(top&&top.location&&top.location.search)argstring=top.location.search;}catch(err){}if(argstring==""){try{if(window&&window.location&&window.location.search)argstring=window.location.search;}catch(er){return"checkDomain: cannot access document location query string";}}var bPlayer=false;if(argstring.charAt(0)=='?'){argstring=argstring.substring(1,argstring.length);var gArgs=new Array();var argarray=argstring.split('&'),singlearg;for(var i=0,l=argarray.length;i<l;++i){singlearg=argarray[i].split('=');if(singlearg.length!=2)continue;var key=singlearg[0];var value=singlearg[1];gArgs[key]=value;}if((gArgs!=null)&&gArgs['player']&&(gArgs['player']=='1'))bPlayer=true;}if(!bPlayer){var sDomain=getDomain(nbLevel);if(sDomain.indexOf("getDomain")==-1){if(document&&document.domain){document.domain=sDomain;return"";}return"checkDomain: cannot access document properties";}else return sDomain;}else return"";}function generateAnchorHref(functionCall){return'onclick="'+functionCall+';return false"; href="#"';}function getDocHeight(){if(parent&&parent.control&&parent.control.isMobileUI&&parent.control.isMobileUI()&&document&&document.body&&document.body.clientHeight>0){if(gClientUserAgent&UA_IPHONE){if(bPhoneGap==true)return document.body.clientHeight-20;return top.iPhoneCurrentFrameHeight;}else return document.body.clientHeight;}if(gClientUserAgent&&(gClientUserAgent&16)&&document&&document.body&&document.body.clientHeight>0)return document.body.clientHeight;if(gClientUserAgent&&(gClientUserAgent&256)&&self&&self.innerHeight>0)return self.innerHeight;if(self&&self.innerHeight>0)return self.innerHeight;if(document&&document.documentElement&&document.documentElement.clientHeight>0)return document.documentElement.clientHeight;if(document&&document.body&&document.body.clientHeight>0)return document.body.clientHeight;if(parent&&parent.control&&parent.control.genError&&parent.control.gErrorMgr&&parent.control.gErrorMgr.raiseError)parent.control.gErrorMgr.raiseError(parent.control.genError("getDocHeight",75,"not available value to return: self.innerHeight: "+(self?self.innerHeight:"unknown")+", document.documentElement.clientHeight: "+(document&&document.documentElement?document.documentElement.clientHeight:"unknown")+", document.body.clientHeight: "+(document&&document.body?document.body.clientHeight:"unknown"),'',1,false));return 0;}if(typeof(gIsResLoaded)=="object")gIsResLoaded["js/init.js"]=true;