// Turner XMP, Release Build, © 2007 Turner Broadcasting System, Inc. A Time Warner Company.  Version: 0.1.633.2120
// xmp_net, xmp_net_0_1_633_2120.js


if(typeof(window)!=='undefined'){var deconcept;if(typeof deconcept==="undefined"){deconcept={};}
deconcept.hop=function(m,k){if(typeof(m.hasOwnProperty)==='undefined'){return true;}
return m.hasOwnProperty(k);};if(typeof deconcept.util==="undefined"){deconcept.util={};}
if(typeof deconcept.SWFObjectUtil==="undefined"){deconcept.SWFObjectUtil={};}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];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(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",_7);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}};deconcept.SWFObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(aa){return this.attributes[aa];},addParam:function(ba,ca){this.params[ba]=ca;},getParams:function(){return this.params;},addVariable:function(da,ea){this.variables[da]=ea;},getVariable:function(fa){return this.variables[fa];},getVariables:function(){return this.variables;},getVariablePairs:function(){var ga=[];var ha;var ia=this.getVariables();for(ha in ia){if(deconcept.hop(ia,ha)){ga.push(ha+"="+ia[ha]);}}
return ga;},getSWFHTML:function(){var ja="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
ja="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";ja+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var ka=this.getParams();for(var la in ka){if(deconcept.hop(ka,la)){ja+=[la]+"=\""+ka[la]+"\" ";}}
var ma=this.getVariablePairs().join("&");if(ma.length>0){ja+="flashvars=\""+ma+"\"";}ja+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
ja="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";ja+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var na=this.getParams();for(var oa in na){if(deconcept.hop(na,oa)){ja+="<param name=\""+oa+"\" value=\""+na[oa]+"\" />";}}
var pa=this.getVariablePairs().join("&");if(pa.length>0){ja+="<param name=\"flashvars\" value=\""+pa+"\" />";}ja+="</object>";}
return ja;},write:function(qa){if(this.getAttribute("useExpressInstall")){var ra=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(ra)&&!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 qa==="string")?document.getElementById(qa):qa;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!==""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var sa;var ta=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){ta=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{try{sa=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{sa=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");ta=new deconcept.PlayerVersion([6,0,21]);sa.AllowScriptAccess="always";}
catch(e2){if(ta.major===6){return ta;}}try{sa=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e3){}}if(sa!==null){ta=new deconcept.PlayerVersion(sa.GetVariable("$version").split(" ")[1].split(","));}}
return ta;};deconcept.PlayerVersion=function(ua){this.major=ua[0]!==null?parseInt(ua[0],10):0;this.minor=ua[1]!==null?parseInt(ua[1],10):0;this.rev=ua[2]!==null?parseInt(ua[2],10):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(va){var q=document.location.search||document.location.hash;if(q){var wa=q.substring(1).split("&");for(var i=0;i<wa.length;i++){if(wa[i].substring(0,wa[i].indexOf("="))===va){return wa[i].substring((wa[i].indexOf("=")+1));}}}
return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var xa=document.getElementsByTagName("OBJECT");for(var i=0;i<xa.length;i++){xa[i].style.display="none";for(var x in xa[i]){if(deconcept.hop(xa[i],x)){if(typeof xa[i][x]==="function"){xa[i][x]=function(){};}}}}};deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(typeof window.onunload==="function"){var ya=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();ya();};}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};if(typeof window.onbeforeunload==="function"){var oldBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){deconcept.SWFObjectUtil.prepUnload();oldBeforeUnload();};}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push===null){Array.prototype.push=function(za){this[this.length]=za;return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;}
var xmp;if(!xmp){xmp={};}
else if(typeof xmp!=="object"){throw new Error("xmp already exists and is not an object");}
xmp=function(){};xmp.p_globalNamespace=this;xmp.getGlobalNamespace=function(){return xmp.p_globalNamespace;};xmp.isBrowserEnvironment=function(){return(typeof(window)!=='undefined');};xmp.createNamespace=function(ns){var Aa=ns.split(".");var Ba=xmp.getGlobalNamespace();for(var i=0;i<Aa.length;i++){if(typeof(Ba[Aa[i]])==="undefined"){Ba[Aa[i]]={};}
Ba=Ba[Aa[i]];}};xmp.extractErrorMessage=function(e){if(e instanceof Error){return('Error name: '+e.name+', Error message: '+e.message);}
else{return"UNKNOWN ERROR";}};xmp.chooseValueOrDefault=function(Ca,Da){if(!((arguments.length===2)&&(Da!==null)&&(typeof Da!=='undefined'))){throw new xmp.util.internals.InvalidArgsError("Invalid invalid 'defaultValue' (undefined or null).");}
return(typeof Ca===typeof Da)?Ca:Da;};xmp.trimString=function(Ea){return Ea.replace(/^\s*/,'').replace(/\s*$/,'');};xmp.isNonEmptyString=function(Fa){return((typeof(Fa)==='string')&&(Fa!==null)&&(Fa.length>0));};xmp.getNamespacedMethod=function(Ga){var Ha=xmp.splitMethodAndNamespace(Ga);var Ia=xmp.getObjectFromString(Ha.ns);return Ia[Ha.method];};xmp.splitMethodAndNamespace=function(Ja){var Ka=Ja.lastIndexOf('.');var La={};La.method=Ja;La.ns='';if(Ka!==-1){La.method=Ja.substring(Ka+1);La.ns=Ja.substring(0,Ka);}
return La;};xmp.getObjectFromString=function(Ma){var o=xmp.getGlobalNamespace();if(Ma.length>0){var Na=Ma.split('.');for(var i=0;i<Na.length;i++){o=o[Na[i]];}}
return o;};xmp.isNumber=function(Oa,Pa){var Qa=0;for(var i=0;i<Oa.length;i++){var Ra=Oa.charCodeAt(i);if(Ra>=48&&Ra<=57){continue;}
if(Ra===45){if(i!==0){return false;}
continue;}
if(Ra===46){if(!Pa){return false;}
Qa++;if(Qa>1){return false;}
continue;}
return false;}
return true;};xmp.escapeHtml=function(Sa,Ta,Ua){var Va='';var Wa='@';for(var i=0;i<Sa.length;i++){var c=Sa.charAt(i);switch(c){case'&':Va+='&amp;';break;case'<':Va+='&lt;';break;case'>':Va+='&gt;';break;case'\"':Va+='&quot;';break;case'\'':if(false===Ta){Va+='&apos;';}
break;case' ':if(Ua&&Wa===' '){Va+='&nbsp;';}
else{Va+=c;}
break;default:Va+=c;break;}
Wa=c;}
Va=Va.replace(/\r/g,'');if(Ua){Va=Va.replace(/\n/g,'<br>');Va=Va.replace(/\t/g,'&nbsp;&nbsp;&nbsp;&nbsp;');}
return Va;};xmp.validateArguments=function(Xa,Ya,Za){if((Xa.length>Ya.length)||Xa.length<Ya.length){throw new xmp.util.internals.InvalidArgsError("Invalid argument count \""+Xa.length+"\" for function/method \""+Za+"\".  Expected count was \""+Ya.length+"\".");}
for(var i=0;i<Xa.length;i++){if(Ya[i]===xmp.i_UNKNOWN_TYPE||typeof(Xa[i])===Ya[i]){continue;}
throw new xmp.util.internals.InvalidArgsError("Invalid \""+Za+"\" function/method argument \""+i+"\" data type \""+typeof(Xa[i])+"\".  Expected data type was \""+Ya[i]+"\".");}};xmp.isDefined=function($a){return(typeof($a)!==xmp.i_UNDEFINED_TYPE);};xmp.i_fatalErrorCallback=null;xmp.handleFatalError=function(e){if(xmp.i_fatalErrorCallback!==null){xmp.i_fatalErrorCallback.call(e);}
else{xmp.showFatalErrorMessage(e.message);}};xmp.showFatalErrorMessage=function(ab){xmp.showMessage(ab);};xmp.showMessage=function(bb){window.alert(bb);};xmp.escapeText=function(db){var eb=db.replace(/\"/g,"\\\"");eb=eb.replace(/\'/g,"\\\'");return eb.replace(/\n/g,"\\n");};xmp.formatTimeString=function(fb){xmp.validateArguments(arguments,[xmp.i_NUMBER_TYPE],"formatTimeString");var gb="";if(fb<60){gb="00:";if(fb===0){gb+="00";}
else{if(fb<10){gb+="0"+fb;}
else{gb+=fb;}}}
else{var hb=Math.floor(fb/60);gb=((hb<10)?"0"+hb+":":hb+":");var ib=(fb-(hb*60));if(ib===0){gb+="00";}
else{if(ib<10){gb+="0"+ib;}
else{gb+=ib;}}}
return gb;};xmp.getSWFRoot=function(){return xmp.util.RootUrlProvider.getInstance().i_getRootUrl('swf')+'/';};xmp.makeSWFVersionedFileName=function(jb){return xmp.util.Version.i_makeFileVersionString(jb,'swf');};xmp.makeSWFPath=function(kb,lb){var mb=xmp.getSWFRoot();if(lb){mb+=xmp.makeSWFVersionedFileName(kb);}
else{mb+=(kb+'.swf');}
return mb;};xmp.getImageRoot=function(){return xmp.util.RootUrlProvider.getInstance().i_getRootUrl('image');};xmp.getBrowserVersion=function(){return xmp.util.internals.BrowserDetect.version;};xmp.isWindowsOS=function(){return(xmp.util.internals.BrowserDetect.OS===xmp.WINDOWS_PLATFORM);};xmp.isWindowsVistaOS=function(){return(navigator.userAgent.toLowerCase().indexOf('windows nt 6.0')!==-1);};xmp.isMacOSX=function(){return(navigator.userAgent.toLowerCase().indexOf("mac os x")>=0);};xmp.isMacOS=function(){return(xmp.util.internals.BrowserDetect.OS===xmp.MAC_PLATFORM);};xmp.isIEBrowser=function(){return(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1);};xmp.isFirefoxBrowser=function(){return(xmp.util.internals.BrowserDetect.browser===xmp.FIREFOX_BROWSER);};xmp.isSafariBrowser=function(){return(xmp.util.internals.BrowserDetect.browser===xmp.SAFARI_BROWSER);};xmp.isOperaBrowser=function(){return(navigator.appName.indexOf(xmp.OPERA_BROWSER)!==-1);};xmp.findDomElement=function(nb){var el=((xmp.isIEBrowser()||xmp.isOperaBrowser())?window[nb]:document[nb]);if(!el){el=document.getElementById(nb);}
return el;};xmp.getDomParent=function(ob){var pb=((xmp.isIEBrowser()||xmp.isOperaBrowser())?ob.parentElement:ob.parentNode);return pb;};xmp.getEventDomTarget=function(qb){var rb=(xmp.isIEBrowser()?qb.srcElement:qb.currentTarget);return rb;};xmp.findDomAncestorByTagName=function(sb,tb){while(sb!==null){if(sb.tagName.toLowerCase()===tb.toLowerCase()){return sb;}
sb=xmp.getDomParent(sb);}
return null;};xmp.insertDomChildBefore=function(ub,vb,wb){wb=(wb)?wb:null;if(xmp.isIEBrowser()&&(wb===null)){ub.insertBefore(vb);}
else{ub.insertBefore(vb,wb);}};xmp.addComboOption=function(xb,yb){if(xmp.isIEBrowser()){xb.add(yb);}
else{xb.add(yb,null);}};xmp.addDynamicStyle=function(zb,Ab){var Bb=false;try{if(typeof(document.styleSheets[0].addRule)!=='undefined'){document.styleSheets[0].addRule(zb,Ab);Bb=true;}
else if(typeof(document.styleSheets[0].insertRule)!=='undefined'){document.styleSheets[0].insertRule(zb+'  '+Ab,0);Bb=true;}}
catch(e){}
return Bb;};xmp.getPixelUnits=function(Cb){return parseInt(Cb,10)+"px";};xmp.DERIVE_CLASS=function(Db,Eb){function Inheritance(){}
Inheritance.prototype=Db.prototype;Eb.prototype=new Inheritance();Eb.prototype.constructor=Eb;Eb.ctor=Db;Eb.base=Db.prototype;};xmp.toJSON=function(Fb){if(typeof Fb==='undefined'){return'undefined';}
else if(Fb===null){return'null';}
var Gb={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};var Hb=null,i,l,v,a=[];switch(Fb.constructor){case Array:l=Fb.length;for(i=0;i<l;i++){if((v=xmp.toJSON(Fb[i]))!==null){a.push(v);}}
Hb='['+a.join(',')+']';break;case Object:for(i in Fb){if(Fb.hasOwnProperty(i)&&(v=xmp.toJSON(Fb[i]))!==null){a.push(xmp.toJSON(String(i))+':'+v);}}
Hb='{'+a.join(',')+'}';break;case String:Hb='"'+Fb.replace(/[\x00-\x1f\\"]/g,function($0){var c;if((c=Gb[$0])){return c;}
c=$0.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';break;case Number:Hb=isFinite(Fb)?String(Fb):'null';break;case Boolean:Hb=String(Fb);break;default:break;}
return Hb;};xmp.getQueryArg=function(Ib){xmp.getQueryArg.p_fault();var Jb=xmp.getQueryArg.p_map[Ib];return(Jb)?Jb:null;};xmp.getQueryArgOpt=function(Kb,Lb){var Mb=xmp.getQueryArg(Kb);return(Mb)?Mb:Lb;};xmp.getQueryArg.p_map=null;xmp.getQueryArg.p_fault=function(){if(xmp.getQueryArg.p_map!==null){return;}
xmp.getQueryArg.p_map={};var Nb=window.location.search.substring(1);var Ob=Nb.split("&");for(var i=0;i<Ob.length;i++){var Pb=Ob[i].indexOf('=');if(Pb>0){var Qb=Ob[i].substring(0,Pb);var Rb=decodeURIComponent(Ob[i].substring(Pb+1));xmp.getQueryArg.p_map[Qb]=Rb;}}};xmp.trueTypeOf=function(Sb){var Tb=typeof(Sb);if(Sb===null){Tb='null';}
try{switch(Tb){case'undefined':case'null':case'string':case'boolean':case'number':break;case'object':case'function':switch(Sb.constructor){case String:Tb='String';break;case Boolean:Tb='Boolean';break;case Number:Tb='Number';break;case Array:Tb='Array';break;case RegExp:Tb='RegExp';break;case Function:Tb='Function';break;default:var m=Sb.constructor.toString().match(/function\s*([^( ]+)\(/);if(m){Tb=m[1];}
break;}
break;default:break;}}
finally{Tb=Tb.substr(0,1).toUpperCase()+Tb.substr(1);return Tb;}};xmp.zeroPad=function(Ub,Vb){var Wb='';Wb+=Ub;var Xb=Wb.length;for(var i=Xb;i<Vb;i++){Wb=('0'+Wb);}
return Wb;};xmp.MapIterator=function(Yb,Zb){this.p_map=Yb;this.p_keys=(Zb)?xmp.MapIterator.extractKeysSorted(Yb):xmp.MapIterator.extractKeys(Yb);this.p_current=-1;this.first();};xmp.MapIterator.create=function($b){return new xmp.MapIterator($b,false);};xmp.MapIterator.createSorted=function(ac){return new xmp.MapIterator(ac,true);};xmp.MapIterator.extractKeys=function(bc){var cc=[];if(!bc){return cc;}
var dc='';var ec=(typeof(bc.hasOwnProperty)!=='undefined');for(dc in bc){if((!ec)||(ec&&bc.hasOwnProperty(dc))){cc.push(dc);}}
return cc;};xmp.MapIterator.extractKeysSorted=function(fc){return xmp.MapIterator.extractKeys(fc).sort();};xmp.MapIterator.prototype.first=function(){this.p_current=0;};xmp.MapIterator.prototype.hasNext=function(){return(!this.isDone());};xmp.MapIterator.prototype.isDone=function(){return(this.p_current>=this.p_keys.length);};xmp.MapIterator.prototype.next=function(){this.p_current++;};xmp.MapIterator.prototype.currentKey=function(){this.p_checkDone();return this.p_keys[this.p_current];};xmp.MapIterator.prototype.currentValue=function(){return this.p_map[this.currentKey()];};xmp.MapIterator.prototype.updateCurrentValue=function(gc){this.p_map[this.currentKey()]=gc;};xmp.MapIterator.prototype.p_checkDone=function(){if(this.isDone()){throw new Error('MapIterator out of bounds.');}};xmp.MapIterator.prototype.getKeyArray=function(){return this.p_keys;};xmp.MapIterator.prototype.getValueArray=function(){var hc=[];for(var i=0;i<this.p_keys.length;i++){hc.push(this.p_map[this.p_keys[i]]);}
return hc;};xmp.MapIterator.prototype.cloneMap=function(){var ic={};for(var i=0;i<this.p_keys.length;i++){var jc=this.p_keys[i];ic[jc]=this.p_map[jc];}
return ic;};xmp.ObjectReporter=function(){this.p_root=null;this.p_reportLines=[];this.p_MAX_DEPTH=12;this.p_classArray=[];this.p_classMap={};this.p_filterEmptyClasses=true;this.p_filterOverrides=true;this.p_filterConstructors=true;};xmp.ObjectReporter.prototype.report=function(kc){var lc=xmp.getObjectFromString(kc);this.p_root={ch:[],p:null};this.p_root.ch.push(this.p_reportHelper(lc,kc,0,this.p_root));this.p_walk(this.p_root.ch[0]);return this.p_reportLines.sort();};xmp.ObjectReporter.prototype.p_walk=function(mc){if(this.p_filterEmptyClasses&&mc.cl&&(0===this.p_getObjCount(mc))){return;}
var nc=mc.n+', '+mc.t;if(mc.cl!==null&&mc.cl.s!==null){nc+=', super: '+this.p_showHiearchy(mc.cl.s);}
if(!(mc.t==='prototype'||(this.p_filterConstructors&&mc.t==='class'))){this.p_reportLines.push(nc);}
for(var i=0;i<mc.ch.length;i++){this.p_walk(mc.ch[i]);}};xmp.ObjectReporter.prototype.p_getObjCount=function(oc){var pc=0;for(var i=0;i<oc.ch.length;i++){var qc=oc.ch[i];if(qc.t!=='prototype'){pc++;}
pc+=this.p_getObjCount(qc);}
return pc;};xmp.ObjectReporter.prototype.p_showHiearchy=function(cl){var rc='';while(cl!==null){rc+=cl.n;cl=cl.s;if(cl!==null){rc+=', ';}}
return rc;};xmp.ObjectReporter.prototype.p_reportHelper=function(sc,tc,uc,vc){var wc={o:sc,n:tc,t:'',d:uc,cl:null,ch:[],p:vc};var xc=(this.p_getTerminalName(wc.n)==='prototype');if(xc){wc.t='prototype';}
else{wc.t=typeof(wc.o);this.p_checkForClass(wc);}
if(wc.t==='function'){this.p_checkIsOverridenFunction(wc);}
if(this.p_filterOverrides&&wc.t==='override'){return null;}
if(!this.p_isNonArrayObject(wc.o)){return wc;}
if(uc>=this.p_MAX_DEPTH){wc.warn='Exceeeded max depth, probable recursion: '+tc;return wc;}
for(var yc=xmp.MapIterator.create(wc.o);yc.hasNext();yc.next()){var zc=yc.currentKey();if(zc.indexOf('p_')===0){continue;}
if(zc.indexOf('i_')===0){continue;}
if(zc==='constructor'){continue;}
if(zc==='ctor'){continue;}
if(zc==='base'){continue;}
var Ac=yc.currentValue();if(Ac===xmp.getGlobalNamespace()){continue;}
var Bc=this.p_reportHelper(Ac,tc+'.'+zc,(uc+1),wc);if(Bc){wc.ch.push(Bc);}}
return wc;};xmp.ObjectReporter.prototype.p_isNonArrayObject=function(Cc){return((typeof(Cc)==='object'||typeof(Cc)==='function')&&!(Cc instanceof Array));};xmp.ObjectReporter.prototype.p_checkForClass=function(Dc){if(!this.p_hasInstanceMethods(Dc.o)){return;}
if(typeof(this.p_classMap[Dc.n])!=='undefined'){return;}
var Ec={n:Dc.n,cl:Dc.o,s:null};if(typeof(Dc.o.ctor)!=='undefined'){for(var i=0;i<this.p_classArray.length;i++){var Fc=this.p_classArray[i];if(Fc.cl===Dc.o.ctor){Ec.s=Fc;break;}}}
this.p_classArray.push(Ec);this.p_classMap[Ec.n]=Ec;Dc.cl=Ec;Dc.t='class';};xmp.ObjectReporter.prototype.p_hasInstanceMethods=function(Gc){if(typeof(Gc)!=='function'){return false;}
var Hc=xmp.MapIterator.extractKeys(Gc.prototype);if(Hc.length===0){return false;}
if(Hc.length===1&&Hc[0]==='constructor'){return false;}
return true;};xmp.ObjectReporter.prototype.p_getTerminalName=function(Ic){var Jc=Ic.lastIndexOf('.');if(Jc===-1){return Ic;}
return Ic.substring(Jc+1);};xmp.ObjectReporter.prototype.p_checkIsOverridenFunction=function(Kc){if(Kc.t!=='function'){return;}
if(Kc.p!==null&&Kc.p.t==='prototype'&&Kc.p.p!==null&&Kc.p.p.t==='class'&&Kc.p.p.cl&&Kc.p.p.cl.s&&Kc.p.p.cl.s.cl){var Lc=Kc.p.p.cl.s.cl;var Mc=this.p_getTerminalName(Kc.n);while(Lc){if(typeof(Lc.prototype[Mc])!=='undefined'){Kc.t='override';break;}
Lc=(Lc.s&&Lc.s.cl)?Lc.s.cl:null;}}};xmp.i_UNKNOWN_TYPE="unknown";xmp.i_OBJECT_TYPE="object";xmp.i_STRING_TYPE="string";xmp.i_BOOLEAN_TYPE="boolean";xmp.i_NUMBER_TYPE="number";xmp.i_FUNCTION_TYPE="function";xmp.i_UNDEFINED_TYPE="undefined";xmp.TRUE="true";xmp.FALSE="false";xmp.MICROSOFT_BROWSER="Microsoft";xmp.OPERA_BROWSER="Opera";xmp.FIREFOX_BROWSER="Firefox";xmp.SAFARI_BROWSER="Safari";xmp.WINDOWS_PLATFORM="Windows";xmp.MAC_PLATFORM="Mac";xmp.i_ROOT_URL="rootUrl";xmp.NO_DEFAULT_VALUE="";xmp.i_DELIMITER="|";xmp.ID_ATTRIBUTE="id";xmp.NAME_ATTRIBUTE="name";xmp.i_DEFAULT_TIMER_INTERVAL=100;xmp.SYNCH_UNIT="SynchUnit";xmp.CONNECTING="Connecting";xmp.CONNECTED="Connected";xmp.OPEN="Open";xmp.BUFFERING="Buffering";xmp.FIRST_FRAME_RENDERED="FirstFrameRendered";xmp.i_MONITOR_INTERVAL=1000;xmp.DISPLAY_NONE="none";xmp.DISPLAY_BLOCK="block";xmp.DISPLAY_INLINE="inline";xmp.i_CONTEXT="context";xmp.i_VOLUME="volume";xmp.i_MUTE="mute";xmp.i_BLACK_BACKGROUND_COLOR="#000000";xmp.NO_TIME_LIMIT=-1;xmp.i_IS_AVAILABLE="IsAvailable";xmp.i_GET_POSITION="GetPosition";xmp.i_GET_DURATION="GetDuration";xmp.i_GET_VOLUME="GetVolume";xmp.i_SET_VOLUME="SetVolume";xmp.i_GET_MUTE="GetMute";xmp.i_SET_MUTE="SetMute";xmp.FULLSCREEN="Fullscreen";xmp.i_GET_FULLSCREEN="GetFullscreen";xmp.i_SET_FULLSCREEN="SetFullscreen";xmp.i_GET_BUFFERING_PROGRESS="GetBufferingProgress";xmp.TYPE="type";xmp.ON_DEMAND_STREAMING_MODE="vod";xmp.LIVE_STREAMING_MODE="live";xmp.CONTROL_STREAMING_MODE="control";xmp.AD_STREAMING_MODE="ad";xmp.i_WIDTH="width";xmp.i_HEIGHT="height";xmp.MT_PLAYER_BOOTSTRAP="bootstrap";xmp.MT_PLAYER_PLAYLIST_ENDED="playlist_ended";xmp.createNamespace("xmp.net");xmp.net.AbstractTransport=function(Nc,Oc,Pc,Qc,Rc){this.p_requestId=Nc;this.p_loadId=Oc;this.p_callback=Pc;this.p_cfg=Qc;this.p_contentType=Rc;this.p_response=new xmp.net.AjaxResponse(Oc);this.p_timer=null;this.p_manager=xmp.net.AjaxRequestManager.getInstance();this.p_response.setFullUrl(this.p_cfg.rootUrl+this.p_response.getId());};xmp.net.AbstractTransport.prototype.i_getRequestId=function(){return this.p_requestId;};xmp.net.AbstractTransport.prototype.i_getLoadId=function(){return this.p_loadId;};xmp.net.AbstractTransport.prototype.i_getResponse=function(){return this.p_response;};xmp.net.AbstractTransport.prototype.i_getCallback=function(){return this.p_callback;};xmp.net.AbstractTransport.prototype.i_getConfiguration=function(){return this.p_cfg;};xmp.net.AbstractTransport.prototype.i_getContentType=function(){return this.p_contentType;};xmp.net.AbstractTransport.prototype.i_setLoadedData=function(Sc){throw new Error("Not supported.");};xmp.net.AbstractTransport.prototype.i_request=function(Tc,Uc){throw new Error("Must override.");};xmp.net.AbstractTransport.prototype.i_makeReport=function(){var Vc='';Vc+=('Request ID: '+this.i_getRequestId()+', ');Vc+=('Transport Type: '+xmp.net.TransportTypes.stringify(this.i_getConfiguration().transportType)+', ');Vc+=('Load ID: '+this.i_getLoadId()+', ');Vc+=('Root URL: '+this.i_getConfiguration().rootUrl+', ');Vc+=('Content Type: '+xmp.net.ContentTypes.stringify(this.i_getContentType()));return Vc;};xmp.net.AbstractTransport.prototype.i_getManager=function(){return this.p_manager;};xmp.net.AbstractTransport.prototype.i_handleTimeout=function(){throw new Error("Must override.");};xmp.net.AbstractTransport.prototype.i_startTimer=function(){if(this.p_timer){this.p_timer.start();}};xmp.net.AbstractTransport.prototype.i_stopTimer=function(){if(this.p_timer){this.p_timer.stop();}};xmp.net.AbstractTransport.prototype.i_checkAndCreateTimer=function(){if(this.p_timer){this.p_timer.stop();}
var Wc=this.i_getConfiguration().timeout;if(Wc!==-1){if(this.p_timer===null){this.p_timer=new xmp.util.Timer(this.i_getRequestId(),Wc,1,new xmp.util.Callback(this.i_getRequestId(),this.p_handleTimer,this));}
return true;}
return false;};xmp.net.AbstractTransport.prototype.p_handleTimer=function(Xc,Yc){this.i_stopTimer();this.i_handleTimeout();};xmp.createNamespace("xmp.net");xmp.net.AbstractTagTransport=function(Zc,$c,ad,bd,cd){xmp.net.AbstractTagTransport.ctor.call(this,Zc,$c,ad,bd,cd);this.p_timedOut=false;};xmp.DERIVE_CLASS(xmp.net.AbstractTransport,xmp.net.AbstractTagTransport);xmp.net.AbstractTagTransport.prototype.i_setLoadedData=function(dd){this.i_completeResponse(dd);};xmp.net.AbstractTagTransport.prototype.i_request=function(ed,fd){try{this.p_timedOut=false;this.i_checkAndCreateTimer();var gd=this.i_getConfiguration().rootUrl+ed;if(fd!==null){throw new Error("Headers not supported");}
this.i_initTag(gd);this.i_startTimer();}
catch(e){this.i_finiTag();this.i_stopTimer();this.i_getResponse().i_setError(e);this.i_getManager().i_handleCompleteRequest(this);}};xmp.net.AbstractTagTransport.prototype.i_initTag=function(hd){throw new Error("Must override this method!");};xmp.net.AbstractTagTransport.prototype.i_finiTag=function(){throw new Error("Must override this method!");};xmp.net.AbstractTagTransport.prototype.i_makeTagId=function(){throw new Error("Must override this method!");};xmp.net.AbstractTagTransport.prototype.i_getLogger=function(){throw new Error("Must override this method!");};xmp.net.AbstractTagTransport.prototype.i_completeResponse=function(jd){try{this.i_stopTimer();if(this.p_timedOut){this.i_getLogger('Dropping data, request timed out.');return;}
if(this.i_getContentType()===xmp.net.ContentTypes.TEXT){if(typeof jd!=='string'){throw new Error('Requested text but got data of type:'+(typeof jd));}
this.i_getResponse().i_setText(jd);}
else if(this.i_getContentType()===xmp.net.ContentTypes.JSON){var kd=null;if(typeof jd==='string'){kd=this.i_getManager().i_parseJson(jd);}
else if(typeof jd==='object'&&jd!==null){kd=jd;}
if(kd!==null){this.i_getResponse().i_setJsonObject(kd);}
else{throw new Error('Requested JSON but got wrong data type:'+jd);}}}
catch(e){this.i_getResponse().i_setError(e);}
this.i_finiTag();this.i_getManager().i_handleCompleteRequest(this);};xmp.net.AbstractTagTransport.prototype.i_handleTimeout=function(){this.p_timedOut=true;this.i_getResponse().i_setTimedOut();this.i_finiTag();this.i_getManager().i_handleCompleteRequest(this);};xmp.createNamespace("xmp.net");xmp.net.AjaxRequestManager=function(){this.p_logger=new xmp.util.internals.CategoryLogger('AjaxRequestManager');this.p_loggerByTypeMap={};this.p_DEFAULT_TIMEOUT=30000;this.p_DEFAULT_TRANSPORT_TYPE=xmp.net.TransportTypes.stringify(xmp.net.TransportTypes.FLASH_XHR);this.p_DEFAULT_RETRIES=1;this.p_DEFAULT_WAIT_BETWEEN_RETRIES=0;this.p_DEFAULT_REQUEST_VERB='GET';this.p_requestIdCounter=0;this.p_requestMap={};};xmp.net.AjaxRequestManager.i_POST_FORM_TYPE='post_form';xmp.net.AjaxRequestManager.prototype.init=function(ld,md){xmp.net.FlashXhrTransportManager.getInstance().i_init(md);};xmp.net.AjaxRequestManager.p_singeltonInstance=null;xmp.net.AjaxRequestManager.getInstance=function(){if(xmp.net.AjaxRequestManager.p_singeltonInstance===null){xmp.net.AjaxRequestManager.p_singeltonInstance=new xmp.net.AjaxRequestManager();}
return xmp.net.AjaxRequestManager.p_singeltonInstance;};xmp.net.AjaxRequestManager.handleLoaded=function(nd,od){xmp.net.AjaxRequestManager.getInstance().p_handleLoadedCore(nd,od);};xmp.net.AjaxRequestManager.ping=function(pd,qd){var cb=new xmp.util.Callback('Ping',xmp.net.AjaxRequestManager.p_pingCallback,null);xmp.net.AjaxRequestManager.getInstance().request(qd,cb,pd,qd,xmp.net.ContentTypes.PING,null);};xmp.net.AjaxRequestManager.p_pingCallback=function(rd,sd){};xmp.net.AjaxRequestManager.prototype.request=function(td,ud,vd,wd,xd,yd){var ok=xmp.isNonEmptyString(td)&&xmp.isNonEmptyString(vd)&&xmp.isNonEmptyString(wd);if(ok){ok=(ud!==null)&&(typeof ud==='object');}
if(ok){xd=xmp.net.ContentTypes.i_calc(xd);ok=(xd!==xmp.net.ContentTypes.INVALID);}
if(ok){if(!yd){yd=null;}
ok=((yd===null)||(typeof yd==='object'));}
if(!ok){throw new xmp.util.internals.InvalidArgsError('Invalid arguments, please read documentation for xmp.net.AjaxRequestManager.prototype.request.');}
var zd=this.p_findConfiguration(vd);if(!zd){throw new Error('Could not find proper configuration for URL root type: '+vd);}
this.p_requestWithConfiguration(zd,td,ud,wd,xd,yd);};xmp.net.AjaxRequestManager.prototype.p_requestWithConfiguration=function(Ad,Bd,Cd,Dd,Ed,Fd){var Gd=this.p_createTransport(Ad.transportType,Bd,Cd,Ad,Ed);this.p_requestMap[Gd.i_getRequestId()]=Gd;this.p_logRequestReport(Gd,Dd,Fd);Gd.i_request(Dd,Fd);};xmp.net.AjaxRequestManager.prototype.p_buildRequestReport=function(Hd,Id,Jd){var Kd='Making request = ';Kd+=(Hd.i_makeReport()+', ');Kd+=('Relative URL: '+Id+', ');Kd+=('Request Headers: ');if(Jd===null){Kd+='NONE';}
else{for(var i=0;i<Jd.length;i++){var Ld=Jd[i];Kd+=(Ld.name+' = '+Ld.value);if(i!==(Jd.length-1)){Kd+=' & ';}}}
return Kd;};xmp.net.AjaxRequestManager.prototype.p_createTransport=function(Md,Nd,Od,Pd,Qd){var Rd=xmp.net.TransportTypes;var Sd=Rd.i_calc(Md);this.p_requestIdCounter++;var Td=this.p_requestIdCounter.toString();switch(Sd){case Rd.XHR:return new xmp.net.XhrTransport(Td,Nd,Od,Pd,Qd);case Rd.IFRAME:return new xmp.net.IFrameTagTransport(Td,Nd,Od,Pd,Qd);case Rd.SCRIPT:return new xmp.net.ScriptTagTransport(Td,Nd,Od,Pd,Qd);case Rd.FLASH_XHR:return new xmp.net.FlashXhrTransport(Td,Nd,Od,Pd,Qd);case Rd.MOCK:return new xmp.net.MockTransport(Td,Nd,Od,Pd,Qd);default:return null;}};xmp.net.AjaxRequestManager.prototype.i_parseJson=function(Ud){Ud=xmp.trimString(Ud);return this.i_parseJavaScript('('+Ud+')');};xmp.net.AjaxRequestManager.prototype.i_parseJavaScript=function(Vd){return eval(Vd);};xmp.net.AjaxRequestManager.prototype.i_handleCompleteRequest=function(Wd){var Xd=Wd.i_getRequestId();if(!this.p_requestMap[Xd]){this.p_logger.debug("Did not find transport: "+Xd);return;}
delete this.p_requestMap[Xd];try{if(Wd.i_getResponse().isError()){if(Wd.i_getResponse().isTimedOut()||(Wd.i_getResponse().isCriticalOrFatalError())){var Yd=xmp.CriticalException.createCriticalException(xmp.XmpErrorCodes.CRITICAL_UNSPECIFIED_AJAX_ERROR,'ARM',this.p_buildReponseReport(Wd));this.p_logger.debug('ARM transport timeout',Yd);}
else{this.p_logReponseReport(Wd);}}
else{this.p_logReponseReport(Wd);}
Wd.i_getCallback().call(Wd.i_getResponse());}
catch(e){this.p_logger.trace("Error while calling request callback.",e);}};xmp.net.AjaxRequestManager.prototype.p_getLoggerByType=function(Zd){var $d=this.p_loggerByTypeMap[Zd];if(!$d){$d=new xmp.util.internals.CategoryLogger('AjaxRequestManager'+'_'+Zd);this.p_loggerByTypeMap[Zd]=$d;}
return $d;};xmp.net.AjaxRequestManager.prototype.p_logRequestReport=function(ae,be,ce){var de=this.p_getLoggerByType(ae.i_getConfiguration().rootUrlType);if(de.isDebugEnabled()){de.debug(this.p_buildRequestReport(ae,be,ce));}};xmp.net.AjaxRequestManager.prototype.p_logReponseReport=function(ee){var fe=this.p_getLoggerByType(ee.i_getConfiguration().rootUrlType);if(fe.isDebugEnabled()){fe.debug(this.p_buildReponseReport(ee));}};xmp.net.AjaxRequestManager.prototype.p_buildReponseReport=function(ge){var he='Request complete (Request ID: '+ge.i_getRequestId()+'), response = '+ge.i_getResponse().i_makeReport();return he;};xmp.net.AjaxRequestManager.prototype.p_handleLoadedCore=function(ie,je){try{for(var ke=xmp.MapIterator.create(this.p_requestMap);ke.hasNext();ke.next()){var le=ke.currentValue();if(le.i_getLoadId()===ie){le.i_setLoadedData(je);return;}}
this.p_logger.info("Dropping loaded data, could not find transport for: "+ie);}
catch(e){this.p_logger.warn("Error while calling p_handleLoadedCore.",e);}};xmp.net.AjaxRequestManager.prototype.p_findConfiguration=function(me){var ne=xmp.util.RootUrlProvider.getInstance().i_getRootUrl(me);if(ne.length===0){return null;}
var oe=xmp.util.RootUrlProvider.getInstance().i_getRootUrlNode(me);var pe=xmp.net.TransportTypes.fromString(oe.getString('transportType',this.p_DEFAULT_TRANSPORT_TYPE));if(pe===xmp.net.TransportTypes.INVALID){return null;}
var qe={};qe.rootUrl=ne;qe.rootUrlType=me;qe.transportType=pe;qe.timeout=oe.getInt('timeout',this.p_DEFAULT_TIMEOUT);qe.retries=oe.getInt('retries',this.p_DEFAULT_RETRIES);qe.waitBetweenRetries=oe.getInt('waitBetweenRetries',this.p_DEFAULT_WAIT_BETWEEN_RETRIES);qe.requestVerb=oe.getString('requestVerb',this.p_DEFAULT_REQUEST_VERB);return qe;};xmp.createNamespace("xmp.net");xmp.net.AjaxResponse=function(id){this.p_id=id;this.p_fullUrl="";this.p_errorObject=null;this.p_jsonObject=null;this.p_text='';this.p_timedOutError=false;this.p_isCriticalOrFatalError=false;};xmp.net.AjaxResponse.prototype.getId=function(){return this.p_id;};xmp.net.AjaxResponse.prototype.getFullUrl=function(){return this.p_fullUrl;};xmp.net.AjaxResponse.prototype.setFullUrl=function(se){this.p_fullUrl=se;};xmp.net.AjaxResponse.prototype.isError=function(){return(this.p_errorObject!==null);};xmp.net.AjaxResponse.prototype.isTimedOut=function(){return this.p_timedOutError;};xmp.net.AjaxResponse.prototype.isCriticalOrFatalError=function(){return this.p_isCriticalOrFatalError;};xmp.net.AjaxResponse.prototype.getErrorObject=function(){return this.p_errorObject;};xmp.net.AjaxResponse.prototype.getJsonObject=function(){this.p_accessGuard();return this.p_jsonObject;};xmp.net.AjaxResponse.prototype.getText=function(){this.p_accessGuard();return this.p_text;};xmp.net.AjaxResponse.prototype.getErrorMessage=function(){if(this.isError()){return xmp.extractErrorMessage(this.getErrorObject());}
else{return'No Error';}};xmp.net.AjaxResponse.prototype.p_accessGuard=function(){if(this.isError()){var ex=new xmp.net.AjaxResponseException('Tried to access AjaxResponse while in an error state, see nested exception.');ex.message+=('\nNESTED ERROR: '+xmp.extractErrorMessage(this.p_errorObject));throw ex;}};xmp.net.AjaxResponse.prototype.i_setError=function(te){this.p_setErrorCore(te);};xmp.net.AjaxResponse.prototype.i_setTimedOut=function(){this.p_timedOutError=true;this.p_setErrorCore(new Error("AjaxResponse: Request timed out."));};xmp.net.AjaxResponse.prototype.i_setJsonObject=function(ue){this.p_jsonObject=ue;};xmp.net.AjaxResponse.prototype.i_setText=function(ve){this.p_text=ve;};xmp.net.AjaxResponse.prototype.p_setErrorCore=function(we){this.p_isCriticalOrFatalError=false;if(we instanceof Error){this.p_errorObject=new xmp.net.AjaxResponseException('AjaxResponse, see nested exception');this.p_errorObject.message+=('\nNESTED ERROR: '+xmp.extractErrorMessage(we));if((we instanceof xmp.FatalException)||(we instanceof xmp.CriticalException)){this.p_isCriticalOrFatalError=true;}}
else{this.p_errorObject=new xmp.net.AjaxResponseException("AjaxResponse: UNKNOWN ERROR");}};xmp.net.AjaxResponse.prototype.i_makeReport=function(){var xe='';xe+=('Response ID: '+this.getFullUrl()+'\n');if(this.isError()){xe+=('Response Text: '+this.p_text+'\n');xe+=('Response JSON: null\n');xe+=('ERROR Message: '+this.getErrorMessage());}
else{xe+=('Response Text: '+this.getText()+'\n');xe+=('Response JSON: '+((this.getJsonObject()===null)?'null':'not null')+'\n');xe+='SUCCESS';}
return xe;};xmp.net.AjaxResponseException=function(ye){this.name="AjaxResponseException";this.message=ye;};xmp.DERIVE_CLASS(Error,xmp.net.AjaxResponseException);xmp.createNamespace("xmp.net");xmp.net.ContentTypes=function(){};xmp.net.ContentTypes.INVALID=-1;xmp.net.ContentTypes.TEXT=0;xmp.net.ContentTypes.JSON=1;xmp.net.ContentTypes.PING=2;xmp.net.ContentTypes.p_BEGIN=-1;xmp.net.ContentTypes.p_END=2;xmp.net.ContentTypes.i_calc=function(ze){var Ae=xmp.net.ContentTypes;if((typeof ze!=='number')||(ze<Ae.p_BEGIN)||(ze>Ae.p_END)){return Ae.p_BEGIN;}
return ze;};xmp.net.ContentTypes.stringify=function(Be){var Ce=xmp.net.ContentTypes;var De=Ce.i_calc(Be);switch(De){case Ce.INVALID:return'invalid';case Ce.TEXT:return'text';case Ce.JSON:return'json';case Ce.PING:return'ping';default:return'invalid';}};xmp.net.ContentTypes.fromString=function(Ee){var Fe=xmp.net.ContentTypes;switch(Ee){case'invalid':return Fe.INVALID;case'text':return Fe.TEXT;case'json':return Fe.JSON;case'ping':return Fe.PING;default:return Fe.INVALID;}};xmp.createNamespace("xmp.net");xmp.net.FlashXhrTransport=function(Ge,He,Ie,Je,Ke){xmp.net.FlashXhrTransport.ctor.call(this,Ge,He,Ie,Je,Ke);this.p_FLASH_XML_REQUEST_MIME_TYPE="text/html";this.p_handle="";this.p_url="";this.p_flashXhrManager=xmp.net.FlashXhrTransportManager.getInstance();this.p_isIEWin=(xmp.isIEBrowser()&&(xmp.util.internals.BrowserDetect.OS===xmp.WINDOWS_PLATFORM));this.p_requestHeaderArray=null;};xmp.DERIVE_CLASS(xmp.net.AbstractTransport,xmp.net.FlashXhrTransport);xmp.net.FlashXhrTransport.prototype.i_getHandle=function(){return this.p_handle;};xmp.net.FlashXhrTransport.prototype.i_getUrl=function(){return this.p_url;};xmp.net.FlashXhrTransport.prototype.i_getRequestVerb=function(){return this.i_getConfiguration().requestVerb;};xmp.net.FlashXhrTransport.prototype.i_getRequestMimeType=function(){return this.p_FLASH_XML_REQUEST_MIME_TYPE;};xmp.net.FlashXhrTransport.prototype.p_getFlashXhrManager=function(){return this.p_flashXhrManager;};xmp.net.FlashXhrTransport.prototype.i_getRequestHeaders=function(){return this.p_requestHeaderArray;};xmp.net.FlashXhrTransport.prototype.i_request=function(Le,Me){try{this.p_requestHeaderArray=Me;this.p_url=this.i_getConfiguration().rootUrl+Le;this.p_handle=this.p_getFlashXhrManager().i_getXhrComponentName()+this.i_getRequestId();this.p_getFlashXhrManager().i_open(this);}
catch(e){this.i_handleError(e.name,e.message);}};xmp.net.FlashXhrTransport.prototype.i_doRequest=function(){this.i_checkAndCreateTimer();this.p_getFlashXhrManager().i_doRequest(this);this.i_startTimer();};xmp.net.FlashXhrTransport.prototype.i_handleData=function(Ne){this.i_stopTimer();this.i_getResponse().i_setText(Ne);if(this.i_getContentType()===xmp.net.ContentTypes.JSON){var Oe=this.i_getManager().i_parseJson(Ne);this.i_getResponse().i_setJsonObject(Oe);}
this.p_getFlashXhrManager().i_close(this);this.i_getManager().i_handleCompleteRequest(this);};xmp.net.FlashXhrTransport.prototype.i_handleError=function(Pe,Qe){this.i_stopTimer();var Re="Type:  "+Pe+"\nDescription:  "+Qe;this.p_getFlashXhrManager().i_close(this);var Se=this.p_extractErrorCode(Qe);var Te=null;if(this.p_isIEWin&&(Se===0)){Te=xmp.CriticalException.createCriticalException(xmp.XmpErrorCodes.CRITICAL_UNSPECIFIED_AJAX_ERROR,'FlashXhrTransport',Qe);}
else{Te=new Error(Re);}
this.i_getResponse().i_setError(Te);this.i_getManager().i_handleCompleteRequest(this);};xmp.net.FlashXhrTransport.prototype.p_extractErrorCode=function(Ue){var re=/XML\/HTTP Error:\s{2}(\d{1,6}) \w*/;var Ve=Ue.match(re);if(Ve!==null&&Ve.length>1){return parseInt(Ve[1],0);}
return-1;};xmp.net.FlashXhrTransport.prototype.i_handleTimeout=function(){this.p_getFlashXhrManager().i_close(this);this.i_getResponse().i_setTimedOut();this.i_getManager().i_handleCompleteRequest(this);};xmp.createNamespace("xmp.net");xmp.net.FlashXhrTransportManager=function(){this.p_logger=new xmp.util.internals.CategoryLogger('FlashXhrTransportManager');this.p_CREATION_TIMEOUT=5000;this.p_FLASH_DATA_CALLBACK="dataCallback";this.p_FLASH_XML_HTTP_REQUEST_COMPONENT="XMLHttpRequest";this.p_FLASH_XML_HTTP_REQUEST_COMPONENT_NAME="FlashXMLHttpRequest";this.p_FLASH_XML_HTTP_REQUEST_COMPONENT_CONTAINER_NAME="FlashXMLHttpRequestContainer";this.p_initializationState='None';this.p_FlashXmlHttpRequestRegistry={};this.p_create_cb=null;this.p_transitionInitializationState('Uninitialized');};xmp.net.FlashXhrTransportManager.p_singeltonInstance=null;xmp.net.FlashXhrTransportManager.getInstance=function(){if(xmp.net.FlashXhrTransportManager.p_singeltonInstance===null){xmp.net.FlashXhrTransportManager.p_singeltonInstance=new xmp.net.FlashXhrTransportManager();}
return xmp.net.FlashXhrTransportManager.p_singeltonInstance;};xmp.net.FlashXhrTransportManager.prototype.i_init=function(We){try{if(this.p_getInitializationState()!=='Uninitialized'){throw new Error('FlashXhrTransportManager - Already started initialization.');}
this.p_transitionInitializationState('Before creation');this.p_createFlashXMLHttpRequest();this.p_transitionInitializationState('After creation');this.p_create_cb=We;var Xe=new xmp.util.Callback('FlashXhrTransportManager_init',this.p_handleInitTimeout,this);Xe.i_callAsynchEx(this.p_CREATION_TIMEOUT,[]);}
catch(ex){We.call(new Error(xmp.extractErrorMessage(ex)));}};xmp.net.FlashXhrTransportManager.prototype.p_handleInitTimeout=function(){var Ye=this.p_create_cb;this.p_create_cb=null;if(Ye===null){return;}
var Ze=new xmp.baseplayer.ApplicationError(null,'badInitialFlashObject',null,[{label:"Url",text:this.p_makeSWFPath()}]);this.p_logger.warn(Ze.message,Ze);Ye.call(xmp.FatalException.createFatalException(xmp.XmpErrorCodes.FATAL_PLUGIN_INIT,'FlashXhrTransportManager','timed out intializing flash XHR SWF'));};xmp.net.FlashXhrTransportManager.prototype.i_getXhrComponentName=function(){return this.p_FLASH_XML_HTTP_REQUEST_COMPONENT_NAME;};xmp.net.FlashXhrTransportManager.prototype.p_getXhrComponent=function(){return document.getElementById(this.i_getXhrComponentName());};xmp.net.FlashXhrTransportManager.prototype.i_doRequest=function($e){this.p_enforceReadyState();var af=this.p_getXhrComponent();af.xhrOpen($e.i_getHandle(),$e.i_getRequestVerb(),$e.i_getRequestMimeType());if($e.i_getContentType()===xmp.net.ContentTypes.PING){af.xhrSetResultData($e.i_getHandle(),'ping');}
var bf=$e.i_getRequestHeaders();if(bf){for(var i=0;i<bf.length;i++){var cf=bf[i];var df=cf.name;if(xmp.isNonEmptyString(cf.type)&&(cf.type===xmp.net.AjaxRequestManager.i_POST_FORM_TYPE)){df='_POST_FORM_VAR_:'+df;}
af.xhrAddRequestHeader($e.i_getHandle(),df,cf.value);}}
af.xhrSend($e.i_getHandle(),$e.i_getUrl());};xmp.net.FlashXhrTransportManager.prototype.p_makeSWFPath=function(){return xmp.makeSWFPath(this.p_FLASH_XML_HTTP_REQUEST_COMPONENT,true);};xmp.net.FlashXhrTransportManager.prototype.p_createFlashXMLHttpRequest=function(){if(document.getElementById(this.p_FLASH_XML_HTTP_REQUEST_COMPONENT_CONTAINER_NAME)===null){var ef=document.createElement("div");ef.setAttribute(xmp.ID_ATTRIBUTE,this.p_FLASH_XML_HTTP_REQUEST_COMPONENT_CONTAINER_NAME);ef.setAttribute(xmp.NAME_ATTRIBUTE,this.p_FLASH_XML_HTTP_REQUEST_COMPONENT_CONTAINER_NAME);xmp.insertDomChildBefore(document.body,ef);var ff=new SWFObject(this.p_makeSWFPath(),this.i_getXhrComponentName(),1,1,8,"#FFFFFF");ff.addParam(xmp.i_ALLOW_SCRIPT_ACCESS,xmp.i_ALWAYS_ACCESS);ff.addVariable(xmp.i_CONTEXT,'create_handle');var gf='xmp.net.FlashXhrTransportManager.getInstance().';ff.addVariable(xmp.i_FLASH_INITIALIZATION_CALLBACK,gf+'onInit');ff.addVariable(this.p_FLASH_DATA_CALLBACK,gf+'onData');ff.addVariable(xmp.i_FLASH_ERROR_CALLBACK,gf+'onError');ff.write(this.p_FLASH_XML_HTTP_REQUEST_COMPONENT_CONTAINER_NAME);xmp.util.FlashUtility.i_buildFSCommandScript(ef,this.i_getXhrComponentName(),gf+"handleFSCommand(command, args);");}};xmp.net.FlashXhrTransportManager.prototype.p_handleInit=function(){this.p_logger.debug('In p_handleInit.');if(this.p_getInitializationState()!=='After creation'){if(this.p_getInitializationState()!=='Relaying p_handleInit'){var hf=new xmp.util.Callback('FlashXhrTransportManager_relay_handleInit',this.p_handleInit,this);hf.i_callAsynch([]);this.p_transitionInitializationState('Relaying p_handleInit');}
return;}
var jf=this.p_create_cb;this.p_create_cb=null;if(jf===null){this.p_logger.i_critical("Unexpected: creation callback is null.");return;}
this.p_transitionInitializationState('Ready');jf.call('Ready');};xmp.net.FlashXhrTransportManager.prototype.i_close=function(kf){this.p_getXhrComponent().xhrClose(kf.i_getHandle());this.p_FlashXmlHttpRequestRegistry[kf.i_getHandle()]=null;delete this.p_FlashXmlHttpRequestRegistry[kf.i_getHandle()];};xmp.net.FlashXhrTransportManager.prototype.i_open=function(lf){this.p_enforceReadyState();this.p_FlashXmlHttpRequestRegistry[lf.i_getHandle()]=lf;lf.i_doRequest();};xmp.net.FlashXhrTransportManager.prototype.handleFSCommand=function(mf,nf){try{mf=xmp.util.FlashUtility.i_normalizeCommand(mf);var of='xmp.net.FlashXhrTransportManager.getInstance().';var pf=xmp.util.FlashUtility;var qf=null;switch(mf){case of+'onInit':qf=pf.i_splitFSCommandData(nf,2);this.onInit(qf[0],qf[1]);break;case of+'onData':qf=pf.i_splitFSCommandData(nf,2);this.onData(qf[0],qf[1]);break;case of+'onError':qf=pf.i_splitFSCommandData(nf,3);this.onError(qf[0],qf[1],qf[2]);break;default:this.p_logger.warn('Unrecognized FSCommand: '+mf);break;}}
catch(e){this.p_logger.warn('Error executing FSCommand: '+mf,e);}};xmp.net.FlashXhrTransportManager.prototype.onInit=function(rf,sf){try{this.p_handleInit();}
catch(e){this.p_handleError(e,true);}};xmp.net.FlashXhrTransportManager.prototype.onData=function(tf,uf){try{var vf=this.p_getTransport(tf);try{vf.i_handleData(xmp.util.FlashUtility.i_externalInterfaceDecode(uf));}
catch(e2){this.p_handleTransportError(vf,e2,true);}}
catch(e){this.p_handleError(e,false);}};xmp.net.FlashXhrTransportManager.prototype.onError=function(wf,xf,yf){try{var zf=this.p_getTransport(wf);try{zf.i_handleError(xf,yf);}
catch(e2){this.p_handleTransportError(zf,e2,false);}}
catch(e){this.p_handleError(e,false);}};xmp.net.FlashXhrTransportManager.prototype.p_getTransport=function(Af){var Bf=this.p_findTransport(Af);if(!Bf){throw new Error("Could not get transport for handle: "+Af);}
return Bf;};xmp.net.FlashXhrTransportManager.prototype.p_findTransport=function(Cf){var Df=this.p_FlashXmlHttpRequestRegistry[Cf];return(Df)?Df:null;};xmp.net.FlashXhrTransportManager.prototype.p_handleError=function(Ef,Ff){if(Ff){this.p_logger.i_critical("Error in FlashXhrTransportManager",Ef);}
else{this.p_logger.warn("Error in FlashXhrTransportManager",Ef);}};xmp.net.FlashXhrTransportManager.prototype.p_handleTransportError=function(Gf,Hf,If){try{if(If){Gf.i_handleError(Hf.name,Hf.message);}
else{this.p_handleError(Hf,false);this.i_close(Gf);}}
catch(e){var e2=new Error("Error calling p_handleTransportError: "+xmp.extractErrorMessage(e)+"\nOriginal error: "+xmp.extractErrorMessage(Hf));this.p_handleError(e2,true);}};xmp.net.FlashXhrTransportManager.prototype.p_transitionInitializationState=function(Jf){this.p_logger.debug('Transition init state from "'+this.p_initializationState+'" to "'+Jf+'".');this.p_initializationState=Jf;};xmp.net.FlashXhrTransportManager.prototype.p_getInitializationState=function(){return this.p_initializationState;};xmp.net.FlashXhrTransportManager.prototype.p_isInReadyState=function(){return(this.p_getInitializationState()==='Ready');};xmp.net.FlashXhrTransportManager.prototype.p_enforceReadyState=function(){if(!this.p_isInReadyState()){throw new Error("FlashXhrTransportManager is not iniitialized!");}};xmp.createNamespace("xmp.net");xmp.net.IFrameTagTransport=function(Kf,Lf,Mf,Nf,Of){xmp.net.IFrameTagTransport.ctor.call(this,Kf,Lf,Mf,Nf,Of);this.p_logger=new xmp.util.internals.CategoryLogger('IFrameTagTransport');};xmp.DERIVE_CLASS(xmp.net.AbstractTagTransport,xmp.net.IFrameTagTransport);xmp.net.IFrameTagTransport.prototype.i_initTag=function(Pf){var Qf=document.createElement('iframe');Qf.id=this.i_makeTagId();document.body.appendChild(Qf);Qf.src=Pf;};xmp.net.IFrameTagTransport.prototype.i_finiTag=function(){try{var Rf=document.getElementById(this.i_makeTagId());if(Rf){document.body.removeChild(Rf);}}
catch(e){this.p_logger.warn('Error removing tag with ID: '+this.i_makeTagId(),e);}};xmp.net.IFrameTagTransport.prototype.i_makeTagId=function(){return'IFrameTagTransport'+'_'+this.i_getRequestId();};xmp.net.IFrameTagTransport.prototype.i_getLogger=function(){return this.p_logger;};xmp.createNamespace("xmp.net");xmp.net.MockTransport=function(Sf,Tf,Uf,Vf,Wf){xmp.net.MockTransport.ctor.call(this,Sf,Tf,Uf,Vf,Wf);};xmp.DERIVE_CLASS(xmp.net.AbstractTransport,xmp.net.MockTransport);xmp.net.MockTransport.prototype.i_request=function(Xf,Yf){this.p_url=Xf;this.p_mockAdCompositor=xmp.net.MockAdCompositor.i_test(Xf,Yf);this.p_doRequest();};xmp.net.MockTransport.prototype.p_doRequest=function(){this.i_checkAndCreateTimer();this.i_startTimer();if(this._networkDelayTimer){this._networkDelayTimer.stop();}
if(this.p_mockAdCompositor){this.p_dataItem=this.p_mockAdCompositor.i_constructComposite();}
else{this.p_dataItem=xmp.net.MockTransportData.getInstance().getItem(this.p_url);}
var Zf=this.p_dataItem?this.p_dataItem.delay:200;this._networkDelayTimer=new xmp.util.Timer(this.i_getRequestId(),Zf,1,new xmp.util.Callback(this.i_getRequestId(),this.p_handleRequest,this));this._networkDelayTimer.start();};xmp.net.MockTransport.prototype.p_handleRequest=function($f,ag){ag.stop();try{if(this.p_dataItem){this.p_handleData(this.p_dataItem.data);}
else{this.p_handleError("MockTransportError","No mock data found for "+this.p_url);}}
catch(e){this.p_handleError(e.name,e.message);}};xmp.net.MockTransport.prototype.p_handleData=function(bg){this.i_stopTimer();var cg=null;var dg=null;if(typeof bg==='string'){cg=bg;}
else{dg=bg;cg=xmp.toJSON(bg);}
this.i_getResponse().i_setText(cg);if(this.i_getContentType()===xmp.net.ContentTypes.JSON){if(!dg){dg=this.i_getManager().i_parseJson(cg);}
this.i_getResponse().i_setJsonObject(dg);}
this.i_getManager().i_handleCompleteRequest(this);};xmp.net.MockTransport.prototype.p_handleError=function(eg,fg){this.i_stopTimer();var gg="Type:  "+eg+"\nDescription:  "+fg;this.i_getResponse().i_setError(new Error(gg));this.i_getManager().i_handleCompleteRequest(this);};xmp.net.MockTransport.prototype.i_handleTimeout=function(){this.i_getResponse().i_setTimedOut();this.i_getManager().i_handleCompleteRequest(this);};xmp.net.MockAdCompositor=function(hg,ig){this.p_requestHeaderArray=ig;};xmp.net.MockAdCompositor.i_test=function(jg,kg){if(kg!==null&&kg.length>0&&xmp.isNonEmptyString(kg[0].name)&&kg[0].name.indexOf('ad')===0){return new xmp.net.MockAdCompositor(jg,kg);}
return null;};xmp.net.MockAdCompositor.prototype.i_constructComposite=function(){var lg=200;try{var mg=[];for(var i=0;i<this.p_requestHeaderArray.length;i++){var ng=this.p_requestHeaderArray[i];var og=xmp.net.MockTransportData.getInstance().getItem(ng.value);var pg='';if(og){var qg=og.data;if(typeof(qg)==='object'){qg=xmp.toJSON(qg);}
pg='__@@$$@@__ '+ng.name+' OK\n'+qg;lg=Math.max(lg,og.delay);}
else{pg='__@@$$@@__ '+ng.name+' ERROR\n'+"MockTransportError: No mock data found for "+ng.value;}
mg.push({sortKey:ng.name,data:pg});}
mg.sort(function(rg,sg){if(rg.sortKey<sg.sortKey){return-1;}
else if(rg.sortKey>sg.sortKey){return 1;}
return 0;});var tg=[];for(var j=0;j<mg.length;j++){tg.push(mg[j].data);}
var ug={};ug.data=tg.join('\n');ug.delay=lg;return ug;}
catch(ex){xmp.util.internals.CategoryLogger.i_create('MockAdCompositor').warn('Error in i_constructComposite',ex);}
return{'data':'','delay':lg};};xmp.createNamespace("xmp.net");xmp.net.MockTransportData=function(){this.p_logger=new xmp.util.internals.CategoryLogger('MockTransportData');this.p_dataMap={};};xmp.net.MockTransportData.p_singeltonInstance=null;xmp.net.MockTransportData.getInstance=function(){if(xmp.net.MockTransportData.p_singeltonInstance===null){xmp.net.MockTransportData.p_singeltonInstance=new xmp.net.MockTransportData();}
return xmp.net.MockTransportData.p_singeltonInstance;};xmp.net.MockTransportData.prototype.setDataMap=function(vg){this.p_dataMap=vg;};xmp.net.MockTransportData.prototype.getDataMap=function(){return this.p_dataMap;};xmp.net.MockTransportData.prototype.setItem=function(wg,xg){var yg=this.p_transformUrl(wg);this.p_dataMap[yg]=xg;};xmp.net.MockTransportData.prototype.getItem=function(zg){this.p_logger.info("MockTransportData.getData for "+zg);var Ag=this.p_transformUrl(zg);return this.p_dataMap[Ag];};xmp.net.MockTransportData.prototype.p_transformUrl=function(Bg){var Cg=this.p_hasTileId(Bg)?this.p_removeTileId(Bg):Bg;return Cg;};xmp.net.MockTransportData.prototype.p_hasTileId=function(Dg){return Dg.match(/tile=\d+/);};xmp.net.MockTransportData.prototype.p_removeTileId=function(Eg){var Fg=Eg.replace(/tile=\d+&/,'');if(Fg===Eg){Fg=Eg.replace(/&tile=\d+/,'');}
return Fg;};xmp.createNamespace("xmp.net");xmp.net.ScriptTagTransport=function(Gg,Hg,Ig,Jg,Kg){xmp.net.ScriptTagTransport.ctor.call(this,Gg,Hg,Ig,Jg,Kg);this.p_logger=new xmp.util.internals.CategoryLogger('ScriptTagTransport');};xmp.DERIVE_CLASS(xmp.net.AbstractTagTransport,xmp.net.ScriptTagTransport);xmp.net.ScriptTagTransport.prototype.i_initTag=function(Lg){var Mg=document.createElement('script');Mg.id=this.i_makeTagId();document.body.appendChild(Mg);Mg.src=Lg;};xmp.net.ScriptTagTransport.prototype.i_finiTag=function(){try{var Ng=document.getElementById(this.i_makeTagId());if(Ng){document.body.removeChild(Ng);}}
catch(e){this.p_logger.warn('Error removing tag with ID: '+this.i_makeTagId(),e);}};xmp.net.ScriptTagTransport.prototype.i_makeTagId=function(){return'ScriptTagTransport'+'_'+this.i_getRequestId();};xmp.net.ScriptTagTransport.prototype.i_getLogger=function(){return this.p_logger;};xmp.createNamespace("xmp.net");xmp.net.TransportTypes=function(){};xmp.net.TransportTypes.INVALID=-1;xmp.net.TransportTypes.XHR=0;xmp.net.TransportTypes.IFRAME=1;xmp.net.TransportTypes.SCRIPT=2;xmp.net.TransportTypes.FLASH_XHR=3;xmp.net.TransportTypes.MOCK=4;xmp.net.TransportTypes.p_BEGIN=-1;xmp.net.TransportTypes.p_END=4;xmp.net.TransportTypes.i_calc=function(Og){var Pg=xmp.net.TransportTypes;if((typeof Og!=='number')||(Og<Pg.p_BEGIN)||(Og>Pg.p_END)){return Pg.p_BEGIN;}
return Og;};xmp.net.TransportTypes.stringify=function(Qg){var Rg=xmp.net.TransportTypes;var Sg=Rg.i_calc(Qg);switch(Sg){case Rg.INVALID:return'invalid';case Rg.XHR:return'xhr';case Rg.IFRAME:return'iframe';case Rg.SCRIPT:return'script';case Rg.FLASH_XHR:return'flash';case Rg.MOCK:return'mock';default:return'invalid';}};xmp.net.TransportTypes.fromString=function(Tg){var Ug=xmp.net.TransportTypes;switch(Tg){case'invalid':return Ug.INVALID;case'xhr':return Ug.XHR;case'iframe':return Ug.IFRAME;case'script':return Ug.SCRIPT;case'flash':return Ug.FLASH_XHR;case'mock':return Ug.MOCK;default:return Ug.INVALID;}};xmp.createNamespace("xmp.net");xmp.net.XhrTransport=function(Vg,Wg,Xg,Yg,Zg){xmp.net.XhrTransport.ctor.call(this,Vg,Wg,Xg,Yg,Zg);this.p_requestObject=this.p_createRequestObject();var $g=this;this.p_requestObject.onreadystatechange=function(){$g.p_handleStateChange();};};xmp.DERIVE_CLASS(xmp.net.AbstractTransport,xmp.net.XhrTransport);xmp.net.XhrTransport.prototype.i_request=function(ah,bh){try{this.i_checkAndCreateTimer();var dh=this.i_getConfiguration().rootUrl+ah;this.p_requestObject.open('GET',dh);if(bh!==null){for(var i=0;i<bh.length;i++){var eh=bh[i];this.p_requestObject.setRequestHeader(eh.name,eh.value);}}
this.p_requestObject.send(null);this.i_startTimer();}
catch(e){this.i_stopTimer();this.i_getResponse().i_setError(e);this.i_getManager().i_handleCompleteRequest(this);}};xmp.net.XhrTransport.prototype.p_completeResponse=function(){try{this.i_stopTimer();if(this.p_requestObject.status!==200){throw new Error('Status: '+this.p_requestObject.status);}
var fh=this.p_requestObject.responseText;this.i_getResponse().i_setText(fh);if(this.i_getContentType()===xmp.net.ContentTypes.JSON){var gh=this.i_getManager().i_parseJson(fh);this.i_getResponse().i_setJsonObject(gh);}}
catch(e){this.i_getResponse().i_setError(e);}
this.i_getManager().i_handleCompleteRequest(this);};xmp.net.XhrTransport.prototype.i_handleTimeout=function(){this.p_requestObject.abort();this.i_getResponse().i_setTimedOut();this.i_getManager().i_handleCompleteRequest(this);};xmp.net.XhrTransport.prototype.p_handleStateChange=function(){if(this.p_requestObject.readyState===4){this.p_completeResponse();}};xmp.net.XhrTransport.p_factories=[function(){return new XMLHttpRequest();},function(){return new ActiveXObject('Msxml2.XMLHTTP');},function(){return new ActiveXObject('Microsoft.XMLHTTP');}];xmp.net.XhrTransport.p_factory=null;xmp.net.XhrTransport.prototype.p_createRequestObject=function(){if(xmp.net.XhrTransport.p_factory!==null){return xmp.net.XhrTransport.p_factory();}
for(var i=0;i<xmp.net.XhrTransport.p_factories.length;i++){try{var hh=xmp.net.XhrTransport.p_factories[i];var ih=hh();if(ih!==null){xmp.net.XhrTransport.p_factory=hh;return ih;}}
catch(e){continue;}}
xmp.net.XhrTransport.p_factory=function(){throw new Error('XMLHttpRequest not supported.');};xmp.net.XhrTransport.p_factory();return null;};
