// Developed by Robert Nyman/DOMAssistant team, code/licensing: http://domassistant.googlecode.com/, documentation: http://www.domassistant.com/documentation, version 2.8 var DOMAssistant=function(){var i=function(){},d=/*@cc_on!@*/false,h=d&&parseFloat(navigator.appVersion)<6,g,c={},n={},a=true,l=Array.prototype.slice,m={accesskey:"accessKey","class":"className",colspan:"colSpan","for":"htmlFor",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",valign:"vAlign",cellspacing:"cellSpacing",cellpadding:"cellPadding"},k={rules:/\s*(,)\s*/g,selector:/^(\w+)?(#[\w\u00C0-\uFFFF\-_=]+|(\*))?((\.[\w\u00C0-\uFFFF\-_]+)*)?((\[\w+\s*(\^|\$|\*|\||~)?(=\s*([\w\u00C0-\uFFFF\s\-\_\.]+|"[^"]*"|'[^']*'))?\]+)*)?(((:\w+[\w\-]*)(\((odd|even|\-?\d*n?((\+|\-)\d+)?|[:?#?\w\u00C0-\uFFFF\-_\.]+|"[^"]*"|'[^']*'|((\w*\.[\w\u00C0-\uFFFF\-_]+)*)?|(\[#?\w+(\^|\$|\*|\||~)?=?[\w\u00C0-\uFFFF\s\-\_\.\'\"]+\]+)|(:\w+[\w\-]*\(.+\)))\))?)*)?(>|\+|~)?/,selectorSplit:/(?:\[.*\]|\(.*\)|[^\s\+>~\[\(])+|[\+>~]/g,id:/^#([\w\u00C0-\uFFFF\-_=]+)$/,tag:/^(\w+)/,relation:/^(>|\+|~)$/,pseudo:/^:(\w[\w\-]*)(\((.+)\))?$/,pseudos:/:(\w[\w\-]*)(\((([^(]+)|([^(]+\([^(]+)\))\))?/g,attribs:/\[(\w+)\s*(\^|\$|\*|\||~)?(=)?\s*([^\[\]]*|"[^\"]*"|'[^\']*')?\](?=$|\[|\:|\s)/g,classes:/\.([\w\u00C0-\uFFFF\-_]+)/g,quoted:/^["'](.*)["']$/,nth:/^((odd|even)|([1-9]\d*)|((([1-9]\d*)?)n([\+\-]\d+)?)|(\-(([1-9]\d*)?)n\+(\d+)))$/,special:/(:check|:enabl|\bselect)ed\b/},f=function(q,r,o){var p=q.tagName;while((q=q[r+"Sibling"])&&(q.nodeType!==1||(o?q.tagName!==p:q.tagName==="!"))){}return q},b=function(o){return typeof o!=="undefined"},j=function(o){return(j=o[0].compareDocumentPosition?function(p){return p.sort(function(r,q){return 3-(r.compareDocumentPosition(q)&6)})}:d?function(p){return p.sort(function(r,q){return r.sourceIndex-q.sourceIndex})}:function(p){return p.sort(function(t,r){var s=document.createRange(),q=document.createRange();s.setStart(t,0);s.setEnd(t,0);q.setStart(r,0);q.setEnd(r,0);return s.compareBoundaryPoints(Range.START_TO_END,q)})})(o)};var e=function(p,o){p.push.apply(p,l.apply(o));return p};if(d){e=function(q,p){if(p.slice){return q.concat(p)}var o=0,r;while((r=p[o++])){q[q.length]=r}return q}}return{isIE:d,camel:m,def:b,allMethods:[],publicMethods:["prev","next","hasChild","cssSelect","elmsByClass","elmsByAttribute","elmsByTag"],initCore:function(){this.applyMethod.call(window,"$",this.$);this.applyMethod.call(window,"$$",this.$$);window.DOMAssistant=this;if(d){i=Array}i.prototype=[];(function(o){o.each=function(s,r){for(var q=0,p=this.length;q=r)?(t-r)%r:t}else{if(q[8]){r=q[10]?parseInt(q[10],10):1;t=p=parseInt(q[11],10);while(t>r){t-=r}o=(p>=r)?(p-r)%r:p}}}}return{start:t,add:r,max:p,modVal:o}},cssByDOM:function(p){var aS,G,C,L,at,w,af,z,I,v,ao,aL,x,aG,aq,az=new i(),aP=az.indexOf,an=[],aE=[],aI=p.replace(k.rules,"$1").split(","),aD={};function aO(q){q=q||an;for(var o=q.length;o--;){q[o].added=null;q[o].removeAttribute("added")}}function B(){for(var o=aS.length;o--;){aS[o].childElms=null}}function ak(r,o){for(var s=0,aT;(aT=r[s]);s++){var u=false;for(var q=0,t;(t=o[q]);q++){if(t===aT){u=true;o.splice(q,1);break}}if(u){r.splice(s--,1)}}return r}function D(q,o){return(d||k.special.test(o))?q[m[o.toLowerCase()]||o]:q.getAttribute(o,2)}function N(o,q){o=o?o.replace(k.quoted,"$1").replace(/(\.|\[|\])/g,"\\$1"):null;return{"^":"^"+o,"$":o+"$","*":o,"|":"^"+o+"(\\-\\w+)*$","~":"\\b"+o+"\\b"}[q]||(o!==null?"^"+o+"$":o)}function U(o){return(o||this).tagName!=="!"}function Q(o,q){return h?(o==="*"?q.all:q.all.tags(o)):q.getElementsByTagName(o)}function aJ(o,q){o=o||"*";q=q||document;return(q===document||q.lastModified)?c[o]||(c[o]=Q(o,document)):Q(o,q)}function ap(aU,bc,t){aS=[];var u=bc.split("-"),aX=[],a2=0,bb=/\-of\-type$/.test(bc),a1,aW={first:function(q){return !f(q,"previous",bb)},last:function(q){return !f(q,"next",bb)},empty:function(q){return !q.firstChild},enabled:function(q){return !q.disabled&&q.type!=="hidden"},disabled:function(q){return q.disabled},checked:function(q){return q.checked},contains:function(q){return(q.innerText||q.textContent||"").indexOf(t.replace(k.quoted,"$1"))>-1},other:function(q){return D(q,bc)===t}};function s(q){while((z=aU[a2++])){if(U(z)&&aW[q](z)){aX[aX.length]=z}}return aX}var a8=u[0]||null;if(a8&&aW[a8]){return s(a8)}switch(a8){case"only":var aY,aT;while((z=aU[a2++])){I=z.parentNode;var a3=z.nodeName;if(I!==aY||a3!==aT){if(aW.first(z)&&aW.last(z)){aX[aX.length]=z}aY=I;aT=a3}}break;case"nth":if(t==="n"){aX=aU}else{var ba=(u[1]==="last")?["lastChild","previousSibling"]:["firstChild","nextSibling"];aG=DOMAssistant.getSequence(t);if(aG){while((z=aU[a2++])){I=z.parentNode;I.childElms=I.childElms||{};var a4=z.nodeName;if(!I.childElms[a4]){var a7=0;aL=aG.start;x=I[ba[0]];while(x&&(aG.max<0||aL<=aG.max)){var a9=x.nodeName;if((bb&&a9===a4)||(!bb&&x.nodeType===1&&a9!=="!")){if(++a7===aL){if(a9===a4){aX[aX.length]=x}aL+=aG.add}}x=x[ba[1]]}if(aq){g++}I.childElms[a4]=true;aS[aS.length]=I}}B()}}break;case"target":var r=document.location.hash.slice(1);if(r){while((z=aU[a2++])){if(D(z,"name")===r||D(z,"id")===r){aX[aX.length]=z;break}}}break;case"not":if((a1=k.pseudo.exec(t))){aX=ak(aU,ap(aU,a1[1]?a1[1].toLowerCase():null,a1[3]||null))}else{for(var a5 in k){if(k[a5].lastIndex){k[a5].lastIndex=0}}t=t.replace(k.id,"[id=$1]");var a0=k.tag.exec(t);var aV=k.classes.exec(t);var aZ=k.attribs.exec(t);var o=new RegExp(aZ?N(aZ[4],aZ[2]):"(^|\\s)"+(a0?a0[1]:aV?aV[1]:"")+"(\\s|$)","i");while((v=aU[a2++])){ao=null;if(a0&&!o.test(v.nodeName)||aV&&!o.test(v.className)){ao=v}else{if(aZ){var a6=D(v,aZ[1]);if(!b(a6)||a6===false||typeof a6==="string"&&!o.test(a6)){ao=v}}}if(ao&&!ao.added){ao.added=true;aX[aX.length]=ao}}}break;default:return s("other")}return aX}function X(t,q){var o=0,r=t,u;while((u=q[o++])){if(!r.length||r.indexOf(u)<0){t.push(u)}}return t}g=-1;for(var ai=0,aH=[];(G=aI[ai]);ai++){if(!(C=G.match(k.selectorSplit))||ai&&aP.call(aI.slice(0,ai),G)>-1){continue}an=[this];for(var ag=0,E;(E=C[ag]);ag++){aE=[];if(k.relation.test(E)){if((L=k.relation.exec(E))){var al=null,aQ=C[ag+1];if((at=k.tag.exec(aQ))){at=at[1];w=new RegExp("(^|\\s)"+at+"(\\s|$)","i")}else{if(k.id.test(aQ)){al=DOMAssistant.$(aQ)||null}}for(var ae=0,K;(K=an[ae]);ae++){switch(L[0]){case">":var aB=al||aJ(at,K);for(var ac=0,aw;(aw=aB[ac]);ac++){if(aw.parentNode===K){aE[aE.length]=aw}}break;case"+":if((K=f(K,"next"))){if((al&&al[0]===K)||(!al&&(!at||w.test(K.nodeName)))){aE[aE.length]=K}}break;case"~":while((K=K.nextSibling)&&!K.added){if((al&&al[0]===K)||(!al&&(!at||w.test(K.nodeName)))){K.added=true;aE[aE.length]=K}}break}}an=aE;aO();E=C[++ag];if(/^\w+$/.test(E)||k.id.test(E)){continue}an.skipTag=true}}var ar=k.selector.exec(E);aD={tag:(!ar[1]||ar[3]==="*")?"*":ar[1],id:(ar[3]!=="*")?ar[2]:null,allClasses:ar[4],allAttr:ar[6],allPseudos:ar[11]};aq=(aD.tag==="*");if(aD.id){var M=0,aj=document.getElementById(aD.id.slice(1));if(aj){while(an[M]&&!DOMAssistant.hasChild.call(an[M],aj)){M++}aE=(M=0||aP.call(aH,"*")>=0))?X:e)(az,an);aH.push(aD.tag);if(d&&aq){az=az.filter(U)}}return((az.length>1&&aI.length>1)||g>0)?j(az):az},cssByXpath:function(p){var q={xhtml:"http://www.w3.org/1999/xhtml"},r=(document.documentElement.namespaceURI===q.xhtml)?"xhtml:":"",o=function s(t){return q[t]||null};DOMAssistant.cssByXpath=function(K){var O,Q,G,w,x,B,y=new i(),z=K.replace(k.rules,"$1").split(",");function J(T){var U=T?"[":"",S=T?"]":"";return function(V,Z,Y,X,W){W=(W||"").replace(k.quoted,"$1");return U+({"^":"starts-with(@"+Z+', "'+W+'")',"$":"substring(@"+Z+", (string-length(@"+Z+") - "+(W.length-1)+"), "+W.length+') = "'+W+'"',"*":'contains(concat(" ", @'+Z+', " "), "'+W+'")',"|":"@"+Z+'="'+W+'" or starts-with(@'+Z+', "'+W+'-")',"~":'contains(concat(" ", @'+Z+', " "), " '+W+' ")'}[Y]||("@"+Z+(X?'="'+W+'"':"")))+S}}function M(T,V,U){T=/\-child$/.test(V)?"*":T;var X=V.split("-"),S=((X[1]==="last")?"(count(following-sibling::":"(count(preceding-sibling::")+T+") + 1)",W,Y;switch(X[0]){case"nth":return(U!=="n"&&(B=DOMAssistant.getSequence(U)))?((B.start===B.max)?S+" = "+B.start:S+" mod "+B.add+" = "+B.modVal+((B.start>1)?" and "+S+" >= "+B.start:"")+((B.max>0)?" and "+S+" <= "+B.max:"")):"";case"not":return"not("+((W=k.pseudo.exec(U))?M(T,W[1]?W[1].toLowerCase():null,W[3]||null):U.replace(k.id,"[id=$1]").replace(k.tag,"self::$1").replace(k.classes,'contains(concat(" ", @class, " "), " $1 ")').replace(k.attribs,J()))+")";case"first":return"not(preceding-sibling::"+T+")";case"last":return"not(following-sibling::"+T+")";case"only":return"not(preceding-sibling::"+T+" or following-sibling::"+T+")";case"empty":return"count(child::*) = 0 and string-length(text()) = 0";case"contains":return'contains(., "'+U.replace(k.quoted,"$1")+'")';case"enabled":return'not(@disabled) and not(@type="hidden")';case"disabled":return"@disabled";case"target":return'@name="'+(Y=document.location.hash.slice(1))+'" or @id="'+Y+'"';default:return"@"+V+'="'+U+'"'}}for(var L=0;(O=z[L]);L++){if(!(Q=O.match(k.selectorSplit))||L&&y.indexOf.call(z.slice(0,L),O)>-1){continue}G=G?G+" | .":".";for(var I=0,N=Q.length;I":"/","+":"/following-sibling::*[1]/self::","~":"/following-sibling::"}[x.tagRelation]||""):((I>0&&k.relation.test(Q[I-1]))?x.tag:("//"+x.tag)))+(x.id||"").replace(k.id,'[@id = "$1"]')+(x.allClasses||"").replace(k.classes,'[contains(concat(" ", @class, " "), " $1 ")]')+(x.allAttr||"").replace(k.attribs,J(true));if(x.allPseudos){var A=x.allPseudos.match(k.pseudos);for(var H=0,u=A.length;H0&&ajaxObj.params)?("&"+ajaxObj.params):"")}return DOMAssistant.AJAX.makeCall.call(this,ajaxObj)},get:function(url,callback,addToContent){return DOMAssistant.AJAX.makeCall.call(this,createAjaxObj(url,"GET",callback,addToContent))},post:function(url,callback){return DOMAssistant.AJAX.makeCall.call(this,createAjaxObj(url,"POST",callback))},load:function(url,addToContent){this.get(url,DOMAssistant.AJAX.replaceWithAJAXContent,addToContent)},makeCall:function(ajaxObj){var XMLHttp=DOMAssistant.AJAX.initRequest();if(XMLHttp){globalXMLHttp=XMLHttp;(function(elm){var url=ajaxObj.url,method=ajaxObj.method||"GET",callback=ajaxObj.callback,params=ajaxObj.params,headers=ajaxObj.headers,responseType=ajaxObj.responseType||"text",addToContent=ajaxObj.addToContent,timeout=ajaxObj.timeout||null,ex=ajaxObj.exception,timeoutId=null,done=false;XMLHttp.open(method,url,true);XMLHttp.setRequestHeader("AJAX","true");XMLHttp.setRequestHeader("X-Requested-With","XMLHttpRequest");if(method==="POST"){XMLHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");XMLHttp.setRequestHeader("Content-length",params?params.length:0);if(XMLHttp.overrideMimeType){XMLHttp.setRequestHeader("Connection","close")}}if(responseType==="json"){XMLHttp.setRequestHeader("Accept","application/json, text/javascript, */*")}for(var i in headers){if(typeof i==="string"){XMLHttp.setRequestHeader(i,headers[i])}}if(typeof callback==="function"){XMLHttp.onreadystatechange=function(){try{if(XMLHttp.readyState===4&&!done){window.clearTimeout(timeoutId);done=true;status=XMLHttp.status;statusText=XMLHttp.statusText;readyState=4;if((status||location.protocol!=="file:")&&(status<200||status>=300)){throw new Error(statusText)}var response=/xml/i.test(responseType)?XMLHttp.responseXML:XMLHttp.responseText;if(/json/i.test(responseType)&&!!response){response=(typeof JSON==="object"&&typeof JSON.parse==="function")?JSON.parse(response):eval("("+response+")")}globalXMLHttp=null;XMLHttp.onreadystatechange=function(){};requestPool.push(XMLHttp);callback.call(elm,response,addToContent)}}catch(e){globalXMLHttp=XMLHttp=null;if(typeof ex==="function"){ex.call(elm,e);ex=null}}}}XMLHttp.send(params);if(timeout){timeoutId=window.setTimeout(function(){if(!done){XMLHttp.abort();done=true;if(typeof ex==="function"){readyState=0;status=408;statusText="Request timeout";globalXMLHttp=XMLHttp=null;ex.call(elm,new Error(statusText));ex=null}}},timeout)}})(this)}return this},replaceWithAJAXContent:function(content,add){if(add){this.innerHTML+=content}else{DOMAssistant.clearHandlers.apply(this);this.innerHTML=content}},getReadyState:function(){return(globalXMLHttp&&DOMAssistant.def(globalXMLHttp.readyState))?globalXMLHttp.readyState:readyState},getStatus:function(){return status},getStatusText:function(){return statusText}}}();DOMAssistant.attach(DOMAssistant.AJAX);DOMAssistant.CSS=function(){var a=DOMAssistant.def,b={display:true};return{addClass:function(d){if(!this.hasClass(d)){var c=this.className;this.className=c+(c.length?" ":"")+d}return this},removeClass:function(c){return this.replaceClass(c)},replaceClass:function(d,e){var c=new RegExp(("(^|\\s)"+d+"(\\s|$)"),"i");this.className=this.className.replace(c,function(f,h,g){return e?(h+e+g):" "}).replace(/^\s+|\s+$/g,"");return this},hasClass:function(c){return(" "+this.className+" ").indexOf(" "+c+" ")>-1},setStyle:function(f,g){var e=this.style;if("filters" in this&&(typeof f==="string"?/opacity/i.test(f):a(f.opacity))){e.zoom=1;e.filter=(e.filter||"").replace(/alpha\([^)]*\)/,"")+"alpha(opacity="+(a(f.opacity)?f.opacity:g)*100+")"}if(a(e.cssText)){var c=e.cssText;if(typeof f==="object"){for(var d in f){if(typeof d==="string"){if(b[d]){e[d]=f[d]}c+=";"+d+":"+f[d]}}}else{if(b[f]){e[f]=g}c+=";"+f+":"+g}e.cssText=c}return this},getStyle:function(c){var e="",d;c=c.toLowerCase();if(document.defaultView&&document.defaultView.getComputedStyle){e=document.defaultView.getComputedStyle(this,"").getPropertyValue(c)}else{if(this.currentStyle){if("filters" in this&&c==="opacity"){e=(d=this.style.filter||this.currentStyle.filter)&&d.indexOf("opacity=")>=0?parseFloat(d.match(/opacity=([^)]*)/)[1])/100:1}else{c=c.replace(/^float$/,"styleFloat").replace(/\-(\w)/g,function(f,g){return g.toUpperCase()});e=this.currentStyle[c]}if(e==="auto"&&/^(width|height)$/.test(c)&&this.currentStyle.display!=="none"){e=this["offset"+c.charAt(0).toUpperCase()+c.substr(1)]+"px"}}}return e}}}();DOMAssistant.attach(DOMAssistant.CSS);DOMAssistant.Content=function(){var a=DOMAssistant.$$;return{init:function(){DOMAssistant.setCache(false)},create:function(d,c,b,e){var f=a(document.createElement(d));if(c){f=f.setAttributes(c)}if(DOMAssistant.def(e)){f.addContent(e)}if(b){this.appendChild(f)}return f},setAttributes:function(b){if(DOMAssistant.isIE){var c=function(g,e,f){var d=e.toLowerCase();switch(d){case"name":case"type":return a(document.createElement(g.outerHTML.replace(new RegExp(d+"=[a-zA-Z]+")," ").replace(">"," "+d+"="+f+">")));case"style":g.style.cssText=f;return g;default:g[DOMAssistant.camel[d]||e]=f;return g}};DOMAssistant.Content.setAttributes=function(d){var h=this;var g=this.parentNode;for(var f in d){if(typeof d[f]==="string"||typeof d[f]==="number"){var e=c(h,f,d[f]);if(g&&/(name|type)/i.test(f)){if(h.innerHTML){e.innerHTML=h.innerHTML}g.replaceChild(e,h)}h=e}}return h}}else{DOMAssistant.Content.setAttributes=function(d){for(var e in d){if(/class/i.test(e)){this.className=d[e]}else{this.setAttribute(e,d[e])}}return this}}return DOMAssistant.Content.setAttributes.call(this,b)},addContent:function(f){var d=typeof f;if(d==="string"||d==="number"){if(!this.firstChild){this.innerHTML=f}else{var c=document.createElement("div");c.innerHTML=f;for(var b=c.childNodes.length-1,e=null;b>=0;b--){e=this.insertBefore(c.childNodes[b],e)}}}else{if(d==="object"||(d==="function"&&!!f.nodeName)){this.appendChild(f)}}return this},replaceContent:function(b){if(!!this.firstChild){DOMAssistant.clearHandlers.apply(this);this.innerHTML=""}return this.addContent(b)},replace:function(g,b){var f=typeof g;if(f==="string"||f==="number"){var e=this.parentNode;var d=DOMAssistant.Content.create.call(e,"div",null,false,g);for(var c=d.childNodes.length;c--;){e.insertBefore(d.childNodes[c],this.nextSibling)}g=this.nextSibling;e.removeChild(this)}else{if(f==="object"||(f==="function"&&!!g.nodeName)){this.parentNode.replaceChild(g,this)}}return b?g:this},remove:function(){this.parentNode.removeChild(this);return null}}}();DOMAssistant.attach(DOMAssistant.Content);DOMAssistant.Events=function(){var e,c="_events",d=!!document.addEventListener,b={focus:true,blur:true},a=function(g){return DOMAssistant.isIE?{focus:"activate",blur:"deactivate"}[g]||g:g},f=function(k,h,j){k=k||window.event||{};var i={event:k,type:h||k.type,bubbles:k.bubbles||true,cancelable:k.cancelable||false,target:j||k.target||k.srcElement,relatedTarget:k.relatedTarget||(k.fromElement===k.target?k.toElement:k.fromElement)||null,altKey:k.altKey||false,ctrlKey:k.ctrlKey||false,shiftKey:k.shiftKey||false,button:k.button||null,timeStamp:+new Date(),preventDefault:function(){if(k.preventDefault){k.preventDefault()}this.returnValue=k.returnValue=false},stopPropagation:function(){if(k.stopPropagation){k.stopPropagation()}this.cancelBubble=k.cancelBubble=true}};i.currentTarget=i.target;if(i.target&&3===i.target.nodeType){i.target=i.target.parentNode}if("number"===typeof k.pageX){i.clientX=i.pageX=k.pageX;i.clientY=i.pageY=k.pageY}else{var l=document.documentElement,g=document.body;i.clientX=k.clientX+(l.scrollLeft||g.scrollLeft)-(l.clientLeft||0);i.clientY=k.clientY+(l.scrollTop||g.scrollTop)-(l.clientTop||0)}if("number"===typeof k.which){i.keyCode=k.keyCode;i.charCode=i.which=k.which}else{if(k.keyCode){i.keyCode=i.charCode=k.keyCode}}return i};return{publicMethods:["triggerEvent","addEvent","removeEvent","relayEvent","unrelayEvent","preventDefault","cancelBubble"],init:function(){window.addEvent=this.addEvent;window.removeEvent=this.removeEvent;DOMAssistant.preventDefault=this.preventDefault;DOMAssistant.cancelBubble=this.cancelBubble;e=this.handleEvent},triggerEvent:function(h,o,n){h=a(h);var k=this.retrieve(c),l=n||f(n,h,o||this);l.currentTarget=this;if(k&&k[h]){for(var j=0,g=k[h].length;j<\/script>");document.getElementById("ieScriptLoad").onreadystatechange=function(){if(this.readyState==="complete"){e()}}@end@*/ if(document.addEventListener){document.addEventListener("DOMContentLoaded",e,false)}if(/KHTML|WebKit|iCab/i.test(navigator.userAgent)){a=setInterval(function(){if(/loaded|complete/i.test(document.readyState)){e();clearInterval(a)}},10)}window.onload=e;return{DOMReady:function(){for(var j=0,h=arguments.length,k;j