
(function(){if(window.Adaptie)return false
function _(xField){var aClasses=Array.prototype.slice.call(arguments,1)
xField._classes=aClasses
return xField}
window.Adaptie={canAdapt:false,ZINDEX_BASE:10000,TagBehaviors:{},ClassBehaviors:{},IdBehaviors:{},HasInlineBlock:false,init:function(){var oTemp=document.createElement("div")
document.body.appendChild(oTemp)
oTemp.style.overflow="scroll"
Adaptie.Window.Scrollbars.width=oTemp.offsetWidth-oTemp.scrollWidth
Adaptie.Window.Scrollbars.height=oTemp.offsetHeight-oTemp.scrollHeight
oTemp.style.display="inline-block"
if(oTemp.currentStyle.getPropertyValue("display")=="inline-block"){Adaptie.HasInlineBlock=true}
document.body.removeChild(oTemp)},adaptMethod:function(oClass,sMethod,fReplacement){var sClass=oClass
if(typeof oClass=="string")oClass=window[oClass]&&window[oClass].prototype
if(oClass){if(oClass[sMethod]){oClass["__"+sMethod]=oClass[sMethod]}
oClass[sMethod]=fReplacement
return true}else return false},adaptProperty:function(oClass,sProp,oProp){if(typeof oClass=="string")oClass=window[oClass]&&window[oClass].prototype
if(oClass){if(oProp.get){var fOldGetter=oClass.__lookupGetter__(sProp)
if(fOldGetter){oClass.__defineGetter__("__"+sProp,fOldGetter)}
oClass.__defineGetter__(sProp,oProp.get)}
if(oProp.set){var fOldSetter=oClass.__lookupSetter__(sProp)
if(fOldSetter){oClass.__defineSetter__("__"+sProp,fOldSetter)}
oClass.__defineSetter__(sProp,oProp.set)}
return true}else return false},Window:{ActiveXObject:_(function(sID){if(sID.indexOf("XMLDOM")>-1||sID.indexOf("DOMDocument")>-1){return Adaptie.XML.createDocument();}else if(sID.indexOf("XMLHTTP")>-1){return new XMLHttpRequest()}
return null},"Window"),createEventObject:_(function(){return this.document.createEventObject()},"Window"),showDialog:function(sUrl,vArgs,sFeatures,bModal){sFeatures=sFeatures.replace(/;/g,",")
sFeatures=sFeatures.replace(/:/g,"=")
sFeatures=sFeatures.replace("dialogLeft","left")
sFeatures=sFeatures.replace("dialogTop","top")
sFeatures=sFeatures.replace("dialogWidth","width")
sFeatures=sFeatures.replace("dialogHeight","height")
sFeatures=sFeatures.replace("center","centerscreen")
sFeatures=sFeatures.replace("scroll","scrollbars")
var oWin=open(sUrl,"_blank",sFeatures)
oWin.dialogArguments=vArgs
return oWin},showModalDialog:_(function(sUrl,vArgs,sFeatures){Adaptie.Window.showDialog(sUrl,vArgs,sFeatures,false)},"Window"),showModelessDialog:_(function(sUrl,vArgs,sFeatures){return Adaptie.Window.showDialog(sUrl,vArgs,sFeatures,false)},"Window"),open:_(function(sUrl,sName,sFeatures){if(/\bfullscreen\s*=\s*(?:1|yes|true)\b/i.test(sFeatures)){sFeatures=sFeatures.replace(/(?:,|^)\s*(?:top|left|width|height)\s*=\s*[^,]+\b/gi,"")
sFeatures+=",top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight}
return window.__open(sUrl,sName,sFeatures)},"Window"),setTimeout:_(function(xFunc,iDelay){if(typeof xFunc=="function"){return this.__setTimeout(function(){xFunc()},iDelay)}else{return this.__setTimeout.apply(this,arguments)}},"Window"),Scrollbars:{width:0,height:0}},Document:{createElement:_(function(sTag){var oEl,iColon=sTag.indexOf(":")
if(iColon>0){oEl=this.__createElement("fieldset")
oEl.setAttribute("scopeName",sTag.slice(0,iColon))
sTag=sTag.slice(iColon+1)
oEl.setAttribute("tagType",sTag)
oEl.setAttribute("tagtypelc",sTag.toLowerCase())
Adaptie.NSElement.init(oEl)
Adaptie.Element.nbspify(oEl)}else{if(sTag.toLowerCase()=="xml"){return Adaptie.XML.createDocument(true);}
oEl=this.__createElement(sTag)}
oEl.setAttributeNS("","layoutfixed","1")
Adaptie.Element.fixZIndex(oEl)
return oEl},"HTMLDocument"),createEventObject:_(function(){return this.createEvent("HTMLEvents")},"HTMLDocument"),createStyleSheet:_(function(sURL){var oLink=document.createElement('link')
oLink.rel='stylesheet'
oLink.isCreateStyleSheetRequest=true
this.getElementsByTagName("head")[0].appendChild(oLink)
oLink.href=sURL
return oLink},"HTMLDocument"),elementFromPoint:_(function(iX,iY){var oRes=this.body._elementFromPoint(iX,iY)
if(oRes&&!oRes._isOpaque()){var oOpaqueRes=this.body._elementFromPoint(iX,iY,true)
if(oOpaqueRes)return oOpaqueRes}
return oRes},"HTMLDocument"),getElementsByTagName:_(function(sTagName){var aList=new GMNodeList(),aNodes=this.__getElementsByTagName(sTagName);
if(aNodes.length>0){for(var i=0;i<aNodes.length;i++){aList.push(aNodes[i])}}else if(sTagName!="*"){var sXPath='.//*[@tagtypelc="'+sTagName.toLowerCase()+'"]',oNSResolver=document.createNSResolver(document.documentElement),aNodes=document.evaluate(sXPath,this,oNSResolver,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null)
for(var i=0;i<aNodes.snapshotLength;i++)aList.push(aNodes.snapshotItem(i))}
return aList},"HTMLDocument","HTMLElement","HTMLBodyElement","HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLQuoteElement","HTMLTableCellElement","HTMLTableRowElement","HTMLTableSectionElement","HTMLTableElement")},Element:{uidCounter:0,appendChild:_(function(oEl){return this.insertBefore(oEl,null)},"HTMLDocument","HTMLElement","HTMLBodyElement","HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLQuoteElement"),cloneNode:_(function(bDeep){var oNode=this.__cloneNode(bDeep),aNodes=oNode.getElementsByTagName("*"),oTagProps={}
aNodes=Array.prototype.slice.call(aNodes,0)
aNodes.unshift(oNode)
for(var i=0;i<aNodes.length;i++){var oEl=aNodes[i]
oEl.removeAttributeNS("","layoutfixed")
if(oEl.hasAttributeNS("","origWidth"))oEl.style.width=""
var oProps={},sTagName=oEl.nodeName,aAttr=oEl.attributes
for(var iAttr=aAttr.length;iAttr--;){var sProp=aAttr[iAttr].name,sVal=aAttr[iAttr].value
if(sProp.toLowerCase()=="tagtype")sTagName=sVal
oProps[sProp]=1}
if(!oTagProps[sTagName]){oTagProps[sTagName]=oProps}else{for(var sProp in oProps){oTagProps[sTagName][sProp]=1}}}
oNode.addEventListener("DOMNodeInserted",function(e){if(e.target==oNode){Adaptie.Element.postProcess(oNode,oTagProps,true)
oNode.removeEventListener("DOMNodeInserted",arguments.callee,false)}},false)
return oNode},"HTMLElement","HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLQuoteElement"),contains:_(function(oElement){while(oElement){if(oElement==this)return true
oElement=oElement.parentNode}
return false},"HTMLElement"),click:_(function(){var oEvent=this.ownerDocument.createEvent("HTMLEvents")
oEvent.initEvent("click",false,true)
this.dispatchEvent(oEvent)},"HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLQuoteElement"),_elementFromPoint:_(function(iX,iY,bOpaque){if(iX==undefined||iY==undefined)return null
if(this.currentStyle.display=="none")return null
if(this.childNodes.length>0){var sOverflowX=this.currentStyle.overflowX,sOverflowY=this.currentStyle.overflowY,aChild=[]
if(sOverflowX!="visible"||sOverflowY!="visible"){var oPos=this._getAtomicPosition()
if(sOverflowX!="visible"&&iX>=oPos.x+this.offsetWidth)return null
if(sOverflowY!="visible"&&iY>=oPos.y+this.offsetHeight)return null}
for(var i=this.childNodes.length;i--;){var oEl=this.childNodes[i]
if(oEl.nodeType==1)aChild.push(oEl)}
aChild.sort(zIndexSorter)
for(var i=0;i<aChild.length;i++){var oEl=aChild[i],oRes=oEl._elementFromPoint(iX,iY,bOpaque)
if(oRes)return oRes}}
if(this.currentStyle.visibility=="visible"){var oPos=this._getAtomicPosition()
if(iX>=oPos.x&&iY>=oPos.y&&iX<oPos.x+this.offsetWidth&&iY<oPos.y+this.offsetHeight){if(bOpaque&&!this._isOpaque(true)){var iBorderLeft=this.currentStyle.borderLeftStyle!="none"?parseInt(this.currentStyle.borderLeftWidth):0,iBorderTop=this.currentStyle.borderTopStyle!="none"?parseInt(this.currentStyle.borderTopWidth):0
if(iX>=oPos.x+iBorderLeft&&iY>=oPos.y+iBorderTop&&iX<oPos.x+iBorderLeft+this.clientWidth&&iY<oPos.y+iBorderTop+this.clientHeight){return null}}
return this}}
return null},"HTMLElement"),_getAtomicPosition:_(function(){var iX=0,iY=0,oEl=this
while(oEl&&oEl.offsetParent){iX+=oEl.offsetLeft+oEl.clientLeft-oEl.offsetParent.scrollLeft
iY+=oEl.offsetTop+oEl.clientTop-oEl.offsetParent.scrollTop
if(oEl.currentStyle.position=="absolute"&&oEl.offsetParent&&oEl.offsetParent.nodeName=="FIELDSET"){iX+=parseInt(oEl.offsetParent.currentStyle.paddingLeft)
iY+=parseInt(oEl.offsetParent.currentStyle.paddingTop)}
oEl=oEl.offsetParent}
return{x:iX,y:iY}},"HTMLElement"),insertBefore:_(function(oEl,oChild){this.__insertBefore(oEl,oChild)
if(oEl.hasAttributeNS&&oEl.hasAttributeNS("","layoutfixed")){var sQName=((oEl.scopeName!="HTML"?oEl.scopeName+":":"")+oEl.tagName).toLowerCase()
if(Adaptie.TagBehaviors&&Adaptie.TagBehaviors[sQName]){oEl.addBehavior(Adaptie.TagBehaviors[sQName])}}
return oEl},"HTMLDocument","HTMLElement","HTMLBodyElement","HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLQuoteElement"),insertAdjacentElement:_(function(sWhere,oElement){switch(sWhere){case"beforeBegin":this.parentNode.insertBefore(oElement,this)
break
case"afterBegin":this.insertBefore(oElement,this.firstChild)
break
case"beforeEnd":this.appendChild(oElement)
break
case"afterEnd":this.parentNode.insertBefore(oElement,this.nextSibling)
break}
return oElement},"HTMLElement"),_isOpaque:_(function(bFullOpaque){return this.getAttributeNS("","forceopaque")||this.tagName=="IMG"||this.tagName=="EMBED"||this.tagName=="OBJECT"||this.tagName=="TABLE"||!bFullOpaque&&(this.currentStyle.position=="static"||this.currentStyle.backgroundColor!="transparent"||(this.currentStyle.backgroundImage&&!/^(?:none$|url\([\'\"]?(?:javascript:|.*#compnone))/.test(this.currentStyle.backgroundImage)))},"HTMLElement"),selectNodes:_(function(cXPathString){return this.ownerDocument.selectNodes(cXPathString,this)},"Element"),selectSingleNode:_(function(cXPathString){return this.ownerDocument.selectSingleNode(cXPathString,this)},"Element"),swapNode:_(function swapNode(b){var aLoc=this.nextSibling,aParent=this.parentNode
b.parentNode.insertBefore(this,b)
aParent.insertBefore(b,aLoc)
return this},"HTMLElement"),all:_({get:function(){return this.getElementsByTagName("*");}},"HTMLElement"),behaviorUrns:_({get:function(){if(this.__behaviorUrns&&this.__behaviorUrns instanceof Array)return this.__behaviorUrns.concat()
else return[]},set:function(aUrns){return this.__behaviorUrns=aUrns}},"HTMLElement"),children:_({get:function(){var aList=new GMNodeList()
for(var i=0;i<this.childNodes.length;i++){var oChild=this.childNodes[i]
if(oChild.nodeType==1){aList.push(oChild)}}
return aList}},"HTMLElement","HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLInputElement","HTMLQuoteElement"),className:_({get:function(){return this.__className;},set:function(sClass){this.__className=sClass
Adaptie.Element.fixZIndex(this)
return sClass}},"HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLInputElement","HTMLQuoteElement"),clientLeft:_({get:function(){return this.currentStyle.position=="absolute"&&this.offsetParent&&this.offsetParent.currentStyle.borderLeftStyle!="none"?parseInt(this.offsetParent.currentStyle.borderLeftWidth):0;}},"HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLInputElement","HTMLQuoteElement"),clientTop:_({get:function(){return this.currentStyle.position=="absolute"&&this.offsetParent&&this.offsetParent.currentStyle.borderTopStyle!="none"?parseInt(this.offsetParent.currentStyle.borderTopWidth):0;}},"HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLInputElement","HTMLQuoteElement"),currentStyle:_({get:function(){return getComputedStyle(this,"")}},"HTMLElement"),disabled:_({get:function(){return this.hasAttributeNS("","disabled");},set:function(bDisabled){if(bDisabled){this.setAttributeNS("","disabled",1)
return true}else{if(this.hasAttributeNS("","disabled")){this.removeAttributeNS("","disabled")}
return false}}},"HTMLElement"),document:_({get:function(){return this.ownerDocument;}},"HTMLDocument","HTMLElement"),id:_({get:function(){return this.__id;},set:function(sId){this.__id=sId
Adaptie.Element.fixZIndex(this)
return sId}},"HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLInputElement","HTMLQuoteElement"),innerHTML:_({set:function(sHTML){var oRange=this.ownerDocument.createRange()
oRange.selectNodeContents(this)
oRange.deleteContents()
sHTML=""+sHTML
if(!sHTML){if(this.scopeName!="HTML")Adaptie.Element.nbspify(this)
return}
this.removeEventListener("DOMNodeInserted",Adaptie.Element.unnbspify,false)
sHTML=sHTML.replace(/<!--[\s\S]*?-->|<(script|style)((?:\s+[^\s>=]+(?:\s*=\s*(?:([\"\'`])[\s\S]*?\3|[^\s>]*))?)*\s*)>([\s\S]*?)(?=<\/\1[\s>])|<([^\s>]+)((?:\s+[^\s>=]+(?:\s*=\s*(?:([\"\'`])[\s\S]*?\7|[^\s>]*))?)*\s*)>/gi,function(full,spTag,spAttribs,$3,spContent,tag,attribs,$7){tag=spTag||tag
attribs=spAttribs||attribs
return tag?"<"+tag+attribs.replace(/>/g,"&gt;")+">"+(spContent||""):full})
sHTML=sHTML.replace(/<gmv:rect([^>]+)>\s*<gmv:imagedata([^>]+)>[\s\S]+?<\/gmv:rect>/ig,"<img$1$2>")
sHTML=sHTML.replace(/<([^>\s\/?:]+):([^\s>]+)/g,function(sMatch,sScope,sTag){return'<fieldset scopeName="'+sScope+'" tagType="'+sTag+'" tagtypelc="'+sTag.toLowerCase()+'"'})
sHTML=sHTML.replace(/<\/[^>\s\/?:]+:[^\s>]+/g,"</fieldset")
sHTML=sHTML.replace(/(<fieldset[^>]+)\/>/g,"$1></fieldset>")
var oTagProps={},bGameStage=false,rxTag=/<[^?/][^>]+/ig,rxTagName=/^<(\S+)/i,rxProp=/([^\s=]+)=([\"\'])([\s\S]*?)\2/g,aTags=sHTML.match(rxTag)
if(aTags){for(var i=0;i<aTags.length;i++){var sTag=aTags[i],sTagName,aProp,oProps
if(rxTagName.test(sTag)){sTagName=RegExp.$1.toUpperCase()
oProps={}
while(aProp=rxProp.exec(sTag)){var sProp=aProp[1]
if(sProp.toLowerCase()=="tagtype")sTagName=aProp[3]
oProps[sProp]=1}
if(!oTagProps[sTagName]){oTagProps[sTagName]=oProps}else{for(var sProp in oProps){oTagProps[sTagName][sProp]=1}}
if(sTagName=="stage")bGameStage=true}}}
sHTML=sHTML.replace(/<fieldset([^>]+?)contentEditable=(["'])?true\2([^>]*)>([^<]*)<\/fieldset>/gi,"<input$1 $3 />")
sHTML=sHTML.replace(/<embed([^>]*?)id=(([\"\'])[\s\S]+?\3|[^\s>]+)/ig,"<embed$1id=$2 name=$2")
sHTML=sHTML.replace(/<script\s+(?:[^=]+\s+)?([^=]+)=([\"\']?)([^\s>]+)\2\s+(?:[^=]+\s+)?([^=]+)=([\"\']?)([^\s>]+)\5[^>]*>([\s\S]+?)<\/script>/ig,function(sMatch,sAttr1,sQ1,sVal1,sAttr2,sQ2,sVal2,sCode){var oAttr={}
oAttr[sAttr1.toLowerCase()]=sVal1
oAttr[sAttr2.toLowerCase()]=sVal2
if(oAttr["event"]&&oAttr["for"]){return'<script type="text/javascript">function '+oAttr["for"]+'_Do'+oAttr["event"].replace(/fscommand/i,"FSCommand")+' {\r\n'+sCode+'\r\n}</script>'}else{return sMatch}})
sHTML=sHTML.replace(/<embed[^>]*?type=([\"\']?)application\/x-mplayer2\1[^>]*/ig,function(sMatch){sMatch=sMatch.replace(/([^\s=]+)=([\"\']?)(true|false)\2/ig,function(sMatch,sName,sQuote,sVal){if(sName.indexOf("trans")!=0){if(sVal.toLowerCase()=="true")sVal="1"
if(sVal.toLowerCase()=="false")sVal="0"}
return sName+'='+sQuote+sVal+sQuote})
return sMatch})
sHTML=Adaptie.Style.Rules.processHTML(sHTML,this)
this.appendChild(oRange.createContextualFragment(sHTML))
if(bGameStage){Adaptie.Element.postProcessGame(this,oTagProps)}else{Adaptie.Element.postProcess(this,oTagProps)}
return sHTML}},"HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLQuoteElement"),innerText:_({get:function(){return this.textContent;},set:function(sText){sText=""+sText
if(sText!=""){this.removeEventListener("DOMNodeInserted",Adaptie.Element.unnbspify,false)
this.textContent=sText.replace(/\t/g," ").replace(/  /g," \u200B ")}else{Adaptie.Element.nbspify(this)}
return sText}},"HTMLElement"),outerHTML:_({get:function(){var oEl=this.ownerDocument.createElement("div")
oEl.__appendChild(this.__cloneNode(true))
return oEl.innerHTML},set:function(sHTML){var oTemp=this.ownerDocument.createElement("div"),oParent=this.parentNode,aChild
oTemp.innerHTML=sHTML
aChild=oTemp.childNodes
for(var iCh=0;iCh<aChild.length;iCh++){oParent.__insertBefore(aChild[iCh],this)}
oParent.removeChild(this)
return sHTML}},"HTMLElement"),parentElement:_({get:function(){return this.parentNode!=this.ownerDocument?this.parentNode:null;}},"HTMLElement"),pctWidth:_({get:function(){var sW=this.style.width
if(sW){if(sW.indexOf("%")>-1)return sW}else{var iW=parseInt(this.currentStyle.getPropertyValue("outline-offset"))
if(iW>0)return iW+"%"}
return""}},"HTMLElement"),readyState:_({get:function(){return this.__readyState!==undefined?this.__readyState:this.complete===false?"loading":"complete";},set:function(sState){return this.__readyState=sState;}},"HTMLDocument","HTMLElement"),runtimeStyle:_({get:function(){return this.style;}},"HTMLElement"),scopeName:_({get:function(){return this.getAttributeNS("","scopename")||"HTML";}},"HTMLElement"),style:_({get:function(){var oStyle=this.__style
oStyle.element=this
return oStyle}},"HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLInputElement","HTMLEmbedElement","HTMLImageElement","HTMLTableElement","HTMLAnchorElement","HTMLIFrameElement","HTMLQuoteElement"),tagName:_({get:function(){return this.getAttributeNS("","tagtype")||this.__tagName;}},"HTMLElement","HTMLFieldSetElement","HTMLDivElement","HTMLInputElement","HTMLQuoteElement"),uniqueID:_({get:function(){return this.__UID?this.__UID:this.__UID="emu__id"+(++Adaptie.Element.uidCounter);}},"HTMLDocument","HTMLElement"),postProcess:function(oNode,oTagProps,bIncludeRoot){var aNodes=oNode.getElementsByTagName("*"),aRestore=[],aBehaviors=[],aEmbeds=[]
if(bIncludeRoot){aNodes=Array.prototype.slice.call(aNodes,0)
aNodes.unshift(oNode)}
for(var i=aNodes.length;i--;){var oEl=aNodes[i]
if(oEl.scopeName=="gmv"){oEl.removeNode()
continue}
if(oEl.id)window[oEl.id]=oEl
oEl.removeAttributeNS("","forceplay")
if(oEl.hasAttributeNS("","__src")){oEl.setAttributeNS("","src",oEl.getAttributeNS("","__src"))
oEl.removeAttributeNS("","__src")}
if(oEl.nodeName=="FIELDSET"&&(oEl.currentStyle.overflowX!="visible"||oEl.currentStyle.overflowY!="visible")&&(oEl.currentStyle.position=="absolute"||oEl.currentStyle.display=="block")){var oDiv=document.__createElement("blockquote")
for(var j=0;j<oEl.attributes.length;j++){var oAttr=oEl.attributes[j]
if(oAttr.specified){oDiv.setAttributeNS("",oAttr.name,oAttr.value)}}
if(!oEl.style.overflowX||!oEl.style.overflowY){oEl.style.overflowX="";oEl.style.overflowY=""
var sCurX=oEl.currentStyle.overflowX,sCurY=oEl.currentStyle.overflowY,iOffX=parseInt(oEl.currentStyle.getPropertyValue("-moz-outline-radius-topright")),iOffY=parseInt(oEl.currentStyle.getPropertyValue("-moz-outline-radius-bottomleft"))
if(iOffX>0)sCurX=Adaptie.Style.Overflow.lookup(iOffX)||sCurX
if(iOffY>0)sCurY=Adaptie.Style.Overflow.lookup(iOffY)||sCurY
if(!oDiv.style.overflowX)oDiv.style.overflowX=sCurX
if(!oDiv.style.overflowY)oDiv.style.overflowY=sCurY}
oEl.parentNode.insertBefore(oDiv,oEl)
while(oEl.hasChildNodes()){oDiv.appendChild(oEl.firstChild)}
oEl.removeNode(false)
oEl=oDiv
oDiv=null}
if(oEl.currentStyle.display=="none"&&oEl.tagName!="SCRIPT"&&oEl.tagName!="PARAM"){Adaptie.Element.Embed.forceShow(oEl)
oEl.setAttributeNS("","forceshow","1")
aRestore.push(oEl)}}
aNodes=oNode.getElementsByTagName("*")
if(bIncludeRoot){aNodes=Array.prototype.slice.call(aNodes,0)
aNodes.unshift(oNode)}
for(var i=0;i<aNodes.length;i++){var oEl=aNodes[i]
if(oEl.tagName=="SCRIPT"||oEl.tagName=="PARAM"||oEl.tagName=="BR")continue
if(oEl.scopeName!="HTML"&&oEl.hasAttribute("tagType")){Adaptie.NSElement.init(oEl)}
var sQName=((oEl.scopeName!="HTML"?oEl.scopeName+":":"")+oEl.tagName).toLowerCase()
if(Adaptie.TagBehaviors&&Adaptie.TagBehaviors[sQName]){aBehaviors.push({el:oEl,file:Adaptie.TagBehaviors[sQName]})
oEl.readyState="uninitialized"}
if(Adaptie.ClassBehaviors&&Adaptie.ClassBehaviors[oEl.className]){aBehaviors.push({el:oEl,file:Adaptie.ClassBehaviors[oEl.className]})
oEl.readyState="uninitialized"}
if(Adaptie.IdBehaviors&&Adaptie.IdBehaviors[oEl.id]){aBehaviors.push({el:oEl,file:Adaptie.IdBehaviors[oEl.id]})
oEl.readyState="uninitialized"}
if(oEl.nodeName=="MARQUEE"&&oEl.init)try{oEl.init();}catch(e){}
if(oEl.nodeName=="IMG"&&oEl.currentStyle.position!="absolute"&&(oEl.style.height==""||oEl.style.width==""||oEl.style.height=="auto"||oEl.style.width=="auto")){if(oEl.complete)Adaptie.Element.imageLoaded({target:oEl})
else oEl.addEventListener("load",Adaptie.Element.imageLoaded,false)}
if(oEl.nodeName=="INPUT"||oEl.nodeName=="TEXTAREA")Adaptie.Input.init(oEl)
var oProps=oTagProps[oEl.tagName],oSkip={"tagtype":1,"scopename":1,"id":1,"style":1,"class":1,"zindexfixed":1,"zindexinline":1}
if(oProps){for(var sProp in oProps){if(!oSkip[sProp.toLowerCase()]&&!(sProp in oEl)&&typeof oEl[sProp]=="undefined"){Adaptie.Element.wrapAttribute(oEl,sProp)}}}
if(oEl.tagName=="TD"&&oEl.offsetParent){Adaptie.Element.fixTDChildren(oEl)}
Adaptie.Element.fixLayout(oEl)
Adaptie.Element.fixZIndex(oEl)
oEl.disabled=oEl.hasAttributeNS("","disabled")
if(oEl.tagName=="EMBED"&&oEl.src.slice(-4)!=".swf"&&oEl.currentStyle.visibility=="hidden"&&oEl.currentStyle.getPropertyValue("-moz-outline-radius-bottomright")!="1px"){oEl.setAttributeNS("","forceplay","1")
aEmbeds.push(oEl)}}
for(var i=0;i<aRestore.length;i++){aRestore[i].removeAttributeNS("","forceshow")}
if(aEmbeds.length>0){setTimeout(function(){for(var i=0;i<aEmbeds.length;i++){aEmbeds[i].removeAttributeNS("","forceplay")}},0)}
for(var i=0;i<aBehaviors.length;i++){var oEl=aBehaviors[i].el
oEl.addEventListener("emulationdone",Adaptie.Element.emulationDone,false)
oEl.addBehavior(aBehaviors[i].file)}},postProcessGame:function(oNode,oTagProps){setTimeout(waitForTheme,10)
function waitForTheme(){if(oGameStyle.readyState=="complete"){Adaptie.Element.postProcess(oNode,oTagProps)}else{setTimeout(waitForTheme,50)}}},emulationDone:function(oEvent){var oNode=oEvent.target,aNodes=oNode.getElementsByTagName("*"),aRestore=Adaptie.Element.forceShow(oNode);
for(var i=0;i<aNodes.length;i++){var oEl=aNodes[i],oCurStyle=oEl.currentStyle
if(oEl.tagName=="SCRIPT"||oEl.tagName=="BR")continue
Adaptie.Element.fitHeightToContent(oEl)}
Adaptie.Element.forceShow(null,aRestore)
oNode.removeEventListener("emulationdone",Adaptie.Element.emulationDone,false)},imageLoaded:function(event){var oSrc=event.target
setTimeout(function(){Adaptie.Element.fitParentsHeight(oSrc);},0)},fixLayout:function(oEl){if(!oEl.hasAttributeNS("","layoutfixed")){var oCurStyle=oEl.currentStyle
if(oEl.style.left&&oEl.style.left!="auto")oEl.style.right="auto"
if(oEl.style.right&&oEl.style.right!="auto")oEl.style.left="auto"
if(oEl.style.top&&oEl.style.top!="auto")oEl.style.bottom="auto"
if(oEl.style.bottom&&oEl.style.bottom!="auto")oEl.style.top="auto"
if(oEl.nodeName=="FIELDSET"&&!oEl.innerHTML.replace(/[ \f\n\r\t\v]+/,"")){Adaptie.Element.nbspify(oEl)}
if(!Adaptie.HasInlineBlock&&oEl.nodeName=="FIELDSET"&&oCurStyle.position!="absolute"&&oCurStyle.display!="block"&&(!oEl.style.width||oEl.style.width=="auto")&&!oEl.pctWidth){Adaptie.Element.fitWidthToContent(oEl)
var fHandler=Adaptie.Element.fitWidthToContentClosure(oEl)
oEl.addEventListener("DOMNodeInserted",fHandler,false)
oEl.addEventListener("DOMNodeRemoved",fHandler,false)}
var sW=oEl.pctWidth
if(sW&&oEl.nodeName=="FIELDSET"&&oEl.offsetParent){oEl.style.width=Adaptie.Element.getRelativeWidth(oEl,parseFloat(sW))}
Adaptie.Element.fitHeightToContent(oEl)
if(oEl.style.overflowX=="visible"&&oCurStyle.overflowX!="visible"&&oCurStyle.position=="absolute"){var fHandler=Adaptie.Element.fixOverflowClosure(oEl,"width")
if(oEl.readyState=="complete")fHandler()
else oEl.addEventListener("emulationdone",fHandler,false)}
if(oEl.style.overflowY=="visible"&&oCurStyle.overflowY!="visible"&&oCurStyle.position=="absolute"){var fHandler=Adaptie.Element.fixOverflowClosure(oEl,"height")
if(oEl.readyState=="complete")fHandler()
else oEl.addEventListener("emulationdone",fHandler,false)}
Adaptie.Element.fixOddPosition(oEl,"right")
Adaptie.Element.fixOddPosition(oEl,"bottom")
Adaptie.Element.fixPaddingPosition(oEl)
if(!Adaptie.HasInlineBlock&&oEl.nodeName=="FIELDSET"&&oCurStyle.position!="absolute"&&oEl.parentNode.currentStyle.getPropertyValue("display")=="inline"){var oFixer=document.createElement("span")
var oImg=document.createElement("img")
oFixer.appendChild(oImg)
if(oCurStyle.position=="static"){oEl.style.top="auto"
oEl.style.right="auto"}
oFixer.appendChild(oEl.parentNode.replaceChild(oFixer,oEl))
oFixer.className="fixer"
oImg.style.width=oEl.offsetWidth
oImg.style.height=oEl.offsetHeight
oImg.style.height=oEl.offsetHeight-(oEl.offsetTop-oImg.offsetTop)}
if(oCurStyle.position=="absolute"&&(!oEl.style.width||oEl.style.width=="auto")&&oEl.offsetParent&&(oEl.offsetLeft+oEl.offsetWidth)>oEl.offsetParent.offsetWidth){var oNBSP=document.createTextNode("0xA0"),iOrigWidth=oEl.offsetWidth
oEl.appendChild(oNBSP)
if(oEl.offsetWidth>iOrigWidth){var pLeft=parseInt(oEl.offsetParent.currentStyle.paddingLeft),pRight=parseInt(oEl.offsetParent.currentStyle.paddingRight)
oEl.style.width=oEl.offsetParent.offsetWidth-oEl.offsetLeft-pLeft-pRight}
oEl.removeChild(oNBSP)}
if(oEl.currentStyle.fontFamily.toLowerCase().indexOf("dings")>-1&&oEl.nodeName!="FONT"){if(oEl.currentStyle.getPropertyValue("-moz-outline-radius-topleft")=="1px"){oEl.innerHTML="&bull;"}else if(navigator.platform.substr(0,3)=="Win"&&!document.getElementsByClassName){var sFont=oEl.currentStyle.fontFamily
var oRange=oEl.ownerDocument.createRange(),oFont=oEl.ownerDocument.createElement("font")
oFont.face=sFont
oRange.selectNodeContents(oEl)
oFont.appendChild(oRange.extractContents())
oEl.appendChild(oFont)}else{oEl.style.visibility="hidden"}}
if(oEl.tagName=="UL"){var bRTL=oEl.currentStyle.direction=="rtl"
if(!oEl.style.marginTop||oEl.style.marginTop=="auto"){var iBR=0
function seekBackForText(oNode){while(oNode){if(oNode.nodeType==3&&oNode.nodeValue.replace(/[ \f\n\r\t\v]+/,"")){return true}else if(oNode.tagName=="BR"){if(++iBR==2)return false}else if(oNode.nodeType==1&&oNode.currentStyle.position!="absolute"){var bRet=seekBackForText(oNode.lastChild)
if(bRet===true||bRet===false)return bRet}
oNode=oNode.previousSibling}}
if(!seekBackForText(oEl.previousSibling)){oEl.style.marginTop="0"}}
if(oEl.style.marginLeft=="auto")oEl.style.marginLeft=bRTL?0:"30pt"
if(oEl.style.marginRight=="auto")oEl.style.marginRight=bRTL?"30pt":0
var sIndent=oEl.currentStyle.textIndent
if(sIndent!="0px"){var sMargin=bRTL?"marginRight":"marginLeft",iCurMargin=parseInt(oEl.currentStyle[sMargin])
oEl.style[sMargin]=iCurMargin+parseInt(sIndent)+"px"
oEl.style.textIndent=0}}
if(oEl.tagName=="LI"){var oWrapper=document.__createElement("fieldset"),oRange=document.createRange()
oRange.selectNodeContents(oEl)
oWrapper.__appendChild(oRange.extractContents())
oWrapper.style.setProperty("display","block","")
oWrapper.setAttributeNS("","layoutfixed","1")
oWrapper.setAttributeNS("","blocked","1")
oEl.appendChild(oWrapper)}
oEl.setAttributeNS("","layoutfixed","1")}},fixZIndex:function(oEl){if(oEl.hasAttributeNS("","zindexfixed")){if(oEl.hasAttributeNS("","zindexinline")){return}
oEl.style.setProperty("z-index","","")}
if(oEl.style.getPropertyValue("z-index"))oEl.setAttributeNS("","zindexinline",1)
var sZIndex=oEl.currentStyle.getPropertyValue("z-index")
if(sZIndex=="auto")sZIndex=0
oEl.style.setProperty("z-index",+sZIndex+Adaptie.ZINDEX_BASE,"")
oEl.setAttributeNS("","zindexfixed","1")},fitHeightToContent:function(oEl,bSkip){if((oEl.currentStyle.overflowY=="visible"||oEl.style.overflowY=="visible"||!oEl.style.overflowY&&oEl.currentStyle.overflowY=="auto"&&oEl.currentStyle.overflowX=="hidden"||oEl.nodeName=="INPUT")&&oEl.nodeName!="IFRAME"&&oEl.offsetParent&&!oEl.height&&oEl.height!==0&&oEl.nodeName!="EMBED"&&oEl.nodeName!="OBJECT"){var origHeight=oEl.style.height,iLineHeight=Math.round(parseFloat(oEl.currentStyle.lineHeight)),curHeight
if(oEl.__origHeight!==undefined){origHeight=oEl.__origHeight
oEl.style.setProperty("height",origHeight,"")}else{oEl.__origHeight=origHeight}
curHeight=oEl.offsetHeight
oEl.style.setProperty("height","auto","")
if(oEl.offsetHeight<=curHeight){if(oEl.currentStyle.display=="inline"&&oEl.offsetHeight==curHeight&&iLineHeight>curHeight&&(!origHeight||origHeight=="auto")&&!oEl.textContent.replace(/[ \f\n\r\t\v]+/,"")){oEl.style.setProperty("height",iLineHeight,"")}else{oEl.style.setProperty("height",origHeight,"")}}else if(!bSkip){Adaptie.Element.fitParentsHeight(oEl)}}},fitParentsHeight:function(oEl){if(oEl.currentStyle.position!="absolute"){while((oEl=oEl.parentNode)&&oEl.offsetParent){Adaptie.Element.fitHeightToContent(oEl,true)
if(oEl.currentStyle.position=="absolute")break}}},fitWidthToContent:function(oEl){oEl.style.width=""
var origWidth=oEl.getAttributeNS("","origWidth")||oEl.offsetWidth,origPos=oEl.style.position
oEl.setAttributeNS("","origWidth",origWidth)
oEl.style.position="absolute"
if(oEl.offsetWidth<origWidth)oEl.style.width=oEl.offsetWidth
oEl.style.position=origPos},fitWidthToContentClosure:function(oEl){return function(){var aRestore=Adaptie.Element.forceShow(oEl)
Adaptie.Element.fitWidthToContent(oEl)
Adaptie.Element.forceShow(null,aRestore)}},forceShow:function(oEl,aRestore){if(oEl){var oParent,aRestore=[]
if(!oEl.offsetParent){oParent=oEl
do{Adaptie.Element.Embed.forceShow(oParent)
oParent.setAttributeNS("","forceshow","1")
aRestore.push(oParent)
oParent=oParent.parentNode}while(oParent&&!oEl.offsetParent)}
return aRestore}else if(aRestore){for(var i=aRestore.length;i--;){aRestore[i].removeAttributeNS("","forceshow")}}},fixOverflow:function(oEl,sProp){if(oEl.origVal)oEl.style[sProp]=oEl.origVal
oEl.setAttributeNS("","nomargins","1")
var curVal=oEl[sProp=="width"?"clientWidth":"clientWidth"],scrVal=oEl[sProp=="width"?"scrollWidth":"scrollHeight"]
if(scrVal>curVal){if(oEl[sProp=="width"?"scrollHeight":"scrollWidth"]>oEl[sProp=="width"?"offsetHeight":"offsetWidth"]){scrVal+=Adaptie.Window.Scrollbars[sProp]}
oEl.origVal=oEl.style[sProp]
oEl.style[sProp]=scrVal
oEl.style[sProp=="width"?"overflowX":"overflowY"]="hidden"}
oEl.removeAttributeNS("","nomargins")},fixOverflowClosure:function(oEl,sProp){return function(){oEl.removeEventListener("emulationdone",arguments.callee,false)
Adaptie.Element.fixOverflow(oEl,sProp)}},fixRenderBugs:function(oEl){if(!Adaptie.HasInlineBlock){if(oEl.currentStyle.position=="absolute"){Adaptie.Element.fixOffsetParent(oEl)}else{Adaptie.Element.fixRenderOrder(oEl)}}},fixRenderOrder:function(oEl){var oParent=oEl.parentNode
if(oParent){oParent.setAttributeNS("","forcehide","1")
oParent.offsetWidth
oParent.removeAttributeNS("","forcehide")
Adaptie.Element.fixOffsetParent(oParent)}},fixOffsetParent:function(oEl){var oParent=oEl.parentNode
while(oParent&&oEl.offsetParent!=oParent&&oParent.currentStyle.getPropertyValue("display")=="table-caption"){if(oParent.currentStyle.position!="static"){oParent.setAttributeNS("","forceblock","1")
oParent.offsetWidth
oParent.removeAttributeNS("","forceblock")
break}
oParent=oParent.parentNode}},fixTDChildren:function(oTD){var aNodes=oTD.getElementsByTagName("*"),oTable=oTD.offsetParent,oParent=oTable.offsetParent,iLeft=oTD.offsetLeft+oTable.offsetLeft,iTop=oTD.offsetTop+oTable.offsetTop
for(var i=0;i<aNodes.length;i++){var oNode=aNodes[i]
if(oNode.offsetParent==oParent&&oNode.currentStyle.position=="absolute"){oNode.style.left=oNode.offsetLeft+iLeft
oNode.style.right="auto"
oNode.style.top=oNode.offsetTop+iTop
oNode.style.bottom="auto"}}},fixOddPosition:function(oEl,sProp){var sOppProp=sProp=="right"?"left":"top"
if(oEl.style[sProp]&&oEl.style[sProp]!="auto"&&oEl.offsetParent&&(oEl.offsetParent[sProp=="right"?"offsetWidth":"offsetHeight"]%2)==1){var iCur=parseInt(oEl.currentStyle[sProp]),iTemp
oEl.style[sProp]="0"
iTemp=parseInt(oEl.currentStyle[sProp])
oEl.style[sProp]=iCur-iTemp+1}},fixPaddingPosition:function(oEl){if(oEl.currentStyle.position=="absolute"&&oEl.offsetParent&&oEl.offsetParent.nodeName=="FIELDSET"){var pTop=parseInt(oEl.offsetParent.currentStyle.paddingTop),pLeft=parseInt(oEl.offsetParent.currentStyle.paddingLeft),pBottom=parseInt(oEl.offsetParent.currentStyle.paddingBottom),pRight=parseInt(oEl.offsetParent.currentStyle.paddingRight)
if(oEl.offsetTop==-2000&&(oEl.hasAttributeNS("","curtop")||oEl.hasAttributeNS("","curTop"))&&pTop>0){oEl.style.top=oEl.curTop||""
oEl.curTop=oEl.offsetTop-pTop
oEl.style.top="-2000px"}else if(pTop>0||pBottom>0){if(oEl.style.bottom&&oEl.style.bottom!="auto"){var iCurBottom=parseInt(oEl.currentStyle.bottom),iTempBottom,pFix
oEl.style.bottom=0
iTempBottom=parseInt(oEl.currentStyle.bottom)
if(iTempBottom==0){oEl.style.bottom=iCurBottom-iTempBottom-pBottom}else{oEl.style.bottom=iCurBottom-iTempBottom+pTop}}else if(pTop>0){oEl.style.top=oEl.offsetTop-pTop
oEl.style.bottom="auto"}}
if(pLeft>0||pBottom>0){if(oEl.style.right&&oEl.style.right!="auto"){var iCurRight=parseInt(oEl.currentStyle.right),iTempRight
oEl.style.right=0
iTempRight=parseInt(oEl.currentStyle.right)
if(iTempRight==0){oEl.style.right=iCurRight-iTempRight-pRight}else{oEl.style.right=iCurRight-iTempRight+pLeft}}else if(pLeft>0){oEl.style.left=oEl.offsetLeft-pLeft
oEl.style.right="auto"}}}},getRelativeWidth:function(oEl,iPct){var pLeft=parseInt(oEl.parentNode.currentStyle.paddingLeft),pRight=parseInt(oEl.parentNode.currentStyle.paddingRight),bLeft=parseInt(oEl.parentNode.currentStyle.borderLeftWidth),bRight=parseInt(oEl.parentNode.currentStyle.borderRightWidth),mLeft=0,mRight=0,pW
if(oEl.currentStyle.position!="absolute"){mLeft=parseInt(oEl.currentStyle.marginLeft)
mRight=parseInt(oEl.currentStyle.marginRight)}
oEl.parentNode.setAttributeNS("","nomargins","1")
if(oEl.parentNode.currentStyle.overflowX=="hidden")oEl.parentNode.setAttributeNS("","forcehidechild","1")
pW=oEl.parentNode.offsetWidth-pLeft-pRight-bLeft-bRight-mLeft-mRight
oEl.parentNode.removeAttributeNS("","nomargins")
oEl.parentNode.removeAttributeNS("","forcehidechild")
return pW*(iPct/100)},nbspify:function(oEl){oEl.textContent="\xA0"
oEl.addEventListener("DOMNodeInserted",Adaptie.Element.unnbspify,false)},unnbspify:function(event){var oEl=event.currentTarget,oNode=oEl.firstChild
if(oNode.nodeType==oNode.TEXT_NODE&&oNode.nodeValue=="\xA0")oEl.removeChild(oNode)
oEl.removeEventListener("DOMNodeInserted",arguments.callee,false)},wrapAttribute:function(oEl,sProp){if(oEl.hasAttributeNS("",sProp.toLowerCase())){try{var oAttr=oEl.ownerDocument.createAttributeNS("",sProp);}catch(e){return;}
var sVal=oEl.getAttributeNS("",sProp.toLowerCase())
oEl.removeAttributeNS("",sProp.toLowerCase())
oEl.setAttributeNodeNS(oAttr)
oAttr.value=sVal
oAttr.expando=true
oEl["__"+sProp+"__val"]=sVal}
Adaptie.adaptProperty(oEl,sProp,{get:function(){return this["__"+sProp+"__val"]},set:function(xVal){this["__"+sProp+"__val"]=xVal
this.setAttributeNS("",sProp,xVal)
return xVal}})},Embed:{showEmbeds:[],forceShow:function(oEl){var aEmbeds=oEl.tagName=="EMBED"?[oEl]:oEl.__getElementsByTagName("EMBED")
for(var iEmbed=aEmbeds.length;iEmbed--;){var oEmbed=aEmbeds[iEmbed]
if(!oEmbed.hasAttributeNS("","__src")){var sSrc=oEmbed.getAttributeNS("","src")
oEmbed.setAttributeNS("","__src",sSrc)
oEmbed.setAttributeNS("","src","data:,")
Adaptie.Element.Embed.showEmbeds.push(oEmbed)}}
if(!Adaptie.Element.Embed.showTimer){Adaptie.Element.Embed.showTimer=setTimeout(Adaptie.Element.Embed.restoreShow,0)}},restoreShow:function(oParent){var aEmbeds=Adaptie.Element.Embed.showEmbeds,bRestoreAll=!oParent
for(var iEmbed=aEmbeds.length;iEmbed--;){var oEmbed=aEmbeds[iEmbed]
if(bRestoreAll||oParent.contains(oEmbed)){oEmbed.setAttributeNS("","src",oEmbed.getAttributeNS("","__src"))
oEmbed.removeAttributeNS("","__src")
if(!bRestoreAll)aEmbeds.splice(iEmbed,1)}}
if(bRestoreAll)aEmbeds.length=0
if(aEmbeds.length==0&&Adaptie.Element.Embed.showTimer){clearTimeout(Adaptie.Element.Embed.showTimer)
Adaptie.Element.Embed.showTimer=null}}}},NSElement:{init:function(oEl){var sTagType=oEl.getAttribute("tagType")
oEl.getAttribute=Adaptie.NSElement.proxyAttribute.get
oEl.setAttribute=Adaptie.NSElement.proxyAttribute.set
oEl.removeAttribute=Adaptie.NSElement.proxyAttribute.remove
oEl.hasAttribute=Adaptie.NSElement.proxyAttribute.has
oEl.tagType=sTagType
oEl.setAttributeNS("","tagType",sTagType)
if(oEl.currentStyle.getPropertyValue("display")=="inline")oEl.style.display=Adaptie.HasInlineBlock?"inline-block":"table-caption"},proxyAttribute:{get:function(sName){var xVal=this[sName]
return xVal!==undefined?xVal:null},set:function(sName,xVal){this[sName]=xVal
this.setAttributeNS("",sName,xVal)
return xVal},remove:function(sName){this[sName]=null
this.removeAttributeNS("",sName)},has:function(sName){return this[sName]!==undefined&&this[sName]!==null}}},Input:{init:function(oEl){oEl.addEventListener("change",Adaptie.Input.onchange,false)
oEl.addEventListener("focus",Adaptie.Input.onfocus,false)
oEl.addEventListener("blur",Adaptie.Input.onblur,false)
var aAttrs=["color","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","letterSpacing","lineHeight","textAlign","textDecoration","textIndent","textTransform"],oParentStyle=oEl.parentNode.currentStyle
for(var i=0;i<aAttrs.length;i++){var sAttr=aAttrs[i]
if(!oEl.style[sAttr]){oEl.style[sAttr]=oParentStyle[sAttr]}}},contentEditable:_({get:function(){return!this.readOnly;},set:function(bEdit){this.readOnly=!bEdit;return!!bEdit;}},"HTMLInputElement"),innerText:_({get:function(){return this.value;},set:function(sText){sText=""+sText
this.value=sText
this.setAttributeNS("","value",sText)
return sText}},"HTMLInputElement"),onblur:function(oEvent){var oDoc=oEvent.target.ownerDocument
oDoc.body.style.MozUserSelect=oDoc.oldMozUserSelect?oDoc.oldMozUserSelect:""},onchange:function(oEvent){oEvent.target.setAttributeNS("","value",oEvent.target.value)},onfocus:function(oEvent){var oDoc=oEvent.target.ownerDocument
oDoc.oldMozUserSelect=oDoc.body.style.MozUserSelect
oDoc.body.style.MozUserSelect=""}},Node:{getAttribute:_(function(){return null},"Node"),removeNode:_(function(bRemoveChildren){var oParent=this.parentNode
if(!oParent)return this
if(!bRemoveChildren){var aChild=this.childNodes
for(var iCh=0;iCh<aChild.length;iCh++){oParent.__insertBefore(aChild[iCh],this)}}
return oParent.removeChild(this)},"Node"),replaceNode:_(function(oNewNode){return this.parentNode.replaceChild(oNewNode,this)},"Node"),parentElement:_({get:function(){return this.parentNode;}},"Node"),text:_({get:function(){return this.textContent;},set:function(sVal){return this.textContent=sVal;}},"Node")},Attr:{expando:_({get:function(){return this.__expando==true;},set:function(bExpando){return this.__expando=bExpando;}},"Attr")},Event:{knownEvents:["onfocus","onblur","onchange","onmouseover","onmousedown","onmousemove","onmouseup","onmouseout","onclick","ondblclick","onkeydown","onkeypress","onkeyup","onresize","onscroll"],attachEvent:_(function(sEvent,fHandler){var fWrapper=function(oEvent){if(oEvent instanceof MouseEvent&&oEvent.target.disabled)return false
var oOldEvent=window.event
window.event=oEvent
var xRet=fHandler(oEvent)
window.event=oOldEvent
return xRet},sUID=this.uniqueID
var oCache=fHandler["__"+sEvent]
if(!oCache){fHandler["__"+sEvent]=oCache={}}
if(!oCache[sUID]){oCache[sUID]=[]}
oCache[sUID].push(fWrapper)
this.addEventListener(sEvent.slice(2),fWrapper,false)},"Window","HTMLDocument","HTMLElement"),detachEvent:_(function(sEvent,fHandler){var fWrapper
var sUID=this.uniqueID,oCache=fHandler["__"+sEvent]
if(sUID&&oCache&&oCache[sUID]){fWrapper=oCache[sUID].pop()
if(oCache[sUID].length==0)delete oCache[sUID]}else{fWrapper=fHandler}
this.removeEventListener(sEvent.slice(2),fWrapper,false)},"Window","HTMLDocument","HTMLElement"),fireEvent:_(function(sEvent,oEvent){if(!oEvent){var oDoc=this instanceof Document?this:this.ownerDocument
oEvent=oDoc.createEventObject()}
var bKnown=Adaptie.Event.knownEvents.indexOf(sEvent)>-1
oEvent.initEvent(sEvent.slice(2),bKnown,true)
var oOldEvent=window.event
window.event=oEvent
if(typeof this[sEvent]=="function"&&!bKnown){oEvent.forceTarget=this
this[sEvent]()}
var bReturn=this.dispatchEvent(oEvent)
window.event=oOldEvent
return bReturn},"HTMLDocument","HTMLElement"),fromElement:_({get:function(){return this.relatedTarget}},"MouseEvent"),cancelBubble:_({set:function(b){if(b)this.stopPropagation();}},"Event"),keyCode:_({set:function(){}},"KeyboardEvent"),offsetX:_({get:function(){return this.layerX;}},"MouseEvent"),offsetY:_({get:function(){return this.layerY;}},"MouseEvent"),returnValue:_({set:function(b){if(!b)this.preventDefault();}},"Event"),srcElement:_({get:function(){return this.forceTarget||this.target;}},"Event"),toElement:_({get:function(){return this.relatedTarget}},"MouseEvent"),Wrapper:{init:function(){var aEvents=Adaptie.Event.knownEvents,aClasses=arguments
for(var iC=0;iC<aClasses.length;iC++){var sClass=aClasses[iC]
for(var iE=0;iE<aEvents.length;iE++){Adaptie.Event.Wrapper.wrap(sClass,aEvents[iE])}}},wrap:function(sClass,sEvent){Adaptie.adaptProperty(sClass,sEvent,{get:function(){return Adaptie.Event.Wrapper.get(this,sEvent)},set:function(fCallback){Adaptie.Event.Wrapper.set(this,sEvent,fCallback)
return fCallback}})},get:function(oEl,sEvent){var fWrapper=oEl["__"+sEvent+"__wrapper"]
if(fWrapper){return fWrapper.callback}},set:function(oEl,sEvent,fCallback){var fWrapper
if(fCallback){Adaptie.Event.Wrapper.set(oEl,sEvent,null)
fWrapper=function(){fCallback.call(oEl);}
fWrapper.callback=fCallback
oEl["__"+sEvent+"__wrapper"]=fWrapper
Adaptie.Event.attachEvent.call(oEl,sEvent,fWrapper);}else{fWrapper=oEl["__"+sEvent+"__wrapper"]
if(fWrapper){Adaptie.Event.detachEvent.call(oEl,sEvent,fWrapper);}
delete oEl["__"+sEvent+"__wrapper"]}}},Capture:{element:null,events:["mousedown","mouseup","mousemove","click","dblclick","mouseover","mouseout"],listener:function(oE){var oCap=Adaptie.Event.Capture
if(!oCap.element)return
oE.stopPropagation()
document.removeEventListener(oE.type,oCap.listener,true)
Adaptie.Event.Mouse.rerouteEvent(oCap.element,oE,oE.type,false)
document.addEventListener(oE.type,oCap.listener,true)},setCapture:_(function(){var oCap=Adaptie.Event.Capture
this.releaseCapture()
oCap.element=this
for(var i=0;i<oCap.events.length;i++){document.addEventListener(oCap.events[i],oCap.listener,true)}},"HTMLElement"),releaseCapture:_(function(){var oCap=Adaptie.Event.Capture
for(var i=0;i<oCap.events.length;i++){document.removeEventListener(oCap.events[i],oCap.listener,true)}
oCap.element=null},"HTMLElement")},Mouse:{events:["mousedown","mouseup","click","dblclick"],init:function(){var aEvents=Adaptie.Event.Mouse.events,fHandler=Adaptie.Event.Mouse.handler
window.addEventListener("mousemove",Adaptie.Event.Mouse.move,true)
window.addEventListener("mouseover",Adaptie.Event.Mouse.over,true)
window.addEventListener("mouseout",Adaptie.Event.Mouse.out,true)
for(var i=0;i<aEvents.length;i++){window.addEventListener(aEvents[i],fHandler,true)}},move:function(oE){var oCurTarget=Adaptie.Event.Mouse.targetEl,oTarget
if(oE.rerouted)return
if(!oE.target._isOpaque()){oTarget=document.body._elementFromPoint(oE.clientX,oE.clientY,true)
if(oTarget&&oTarget.contains(oE.target))oTarget=null}
if(oCurTarget!=oTarget&&oCurTarget!=oE.target){Adaptie.Event.Mouse.rerouteEvent(oCurTarget||oE.target,oE,"mouseout",true,oTarget||oE.target)}
if(oTarget){Adaptie.Event.Mouse.rerouteEvent(oTarget,oE)
oE.stopPropagation()}
if(oCurTarget!=oTarget&&oCurTarget!=oE.target){Adaptie.Event.Mouse.rerouteEvent(oTarget||oE.target,oE,"mouseover",true,oCurTarget||oE.target)}
if(Adaptie.Event.Mouse.lastTarget&&(Adaptie.Event.Mouse.lastTarget!=oE.target||!oTarget)){Adaptie.Event.Mouse.lastTarget.style.cursor=Adaptie.Event.Mouse.lastCursor
Adaptie.Event.Mouse.lastCursor=null
Adaptie.Event.Mouse.lastTarget=null}
if(oTarget&&oE.target.currentStyle.cursor!=oTarget.currentStyle.cursor){if(Adaptie.Event.Mouse.lastTarget!=oE.target){Adaptie.Event.Mouse.lastCursor=oE.target.style.cursor
Adaptie.Event.Mouse.lastTarget=oE.target}
oE.target.style.cursor=oTarget.currentStyle.cursor}
Adaptie.Event.Mouse.targetEl=oTarget},over:function(oE){if(oE.rerouted)return
if(Adaptie.Event.Mouse.targetEl){oE.stopPropagation()
return}
if(!oE.target._isOpaque()){var oTarget=document.body._elementFromPoint(oE.clientX,oE.clientY,true)
if(oTarget&&!oTarget.contains(oE.target)){oE.stopPropagation()
Adaptie.Event.Mouse.targetEl=oE.relatedTarget}}},out:function(oE){if(oE.rerouted)return
if(Adaptie.Event.Mouse.targetEl){oE.stopPropagation()
return}
var bHasRelated=false
try{bHasRelated=oE.relatedTarget&&oE.relatedTarget._isOpaque}catch(oErr){bHasRelated=false;}
if(bHasRelated&&!oE.relatedTarget._isOpaque()){var oTarget=document.body._elementFromPoint(oE.clientX,oE.clientY,true)
if(oTarget&&!oTarget.contains(oE.relatedTarget)){oE.stopPropagation()
Adaptie.Event.Mouse.targetEl=oE.target}}},handler:function(oE){if(oE.rerouted)return
if(oE.target._isOpaque&&!oE.target._isOpaque()){var oTarget=document.body._elementFromPoint(oE.clientX,oE.clientY,true)
if(oTarget&&!oTarget.contains(oE.target)){Adaptie.Event.Mouse.rerouteEvent(oTarget,oE)
oE.stopPropagation()}}},rerouteEvent:function(){var oTarget=Array.prototype.shift.call(arguments),oEvent=Adaptie.Event.Mouse.duplicateEvent.apply(this,arguments)
oEvent.rerouted=true
oTarget.dispatchEvent(oEvent)},duplicateEvent:function(oE,sType,bBubbles,oRelated){var oEvent=document.createEvent("MouseEvents")
oEvent.initMouseEvent(sType!==undefined?sType:oE.type,bBubbles!==undefined?bBubbles:oE.bubbles,oE.cancelable,oE.view,oE.detail,oE.screenX,oE.screenY,oE.clientX,oE.clientY,oE.ctrlKey,oE.altKey,oE.shiftKey,oE.metaKey,oE.button,oRelated!==undefined?oRelated:oE.relatedTarget)
return oEvent}},MouseTrack:{props:["clientX","clientY","offsetX","offsetY","screenX","screenY"],init:function(){var aProps=Adaptie.Event.MouseTrack.props
for(var i=0;i<aProps.length;i++){var sProp=aProps[i]
Adaptie.adaptProperty("Event",sProp,{get:Adaptie.Event.MouseTrack.getter(sProp)})}
Adaptie.Event.MouseTrack.values={}
window.addEventListener("mousemove",Adaptie.Event.MouseTrack.handler,true)},handler:function(event){var aProps=Adaptie.Event.MouseTrack.props,oVals=Adaptie.Event.MouseTrack.values
for(var i=0;i<aProps.length;i++){var sProp=aProps[i]
oVals[sProp]=event[sProp]}},getter:function(sProp){return function(){return Adaptie.Event.MouseTrack.values[sProp]}}}},XML:{createDocument:function(bHTML){var oXML=document.implementation.createDocument("","",null)
if(oXML.readyState==null){if(bHTML){oXML.readyState="loading"
oXML.hasLoaded=function(){oXML.readyState="interactive"
if(typeof oXML.onreadystatechange=="function")oXML.onreadystatechange()
oXML.readyState="complete"
if(typeof oXML.onreadystatechange=="function")oXML.onreadystatechange()}}else{oXML.readyState=1
oXML.hasLoaded=function(){oXML.readyState=3
if(typeof oXML.onreadystatechange=="function")oXML.onreadystatechange()
oXML.readyState=4
if(typeof oXML.onreadystatechange=="function")oXML.onreadystatechange()}}}
return oXML},cloneNode:_(function(bDeep){var oNode=this.__cloneNode(bDeep)
if(!oNode.__props)oNode.__props={}
for(var sKey in this.__props){oNode.__props[sKey]=this.__props[sKey]}
return oNode},"XMLDocument"),createNode:_(function(iType,sName,sURI){switch(iType){case this.ELEMENT_NODE:return sURI?this.createElementNS(sURI,sName):this.createElement(sName)
case this.ATTRIBUTE_NODE:return sURI?this.createAttributeNS(sURI,sName):this.createAttribute(sName)
case this.TEXT_NODE:return this.createTextNode("")
case this.CDATA_SECTION_NODE:return this.createCDATASection("")
case this.ENTITY_REFERENCE_NODE:return this.createEntityReference(sName)
case this.PROCESSING_INSTRUCTION_NODE:return this.createProcessingInstruction(sName,"")
case this.COMMENT_NODE:return this.createComment("")
case this.DOCUMENT_FRAGMENT_NODE:return this.createDocumentFragment()}},"XMLDocument"),createNSResolver:_(function(oNode){var oNSResolver=this.__createNSResolver(oNode),sNS=this.getProperty("SelectionNamespaces")
if(sNS){var rxNS=/xmlns:([^=]+)=([\"\'])(.*?)\2/g,aMatch,oNS={}
while(aMatch=rxNS.exec(sNS)){var sPrefix=aMatch[1],sURI=aMatch[3]
if(sPrefix&&sURI){oNS[sPrefix]=sURI}}
return function(sPrefix){return oNS[sPrefix]||oNSResolver.lookupNamespaceURI(sPrefix)}}
return oNSResolver},"XMLDocument"),getAttribute:_(function(attrName){return this[attrName]},"XMLDocument"),getProperty:_(function(sName,sVal){return this.__props?this.__props[sName]:undefined},"XMLDocument"),load:_(function(sURL){this.loadXML("")
var oXML=this,oXH=new XMLHttpRequest()
oXH.open("GET",sURL,true)
oXH.onreadystatechange=function(){if(oXH.readyState==4){var oResXML=oXH.responseXML
if(oResXML){for(var iNode=0;iNode<oResXML.childNodes.length;iNode++)oXML.appendChild(oXML.importNode(oResXML.childNodes[iNode],true))}
oXML.hasLoaded()}}
oXH.send(null)},"XMLDocument",true),loadXML:_(function(sXML){try{while(this.hasChildNodes())this.removeChild(this.lastChild)
if(sXML){var oXMLParser=new DOMParser().parseFromString(sXML,"text/xml")
if(oXMLParser.documentElement&&oXMLParser.documentElement.tagName=="parsererror")throw new Error("Parse error")
for(var iNode=0;iNode<oXMLParser.childNodes.length;iNode++)this.appendChild(this.importNode(oXMLParser.childNodes[iNode],true))}
return true}catch(oErr){return false}},"XMLDocument"),selectNodes:_(function(cXPathString,xNode){if(!xNode)xNode=this
var oNSResolver=this.createNSResolver(this.documentElement),aItems=this.evaluate(cXPathString,xNode,oNSResolver,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),aResult=[]
for(var i=0;i<aItems.snapshotLength;i++)aResult[i]=aItems.snapshotItem(i)
return aResult},"XMLDocument"),selectSingleNode:_(function(cXPathString,xNode){if(!xNode)xNode=this
var xItems=this.selectNodes(cXPathString,xNode)
if(xItems.length>0)return xItems[0]
return null},"XMLDocument"),setAttribute:_(function(attrName,attrValue){return this[attrName]=attrValue},"XMLDocument"),setProperty:_(function(sName,sVal){if(!this.__props)this.__props={}
this.__props[sName]=sVal},"XMLDocument"),readyState:_({get:function(){return this.___readyState;},set:function(sState){return this.___readyState=sState;}},"XMLDocument"),responseXML:_({get:function(){return this.__responseXML||Adaptie.XML.createDocument();}},"XMLHttpRequest"),xml:_({get:function(){return new XMLSerializer().serializeToString(this);}},"XMLDocument")},Style:{init:function(){for(var i=0;i<this.length;i++){var prop=this.item(i)
this[prop]=this.getPropertyValue(prop)}},removeAttribute:_(function(sName){this[sName]=""
this.removeProperty(sName)
return true},"CSSStyleDeclaration"),backgroundImage:_({get:function(){return this.getPropertyValue("background-image");},set:function(sImg){sImg=sImg.replace(/^url\(\s*([\"\'])?(.+?)\1\s*\)$/gi,'url("$2")')
this.setProperty("background-image",sImg,"")
return sImg}},"CSSStyleDeclaration"),bottom:_({get:function(){return this.getPropertyValue("bottom");},set:function(sBottom){var sTop=this.getPropertyValue("top")
if(sBottom!="auto"&&sTop&&sTop!="auto"&&this.element){this.element.setAttributeNS("","stylebottom",sBottom)}else{this.setProperty("bottom",sBottom,"")
if(this.element)this.element.removeAttributeNS("","stylebottom")}}},"CSSStyleDeclaration"),cssText:_({set:function(sCSS){sCSS=sCSS||""
sCSS=Adaptie.Style.Rules.processCursor(sCSS)
sCSS=sCSS.replace(/url\(\s*([\"\'])?(.+?)\1\s*\)\s*(;|$)/gi,'url("$2")$3')
sCSS=sCSS.replace(/font-family\s*:\s*([\"\'])?([^,;]+?)\1\s*(;|$)/gi,'font-family:"$2"$3')
this.__cssText=sCSS
if(this.element)Adaptie.Element.fixZIndex(this.element)
return sCSS}},"CSSStyleDeclaration"),cursor:_({get:function(){var sCursor=this.getPropertyValue("cursor")
return sCursor=="pointer"?"hand":sCursor},set:function(sCursor){if(sCursor=="hand")sCursor="pointer"
this.setProperty("cursor",sCursor,"")
return sCursor}},"CSSStyleDeclaration","ComputedCSSStyleDeclaration"),display:_({get:function(){var sDisp=this.getPropertyValue("display");return sDisp=="table-caption"||sDisp=="inline-block"?"inline":sDisp;},set:function(sDisp){sDisp=(sDisp||"").toLowerCase()
if(sDisp=="inline")sDisp=Adaptie.HasInlineBlock?"inline-block":"table-caption"
if(this.element&&sDisp!="none")Adaptie.Element.Embed.restoreShow(this.element)
this.setProperty("display",sDisp,"")
if(this.element){if(sDisp!="none"){Adaptie.Element.fixRenderBugs(this.element)
var aNodes=this.element.getElementsByTagName("*")
for(var i=0;i<aNodes.length;i++){Adaptie.Element.fitHeightToContent(aNodes[i],true)}}
Adaptie.Element.fitParentsHeight(this.element)}
return sDisp}},"CSSStyleDeclaration","ComputedCSSStyleDeclaration"),filter:_({get:function(){if(this.opacity){return"alpha(opacity="+this.opacity*100+")"}
return""},set:function(sFilter){if(sFilter){if(/(?:progid:DXImageTransform\.Microsoft\.)?alpha\(opacity=([\d\.]+)\)/.test(sFilter)){this.opacity=RegExp.$1/100}}else{this.opacity=""}
return sFilter}},"CSSStyleDeclaration"),hasLayout:_({get:function(){return true;}},"CSSStyleDeclaration","ComputedCSSStyleDeclaration"),height:_({get:function(){return this.getPropertyValue("height");},set:function(sVal){this.setProperty("height",sVal,"")
if(this.element){delete this.element.__origHeight
if(sVal!="auto"){Adaptie.Element.fitHeightToContent(this.element)}}
return sVal}},"CSSStyleDeclaration"),left:_({get:function(){return this.getPropertyValue("left");},set:function(sLeft){this.setProperty("left",sLeft,"")
if(this.element){if(sLeft&&sLeft!="auto"){this.element.setAttributeNS("","styleright",this.getPropertyValue("right"))
this.setProperty("right","auto","")}else if(this.element.hasAttributeNS("","styleright")){this.setProperty("right",this.element.getAttributeNS("","styleright"),"")
this.element.removeAttributeNS("","styleright")}}}},"CSSStyleDeclaration"),opacity:_({get:function(){return this.getPropertyValue("opacity");},set:function(sOpacity){var iCur=this.element.currentStyle.opacity,iNew=+sOpacity,bParentFix=iCur==1&&iNew!=1||iCur!=1&&iNew==1
this.setProperty("opacity",sOpacity,"")
if(bParentFix&&this.element){Adaptie.Element.fixRenderBugs(this.element)}
return sOpacity}},"CSSStyleDeclaration"),position:_({get:function(){return this.getPropertyValue("position");},set:function(sPos){this.setProperty("position",sPos,"")
if(this.element){Adaptie.Element.fixRenderBugs(this.element)}
return sPos}},"CSSStyleDeclaration"),right:_({get:function(){return this.getPropertyValue("right");},set:function(sRight){var sLeft=this.getPropertyValue("left")
if(sRight!="auto"&&sLeft&&sLeft!="auto"&&this.element){this.element.setAttributeNS("","styleright",sRight)}else{this.setProperty("right",sRight,"")
if(this.element)this.element.removeAttributeNS("","styleright")}}},"CSSStyleDeclaration"),top:_({get:function(){return this.getPropertyValue("top");},set:function(sTop){this.setProperty("top",sTop,"")
if(this.element){if(sTop&&sTop!="auto"){this.element.setAttributeNS("","stylebottom",this.getPropertyValue("bottom"))
this.setProperty("bottom","auto","")}else if(this.element.hasAttributeNS("","stylebottom")){this.setProperty("bottom",this.element.getAttributeNS("","stylebottom"),"")
this.element.removeAttributeNS("","stylebottom")}}}},"CSSStyleDeclaration"),zIndex:_({get:function(){var sVal=this.getPropertyValue("z-index")
return+(sVal=="auto"?0:sVal)-Adaptie.ZINDEX_BASE},set:function(xVal){xVal=+xVal
this.setProperty("z-index",+xVal+Adaptie.ZINDEX_BASE,"")
if(this.element)this.element.setAttributeNS("","zindexinline",1)
return xVal}},"CSSStyleDeclaration","ComputedCSSStyleDeclaration"),Link:{href:_({set:function(sURL){if(sURL.indexOf("javascript")!=0){var sBaseURL=sURL.replace(/\?.*$/,"").replace(/[^\/]*$/,""),sHost=location.href.replace(/^([^:]+:\/+[^\/]+).*$/,"$1"),oSheet=this,aBehaviors=[]
if(sBaseURL.charAt(0)=="/"){sBaseURL=sHost+sBaseURL}else{sBaseURL=location.href.replace(/\?.*$/,"").replace(/#.*$/,"").replace(/[^\/]*$/,"")+sBaseURL}
sBaseURL=sBaseURL.replace(/\(/g,"\\28 ").replace(/\)/g,"\\29 ")
this.readyState="loading"
httpLoader("GET",sURL,function(oXML){var sCSS=oXML.responseText
if(!sCSS||(oXML.status!=200&&oXML.status!=0)){oSheet.__href=sURL
oSheet.readyState="complete"
return}
if(sCSS){sCSS=sCSS.replace(/([^\s]+)\s*\{\s*behavior:url\(([^}]+)\)[^}]*\}/gi,function(sMatch,sSelector,sURL){if(sSelector.indexOf("#")==0){var sId=sSelector.substr(1)
Adaptie.IdBehaviors[sId]=sURL
aBehaviors.push({id:sId,url:sURL})}else if(sSelector.indexOf(".")==0){var sClass=sSelector.substr(1)
Adaptie.ClassBehaviors[sClass]=sURL}else{var sTag=sSelector.replace(/\\:/g,":").toLowerCase()
Adaptie.TagBehaviors[sTag]=sURL
aBehaviors.push({tag:sTag,url:sURL})}
return""})
sCSS=sCSS.replace(/url\(([\"\'])?(?=\/)/gi,"url($1"+sHost)
sCSS=sCSS.replace(/url\(([\"\'])?(?!http)/gi,"url($1"+sBaseURL)
sCSS=Adaptie.Style.Rules.processCSS(sCSS)
if(!oSheet.id)oSheet.id=oSheet.uniqueID
sCSS+="\n#"+oSheet.id+" { -moz-outline-radius-topleft:1px; }"
oSheet.setAttribute("href","data:text/css,"+encodeURIComponent(sCSS))}else{oSheet.setAttribute("href","javascript:''")}
function waitForCSS(){if(oSheet.currentStyle.getPropertyValue("-moz-outline-radius-topleft")!="1px"){setTimeout(waitForCSS,10)
return}
for(var i=0;i<aBehaviors.length;i++){if(aBehaviors[i].tag){var sScope="HTML",sTag=aBehaviors[i].tag
if(sTag.indexOf(":")>-1){sScope=sTag.replace(/:.*$/,"")
sTag=sTag.replace(/^.*:/,"")}
var oNodes=document.getElementsByTagName(sTag)
for(var j=0;j<oNodes.length;j++){if(oNodes[j].scopeName==sScope){oNodes[j].addBehavior(aBehaviors[i].url)}}}else if(aBehaviors[i].id){var oNode=document.getElementById(aBehaviors[i].id)
if(oNode){oNode.addBehavior(aBehaviors[i].url)}}}
oSheet.readyState="complete"
oSheet.fireEvent("onload")}
waitForCSS()},null,this.isCreateStyleSheetRequest||false)}else{this.__href=sURL
this.readyState="complete"}
return sURL}},"HTMLLinkElement")},Overflow:{hash:{"visible":1,"hidden":2,"scroll":3,"auto":4},rxX:/(?:^|[\s;])(?:overflow-x\s*:\s*(visible|hidden|scroll|auto))/i,rxY:/(?:^|[\s;])(?:overflow-y\s*:\s*(visible|hidden|scroll|auto))/i,lookup:function(iCode){for(var sOff in Adaptie.Style.Overflow.hash){if(Adaptie.Style.Overflow.hash[sOff]==iCode)return sOff}}},Rules:{processCSS:function(sCSS){sCSS=Adaptie.Style.Rules.processCursor(sCSS)
sCSS=Adaptie.Style.Rules.processBullet(sCSS)
sCSS=Adaptie.Style.Rules.processBorder(sCSS)
sCSS=sCSS.replace(/url\(\s*([\"\'])?(.+?)\1\s*\)\s*([;}]|$)/g,function(sMatch,sQuote,sURL,sDelim){return'url("'+sURL.replace(/\{/g,"%7B").replace(/\}/g,"%7D")+'")'+sDelim})
sCSS=sCSS.replace(/font-family\s*:\s*([\"\'])?([^,;]+?)\1\s*([;}]|$)/gi,'font-family:"$2"$3')
sCSS=sCSS.replace(/([\s\S]+?)(\{)([^}]+)/g,function(sAll,sSelector,sPreText,sRuleText){sSelector=sSelector.replace(/\bgm\\:contentarea/gi,'div[id="oContentArea"]')
sSelector=sSelector.replace(/\b(\S+?)\\:([^\s\.#,]+)/g,function(sMatch,sNS,sTag){return'*[scopeName="'+sNS+'"][tagtypelc="'+sTag.toLowerCase()+'"]'})
sSelector=sSelector.replace(/(^|\s)\./g,"$1*[class][class].")
sRuleText=Adaptie.Style.Rules.processBGPosition(sRuleText)
if(/(?:^|[\s;])width\s*:\s*(?:([\d\.]+)%)?/i.test(sRuleText)){var iPctWidth=RegExp.$1?+RegExp.$1:0
sRuleText+=";outline-offset:"+iPctWidth+"px;"}
if(Adaptie.Style.Overflow.rxX.test(sRuleText)){sRuleText+=";-moz-outline-radius-topright:"+Adaptie.Style.Overflow.hash[RegExp.$1.toLowerCase()]}
if(Adaptie.Style.Overflow.rxY.test(sRuleText)){sRuleText+=";-moz-outline-radius-bottomleft:"+Adaptie.Style.Overflow.hash[RegExp.$1.toLowerCase()]}
if(/(?:^|[\s;])left\s*:\s*([^\s;]+)?/i.test(sRuleText)&&RegExp.$1!="auto")sRuleText+=";right:auto;"
if(/(?:^|[\s;])top\s*:\s*([^\s;]+)?/i.test(sRuleText)&&RegExp.$1!="auto")sRuleText+=";bottom:auto;"
return sSelector+sPreText+sRuleText})
return sCSS},processHTML:function(sHTML,oParent){return sHTML.replace(/(<[^>]+\sstyle\s*=\s*)(([\"\'])[\s\S]+?(?=\3)|[^\s>]+)/ig,function(sAll,sPreText,sRuleText){sRuleText=Adaptie.Style.Rules.processBGPosition(sRuleText)
sRuleText=sRuleText.replace(/url\((?!&quot;)([\"\'])?(.+?)\1\)\s*(;|$)/gi,function(sAll,sQuote,sUrl){return"url(&quot;"+sUrl.replace(/&/g,"&amp;")+"&quot;);"})
sRuleText=Adaptie.Style.Rules.processCursor(sRuleText)
sRuleText=Adaptie.Style.Rules.processBullet(sRuleText)
sRuleText=Adaptie.Style.Rules.processBorder(sRuleText)
sRuleText=sRuleText.replace(/font-family\s*:(?!\s*&quot;)\s*([\"\'])?([^,;]+?)\1\s*(;|$)/gi,"font-family:&quot;$2&quot;"+(oParent?","+oParent.currentStyle.fontFamily.replace(/\"/g,"&quot;"):"")+"$3")
return sPreText+sRuleText})},processBGPosition:function(sRuleText){var oPos={}
sRuleText=sRuleText.replace(/\s*background-position-(x|y)\s*:\s*([^\s};]+)\s*(?:!important)?;?/gi,function(sAll,xy,val){oPos[xy.toLowerCase()]=val
return""})
if(oPos.x||oPos.y)return sRuleText+";background-position:"+(oPos.x||"0")+" "+(oPos.y||"0")+";"
return sRuleText},processCursor:function(sCSS){return sCSS.replace(/cursor\s*:\s*hand\s*;?/ig,"cursor:pointer;")},processBullet:function(sCSS){return sCSS.replace(/mso-special-format:\s*bullet[^\s;]*/gi,"-moz-outline-radius-topleft:1px")},processBorder:function(sCSS){return sCSS.replace(/border(-(?:top|right|bottom|left))?\s*:\s*([^\s;!}]+)(?:\s+([^\s;!}]+))?(?:\s+([^\s;!}]+))?(\s*!important)?/gi,function(sAll,sDir,sA1,sA2,sA3,sImp){var sWidth="4px",sStyle="none",sColor=""
for(var i=2;i<5;i++){var sArg=arguments[i]
if(/^(none|dotted|dashed|solid|double|groove|ridge|inset|outset)$/i.test(sArg))sStyle=sArg
else if(/^[\d.]+([a-zA-Z]{2})?$/.test(sArg))sWidth=sArg
else if(sArg)sColor=sArg}
return"border"+sDir+"-width:"+sWidth+sImp+"; border"+sDir+"-style:"+sStyle+sImp+(sColor?"; border"+sDir+"-color:"+sColor+sImp:"")})}}}}
try{if(Object.__defineSetter__&&Object.__defineGetter__&&("MozOutlineRadius"in CSSStyleDeclaration.prototype)){function adaptFields(oObj){for(var sField in oObj){var xField=oObj[sField],sType=typeof xField
if(sType=="object"&&xField||sType=="function"){if(xField.hasOwnProperty("_classes")){var aClasses=xField._classes,bForce=xField._force,fAdapt=sType=="function"?Adaptie.adaptMethod:Adaptie.adaptProperty
for(var i=0;i<aClasses.length;i++){fAdapt(aClasses[i],sField,xField,bForce)}
delete xField._classes
delete xField._force}else if(sType=="object"){adaptFields(xField)}}}}
adaptFields(Adaptie)
window.event=null
Adaptie.Event.Wrapper.init("HTMLDocument","HTMLElement","HTMLBodyElement","HTMLDivElement","HTMLSpanElement","HTMLFieldSetElement","HTMLInputElement","HTMLEmbedElement","HTMLImageElement","HTMLTableElement","HTMLTableCellElement","HTMLTableRowElement","HTMLTableSectionElement","HTMLAnchorElement","HTMLIFrameElement","HTMLQuoteElement")
Adaptie.Event.Mouse.init()
Adaptie.Event.MouseTrack.init()
CSSStyleDeclaration.prototype=Adaptie.Style.init
function GMNodeList(){}
GMNodeList.prototype=new Array()
GMNodeList.prototype.item=function(vIndex){return this[vIndex]}
GMNodeList.prototype.tags=function(sTag){sTag=sTag.toLowerCase()
var aList=new GMNodeList()
for(var i=0;i<this.length;i++){var oNode=this[i]
if(oNode.tagName.toLowerCase()==sTag){aList.push(oNode)}}
return aList}
GMNodeList.prototype.concat=function(){var aRes=new GMNodeList()
for(var i=0;i<this.length;i++){aRes.push(this[i])}
for(var i=0;i<arguments.length;i++){var xArg=arguments[i]
if(xArg instanceof Array){for(var j=0;j<xArg.length;j++){aRes.push(xArg[j])}}else{aRes.push(xArg)}}
return aRes}
function zIndexSorter(oA,oB){var bStaticA=oA.currentStyle.position=="static",bStaticB=oB.currentStyle.position=="static",iZA=oA.currentStyle.getPropertyValue("z-index"),iZB=oB.currentStyle.getPropertyValue("z-index")
iZA=iZA=="auto"?0:+iZA
iZB=iZB=="auto"?0:+iZB
if(!bStaticA&&!bStaticB)return iZB-iZA
else if(bStaticA&&!bStaticB)return 1
else if(bStaticB&&!bStaticA)return-1
else return 0}
addEventListener("load",Adaptie.init,true)
Adaptie.canAdapt=true}}catch(e){Adaptie.canAdapt=false}})();
