
var BindingsVersion="2.060314.1";registerNamespace("Web.Debug.Performance");if(!Web.Debug.enabled)
{Web.Debug.enabled=false;Web.Debug.trace=function(){};Web.Debug.ASSERT=function(){return(Web.Debug.ASSERT)};Web.Debug.Performance.start=function()
{this.end=function(){};return this;}}
registerNamespace("Web.Enum");Web.Enum.getValue=function(p_enumType,p_str)
{return p_enumType.parse(p_str);}
Web.Enum.createEnumeration=Web.Enum.create=Type.createSimpleEnum=function()
{function extendEnum(p_addEnum)
{if(p_addEnum)
{for(var i in p_addEnum.getValues())
{enumeration[i]=i;}
enumeration._values=null;}
return enumeration;}
var arrEnum=[];arrEnum.push(null);for(var i=0;i<arguments.length;i++)
{arrEnum.push(arguments[i]);arrEnum.push(arguments[i]);}
var enumeration=Type.createEnum.apply(this,arrEnum);enumeration.extend=extendEnum;return enumeration;}
Web.Enum.extend=function(p_srcEnum,p_addEnum)
{if(!p_srcEnum)p_srcEnum=Web.Enum.create();return p_srcEnum.extend(p_addEnum);}
registerNamespace("Web.Flags");Web.Flags.create=function()
{var arrEnum=[];arrEnum.push(null);for(var i=0;i<arguments.length;i++)
{arrEnum.push(arguments[i]);}
return Type.createFlags.apply(this,arrEnum);};Web.Event=Type.DOMEvent=function(autoInvoke)
{var _handlers=null;var _autoInvoke=autoInvoke;var _isInvoked=false;this.reset=function()
{_isInvoked=false;}
this.get_autoInvoke=function(){return _autoInvoke;}
this._getHandlers=function(){if(_handlers==null){_handlers=[];}
return _handlers;}
this.isActive=function(){return((_handlers!=null)&&(_handlers.length!=0));}
this.get_isInvoked=function(){return _isInvoked;}
this.dispose=function(){if(_handlers){for(var h=_handlers.length-1;h>=0;h--){_handlers[h]=null;}
_handlers=null;}
_owner=null;}
this._setInvoked=function(value){_isInvoked=value;}
this.isActive=function()
{return(this.afncCallbacks.length!=0)}}
Type.DOMEvent.prototype.add=Type.DOMEvent.prototype.attach=function(p_fnc)
{var objEvent=this;function Run(){if(p_fnc)
p_fnc(objEvent.vPackage);}
if(this.get_autoInvoke()&&this.get_isInvoked()){window.setTimeout(Run,1);return(true);}
else if(p_fnc&&(!this._getHandlers().exists(p_fnc)))
{this._getHandlers().queue(p_fnc);return(true);}
return(false);}
Type.DOMEvent.prototype.remove=Type.DOMEvent.prototype.detach=function(handler){return this._getHandlers().remove(handler);}
Type.DOMEvent.prototype.clear=function()
{this._getHandlers().clear();}
Type.DOMEvent.prototype.fire=function(p_vPackage,p_fncAsyncCallback)
{var objEvent=this;function Done()
{if(objEvent.get_autoInvoke())
{objEvent.clear();objEvent.vPackage=p_vPackage;}
if(p_fncAsyncCallback)
p_fncAsyncCallback();objEvent._setInvoked(true);}
function Fire(p_fnc)
{if(p_fnc)
{try
{p_fnc(p_vPackage);}
catch(ex)
{}}}
Web.Utility.applyFunctionOverArray(Fire,objEvent._getHandlers(),p_fncAsyncCallback?Done:null);if(!p_fncAsyncCallback)
{Done();}}
Type.DOMEvent.registerSealedClass("Type.DOMEvent",null,Web.IDisposable);Web.Event.create=function(p_blnRunOnce)
{return(new Type.DOMEvent(p_blnRunOnce));}
registerNamespace("Web");Web.Runtime=new function()
{var objRuntime=this;this.culture=document.documentElement.getAttribute("web:culture")||"en-US";this.readyStateType=Type.createSimpleEnum("Uninitialized","Init","InitComplete");this._readyState=this.readyStateType.Uninitialized;this.oninit=new Type.DOMEvent(true);this.onunload=new Type.DOMEvent(true);this.getReadyState=function()
{return(this._readyState);}
function UnwirePage()
{window.detachEvent("onunload",UnwirePage);objRuntime.onunload.fire();}
function VerifyHookupsCalled()
{if(objRuntime._readyState==Web.Runtime.readyStateType.Unitialized)
{alert("You failed to call Web.Runtime.init() at the bottom of your page");}
window.detachEvent("onload",VerifyHookupsCalled);}
window.attachEvent("onload",VerifyHookupsCalled);window.attachEvent("onunload",UnwirePage)
function BuildEventInvoker(p_objEvent,p_strPreState,p_strRunState,p_strPostState)
{function Invoke()
{if(objRuntime._readyState!=objRuntime.readyStateType[p_strPreState])
{throw("Invalid state for event to fire");}
else
{objRuntime._readyState=objRuntime.readyStateType[p_strRunState];p_objEvent.fire();objRuntime._readyState=objRuntime.readyStateType[p_strPostState];}}
return(Invoke);}
this.init=BuildEventInvoker(objRuntime.oninit,"Uninitialized","Init","InitComplete");}
if(!document.head)document.head=document.getElementsByTagName("head")[0];String.prototype.removeSpaces=function()
{return this.replace(/ /gi,'');}
String.prototype.removeExtraSpaces=function()
{return(this.replace(String.prototype.removeExtraSpaces.re," "));}
String.prototype.removeExtraSpaces.re=new RegExp("\\s+","g");String.prototype.removeSpaceDelimitedString=function(r)
{var s=" "+this.trim()+" ";return s.replace(" "+r+" "," ").trim();}
String.prototype.encodeURI=function()
{var returnString;returnString=escape(this)
returnString=returnString.replace(/\+/g,"%2B");return returnString}
String.prototype.encodeHtml=function()
{var returnString=this.replace(/\>/g,"&gt;").replace(/\</g,"&lt;").replace(/\&/g,"&amp;").replace(/\'/g,"&#039;").replace(/\"/g,"&quot;");return returnString;}
String.prototype.decodeURI=function(){return unescape(this)}
registerNamespace("Web.Type");Web.Type.resolve=function(p_vType)
{try
{if(typeof(p_vType)=="string")
{p_vType=eval(p_vType);}
else if(typeof(p_vType)=="object")
{p_vType=p_vType.constructor;}
else if(typeof(p_vType)!="function")
{p_vType=null;}}
catch(ex)
{return(null);}
return(p_vType);}
Web.Type.compare=function(p_vTypeA,p_vTypeB)
{var fncTypeA=Web.Type.resolve(p_vTypeA);var fncTypeB=Web.Type.resolve(p_vTypeB);return(fncTypeA&&(fncTypeA==fncTypeB));}
Web.Type.isString=function(p_var)
{return(typeof(p_var)=="string")}
Web.Type.isArray=function(p_obj)
{return p_obj instanceof Array;}
Web.Type.isBoolean=function(p_var)
{return(typeof(p_var)=="boolean")}
Function.prototype.applyClass=function(blnEvents)
{function generateClass(o)
{var str=(o._typeName&&o._typeName.replace(/\./g,"_"))||"";if(o.bases)
for(var i=0;i<o.bases.length;i++)
{str+=" "+generateClass(o.bases[i]);if(blnEvents)
o.Events=Web.Enum.extend(o.Events,o.bases[i].Events);}
return str;}
if(!this._className)
{this._className=generateClass(this);}
return this._className;}
Function.prototype.removeClass=function(p_strClass)
{if(this._className)
{if(!this._arrClasses)
this._arrClasses=this._className.split(" ");for(var intApplied=0;intApplied<this._arrClasses.length;intApplied++)
{p_strClass=p_strClass.removeSpaceDelimitedString(this._arrClasses[intApplied]);}
return p_strClass;}
else
return p_strClass;}
Web.Conversion=function(){}
Web.Conversion.coerceInt=function(p_i)
{p_i=parseInt(p_i);return(isNaN(p_i)?0:p_i);}
Web.Conversion.coerceFloat=function(p_f)
{p_f=parseFloat(p_f);return(isNaN(p_f)?0.0:p_f);}
registerNamespace("Web.Browser");if(!Web.Browser.isMozilla)
{Web.Browser.isOpera=Web.Browser.isMozilla=function(){return false};Web.Browser.Button={LEFT:1,RIGHT:2,MIDDLE:4};}
Web.Browser.version=parseFloat(window.navigator.appVersion);Web.Browser._isIE=(!Web.Browser.isMozilla()&&!Web.Browser._isOpera);Web.Browser.isIE=function()
{return(Web.Browser._isIE);}
if(Web.Debug.enabled)Web.Debug.initEvents();registerNamespace("Web.Utility");Web.Utility.Prioritizer=function()
{var pList=new Object();this.push=function(obj,priority)
{if(!priority)priority=Web.Utility.Prioritizer.Priorities.Medium;if(pList[priority])
pList[priority].unshift(obj);else
throw"Error: Invalid Priority Specified";}
this.queue=function(obj,priority)
{if(!priority)priority=Web.Utility.Prioritizer.Priorities.Medium;if(pList[priority])
pList[priority].queue(obj);else
throw"Error: Invalid Priority Specified";}
this.dequeue=function()
{for(var p in pList)
{if(pList[p].length>0)
return pList[p].dequeue();}
return null;}
this.removeItem=function(obj)
{var bRemoved=false;for(var p in pList)
{bRemoved=pList[p].remove(obj)||bRemoved;}
return bRemoved;}
this.findByProperty=function(p_strProperty,p_strValue)
{for(var p in pList)
{for(var item in pList[p])
if(pList[p][item][p_strProperty]==p_strValue)
return pList[p][item];}
return null;}
this.getList=function()
{return pList;}
this.clear=function()
{for(var p in Web.Utility.Prioritizer.Priorities.getValues())
{pList[p]=new Array();}}
this.clear();return this;}
Web.Utility.Prioritizer.Priorities=Web.Enum.create("High","Medium","Low","Lowest");Web.Utility.extractHost=function(p_strUrl,p_blnIncludePrototcol)
{if(p_blnIncludePrototcol)
{Web.Utility.extractHost.reProtocolAndHost.lastIndex=0;var rMatch=Web.Utility.extractHost.reProtocolAndHost.exec(p_strUrl);return(rMatch?rMatch[1]:"");}
else
{Web.Utility.extractHost.reHost.lastIndex=0;var rMatch=Web.Utility.extractHost.reHost.exec(p_strUrl);return(rMatch?rMatch[2]:"");}}
Web.Utility.extractHost.reProtocolAndHost=new RegExp("((http|https|ftp)://[^\\/]*)\.*","ig");Web.Utility.extractHost.reHost=new RegExp("(http|https|ftp)://([^\\/]*)\.*","ig");Web.Utility.resolveUrl=function(str,strSource)
{if(str==null)return"";if(!strSource)
{if(!Web.Utility.resolveUrl.Base)
{var elBases=document.getElementsByTagName("base");if(elBases.length>0&&elBases[0].href!="")
strSource=Web.Utility.resolveUrl.Base=elBases[0].href;else
{var tmp=location.href;if(tmp.indexOf("?")>=0)
tmp=tmp.substring(0,tmp.indexOf("?"));strSource=Web.Utility.resolveUrl.Base=tmp.substring(0,tmp.lastIndexOf("/")+1);}}
else
strSource=Web.Utility.resolveUrl.Base;}
else
{strSource=strSource.substring(0,strSource.lastIndexOf("/")+1);}
if(str.startsWith("/"))str=location.protocol+"//"+location.host+str;if(str.indexOf("//")==-1)str=strSource+str;function DeleteDoubleDots(p_strPath)
{while(DeleteDoubleDots.reDoubleDot.test(p_strPath))
{p_strPath=p_strPath.replace(DeleteDoubleDots.reDoubleDot,"");}
return(p_strPath);}
DeleteDoubleDots.reDoubleDot=/\/[^\/]*\/\.\./;str=str.replace("{culture}",Web.Runtime.culture);return DeleteDoubleDots(str);}
function FindUrl(p_arCol,p_strProp,p_strMatch)
{if(p_strMatch)
{var iCount=p_arCol.length;var strSource=Web.Utility.resolveUrl(p_strMatch).toLowerCase();var i=0;for(i=0;i<iCount;i++)
{var strCompare=p_arCol[i]["__"+p_strProp];if(!strCompare)
{strCompare=p_arCol[i]["__"+p_strProp]=Web.Utility.resolveUrl(p_arCol[i].getAttribute(p_strProp)).toLowerCase();}
if(strCompare==strSource)
{return p_arCol[i];}}}
return null;}
Web.Utility.CSS=new function()
{var objCSS=this;objCSS.findElement=function(p_strSrc)
{return FindUrl(document.getElementsByTagName("link"),"href",p_strSrc);}}
Web.Utility.loadSources=function(p_astrSources,p_astrStyles,p_astrXml,p_ePriority,p_fncAsyncCallback)
{function SourcesRetrieved(p_htScripts)
{var aelScriptToAttach=new Array();for(var i=0;i<p_htScripts.length;i++)
{if(p_htScripts[i].resource&&p_htScripts[i].type==Web.Network.Type.Script)
{aelScriptToAttach.push(p_htScripts[i].resource)}}
function DoReturn()
{p_fncAsyncCallback(p_htScripts);}
if(aelScriptToAttach.length>0)
Web.Utility.Script.attachBulkScript(aelScriptToAttach,document.head,DoReturn);else
DoReturn();}
if(p_astrSources.length==0&&p_astrStyles.length==0&&p_astrXml.length==0)
{p_fncAsyncCallback();}
else
{var objRequest=Web.Network.createBatch(p_ePriority);var blnFetch=false;for(var i=0;i<p_astrSources.length;i++)
{var el=null;if(Web.Browser.isIE())
el=Web.Utility.Script.findElement(p_astrSources[i]);if(p_astrSources[i]!=""&&(!el))
{blnFetch=true;objRequest.add(Web.Network.Type.Script,p_astrSources[i],null,null);}}
for(var i=0;i<p_astrStyles.length;i++)
{var el=Web.Utility.CSS.findElement(p_astrStyles[i]);if(!el)
{blnFetch=true;objRequest.add(Web.Network.Type.CSS,p_astrStyles[i],null,null);}}
for(var i=0;i<p_astrXml.length;i++)
{blnFetch=true;objRequest.add(Web.Network.Type.XML,p_astrXml[i],p_astrXml[i].name,null,null,null,p_astrXml[i].proxy);}
if(blnFetch)
{objRequest.execute(SourcesRetrieved);}
else
{objRequest=null;p_fncAsyncCallback();}}}
Web.Utility.Script=new function()
{var objScript=this;objScript.findElement=function(p_strSrc)
{return FindUrl(document.scripts,"src",p_strSrc);}
objScript.attachBulkScript=function(p_arrScripts,p_elAttachElement,p_fnCallback)
{var cnt=0;var locked=true;function DoComplete()
{cnt--;if(!locked&&cnt==0)
{p_fnCallback();}}
for(var i=0;i<p_arrScripts.length;i++)
{if(p_arrScripts[i].tagName=="SCRIPT")
{cnt++;objScript.attachScript(p_arrScripts[i],p_elAttachElement,DoComplete)}}
locked=false;if(cnt==0&&p_fnCallback)
{p_fnCallback();}}
objScript.attachScript=function(p_elAttachScript,p_elAttachElement,p_fnCallback)
{var el=Web.Utility.Script.findElement(p_elAttachScript.src)
if(!el)
{if(Web.Browser.isMozilla())
{p_elAttachScript.onload=EvalTest;}
p_elAttachElement.appendChild(p_elAttachScript)
if(!Web.Browser.isMozilla()&&p_fnCallback)
{p_fnCallback();}}
else
{if(p_fnCallback)
if(Web.Browser.isMozilla()&&el.onload!=null)
{if(el.callbacks==null)el.callbacks=Web.Event.create(true);el.callbacks.attach(p_fnCallback);}
else
p_fnCallback();}
function EvalTest()
{if(p_elAttachScript.onload)
{p_elAttachScript.onload=null;p_elAttachScript.readyState="complete";if(p_fnCallback)
p_fnCallback();if(p_elAttachScript.callbacks)
{p_elAttachScript.callbacks.fire();p_elAttachScript.callbacks=null;};}
else
p_fnCallback();}
return p_elAttachScript.readyState=="complete";}}
Web.Utility.applyFunctionOverArray=function(p_fnc,p_a,p_fncAsyncCallback)
{var i=0;var length=p_a.length
function RunNext()
{if(i<length)
{p_fnc(p_a[i++]);window.setTimeout(RunNext,1);}
else
{if(p_fncAsyncCallback)
p_fncAsyncCallback();}}
if(p_fncAsyncCallback)
{RunNext();}
else
{p_a.forEach(p_fnc);}}
Web.Network=new function()
{var objNetwork=this;var objDomains=new Object();var strCurrentDomain=Web.Utility.extractHost(document.location,false);var blnRegister=false;this.oninvoke=Web.Event.create();this.onfinished=Web.Event.create();this.onabort=Web.Event.create();this.onhttperror=Web.Event.create();this.onerror=Web.Event.create();this.ontimeout=Web.Event.create();this.onrequest=Web.Event.create();this.onexecute=Web.Event.create();function registerBaseDomain()
{var strDomain=strCurrentDomain;var idx=strDomain.indexOf(".");document.domain=strCurrentDomain;try
{while(idx>=0)
{strDomain=strDomain.substring(idx+1);if(strDomain!="com")
{document.domain=strDomain;idx=strDomain.indexOf(".");}
else
idx=-1;}}
catch(ex)
{}
blnRegister=true;}
this.registerProxy=function(w)
{var strProxyDomain=Web.Utility.extractHost(w.location,false);objDomains[strProxyDomain]._assignProxy(w);}
this.defaultTimeout=null;function RunList(p_strDomain)
{var intActive=0;var blnProxy=false;var objProxy=null;var elProxy=null;var objList=new Object();var objParallel=new Web.Utility.Prioritizer();var objSerializer=new Web.Utility.Prioritizer();var boolSerRequest=false;var m_objRuntime=this;function FetchImage(o)
{var img=new Image();img.onload=doCallback;img.onerror=doError;img.blnError=false;img.src=o.url;function doError()
{img.blnError=true;doCallback();}
function doCallback()
{img.onerror=img.onload=null;Finished(img,o);}
return img;}
function FetchCSS(o)
{var el=Web.Utility.CSS.findElement(o.url)
if(!el)
{el=document.createElement("link");el.rel="stylesheet";el.type="text/css";el.onreadystatechange=doCallback;el.href=o.url;document.head.appendChild(el);if(Web.Browser.isMozilla()||Web.Browser.isOpera())
{el.readyState="complete";doCallback();}}
else
{doCallback();}
function doCallback()
{if(el&&("loaded"==el.readyState||"complete"==el.readyState))
{el.onreadystatechange=null;Finished(el,o);}}
return el;}
function FetchScript(o)
{var el=Web.Utility.Script.findElement(o.url)
if(!el)
{el=document.createElement("script");el.onreadystatechange=doCallback;el.src=o.url;if(!Web.Browser.isIE())
{el.readyState="loaded";doCallback();}}
else
{if(Web.Browser.isMozilla())
el.readyState="loaded";doCallback();}
function doCallback()
{if(el&&("loaded"==el.readyState||"complete"==el.readyState))
{el.onreadystatechange=null;Finished(el,o);}}
return el;}
function FetchXML(o,method)
{var xml=new XMLHttpRequest();if(o.timeout)
o.timer=setTimeout(TimedOut,o.timeout);xml.onreadystatechange=doCallback;objNetwork.oninvoke.fire(o);if(method)
{xml.open("POST",o.url,true);if(Web.Browser.isIE())
{xml.setRequestHeader("Accept-Encoding","gzip, deflate");}}
else
{xml.open("GET",o.url,true);}
if(o.headers)
{for(var h in o.headers)
{xml.setRequestHeader(h,o.headers[h]);}}
try
{if(o.postString||Web.Browser.isMozilla())
xml.send(o.postString);else
xml.send();}
catch(ex)
{objNetwork.onhttperror.fire(xml);}
function doCallback()
{if(4==xml.readyState)
{xml.onreadystatechange=Function.emptyFunction;if(o.timer)
clearTimeout(o.timer);Finished(xml,o);xml=o=null;}}
function TimedOut()
{xml.onreadystatechange=Function.emptyFunction;xml.abort();Finished(null,o);xml=o=null;}
return xml;}
function Continue()
{var o=null;if(intActive<Web.Network.MAXACTIVE&&(!blnProxy||(blnProxy&&objProxy)))
{if(!boolSerRequest)
{o=objSerializer.dequeue();if(o)boolSerRequest=true;}
if(!o)
{o=objParallel.dequeue();}
if(o)
{intActive++;switch(o.type)
{case Web.Network.Type.XMLGet:case Web.Network.Type.XML:case Web.Network.Type.XMLPost:if(o.proxy)
o.executing=objProxy.fetchXML(o,objNetwork,m_objRuntime,Finished);else
o.executing=FetchXML(o,Web.Network.Type.XMLPost==o.type);break;case Web.Network.Type.Image:o.executing=FetchImage(o);break;case Web.Network.Type.Script:o.executing=FetchScript(o);break;case Web.Network.Type.CSS:o.executing=FetchCSS(o);break;default:intActive--;}}}}
function CleanupFirefox(el,obj)
{var newXML;if(el.status==200)
{try
{var testAccess=el.responseXML.documentElement;}
catch(ex)
{if(window.DOMParser)
{try
{var parser=new DOMParser;var domDoc=parser.parseFromString(el.responseText.toString(),"text/xml");newXML={};newXML.responseText=el.responseText;newXML.responseXML=domDoc;var strHeaders=el.getAllResponseHeaders();var arrHeaders={};function parseH(v)
{var p=v.split(":");if(p[1])
arrHeaders[p[0]]=p[1].trim();};strHeaders.split("\n").forEach(parseH);newXML.getAllResponseHeaders=function(){return strHeaders};newXML.getResponseHeader=function(s){return arrHeaders[s];};newXML.statusText=el.statusText;newXML.status=el.status;el=newXML;}
catch(ex)
{el=null;}}
else
el=null;}}
return el;}
function Finished(el,obj)
{if(obj.proxy&&Web.Browser.isMozilla())
{switch(obj.type)
{case Web.Network.Type.XMLGet:case Web.Network.Type.XML:case Web.Network.Type.XMLPost:el=CleanupFirefox(el,obj);break;}}
if(obj.flags&Web.Network.Flags.SERIALIZE)
{boolSerRequest=false;}
intActive--;if(objList[obj.key])
{for(var i=objList[obj.key].length-1;i>=0;i--)
{var objItem=objList[obj.key][i];if(objItem.callback)
objItem.callback(el,objItem.context);}
var objItem=objList[obj.key].pop();while(objItem)
{objItem=objItem.callback=objItem.context=objItem.executing=null;objItem=objList[obj.key].pop();}
delete objList[obj.key];}
obj=obj.executing=el=null;Continue();}
function IndexInList(objCheck)
{var boolMatch=false;var intIndex=0;var objCheckList=objList[objCheck.key];if(objCheckList)
while(!boolMatch&&objCheckList&&intIndex<objCheckList.length)
{var objItem=objCheckList[intIndex];boolMatch=objItem&&(objItem.callback==objCheck.callback);if(!boolMatch)
intIndex++;}
return((boolMatch)?intIndex:-1);}
function Remove(obj)
{var objItem=null;if(objList[obj.key])
{var intIndex=IndexInList(obj);if(intIndex>-1)
objItem=objList[obj.key].splice(intIndex,1)[0];}
return objItem;}
function AbortRequest(objMatch)
{objMatch.callback=null;if(objMatch.executing)
{if(objMatch.flags&Web.Network.Flags.SERIALIZE)
{boolSerRequest=false;}
objNetwork.onabort.fire(objMatch);switch(objMatch.type)
{case Web.Network.Type.XML:case Web.Network.Type.XMLPost:case Web.Network.Type.XMLGet:objMatch.executing.onreadystatechange=Function.emptyFunction;objMatch.executing.abort();break;case Web.Network.Type.Image:case Web.Network.Type.Script:case Web.Network.Type.CSS:objMatch.onload=objMatch.onerror=objMatch.onreadystatechange=null;objMatch.executing.src="";break;}
intActive--;}
objMatch.context=objMatch.executing=null;}
this.generateProxy=function()
{if(!blnRegister)
registerBaseDomain();if(!blnProxy&&p_strDomain.endsWith(document.domain))
{blnProxy=true;elProxy=document.createElement("iframe");elProxy.style.display="none";elProxy.src="http://"+p_strDomain+"/xmlProxy.htm?v="+RuntimeVersion+"&domain="+document.domain;document.body.appendChild(elProxy);}}
this._assignProxy=function(w)
{objProxy=w;Continue();}
this.abort=function(obj)
{var objMatch=Remove(obj);while(objMatch!=null)
{AbortRequest(objMatch);objMatch=Remove(obj);}
Continue();}
function AbortObjectKey(p_objList,p_strKey)
{var o=p_objList[p_strKey];if(o)
{var objItem=o.pop();while(objItem)
{AbortRequest(objItem);objItem=o.pop();}}
delete p_objList[p_strKey];}
this.abortGroup=function(p_strGroup)
{var objFound=objParallel.findByProperty("strGroup",p_strGroup);while(objFound)
{objParallel.removeItem(objFound);objFound=objParallel.findByProperty("strGroup",p_strGroup);}
objFound=objSerializer.findByProperty("strGroup",p_strGroup);while(objFound)
{objSerializer.removeItem(objFound);objFound=objSerializer.findByProperty("strGroup",p_strGroup);}
for(var key in objList)
{var blnAbort=false;var intItem=0;while(intItem<objList[key].length&&!blnAbort)
{if(objList[key][intItem].strGroup==p_strGroup)
{blnAbort=true;break;}
intItem++;}
if(blnAbort)
{AbortObjectKey(objList,key);}}}
this.abortAll=function(p_boolRestart)
{if(p_boolRestart)
{objParallel.clear();objSerializer.clear();blnProxy=false;try
{if(elProxy&&elProxy.removeNode)
elProxy.removeNode(true);}
catch(ex){}
objProxy=elProxy=null;}
for(var strKey in objList)
{AbortObjectKey(objList,strKey);}
objList=new Object();}
this.add=function(obj)
{var boolQueue=false;if(objList[obj.key])
{var intIndex=IndexInList(obj);boolQueue=(intIndex==-1);}
else
{objList[obj.key]=new Array();boolQueue=true;var objStack=(obj.flags&Web.Network.Flags.SERIALIZE)?objSerializer:objParallel;if(obj.type==Web.Network.Type.XML||obj.type==Web.Network.Type.XMLGet||obj.type==Web.Network.Type.XMLPost)
{objStack.push(obj,obj.priority);}
else
{objStack.queue(obj,obj.priority);}}
if(boolQueue)
{objList[obj.key].push(obj);Continue();}}}
function Request(p_enumNetworkType,p_strUrl,p_objContext,p_fnCallback,p_enumPriority,p_postString,p_objHeaders,p_enumFlags,p_intTimeout,p_strTag,p_blnProxy,p_objAuth)
{this.type=p_enumNetworkType;this.url=Web.Utility.resolveUrl(p_strUrl);this.context=p_objContext;this.callback=p_fnCallback;this.priority=p_enumPriority;this.postString=p_postString;this.strGroup=p_strTag;this.domain=Web.Utility.extractHost(this.url,false);this.proxy=!!p_blnProxy&&(this.domain!=strCurrentDomain);this.auth=p_objAuth;var strList="";for(var h in p_objHeaders)
{strList+=h+":"+p_objHeaders[h];}
this.strHeaders=strList;this.key=this.url+"?"+(this.postString||"")+"!"+strList;if(p_enumFlags&Web.Network.Flags.DUPLICATE)
{this.key+="!"+(Request.DupCounter++);}
this.headers=p_objHeaders;this.flags=p_enumFlags;this.executing=null;this.timeout=p_intTimeout;objNetwork.onrequest.fire(this);if(this.domain=="")this.domain="local";if(!objDomains[this.domain])
{objDomains[this.domain]=new RunList(this.domain);}
if(this.proxy)
{objDomains[this.domain].generateProxy();}}
Request.DupCounter=0;this.abortAll=function(p_blnUnload)
{for(var rl in objDomains)
{objDomains[rl].abortAll(p_blnUnload);}}
this.abortGroup=function(p_strTag)
{for(var strDomain in objDomains)
{objDomains[strDomain].abortGroup(p_strTag);}}
this.createRequest=function(p_enumNetworkType,p_strUrl,p_objContext,p_fnCallback,p_enumPriority,p_strPostArgs,p_objHeaders,p_enumFlags,p_intTimeout,p_strTag,p_blnProxy,p_objAuth)
{var objRequest=new Object();var objPrivRequest=new Request(p_enumNetworkType,p_strUrl,p_objContext,p_fnCallback,p_enumPriority,p_strPostArgs,p_objHeaders,p_enumFlags,p_intTimeout,p_strTag,p_blnProxy,p_objAuth);var boolExecuting=false;function DoAuth(p_blnAuth)
{if(p_objAuth.isAuthenticated())
objDomains[objPrivRequest.domain].add(objPrivRequest);else
throw"Authentication Failure";}
objRequest.execute=function()
{if(!boolExecuting)
{if(!p_objAuth||p_objAuth.isAuthenticated())
{objDomains[objPrivRequest.domain].add(objPrivRequest);boolExecuting=true;}
else
{p_objAuth.onauthenticate.attach(DoAuth);p_objAuth.authenticate();}}}
objRequest.isExecuting=function()
{return boolExecuting;}
objRequest.abort=function()
{objDomains[objPrivRequest.domain].abort(objPrivRequest);}
return objRequest;}
this.createBatch=function(p_enumPriority,p_objContext)
{var objBatch=this;var arrBatch=new Array();var boolExecuting=false;var intReceiveCount=0;var boolLockSection=false;var arrCallback=new Array();function CheckComplete()
{if(!boolLockSection&&arrBatch.length==intReceiveCount)
{for(var i=0;i<arrCallback.length;i++)
if(arrCallback[i])
arrCallback[i](arrBatch,p_objContext);intReceiveCount=0;boolExecuting=false;}}
objBatch.add=function(p_enumNetworkType,p_strUrl,p_objContext,p_strPostArgs,p_objHeaders,p_enumFlags,p_blnProxy)
{arrBatch.push(objNetwork.createRequest(p_enumNetworkType,p_strUrl,arrBatch.length,BatchItemReceived,p_enumPriority,p_strPostArgs,p_objHeaders,p_enumFlags,null,null,p_blnProxy));arrBatch[arrBatch.length-1].type=p_enumNetworkType;arrBatch[arrBatch.length-1].context=p_objContext;}
function BatchItemReceived(p_elResource,p_intIndex)
{arrBatch[p_intIndex].resource=p_elResource;intReceiveCount++;CheckComplete();}
objBatch.execute=function(p_fnCallback)
{if(!arrCallback.exists(p_fnCallback))arrCallback.push(p_fnCallback);if(!boolExecuting)
{boolExecuting=boolLockSection=true;for(var intIndex=0;intIndex<arrBatch.length;intIndex++)
{arrBatch[intIndex].execute();}
boolLockSection=false;CheckComplete();}}
objBatch.abort=function(p_fnCallback)
{arrCallback.remove(p_fnCallback);if(arrCallback.length==0)
{for(var i=0;i<arrBatch.length;i++)
arrBatch[i].abort();boolExecuting=false;}}
return objBatch;}
function dispose()
{objNetwork.abortAll(true);objNetwork.oninvoke.clear();objNetwork.onfinished.clear();objNetwork.onabort.clear();objNetwork.onhttperror.clear();objNetwork.onerror.clear();objNetwork.ontimeout.clear();objNetwork.onrequest.clear();}
Web.Runtime.onunload.attach(dispose);}
Web.Network.Flags=Web.Flags.create("SERIALIZE",1,"DUPLICATE",2);Web.Network.Type=Web.Enum.create("XML","Image","Script","XMLPost","XMLGet","CSS");Web.Network.MAXACTIVE=2;Function.eventHelper=function(p_varCancel,p_boolBubble)
{function Exec()
{if(Web.Type.isBoolean(p_boolBubble))
event.cancelBubble=p_boolBubble;if(p_varCancel!=null)
{event.returnValue=p_varCancel;if(Web.Type.isBoolean(p_varCancel))
{return p_varCancel;}}}
return Exec;}
Function.KillEvent=Function.eventHelper(false,true);Function.CancelBubble=Function.eventHelper(null,true);Function.CancelDefault=Function.eventHelper(false);Web.Type.Descriptor=function()
{}
Web.Type.Descriptor.create=function(p_vType)
{if((p_vType==null)||(p_vType==undefined))
{throw("The p_vType parameter is null or undefined");}
var obj=new Web.Type.Descriptor();var strTypeOf=typeof(p_vType);if(strTypeOf=="string")
{obj.strType=p_vType;obj.fncType=Function.parse(obj.strType);}
else if(strTypeOf=="object")
{obj.fncType=p_vType.constructor;}
else
{obj.fncType=p_vType;}
return(obj);}
Web.Dom=new function()
{var objDom=this;objDom.getAnyElementByTagName=function(tagName,root,bForceNoCompat)
{if(!root)root=document;var elList=new Array();var idx=tagName.indexOf(":")
if(idx>=0)
{if(Web.Browser.isIE()||(Web.Browser.isOpera()&&Web.Browser.version<9))
{var ns=tagName.substring(0,idx)
var tagName=tagName.substring(idx+1);if(ns!=""&&document.namespaces&&!document.namespaces[ns])
{alert("IE Requirement - Add xmlns:"+ns+" to the HTML tag.")}
var propName="scopeName";var elTemp=root.getElementsByTagName(tagName);if(Web.Browser.isOpera())
{propName="prefix";}
var iCount=elTemp.length;for(var i=0;i<iCount;i++)
{var objItem=elTemp[i];if(objItem[propName]&&objItem[propName].toLowerCase()==ns.toLowerCase())
elList.push(objItem);}}
else if(Web.Browser.MozillaCompatMode&&!bForceNoCompat)
{elList=new Array();var elTemp=root.getElementsByTagName("div");for(var i=0;i<elTemp.length;i++)
if(elTemp[i].className.indexOf(tagName)>-1)
elList.push(elTemp[i]);}
else
{elList=root.getElementsByTagName(tagName);}}
else
elList=root.getElementsByTagName(tagName);return elList;}
objDom.resolveTagName=function(p_el)
{var strTagName=p_el.tagName;if(strTagName)
{if(Web.Browser.isIE())
{if(p_el.scopeName!="")
strTagName=p_el.scopeName+":"+strTagName;}}
return strTagName;}
objDom.getElementsByCssSelector=function(p_strSelector,p_elRoot)
{return(objDom.Css.getElementsByCssSelectorRules(objDom.Css.createRules(p_strSelector),p_elRoot));}
objDom.Css=new function()
{var objCss=this;objCss.Rule=function(p_strSingleSelector)
{objCss.Rule.reCssSelector.lastIndex=0;objCss.Rule.reCssSelector.exec(p_strSingleSelector);this.strTagName=RegExp.$1.toLowerCase();this.strClassName=RegExp.$2.toLowerCase();this.strID=RegExp.$3;}
objCss.Rule.reCssSelector=new RegExp("([^\\.#]*)\\.?([^#]*)#?(.*)");objCss.createRules=function(p_strSelector)
{if(!p_strSelector)
{return(new Array());}
var aSelectorTerms=p_strSelector.trim().split(objCss.createRules.reWhiteSpace);for(var i=0;i<aSelectorTerms.length;i++)
{aSelectorTerms[i]=new objCss.Rule(aSelectorTerms[i]);}
return(aSelectorTerms);}
objCss.createRules.reWhiteSpace=new RegExp("\\s+");function GetPotentialElementsByRule(p_objRule,p_elRoot)
{var elPotentials=new Array();if(p_objRule)
{if(p_objRule.strID)
{var elByID=document.getElementById(p_objRule.strID);if(elByID&&(p_elRoot==document)||(p_elRoot.tagName&&p_elRoot.contains(elByID)))
{elPotentials=new Array(document.getElementById(p_objRule.strID));}}
else if(p_objRule.strTagName)
{elPotentials=Web.Dom.getAnyElementByTagName(p_objRule.strTagName,p_elRoot);}
else if(p_objRule.strClassName)
{elPotentials=p_elRoot.all||p_elRoot.getElementsByTagName("*");}}
return(elPotentials);}
objCss.doesElementPassRule=function(p_el,p_objRule)
{var blnValid=false;if(p_objRule)
{blnValid=(!p_objRule.strTagName)||(p_objRule.strTagName==p_el.tagName.toLowerCase());var strClassName=" "+p_el.className.toLowerCase()+" ";blnValid=blnValid&&((!p_objRule.strClassName)||(strClassName.indexOf(" "+p_objRule.strClassName+" ")!=-1));blnValid=blnValid&&((!p_objRule.strID)||(p_objRule.strID==p_el.id));}
return(blnValid);}
objCss.doesElementPassRules=function(p_el,p_aobjRules,p_elRoot)
{if((!p_aobjRules)||(p_aobjRules.length==0))
{return(false);}
var iRuleIndex=p_aobjRules.length-1;if(!objCss.doesElementPassRule(p_el,p_aobjRules[iRuleIndex--]))
{return(false);}
if(!p_elRoot)
{p_elRoot=document.documentElement;}
var blnMustContain=(p_elRoot==document.documentElement);while(p_el&&(blnMustContain||p_elRoot.contains(p_el))&&(iRuleIndex>=0))
{p_el=p_el.parentElement;if(p_el&&objCss.doesElementPassRule(p_el,p_aobjRules[iRuleIndex]))
{iRuleIndex--;}}
return(p_el&&(blnMustContain||p_elRoot.contains(p_el)));}
objCss.getElementsByCssSelectorRules=function(p_aRules,p_elRoot)
{var aElements=new Array();p_elRoot=p_elRoot||document;function GetElements(p_elScope,p_iIndex)
{var elPotentials=GetPotentialElementsByRule(p_aRules[p_iIndex],p_elScope);var intCount=elPotentials.length;for(var i=0;i<intCount;i++)
{var elItem=elPotentials[i];if(objCss.doesElementPassRule(elItem,p_aRules[p_iIndex]))
{if(p_iIndex+1<p_aRules.length)
GetElements(elItem,p_iIndex+1)
else
aElements.push(elItem);}}}
if(p_aRules.length>0)
GetElements(p_elRoot,0);return(aElements);}}}
Web.Network.Fpp=function(p_strUrl,nPartnerId,strSessionId,strReverseProxyUrl)
{var oFppHeaders=new Object();oFppHeaders["Content-Type"]="application/x-www-form-urlencoded";if(typeof(strReverseProxyUrl)!="undefined")
{oFppHeaders["FPPRPURL"]=strReverseProxyUrl;}
if(nPartnerId==null)
{nPartnerId=0;}
function FppFinished(proxy,obj)
{Web.Network.onfinished.fire(obj);var pkg={"ErrorCode":0,"Context":obj.oContext,"Proxy":proxy,"Error":null};if(proxy==null)
{pkg.ErrorCode=-4;Web.Network.onerror.fire(pkg);if(obj.cbErr)
{obj.cbErr(pkg.ErrorCode,pkg.Context,pkg.Proxy,pkg.Error);}}
else if((proxy.statusText==null)||(proxy.statusText==""))
{pkg.ErrorCode=-5;Web.Network.onerror.fire(pkg);if(obj.cbErr)
{obj.cbErr(pkg.ErrorCode,pkg.Context,pkg.Proxy,pkg.Error);}}
else if((proxy.status!=200)&&(proxy.status!=500))
{pkg.ErrorCode=-7;Web.Network.onerror.fire(pkg);if(obj.cbErr)
{obj.cbErr(pkg.ErrorCode,pkg.Context,pkg.Proxy,pkg.Error);}}
else
{try
{var strUrl=proxy.getResponseHeader("FPPRPURL");if(strUrl!=""&&strUrl!=null)
{oFppHeaders["FPPRPURL"]=strUrl;}}
catch(ex)
{}
var oFppPkg=null;try
{oFppPkg=eval(proxy.responseText);}
catch(ex)
{pkg.ErrorCode=-6;Web.Network.onerror.fire(pkg);if(obj.cbErr)
{obj.cbErr(pkg.ErrorCode,pkg.Context,pkg.Proxy,pkg.Error);}}
if(oFppPkg!=null)
{if(obj.oProfile!=null)
{obj.oProfile.EndProfile(oFppPkg.ProfilingInfo);}
if(oFppPkg.Status==0)
{var arrArgs=oFppPkg.OutRefParams;arrArgs.unshift(obj.context);arrArgs.unshift(oFppPkg.Value);obj.callback.apply(null,arrArgs);}
else
{pkg.ErrorCode=oFppPkg.Status;pkg.Error=oFppPkg.Error;Web.Network.onerror.fire(pkg);if(obj.cbErr)
{obj.cbErr(pkg.ErrorCode,pkg.Context,pkg.Proxy,pkg.Error);}}}
else
{Web.Debug.ASSERT(false,"FppFinished encountered a null oFppPkg reference")();}}}
this.invoke=function(xmlType,cn,mn,d,cb,oContext,cbErr,nTimeout,p_strGroup,p_ePriority)
{if(cn==null||mn==null||cb==null)
{throw new Error("invalid arguments for Fpp.invoke");}
if(typeof(cb)!="function")
{throw new Error("FPP arg list mismatch:  cb must be of type function.");}
if(!p_ePriority)
{p_ePriority=Web.Utility.Prioritizer.Priorities.High;}
var p_enumFlags=null;var strData="cn="+cn+"&"+"mn="+mn+"&"+"d="+d;var strPost=null;var strUrl=null;var defaultTimeout=Web.Network.defaultTimeout;var objContext=new Object();objContext.context=oContext;objContext.callback=cb;objContext.cbErr=cbErr;if(xmlType==Web.Network.Type.XMLPost)
{strPost=strData;var urlDomainMatch=p_strUrl.match("http\://.+[.](.+\.com)/","i");var docDomainMatch=document.domain.match(".+[.](.+\.com)","i");if(urlDomainMatch!=null&&urlDomainMatch.length>1&&docDomainMatch!=null&&docDomainMatch.length>1&&urlDomainMatch[1]==docDomainMatch[1]&&p_strUrl.search("mail\.fpp$")!=-1)
{var mt=document.cookie.indexOf("MailToken=");if(mt!=-1)
{var end=document.cookie.indexOf(";",mt);if(end==-1)
end=document.cookie.length;strPost=strPost+"&MailToken="+document.cookie.substring(mt+10,end);}}
strUrl=p_strUrl+"?cnmn="+cn+"."+mn+"&ptid="+nPartnerId+"&a="+strSessionId;}
else if(xmlType==Web.Network.Type.XMLGet)
{strUrl=p_strUrl+"?"+strData+"&ptid="+nPartnerId+"&a="+strSessionId;}
if(typeof(FireAnt)!="undefined"&&typeof(FireAnt.Debug)!="undefined"&&FireAnt.Debug!=null)
{objContext.oProfile=FireAnt.Debug.StartProfile(cn+"."+mn);FireAnt.Debug.Trace(cn+"."+mn);}
if(p_strGroup)
{Web.Network.abortGroup(p_strGroup);}
if(nTimeout)
{defaultTimeout=nTimeout;}
var request=Web.Network.createRequest(xmlType,strUrl,objContext,FppFinished,p_ePriority,strPost,oFppHeaders,p_enumFlags,defaultTimeout,p_strGroup);request.execute();return request;}}
Web.Network.Fpp.arrayToString=function(p_array)
{var retValue="";if(p_array==null){return retValue;}
if(Web.Type.isArray(p_array))
{var joinArray=new Array();for(var i=0;i<p_array.length;i++)
{if(Web.Type.isString(p_array[i]))
{joinArray.push(Web.Network.Fpp.escape(p_array[i]));}
else
{joinArray.push(p_array[i].toString());}}
retValue=joinArray.join(",");return retValue;}
else
{throw new Error("p_array = "+p_array+" is not an array");}}
Web.Network.Fpp.escape=function(p_str)
{if(p_str==null)
{return p_str;}
else
{var someString="\""+p_str.toString()+"\"";someString=encodeURIComponent(someString.replace(/([\{|\}\[|\]\,\\])/g,"\\$1"));return someString;}}
Web.Network.FppProxy=function()
{var m_obj=this;var proxy=null;this.initialize=function(url,nPartnerId,strSessionId,strReverseProxyUrl)
{proxy=new Web.Network.Fpp(url,nPartnerId,strSessionId,strReverseProxyUrl);return m_obj;}
function ClassManager(p_arrMembers)
{function AssignProperties()
{var m_this=new Object();for(var i=0;i<p_arrMembers.length;i++)
{m_this[p_arrMembers[i]]=arguments[i];}
m_this.toString=function()
{var sbProps=new Array();for(var i=0;i<p_arrMembers.length;i++)
{sbProps.push(p_arrMembers[i].escape(m_this[p_arrMembers[i]]));}
return"{"+sbProps.join(",")+"}";}
return m_this;}
return AssignProperties;}
function MethodManager(p_strMethod,p_arrMembers,p_NetworkType,p_strGroup,p_strNamespace)
{function invoke()
{var sbArgs=new Array();var intMembers=p_arrMembers.length;for(var i=0;i<intMembers;i++)
{sbArgs.push(p_arrMembers[i].escape(arguments[i]))}
return proxy.invoke(p_NetworkType||Web.Network.Type.XMLPost,p_strNamespace,p_strMethod,sbArgs.join(","),arguments[intMembers],arguments[intMembers+1],arguments[intMembers+2],arguments[intMembers+3],p_strGroup);}
return invoke;}
this.registerFppClass=function(p_strName,p_arrArgs)
{this[p_strName]=ClassManager(p_arrArgs);}
this.registerFppMethod=function(p_strName,p_arrArgs,p_strMethod,p_NetworkType,p_strGroup,p_strNameSpace)
{this[p_strName]=MethodManager(p_strMethod||p_strName,p_arrArgs,p_NetworkType||Web.Network.Type.XMLPost,p_strGroup,p_strNameSpace||strDefaultNamespace);}
this.seal=function()
{this.RegisterClass=this.RegisterMethod=this.Seal=null;}}
Web.Network.FppProxy.TypeSystem=function(p_strType,p_strName)
{this.toString=function(){return p_strName}
this.type=p_strType;return this;}
Web.Network.FppProxy.TypeSystem.prototype.escape=function(p_strValue)
{if((p_strValue==null)||(typeof(p_strValue)=="undefined"))
{return"null";}
switch(this.type)
{case"__string":return Web.Network.Fpp.escape(p_strValue);case"__date":var dateFormatString="{0}-{1}-{2}T{3}:{4}:{5}";var hour=p_strValue.getHours();if(hour<10)
hour="0"+hour;var minute=p_strValue.getMinutes();if(minute<10)
minute="0"+minute;var second=p_strValue.getSeconds();if(second<10)
second="0"+second;return dateFormatString.format(p_strValue.getFullYear(),p_strValue.getMonth()+1,p_strValue.getDate(),hour,minute,second);case"__array":var intermediate="[";intermediate+=Web.Network.Fpp.arrayToString(p_strValue);intermediate+="]";return intermediate;case"__primitive":case"__object":case"__enum":return p_strValue;default:return p_strValue;}}
Web.Network.FppProxy.__string=function(p_strName){return new Web.Network.FppProxy.TypeSystem("__string",p_strName)}
Web.Network.FppProxy.__date=function(p_strName){return new Web.Network.FppProxy.TypeSystem("__date",p_strName)}
Web.Network.FppProxy.__array=function(p_strName){return new Web.Network.FppProxy.TypeSystem("__array",p_strName)}
Web.Network.FppProxy.__primitive=function(p_strName){return new Web.Network.FppProxy.TypeSystem("__primitive",p_strName)}
Web.Network.FppProxy.__object=function(p_strName){return new Web.Network.FppProxy.TypeSystem("__object",p_strName)}
Web.Network.FppProxy.__enum=function(p_strName){return new Web.Network.FppProxy.TypeSystem("__enum",p_strName)}
Web.Network.FppProxy.__custom=function(p_fnType,strName){return new Web.Network.FppProxy.TypeSystem(p_fnType,strName)}
registerNamespace("Web.Bindings");Web.Bindings=new function()
{var objWebBinding=this;var m_unloading=false;this.onerror=Web.Event.create();function Scope()
{var objOwner=null;var childBindings=new Object();childBindings["_untyped"]=new Array();var aobjRegistrations=new Object();var aobjDefinitions=new Array();this.initialize=function(p_objBinding)
{objOwner=p_objBinding;}
this.getBinding=function()
{return objOwner||this;}
function CheckRegistration(p_objBinding,p_blnLoad)
{var childList=p_objBinding.constructor._childBase;if(childList)
{for(var iClass=0;iClass<childList.length;iClass++)
{var objReg=aobjRegistrations[childList[iClass]];if(objReg)
{for(var i=objReg.length-1;i>=0;i--)
{if(objReg[i].elRoot==document.documentElement||objReg[i].elRoot.contains(p_objBinding._element))
{objReg[i].fnCallback(p_objBinding,p_blnLoad);}}}}}}
this.add=function(p_objBinding)
{var objConstructor=p_objBinding.constructor;var strType=objConstructor._typeName;if(!strType)
{childBindings["_untyped"].push(p_objBinding);}
else
{if(!childBindings[strType])
childBindings[strType]=new Array();childBindings[strType].push(p_objBinding);}
CheckRegistration(p_objBinding,true);}
this.addDefinition=function(p_objDefinition)
{aobjDefinitions.push(p_objDefinition);}
this.getDefinitions=function()
{return aobjDefinitions;}
this.remove=function(p_objBinding)
{CheckRegistration(p_objBinding,false);var strType=p_objBinding.constructor._typeName;if(!strType)strType="_untyped";childBindings[strType].remove(p_objBinding);if(p_objBinding._objDeclaration.objElementQuery.elements)
{aobjDefinitions.remove(p_objBinding._objDeclaration);p_objBinding._objDeclaration.dispose();}
if(p_objBinding.scope)
{p_objBinding.scope.dispose();}}
function RunNewRegistration(p_objItem,p_objBaseList)
{if(p_objBaseList)
{for(var i=0;i<p_objBaseList.length;i++)
{var objRef=childBindings[p_objBaseList[i]]
if(objRef)
{for(var iRef=0;iRef<objRef.length;iRef++)
{{if(p_objItem.elRoot==document.documentElement||p_objItem.elRoot.contains(objRef[iRef]._element))
p_objItem.fnCallback(objRef[iRef],true);}}}}}}
this.unregisterFor=function(objItem)
{aobjRegistrations[objItem.strBinding].remove(objItem);}
this.registerFor=function(p_vBinding,p_fnCallback,p_elRoot)
{var strBinding=p_vBinding;if(typeof(p_vBinding)=="function")
{strBinding=p_vBinding._typeName;}
else
{p_vBinding=Function.parse(p_vBinding);}
if(strBinding=="*")
strBinding="Web.Bindings.Base";var objItem={fnCallback:p_fnCallback,elRoot:p_elRoot||document.documentElement,strBinding:strBinding};if(!aobjRegistrations[strBinding])
aobjRegistrations[strBinding]=new Array();aobjRegistrations[strBinding].push(objItem);if(p_vBinding)
RunNewRegistration(objItem,p_vBinding._parentBase);return objItem;}
this.dispose=function()
{for(var strType in childBindings)
{for(var i=childBindings[strType].length-1;i>=0;i--)
{if(childBindings[strType][i])
{try
{childBindings[strType][i].dispose(m_unloading);}
catch(ex)
{}}}}
for(var iReg in aobjRegistrations)
{aobjRegistrations[iReg].clear();}
for(var i=aobjDefinitions.length-1;i>=0;i--)
{aobjDefinitions[i].dispose();}
childBindings=aobjRegistrations=aobjDefinitions=objOwner=null;}}
var m_rootScope=new Scope();this.Base=function(p_element,p_htParams,p_strNamespace)
{var blnMerge=false
var m_this=this;var aobjRegistrations;this.parentBinding=null;this.scope=null;this._element=p_element;p_element.className+=" "+m_this.constructor.applyClass(true);if(!p_element.webBindings)
{p_element.webBindings=new Array();}
this._element.webBindings.push(this);this.getParameters=function()
{if(!blnMerge)
{if(p_strNamespace&&this.constructor.Params)
{p_htParams=MergeArguments(p_element,p_strNamespace,p_htParams,this.constructor.Params);}
blnMerge=true;}
return p_htParams;}
this.registerFor=function(fnType,p_fncCallback,p_elScope)
{if(!aobjRegistrations)aobjRegistrations=new Array();aobjRegistrations.push(this.parentScope.registerFor(fnType,p_fncCallback,p_elScope))}
this.initialize=function(p_owner)
{if(!this._objDeclaration)
{this._objDeclaration=CreateDefinition(new Array(this._element),this.constructor,null,null,null,null,p_owner||m_rootScope,p_strNamespace?p_strNamespace.toLowerCase():null,p_htParams);if(p_owner&&p_owner!=m_rootScope)
p_owner=p_owner.scope;}
if(p_owner&&p_owner!=m_rootScope)
{this.parentScope=p_owner;}
else
{this.parentScope=m_rootScope;}
this.parentScope.add(this);BindingChangedNotification(this,false);};objWebBinding.Base.registerBaseMethod(this,"initialize");this.getIdentity=function()
{return this._element.getAttribute(this._objDeclaration.strNamespace+":id")||"";}
objWebBinding.Base.registerBaseMethod(this,"getIdentity");this.dispose=function(p_blnUnloading)
{this.parentScope.remove(this);this._element.webBindings.remove(this);if(!p_blnUnloading)
{BindingChangedNotification(this,true);var strReplace=m_this.constructor.removeClass(this._element.className);if(strReplace!=this._element.className)
this._element.className=strReplace;}
for(var strEventName in this._htEvents)
{this._htEvents[strEventName].clear();}
if(aobjRegistrations)
{var objReg=aobjRegistrations.pop();while(objReg)
{this.parentScope.unregisterFor(objReg);objReg=aobjRegistrations.pop();}}
if(p_htParams&&p_htParams.xmlSources)
p_htParams.xmlSources.clear();p_element=p_htParams=this._element=this.parentScope=this._objDeclaration=null;};objWebBinding.Base.registerBaseMethod(this,"dispose");}
var objPrototype=this.Base.prototype;objPrototype.attachEvent=function(p_strEventName,p_fncCallback)
{if(this.constructor.Events&&this.constructor.Events[p_strEventName])
{if(!this._htEvents)this._htEvents=new Object();if(!this._htEvents[p_strEventName])this._htEvents[p_strEventName]=Web.Event.create();this._htEvents[p_strEventName].attach(p_fncCallback);}
else
{throw"Invalid Event Name Specified";}}
objPrototype.detachEvent=function(p_strEventName,p_fncCallback)
{if(this.constructor.Events&&this.constructor.Events[p_strEventName])
{if(this._htEvents&&this._htEvents[p_strEventName])
{this._htEvents[p_strEventName].detach(p_fncCallback);}}
else
{throw"Invalid Event Name Specified";}}
objPrototype.fire=function(p_strEventName,p_objPackage)
{var returnValue=null;if(this.constructor.Events&&this.constructor.Events[p_strEventName])
{if(this._htEvents&&this._htEvents[p_strEventName])
{var objPackage={srcBinding:this,eventName:p_strEventName,Package:p_objPackage,returnValue:null};this._htEvents[p_strEventName].fire(objPackage);if(objPackage.returnValue!=null)
returnValue=objPackage.returnValue;}}
else
{throw"Invalid Event Name Specified";}
return returnValue;}
objWebBinding.Base.registerBaseMethod(this,"getIdentity");objPrototype.getType=function(){return this.constructor._typeName};objPrototype._objDeclaration=null;objPrototype.onbinding=function(p_objBinding){}
objPrototype.onunbinding=function(p_objBinding){}
this.Base.registerClass("Web.Bindings.Base");this.extendBinding=function(p_el,p_objBindingScope)
{if(p_el)
{var objScope=(p_objBindingScope&&p_objBindingScope.scope)||m_rootScope;while(objScope)
{var aDecls=objScope.getDefinitions();for(var i=0;i<aDecls.length;i++)
{var aobjCssSelectorRules=aDecls[i].objElementQuery.aobjCssSelectorRules;var elScope=aDecls[i].objElementQuery.elScope;if(aobjCssSelectorRules&&elScope)
{if(Web.Dom.Css.doesElementPassRules(p_el,aobjCssSelectorRules,elScope))
{CreateAndBindAsync(p_el,aDecls[i])}}}
objScope=objScope.parentScope;}}}
this.revalidateBinding=function(p_el,p_objBindingScope)
{if(p_el)
{if(p_el.webBindings)
{for(var i=p_el.webBindings.length-1;i>=0;i--)
{var objElementQuery=p_el.webBindings[i]._objDeclaration.objElementQuery;var aobjCssSelectorRules=objElementQuery.aobjCssSelectorRules;var elScope=objElementQuery.elScope;if(aobjCssSelectorRules&&elScope&&(!Web.Dom.Css.doesElementPassRules(p_el,aobjCssSelectorRules,elScope)))
{p_el.webBindings[i].dispose(false);}}}
objWebBinding.extendBinding(p_el,p_objBindingScope);}}
this.removeBindings=function(p_el)
{if(p_el&&p_el.webBindings)
{var intCount=p_el.webBindings.length;for(var i=intCount-1;i>=0;i--)
{p_el.webBindings[i].dispose(false);}
p_el.webBindings=null;return true;}
return false;}
this.dispose=function()
{m_rootScope.dispose();Web.Bindings.onerror.clear();}
function pageDestroy()
{m_unloading=true;objWebBinding.dispose();}
Web.Runtime.onunload.attach(pageDestroy);this.Definition=function(){}
this.Definition.create=function(p_objElementQuery,p_objTypeDescriptor,p_objScope,p_strNamespace,p_htParams,p_objImportInfo,p_elScope)
{var objDecl=new objWebBinding.Definition();objDecl.objElementQuery=p_objElementQuery;objDecl.objTypeDescriptor=p_objTypeDescriptor;objDecl.objScope=p_objScope;objDecl.strNamespace=p_strNamespace;objDecl.htParams=p_htParams||new Object();objDecl.objImportInfo=p_objImportInfo;objDecl.elScope=p_elScope;return(objDecl);}
this.Definition.prototype.dispose=function()
{this.objImportInfo=this.htParams=this.objScope=this.objTypeDescriptor=this.objElementQuery=this.elScope=null;}
function CreateDefinition(p_vSelector,p_vBindingType,p_astrBindingSources,p_astrStyleSources,p_astrXmlSource,p_ePriority,p_objScope,p_strNamespace,p_htParams,p_elScope)
{var objImportInfo=null;if((p_astrBindingSources&&p_astrBindingSources.length>0)||(p_astrStyleSources&&p_astrStyleSources.length>0)||(p_astrXmlSource&&p_astrXmlSource.length>0))
{var objPriorities=Web.Utility.Prioritizer.Priorities;var ePriority=Web.Enum.getValue(objPriorities,p_ePriority);if(!ePriority)ePriority=objPriorities.High;if(!p_astrBindingSources)p_astrBindingSources=new Array();if(!p_astrStyleSources)p_astrStyleSources=new Array();if(!p_astrXmlSource)p_astrXmlSource=new Array();objImportInfo={astrSources:p_astrBindingSources,eBindingPriority:ePriority,astrStyles:p_astrStyleSources,astrXml:p_astrXmlSource,Loaded:false};}
var objElementQuery;if(!p_vSelector||typeof(p_vSelector)=="string")
{objElementQuery={aobjCssSelectorRules:Web.Dom.Css.createRules(p_vSelector),elScope:(p_objScope&&p_objScope._element)||document.documentElement};}
else
{objElementQuery={elements:p_vSelector};}
var objTypeDescriptor=Web.Type.Descriptor.create(p_vBindingType);var objScope;if(p_objScope&&p_objScope!=m_rootScope)
{if(!p_objScope.scope)
{p_objScope.scope=new Scope();p_objScope.scope.initialize(p_objScope);}
objScope=p_objScope.scope}
else
objScope=m_rootScope;var objDeclaration=objWebBinding.Definition.create(objElementQuery,objTypeDescriptor,objScope,p_strNamespace,p_htParams,objImportInfo,p_elScope);objScope.addDefinition(objDeclaration);return objDeclaration;}
function BindingChangedNotification(p_objChangedBinding,p_blnRemoved)
{if(p_objChangedBinding&&p_objChangedBinding._element)
{var strEventName=p_blnRemoved?"onunbinding":"onbinding";var blnFireBack=!p_blnRemoved&&p_objChangedBinding[strEventName];var aobjBindings=p_objChangedBinding._element.webBindings;for(var i=0;i<aobjBindings.length;i++)
{if(aobjBindings[i]!=p_objChangedBinding)
{if(aobjBindings[i][strEventName])
{aobjBindings[i][strEventName](p_objChangedBinding);}
if(blnFireBack)
p_objChangedBinding[strEventName](aobjBindings[i])}}}}
this.attachElementBindingSync=function(p_elItem,p_vBindingType,p_objScope,p_htParams,p_strNamespace)
{var fncType=Web.Type.resolve(p_vBindingType);var objBinding=new fncType(p_elItem,p_htParams,p_strNamespace);objBinding.initialize(p_objScope);return objBinding;}
this.attachElementBinding=function(p_elItem,p_vBindingType,p_objScope,p_htParams,p_strNamespace,p_fncCallback,p_astrBindingSource,p_astrStyleSource,p_ePriority,p_astrXmlSource)
{return objWebBinding.attachSelectorBinding(new Array(p_elItem),p_vBindingType,p_objScope,p_htParams,p_strNamespace,null,p_fncCallback,p_astrBindingSource,p_astrStyleSource,p_ePriority,p_astrXmlSource)[0];}
this.attachSelectorBindingSync=function(p_vSelector,p_vBindingType,p_objScope,p_htParams,p_strNamespace,p_elScope)
{return objWebBinding.attachSelectorBinding(p_vSelector,p_vBindingType,p_objScope,p_htParams,p_strNamespace,p_elScope);}
this.attachSelectorBinding=function(p_vSelector,p_vBindingType,p_objScope,p_htParams,p_strNamespace,p_elScope,p_fncCallback,p_astrBindingSource,p_astrStyleSource,p_ePriority,p_astrXmlSource)
{var objDeclaration=CreateDefinition(p_vSelector,p_vBindingType,p_astrBindingSource,p_astrStyleSource,p_astrXmlSource,p_ePriority,p_objScope,p_strNamespace?p_strNamespace.toLowerCase():null,p_htParams,null,p_elScope);return objWebBinding.bindDeclaration(objDeclaration,p_fncCallback);}
function CreateAndBind(p_element,p_objDeclaration)
{var fncType=p_objDeclaration.objTypeDescriptor.fncType;if(p_element.webBindings)
{for(var i=0;i<p_element.webBindings.length;i++)
{if(fncType==p_element.webBindings[i].constructor)
{return(p_element.webBindings[i]);}}}
var objBinding=new fncType(p_element,p_objDeclaration.htParams||new Object(),p_objDeclaration.strNamespace);objBinding._objDeclaration=p_objDeclaration;objBinding.initialize(p_objDeclaration.objScope);return(objBinding);}
function CreateAndBindAsync(p_element,p_objDeclaration)
{if(p_objDeclaration.objImportInfo&&(p_objDeclaration.objImportInfo.astrSources.length>0||p_objDeclaration.objImportInfo.astrStyles.length>0||p_objDeclaration.objImportInfo.astrXml.length>0)&&(!p_objDeclaration.objImportInfo.Loaded))
return RunDeclaration(p_objDeclaration,null,p_element);else
return CreateAndBind(p_element,p_objDeclaration);}
function RunDeclaration(p_objDeclaration,p_fncAsyncCallback,p_element)
{function SourcesLoaded(p_Sources)
{var arrMatch=new Array();var fncType=p_objDeclaration.objTypeDescriptor.fncType;if(!fncType)fncType=Function.parse(p_objDeclaration.objTypeDescriptor.strType);if(!fncType)
{var ev={declaration:p_objDeclaration,callback:p_fncAsyncCallback,elements:p_element?[p_element]:p_objDeclaration.objElementQuery.elements,type:p_objDeclaration.objTypeDescriptor.strType,returnValue:false}
Web.Bindings.onerror.fire(ev);if(!ev.returnValue)
throw("Binding class ("+p_objDeclaration.objTypeDescriptor.strType+") could not be found");return;}
else
{if(p_objDeclaration.objImportInfo)
p_objDeclaration.objImportInfo.Loaded=true;}
p_objDeclaration.objTypeDescriptor.fncType=fncType;if(p_Sources)
{var arrXml=new Array();for(var i=0;i<p_Sources.length;i++)
{if(p_Sources[i].type==Web.Network.Type.XML)
{arrXml.push(p_Sources[i].resource);if(p_Sources[i].context)
arrXml[p_Sources[i].context]=p_Sources[i].resource;}}
p_objDeclaration.htParams.xmlSources=arrXml;}
if(!p_element)
{var aelTargets=p_objDeclaration.objElementQuery.elements;if(!aelTargets)
{if(p_objDeclaration.objElementQuery.aobjCssSelectorRules.length==0)
{aelTargets=new Array(document.documentElement);}
else
{aelTargets=Web.Dom.Css.getElementsByCssSelectorRules(p_objDeclaration.objElementQuery.aobjCssSelectorRules,p_objDeclaration.objElementQuery.elScope);}}
var iTargets=aelTargets.length;for(var i=0;i<iTargets;i++)
{var objBinding=CreateAndBind(aelTargets[i],p_objDeclaration);if(p_fncAsyncCallback)
p_fncAsyncCallback(objBinding);arrMatch.push(objBinding);}
aelTargets=null;return arrMatch;}
else
{var objBinding=CreateAndBind(p_element,p_objDeclaration);if(p_fncAsyncCallback)
p_fncAsyncCallback(objBinding);return objBinding;}}
if(p_objDeclaration.objImportInfo&&(p_objDeclaration.objImportInfo.astrSources.length>0||p_objDeclaration.objImportInfo.astrStyles.length>0))
{Web.Utility.loadSources(p_objDeclaration.objImportInfo.astrSources,p_objDeclaration.objImportInfo.astrStyles,p_objDeclaration.objImportInfo.astrXml,p_objDeclaration.objImportInfo.eBindingPriority,SourcesLoaded);return new Array();}
else
{return SourcesLoaded();}}
this.bindDeclaration=function(p_objDeclaration,p_fncAsyncCallback)
{return RunDeclaration(p_objDeclaration,p_fncAsyncCallback);}
function MergeArguments(p_el,p_strNamespace,p_htSource,p_objList)
{var htMerged=new Object();if(p_strNamespace)
{for(var i in p_objList)
{var strAttribName=i.toLowerCase();try
{var strValue=p_el.getAttribute(p_strNamespace+":"+strAttribName);if(strValue)
{htMerged[strAttribName]=new String(strValue);htMerged[strAttribName].Default=p_htSource[strAttribName];}
else
htMerged[strAttribName]=p_htSource[strAttribName];}
catch(ex)
{htMerged[strAttribName]=p_htSource&&p_htSource[strAttribName];}}}
return(htMerged);}
function Init()
{var strPrefix="web:";var aelwebBinding=Web.Dom.getAnyElementByTagName(strPrefix+"binding",null,true);var iBindingCount=aelwebBinding.length;for(var i=0;i<iBindingCount;i++)
{var astrSources=new Array();var astrStyles=new Array();var astrXml=new Array();var strPriority="";var htParams=new Object();var elDef=aelwebBinding[i];var iChildCount=elDef.childNodes.length;for(var iGroups=0;iGroups<iChildCount;iGroups++)
{var elGroup=elDef.childNodes[iGroups];var strGroupName=Web.Dom.resolveTagName(elGroup);if(strGroupName)
{switch(strGroupName.toLowerCase())
{case strPrefix+"references":var iSourceCount=elGroup.childNodes.length;strPriority=elGroup.getAttribute("priority");for(var iSources=0;iSources<iSourceCount;iSources++)
{var elSource=elGroup.childNodes[iSources];var strSourceName=Web.Dom.resolveTagName(elSource);if(strSourceName&&strSourceName.toLowerCase()==strPrefix+"add")
{var strType=elSource.getAttribute("type");if(!strType)strType="script";switch(strType.toLowerCase())
{case"text/css":case"css":astrStyles.push(elSource.getAttribute("src"));break;case"text/javascript":case"script":astrSources.push(elSource.getAttribute("src"));break;case"text/xml":case"xml":var strSource=new String(elSource.getAttribute("src"));strSource.name=elSource.getAttribute("name");var strProxy=elSource.getAttribute("proxy");strSource.proxy=(strProxy&&(strProxy.toLowerCase()=="true"))
astrXml.push(strSource);break;}}}
break;case strPrefix+"defaults":var iParamCount=elGroup.childNodes.length;for(var iParams=0;iParams<iParamCount;iParams++)
{var elParam=elGroup.childNodes[iParams];var strParamName=Web.Dom.resolveTagName(elParam);if(strParamName&&strParamName.toLowerCase()==strPrefix+"param")
{var strName=elParam.getAttribute("name");if(strName)
htParams[strName.toLowerCase()]=elParam.getAttribute("value");}}
break;}}}
if(strPriority)
strPriority=Web.Utility.Prioritizer.Priorities[strPriority.substring(0,1).toUpperCase()+strPriority.substring(1).toLowerCase()];if(elDef.getAttribute("type"))
{objWebBinding.attachSelectorBinding(elDef.getAttribute("selector"),elDef.getAttribute("type"),m_rootScope,htParams,aelwebBinding[i].getAttribute("namespace"),null,null,astrSources,astrStyles,strPriority,astrXml);}
else
Web.Utility.loadSources(astrSources,astrStyles,astrXml,strPriority,null);}}
Web.Runtime.oninit.attach(Init);}
Web.Runtime.HostName="Microsoft";