(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context)};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3]){return jQuery().find(selector)}return jQuery(elem)}selector=[]}}else{return jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector)}}return this.setArray(jQuery.makeArray(selector))},jquery:"1.2.6",size:function(){return this.length},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num]},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this)},attr:function(name,value,type){var options=name;if(name.constructor==String){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name)}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return ret},wrapAll:function(html){if(this[0]){jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem)});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems)},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0]}else{return this.cloneNode(true)}});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined){this[expando]=null}});if(events===true){this.find("*").andSelf().each(function(i){if(this.nodeType==3){return}var events=jQuery.data(this,"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data)}}})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,this))},not:function(selector){if(selector.constructor==String){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true))}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=="string"?jQuery(selector):jQuery.makeArray(selector))))},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0},hasClass:function(selector){return this.is("."+selector)},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one){return value}values.push(value)}}return values}else{return(this[0].value||"").replace(/\r/g,"")}}return undefined}if(value.constructor==Number){value+=""}return this.each(function(){if(this.nodeType!=1){return}if(value.constructor==Array&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key)}return data===undefined&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse){elems.reverse()}}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr")){obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"))}var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem)}else{if(elem.nodeType==1){scripts=scripts.add(jQuery("script",elem).remove())}callback.call(obj,elem)}});scripts.each(evalScript)})}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}function now(){return +new Date}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2}if(typeof target!="object"&&typeof target!="function"){target={}}if(length==i){target=this;--i}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue}if(deep&&copy&&typeof copy=="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(fn){return !!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"")},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie){script.text=data}else{script.appendChild(document.createTextNode(data))}head.insertBefore(script,head.firstChild);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!==undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object){if(callback.apply(object[name],args)===false){break}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break}}}}else{if(length==undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0});val-=Math.round(padding+border)}if(jQuery(elem).is(":visible")){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,val)}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari){return false}var ret=defaultView.getComputedStyle(elem,null);return !ret||ret.getPropertyValue("color")==""}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save}if(name.match(/float/i)){name=styleFloat}if(!force&&style&&style[name]){ret=style[name]}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem)){ret=computedStyle.getPropertyValue(name)}else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode){stack.unshift(a)}for(;i<stack.length;i++){if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block"}}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++){if(swap[i]!=null){stack[i].style.display=swap[i]}}}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft}}}}return ret},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}jQuery.each(elems,function(i,elem){if(!elem){return}if(elem.constructor==Number){elem+=""}if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}if(/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}}elem=jQuery.makeArray(div.childNodes)}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select"))){return}if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari){elem.parentNode.selectedIndex}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem[name]=value}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue}return elem[name]}if(msie&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}if(set){elem.setAttribute(name,""+value)}var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(set){elem[name]=value}return elem[name]},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call){ret[0]=array}else{while(i){ret[--i]=array[i]}}}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i}}return -1},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++]){if(elem.nodeType!=8){first[pos++]=elem}}}else{while(elem=second[i++]){first[pos++]=elem}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value}}return ret.concat.apply([],ret)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret))}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++){jQuery(args[i])[original](this)}})}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){jQuery(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px")}});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2])},"#":function(a,i,m){return a.getAttribute("id")==m[2]},":":{lt:function(a,i,m){return i<m[3]-0},gt:function(a,i,m){return i>m[3]-0},nth:function(a,i,m){return m[3]-0==i},eq:function(a,i,m){return m[3]-0==i},first:function(a,i){return i==0},last:function(a,i,m,r){return i==r.length-1},even:function(a,i){return i%2==0},odd:function(a,i){return i%2},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a},"only-child":function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling")},parent:function(a){return a.firstChild},empty:function(a){return !a.firstChild},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"},enabled:function(a){return !a.disabled},disabled:function(a){return a.disabled},checked:function(a){return a.checked},selected:function(a){return a.selected||jQuery.attr(a,"selected")},text:function(a){return"text"==a.type},radio:function(a){return"radio"==a.type},checkbox:function(a){return"checkbox"==a.type},file:function(a){return"file"==a.type},password:function(a){return"password"==a.type},submit:function(a){return"submit"==a.type},image:function(a){return"image"==a.type},reset:function(a){return"reset"==a.type},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button")},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},has:function(a,i,m){return jQuery.find(m[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem}).length}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r)}return cur},find:function(t,context){if(typeof t!="string"){return[t]}if(context&&context.nodeType!=1&&context.nodeType!=9){return[]}context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++){for(var c=ret[i].firstChild;c;c=c.nextSibling){if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName)){r.push(c)}}}ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0){continue}foundToken=true}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling){if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id]){break}if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~"){merge[id]=true}r.push(n)}if(m=="+"){break}}}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0]){ret.shift()}done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length)}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]]}else{re2=quickClass;m=re2.exec(t)}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2]){oid=jQuery('[@id="'+m[2]+'"]',elem)[0]}ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[]}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object"){tag="param"}r=jQuery.merge(r,ret[i].getElementsByTagName(tag))}if(m[1]=="."){r=jQuery.classFilter(r,m[2])}if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++){if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break}}r=tmp}ret=r}t=t.replace(re2,"")}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t)}}if(t){ret=[]}if(ret&&context==ret[0]){ret.shift()}done=jQuery.merge(done,ret);return done},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass){tmp.push(r[i])}}return tmp},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break}}if(!m){break}if(m[1]==":"&&m[2]=="not"){r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3])}else{if(m[1]=="."){r=jQuery.classFilter(r,m[2],not)}else{if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2])){z=jQuery.attr(a,m[2])||""}if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not){tmp.push(a)}}r=tmp}else{if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling){if(n.nodeType==1){n.nodeIndex=c++}}merge[id]=true}var add=false;if(first==0){if(node.nodeIndex==last){add=true}}else{if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0){add=true}}if(add^not){tmp.push(node)}}r=tmp}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object"){fn=fn[m[2]]}if(typeof fn=="string"){fn=eval("false||function(a,i){return "+fn+";}")}r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r)},not)}}}}}return{r:r,t:t}},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n)}}return r}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return}if(jQuery.browser.msie&&elem.setInterval){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments)});handler.data=data}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered){return jQuery.event.handle.apply(arguments.callee.elem,arguments)}});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return}var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler){delete events[type][handler.guid]}else{for(handler in events[type]){if(!parts[1]||events[type][handler].type==parts[1]){delete events[type][handler]}}}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true}if(!elem){if(this.global[type]){jQuery("*").add([window,document]).trigger(type,data)}}else{if(elem.nodeType==3||elem.nodeType==8){return undefined}var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true}data[0].type=type;if(exclusive){data[0].exclusive=true}var handle=jQuery.data(elem,"handle");if(handle){val=handle.apply(elem,data)}if((!fn||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){val=false}if(event){data.shift()}if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined){val=ret}}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false}return val},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false){val=ret}if(ret===false){event.preventDefault();event.stopPropagation()}}}return val},fix:function(event){if(event[expando]==true){return event}var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--){event[props[i]]=originalEvent[props[i]]}event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault){originalEvent.preventDefault()}originalEvent.returnValue=false};event.stopPropagation=function(){if(originalEvent.stopPropagation){originalEvent.stopPropagation()}originalEvent.cancelBubble=true};event.timeStamp=event.timeStamp||now();if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=event.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy},special:{ready:{setup:function(){bindReady();return},teardown:function(){return}},mouseenter:{setup:function(){if(jQuery.browser.msie){return false}jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true},teardown:function(){if(jQuery.browser.msie){return false}jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true},handler:function(event){if(withinElement(event,this)){return true}event.type="mouseenter";return jQuery.event.handle.apply(this,arguments)}},mouseleave:{setup:function(){if(jQuery.browser.msie){return false}jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true},teardown:function(){if(jQuery.browser.msie){return false}jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true},handler:function(event){if(withinElement(event,this)){return true}event.type="mouseleave";return jQuery.event.handle.apply(this,arguments)}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,type,one,fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn)})},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn)},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++])}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false}))},hover:function(fnOver,fnOut){return this.bind("mouseenter",fnOver).bind("mouseleave",fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(function(){return fn.call(this,jQuery)})}return this}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return}readyBound=true;if(document.addEventListener&&!jQuery.browser.opera){document.addEventListener("DOMContentLoaded",jQuery.ready,false)}if(jQuery.browser.msie&&window==top){(function(){if(jQuery.isReady){return}try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}jQuery.ready()})()}if(jQuery.browser.opera){document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady){return}for(var i=0;i<document.styleSheets.length;i++){if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return}}jQuery.ready()},false)}if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady){return}if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return}if(numStyles===undefined){numStyles=jQuery("style, link[rel=stylesheet]").length}if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return}jQuery.ready()})()}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem){try{parent=parent.parentNode}catch(error){parent=elem}}return parent==elem};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind()});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!="string"){return this._load(url)}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}callback=callback||function(){};var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{params=jQuery.param(params);type="POST"}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}self.each(callback,[res.responseText,status,res])}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password)}else{xhr.open(type,s.url,s.async)}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s])}var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xhr,status)}complete();if(s.async){xhr=null}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr){xhr.abort();if(!requestDone){onreadystatechange("timeout")}}},s.timeout)}}try{xhr.send(s.data)}catch(e){jQuery.handleError(s,xhr,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s])}}function complete(){if(s.complete){s.complete(xhr,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xhr},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e])}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined}catch(e){}return false},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined}catch(e){}return false},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(filter){data=filter(data,type)}if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=eval("("+data+")")}return data},param:function(a){var s=[];if(a.constructor==Array||a.jquery){jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value))})}else{for(var j in a){if(a[j]&&a[j].constructor==Array){jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this))})}else{s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]))}}}return s.join("&").replace(/%20/g,"+")}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none"){this.style.display="block"}elem.remove()}}).end()},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none"}).end()},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]()})},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback)},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback)},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback)},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback)},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1){return false}var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this)}if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx"}if(!type||(typeof type=="string"&&!fn)){return queue(this[0],type)}return this.each(function(){if(fn.constructor==Array){queue(this,type,fn)}else{queue(this,type).push(fn);if(queue(this,type).length==1){fn.call(this)}}})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array){q=jQuery.data(elem,type+"queue",jQuery.makeArray(array))}}return q};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length){q[0].call(this)}})};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.call(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width"){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height"){this.elem.style[this.prop]="1px"}jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){this.elem.style.display="none"}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}}if(done){this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now},scrollTop:function(fx){fx.elem.scrollTop=fx.now},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem){with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop)}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2){border(offsetParent)}if(!fixed&&css(offsetParent,"position")=="fixed"){fixed=true}offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display"))){add(-parent.scrollLeft,-parent.scrollTop)}if(mozilla&&css(parent,"overflow")!="visible"){border(parent)}parent=parent.parentNode}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute")){add(-doc.body.offsetLeft,-doc.body.offsetTop)}if(fixed){add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop))}}results={top:top,left:left}}}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true))}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0}return results};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return jQuery(offsetParent)}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return}return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method]}});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br)};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0)}})})();function AC_AddExtension(b,a){if(b.indexOf("?")!=-1){return b.replace(/\?/,a+"?")}else{return b+a}}function AC_Generateobj(g,f,a){var d="<object ";for(var b in g){d+=b+'="'+g[b]+'" '}d+=">";for(var b in f){d+='<param name="'+b+'" value="'+f[b]+'" /> '}d+="<embed ";for(var b in a){d+=b+'="'+a[b]+'" '}d+=" ></embed></object>";document.write(d)}function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_SW_RunContent(){var a=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_GetArgs(b,g,l,f,m){var a=new Object();a.embedAttrs=new Object();a.params=new Object();a.objAttrs=new Object();for(var d=0;d<b.length;d=d+2){var h=b[d].toLowerCase();switch(h){case"classid":break;case"pluginspage":a.embedAttrs[b[d]]=b[d+1];break;case"src":case"movie":b[d+1]=AC_AddExtension(b[d+1],g);a.embedAttrs.src=b[d+1];a.params[l]=b[d+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":a.objAttrs[b[d]]=b[d+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"id":case"tabindex":a.embedAttrs[b[d]]=a.objAttrs[b[d]]=b[d+1];break;default:a.embedAttrs[b[d]]=a.params[b[d]]=b[d+1]}}a.objAttrs.classid=f;if(m){a.embedAttrs.type=m}return a}navHover=function(){var a=document.getElementById("navmenu-h").getElementsByTagName("LI");for(var b=0;b<a.length;b++){a[b].onmouseover=function(){this.className+=" iehover"};a[b].onmouseout=function(){this.className=this.className.replace(new RegExp(" iehover\\b"),"")}}};if(window.attachEvent){window.attachEvent("onload",navHover)}function at_display(a){win=window.open();for(var b in a){win.document.write(b+" = "+a[b]+"<br>")}}function at_show_aux(a,h){var f=document.getElementById(a);var g=document.getElementById(h);var d=(g.at_position=="y")?f.offsetHeight+2:0;var b=(g.at_position=="x")?f.offsetWidth+2:0;for(;f;f=f.offsetParent){d+=f.offsetTop;b+=f.offsetLeft}g.style.position="absolute";g.style.top=d+"px";g.style.left=b+"px";g.style.visibility="visible"}function at_show(){p=document.getElementById(this["at_parent"]);c=document.getElementById(this["at_child"]);at_show_aux(p.id,c.id);clearTimeout(c.at_timeout)}function at_hide(){c=document.getElementById(this["at_child"]);c.at_timeout=setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'",333)}function at_click(){p=document.getElementById(this["at_parent"]);c=document.getElementById(this["at_child"]);if(c.style.visibility!="visible"){at_show_aux(p.id,c.id)}else{c.style.visibility="hidden"}return false}function at_attach(d,g,b,a,f){p=document.getElementById(d);c=document.getElementById(g);p.at_parent=p.id;c.at_parent=p.id;p.at_child=c.id;c.at_child=c.id;p.at_position=a;c.at_position=a;c.style.position="absolute";c.style.visibility="hidden";if(f!=undefined){p.style.cursor=f}switch(b){case"click":p.onclick=at_click;p.onmouseout=at_hide;c.onmouseover=at_show;c.onmouseout=at_hide;break;case"hover":p.onmouseover=at_show;p.onmouseout=at_hide;c.onmouseover=at_show;c.onmouseout=at_hide;break}}var REGEXP_UNICODE=function(){var b=[" ","\u0120",-1,"!","\u0120",-1,"\u0120","\u0120",0,"\u0121","\u0120",-1,"\u0121","\u0120|\u0121",0,"\u0122","\u0120|\u0121",-1,"\u0120","[\u0120]",0,"\u0121","[\u0120]",-1,"\u0121","[\u0120\u0121]",0,"\u0122","[\u0120\u0121]",-1,"\u0121","[\u0120-\u0121]",0,"\u0122","[\u0120-\u0121]",-1];for(var a=0;a<b.length;a+=3){if(b[a].search(new RegExp(b[a+1]))!=b[a+2]){return false}}return true}();var XML_S="[ \t\r\n]+";var XML_EQ="("+XML_S+")?=("+XML_S+")?";var XML_CHAR_REF="&#[0-9]+;|&#x[0-9a-fA-F]+;";var XML10_VERSION_INFO=XML_S+"version"+XML_EQ+"(\"1\\.0\"|'1\\.0')";var XML10_BASE_CHAR=(REGEXP_UNICODE)?"\u0041-\u005a\u0061-\u007a\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff\u0100-\u0131\u0134-\u013e\u0141-\u0148\u014a-\u017e\u0180-\u01c3\u01cd-\u01f0\u01f4-\u01f5\u01fa-\u0217\u0250-\u02a8\u02bb-\u02c1\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03ce\u03d0-\u03d6\u03da\u03dc\u03de\u03e0\u03e2-\u03f3\u0401-\u040c\u040e-\u044f\u0451-\u045c\u045e-\u0481\u0490-\u04c4\u04c7-\u04c8\u04cb-\u04cc\u04d0-\u04eb\u04ee-\u04f5\u04f8-\u04f9\u0531-\u0556\u0559\u0561-\u0586\u05d0-\u05ea\u05f0-\u05f2\u0621-\u063a\u0641-\u064a\u0671-\u06b7\u06ba-\u06be\u06c0-\u06ce\u06d0-\u06d3\u06d5\u06e5-\u06e6\u0905-\u0939\u093d\u0958-\u0961\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09dc-\u09dd\u09df-\u09e1\u09f0-\u09f1\u0a05-\u0a0a\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36\u0a38-\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8b\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9\u0abd\u0ae0\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32-\u0b33\u0b36-\u0b39\u0b3d\u0b5c-\u0b5d\u0b5f-\u0b61\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4\u0ba8-\u0baa\u0bae-\u0bb5\u0bb7-\u0bb9\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c60-\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cde\u0ce0-\u0ce1\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d28\u0d2a-\u0d39\u0d60-\u0d61\u0e01-\u0e2e\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0e82\u0e84\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa-\u0eab\u0ead-\u0eae\u0eb0\u0eb2-\u0eb3\u0ebd\u0ec0-\u0ec4\u0f40-\u0f47\u0f49-\u0f69\u10a0-\u10c5\u10d0-\u10f6\u1100\u1102-\u1103\u1105-\u1107\u1109\u110b-\u110c\u110e-\u1112\u113c\u113e\u1140\u114c\u114e\u1150\u1154-\u1155\u1159\u115f-\u1161\u1163\u1165\u1167\u1169\u116d-\u116e\u1172-\u1173\u1175\u119e\u11a8\u11ab\u11ae-\u11af\u11b7-\u11b8\u11ba\u11bc-\u11c2\u11eb\u11f0\u11f9\u1e00-\u1e9b\u1ea0-\u1ef9\u1f00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2126\u212a-\u212b\u212e\u2180-\u2182\u3041-\u3094\u30a1-\u30fa\u3105-\u312c\uac00-\ud7a3":"A-Za-z";var XML10_IDEOGRAPHIC=(REGEXP_UNICODE)?"\u4e00-\u9fa5\u3007\u3021-\u3029":"";var XML10_COMBINING_CHAR=(REGEXP_UNICODE)?"\u0300-\u0345\u0360-\u0361\u0483-\u0486\u0591-\u05a1\u05a3-\u05b9\u05bb-\u05bd\u05bf\u05c1-\u05c2\u05c4\u064b-\u0652\u0670\u06d6-\u06dc\u06dd-\u06df\u06e0-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0901-\u0903\u093c\u093e-\u094c\u094d\u0951-\u0954\u0962-\u0963\u0981-\u0983\u09bc\u09be\u09bf\u09c0-\u09c4\u09c7-\u09c8\u09cb-\u09cd\u09d7\u09e2-\u09e3\u0a02\u0a3c\u0a3e\u0a3f\u0a40-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a70-\u0a71\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0b01-\u0b03\u0b3c\u0b3e-\u0b43\u0b47-\u0b48\u0b4b-\u0b4d\u0b56-\u0b57\u0b82-\u0b83\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c82-\u0c83\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d43\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86-\u0f8b\u0f90-\u0f95\u0f97\u0f99-\u0fad\u0fb1-\u0fb7\u0fb9\u20d0-\u20dc\u20e1\u302a-\u302f\u3099\u309a":"";var XML10_DIGIT=(REGEXP_UNICODE)?"\u0030-\u0039\u0660-\u0669\u06f0-\u06f9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be7-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29":"0-9";var XML10_EXTENDER=(REGEXP_UNICODE)?"\u00b7\u02d0\u02d1\u0387\u0640\u0e46\u0ec6\u3005\u3031-\u3035\u309d-\u309e\u30fc-\u30fe":"";var XML10_LETTER=XML10_BASE_CHAR+XML10_IDEOGRAPHIC;var XML10_NAME_CHAR=XML10_LETTER+XML10_DIGIT+"\\._:"+XML10_COMBINING_CHAR+XML10_EXTENDER+"-";var XML10_NAME="["+XML10_LETTER+"_:]["+XML10_NAME_CHAR+"]*";var XML10_ENTITY_REF="&"+XML10_NAME+";";var XML10_REFERENCE=XML10_ENTITY_REF+"|"+XML_CHAR_REF;var XML10_ATT_VALUE='"(([^<&"]|'+XML10_REFERENCE+")*)\"|'(([^<&']|"+XML10_REFERENCE+")*)'";var XML10_ATTRIBUTE="("+XML10_NAME+")"+XML_EQ+"("+XML10_ATT_VALUE+")";var XML11_VERSION_INFO=XML_S+"version"+XML_EQ+"(\"1\\.1\"|'1\\.1')";var XML11_NAME_START_CHAR=(REGEXP_UNICODE)?":A-Z_a-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd":":A-Z_a-z";var XML11_NAME_CHAR=XML11_NAME_START_CHAR+((REGEXP_UNICODE)?"\\.0-9\u00b7\u0300-\u036f\u203f-\u2040-":"\\.0-9-");var XML11_NAME="["+XML11_NAME_START_CHAR+"]["+XML11_NAME_CHAR+"]*";var XML11_ENTITY_REF="&"+XML11_NAME+";";var XML11_REFERENCE=XML11_ENTITY_REF+"|"+XML_CHAR_REF;var XML11_ATT_VALUE='"(([^<&"]|'+XML11_REFERENCE+")*)\"|'(([^<&']|"+XML11_REFERENCE+")*)'";var XML11_ATTRIBUTE="("+XML11_NAME+")"+XML_EQ+"("+XML11_ATT_VALUE+")";var XML_NC_NAME_CHAR=XML10_LETTER+XML10_DIGIT+"\\._"+XML10_COMBINING_CHAR+XML10_EXTENDER+"-";var XML_NC_NAME="["+XML10_LETTER+"_]["+XML_NC_NAME_CHAR+"]*";var DOM_ELEMENT_NODE=1;var DOM_ATTRIBUTE_NODE=2;var DOM_TEXT_NODE=3;var DOM_CDATA_SECTION_NODE=4;var DOM_ENTITY_REFERENCE_NODE=5;var DOM_ENTITY_NODE=6;var DOM_PROCESSING_INSTRUCTION_NODE=7;var DOM_COMMENT_NODE=8;var DOM_DOCUMENT_NODE=9;var DOM_DOCUMENT_TYPE_NODE=10;var DOM_DOCUMENT_FRAGMENT_NODE=11;var DOM_NOTATION_NODE=12;function xpathLog(a){}function xsltLog(a){}function xsltLogXml(a){}function assert(a){if(!a){throw"Assertion failed"}}function stringSplit(f,h){var d=f.indexOf(h);if(d==-1){return[f]}var g=[];g.push(f.substr(0,d));while(d!=-1){var b=f.indexOf(h,d+1);if(b!=-1){g.push(f.substr(d+1,b-d-1))}else{g.push(f.substr(d+1))}d=b}return g}function mapExec(d,b){for(var a=0;a<d.length;++a){b.call(this,d[a],a)}}function mapExpr(f,d){var a=[];for(var b=0;b<f.length;++b){a.push(d(f[b]))}return a}function reverseInplace(f){for(var a=0;a<f.length/2;++a){var d=f[a];var b=f.length-a-1;f[a]=f[b];f[b]=d}}function removeFromArray(g,d,f){var a=0;for(var b=0;b<g.length;++b){if(g[b]===d||(f&&g[b]==d)){g.splice(b--,1);a++}}return a}function copyArray(d,b){for(var a=0;a<b.length;++a){d.push(b[a])}}function xmlValue(d){if(!d){return""}var a="";if(d.nodeType==DOM_TEXT_NODE||d.nodeType==DOM_CDATA_SECTION_NODE||d.nodeType==DOM_ATTRIBUTE_NODE){a+=d.nodeValue}else{if(d.nodeType==DOM_ELEMENT_NODE||d.nodeType==DOM_DOCUMENT_NODE||d.nodeType==DOM_DOCUMENT_FRAGMENT_NODE){for(var b=0;b<d.childNodes.length;++b){a+=arguments.callee(d.childNodes[b])}}}return a}function xpathParse(s){xpathLog("parse "+s);xpathParseInit();var a=xpathCacheLookup(s);if(a){xpathLog(" ... cached");return a}if(s.match(/^(\$|@)?\w+$/i)){var n=makeSimpleExpr(s);xpathParseCache[s]=n;xpathLog(" ... simple");return n}if(s.match(/^\w+(\/\w+)*$/i)){var n=makeSimpleExpr2(s);xpathParseCache[s]=n;xpathLog(" ... simple 2");return n}var o=s;var r=[];var b=null;var l=null;var d=false;var m=0;var h=0;var u=0;while(!d){m++;s=s.replace(/^\s*/,"");l=b;b=null;var q=null;var g="";for(var f=0;f<xpathTokenRules.length;++f){var t=xpathTokenRules[f].re.exec(s);h++;if(t&&t.length>0&&t[0].length>g.length){q=xpathTokenRules[f];g=t[0];break}}if(q&&(q==TOK_DIV||q==TOK_MOD||q==TOK_AND||q==TOK_OR)&&(!l||l.tag==TOK_AT||l.tag==TOK_DSLASH||l.tag==TOK_SLASH||l.tag==TOK_AXIS||l.tag==TOK_DOLLAR)){q=TOK_QNAME}if(q){s=s.substr(g.length);xpathLog("token: "+g+" -- "+q.label);b={tag:q,match:g,prec:q.prec?q.prec:0,expr:makeTokenExpr(g)}}else{xpathLog("DONE");d=true}while(xpathReduce(r,b)){u++;xpathLog("stack: "+stackToString(r))}}xpathLog("stack: "+stackToString(r));if(r.length!=1){throw"XPath parse error "+o+":\n"+stackToString(r)}var t=r[0].expr;xpathParseCache[o]=t;xpathLog("XPath parse: "+m+" / "+h+" / "+u);return t}var xpathParseCache={};function xpathCacheLookup(a){return xpathParseCache[a]}function xpathReduce(m,a){var g=null;if(m.length>0){var h=m[m.length-1];var n=xpathRules[h.tag.key];if(n){for(var b=0;b<n.length;++b){var l=n[b];var d=xpathMatchStack(m,l[1]);if(d.length){g={tag:l[0],rule:l,match:d};g.prec=xpathGrammarPrecedence(g);break}}}}var f;if(g&&(!a||g.prec>a.prec||(a.tag.left&&g.prec>=a.prec))){for(var b=0;b<g.match.matchlength;++b){m.pop()}xpathLog("reduce "+g.tag.label+" "+g.prec+" ahead "+(a?a.tag.label+" "+a.prec+(a.tag.left?" left":""):" none "));var o=mapExpr(g.match,function(q){return q.expr});g.expr=g.rule[3].apply(null,o);m.push(g);f=true}else{if(a){xpathLog("shift "+a.tag.label+" "+a.prec+(a.tag.left?" left":"")+" over "+(g?g.tag.label+" "+g.prec:" none"));m.push(a)}f=false}return f}function xpathMatchStack(m,l){var f=m.length;var h=l.length;var b,n;var g=[];g.matchlength=0;var d=0;for(b=h-1,n=f-1;b>=0&&n>=0;--b,n-=d){d=0;var a=[];if(l[b]==Q_MM){b-=1;g.push(a);while(n-d>=0&&m[n-d].tag==l[b]){a.push(m[n-d]);d+=1;g.matchlength+=1}}else{if(l[b]==Q_01){b-=1;g.push(a);while(n-d>=0&&d<2&&m[n-d].tag==l[b]){a.push(m[n-d]);d+=1;g.matchlength+=1}}else{if(l[b]==Q_1M){b-=1;g.push(a);if(m[n].tag==l[b]){while(n-d>=0&&m[n-d].tag==l[b]){a.push(m[n-d]);d+=1;g.matchlength+=1}}else{return[]}}else{if(m[n].tag==l[b]){g.push(m[n]);d+=1;g.matchlength+=1}else{return[]}}}}reverseInplace(a);a.expr=mapExpr(a,function(o){return o.expr})}reverseInplace(g);if(b==-1){return g}else{return[]}}function xpathTokenPrecedence(a){return a.prec||2}function xpathGrammarPrecedence(g){var b=0;if(g.rule){if(g.rule.length>=3&&g.rule[2]>=0){b=g.rule[2]}else{for(var d=0;d<g.rule[1].length;++d){var f=xpathTokenPrecedence(g.rule[1][d]);b=Math.max(b,f)}}}else{if(g.tag){b=xpathTokenPrecedence(g.tag)}else{if(g.length){for(var a=0;a<g.length;++a){var f=xpathGrammarPrecedence(g[a]);b=Math.max(b,f)}}}}return b}function stackToString(a){var b="";for(var d=0;d<a.length;++d){if(b){b+="\n"}b+=a[d].tag.label}return b}function ExprContext(d,a,f,b){this.node=d;this.position=a||0;this.nodelist=f||[d];this.variables={};this.parent=b||null;if(b){this.root=b.root}else{if(this.node.nodeType==DOM_DOCUMENT_NODE){this.root=d}else{this.root=d.ownerDocument}}}ExprContext.prototype.clone=function(d,a,b){return new ExprContext(d||this.node,typeof a!="undefined"?a:this.position,b||this.nodelist,this)};ExprContext.prototype.setVariable=function(a,b){this.variables[a]=b};ExprContext.prototype.getVariable=function(a){if(typeof this.variables[a]!="undefined"){return this.variables[a]}else{if(this.parent){return this.parent.getVariable(a)}else{return null}}};ExprContext.prototype.setNode=function(a){this.node=this.nodelist[a];this.position=a};ExprContext.prototype.contextSize=function(){return this.nodelist.length};function StringValue(a){this.value=a;this.type="string"}StringValue.prototype.stringValue=function(){return this.value};StringValue.prototype.booleanValue=function(){return this.value.length>0};StringValue.prototype.numberValue=function(){return this.value-0};StringValue.prototype.nodeSetValue=function(){throw this};function BooleanValue(a){this.value=a;this.type="boolean"}BooleanValue.prototype.stringValue=function(){return""+this.value};BooleanValue.prototype.booleanValue=function(){return this.value};BooleanValue.prototype.numberValue=function(){return this.value?1:0};BooleanValue.prototype.nodeSetValue=function(){throw this};function NumberValue(a){this.value=a;this.type="number"}NumberValue.prototype.stringValue=function(){return""+this.value};NumberValue.prototype.booleanValue=function(){return !!this.value};NumberValue.prototype.numberValue=function(){return this.value-0};NumberValue.prototype.nodeSetValue=function(){throw this};function NodeSetValue(a){this.value=a;this.type="node-set"}NodeSetValue.prototype.stringValue=function(){if(this.value.length==0){return""}else{return xmlValue(this.value[0])}};NodeSetValue.prototype.booleanValue=function(){return this.value.length>0};NodeSetValue.prototype.numberValue=function(){return this.stringValue()-0};NodeSetValue.prototype.nodeSetValue=function(){return this.value};function TokenExpr(a){this.value=a}TokenExpr.prototype.evaluate=function(){return new StringValue(this.value)};function LocationExpr(){this.absolute=false;this.steps=[]}LocationExpr.prototype.appendStep=function(a){this.steps.push(a)};LocationExpr.prototype.prependStep=function(d){var a=this.steps;this.steps=[d];for(var b=0;b<a.length;++b){this.steps.push(a[b])}};LocationExpr.prototype.evaluate=function(a){var d;if(this.absolute){d=a.root}else{d=a.node}var b=[];xPathStep(b,this.steps,0,d,a);return new NodeSetValue(b)};function xPathStep(a,g,b,h,m){var n=g[b];var f=m.clone(h);var l=n.evaluate(f).nodeSetValue();for(var d=0;d<l.length;++d){if(b==g.length-1){a.push(l[d])}else{xPathStep(a,g,b+1,l[d],m)}}}function StepExpr(b,d,a){this.axis=b;this.nodetest=d;this.predicate=a||[]}StepExpr.prototype.appendPredicate=function(a){this.predicate.push(a)};StepExpr.prototype.evaluate=function(a){var d=a.node;var h=[];if(this.axis==xpathAxis.ANCESTOR_OR_SELF){h.push(d);for(var m=d.parentNode;m;m=m.parentNode){h.push(m)}}else{if(this.axis==xpathAxis.ANCESTOR){for(var m=d.parentNode;m;m=m.parentNode){h.push(m)}}else{if(this.axis==xpathAxis.ATTRIBUTE){copyArray(h,d.attributes)}else{if(this.axis==xpathAxis.CHILD){copyArray(h,d.childNodes)}else{if(this.axis==xpathAxis.DESCENDANT_OR_SELF){h.push(d);xpathCollectDescendants(h,d)}else{if(this.axis==xpathAxis.DESCENDANT){xpathCollectDescendants(h,d)}else{if(this.axis==xpathAxis.FOLLOWING){for(var m=d;m;m=m.parentNode){for(var l=m.nextSibling;l;l=l.nextSibling){h.push(l);xpathCollectDescendants(h,l)}}}else{if(this.axis==xpathAxis.FOLLOWING_SIBLING){for(var m=d.nextSibling;m;m=m.nextSibling){h.push(m)}}else{if(this.axis==xpathAxis.NAMESPACE){alert("not implemented: axis namespace")}else{if(this.axis==xpathAxis.PARENT){if(d.parentNode){h.push(d.parentNode)}}else{if(this.axis==xpathAxis.PRECEDING){for(var m=d;m;m=m.parentNode){for(var l=m.previousSibling;l;l=l.previousSibling){h.push(l);xpathCollectDescendantsReverse(h,l)}}}else{if(this.axis==xpathAxis.PRECEDING_SIBLING){for(var m=d.previousSibling;m;m=m.previousSibling){h.push(m)}}else{if(this.axis==xpathAxis.SELF){h.push(d)}else{throw"ERROR -- NO SUCH AXIS: "+this.axis}}}}}}}}}}}}}var b=h;h=[];for(var f=0;f<b.length;++f){var m=b[f];if(this.nodetest.evaluate(a.clone(m,f,b)).booleanValue()){h.push(m)}}for(var f=0;f<this.predicate.length;++f){var b=h;h=[];for(var g=0;g<b.length;++g){var m=b[g];if(this.predicate[f].evaluate(a.clone(m,g,b)).booleanValue()){h.push(m)}}}return new NodeSetValue(h)};function NodeTestAny(){this.value=new BooleanValue(true)}NodeTestAny.prototype.evaluate=function(a){return this.value};function NodeTestElementOrAttribute(){}NodeTestElementOrAttribute.prototype.evaluate=function(a){return new BooleanValue(a.node.nodeType==DOM_ELEMENT_NODE||a.node.nodeType==DOM_ATTRIBUTE_NODE)};function NodeTestText(){}NodeTestText.prototype.evaluate=function(a){return new BooleanValue(a.node.nodeType==DOM_TEXT_NODE)};function NodeTestComment(){}NodeTestComment.prototype.evaluate=function(a){return new BooleanValue(a.node.nodeType==DOM_COMMENT_NODE)};function NodeTestPI(a){this.target=a}NodeTestPI.prototype.evaluate=function(a){return new BooleanValue(a.node.nodeType==DOM_PROCESSING_INSTRUCTION_NODE&&(!this.target||a.node.nodeName==this.target))};function NodeTestNC(a){this.regex=new RegExp("^"+a+":");this.nsprefix=a}NodeTestNC.prototype.evaluate=function(a){var b=a.node;return new BooleanValue(this.regex.match(b.nodeName))};function NodeTestName(a){this.name=a}NodeTestName.prototype.evaluate=function(a){var b=a.node;return new BooleanValue(b.nodeName==this.name)};function PredicateExpr(a){this.expr=a}PredicateExpr.prototype.evaluate=function(a){var b=this.expr.evaluate(a);if(b.type=="number"){return new BooleanValue(a.position==b.numberValue()-1)}else{return new BooleanValue(b.booleanValue())}};function FunctionCallExpr(a){this.name=a;this.args=[]}FunctionCallExpr.prototype.appendArg=function(a){this.args.push(a)};FunctionCallExpr.prototype.evaluate=function(a){var b=""+this.name.value;var d=this.xpathfunctions[b];if(d){return d.call(this,a)}else{xpathLog("XPath NO SUCH FUNCTION "+b);return new BooleanValue(false)}};FunctionCallExpr.prototype.xpathfunctions={last:function(a){assert(this.args.length==0);return new NumberValue(a.contextSize())},position:function(a){assert(this.args.length==0);return new NumberValue(a.position+1)},count:function(a){assert(this.args.length==1);var b=this.args[0].evaluate(a);return new NumberValue(b.nodeSetValue().length)},id:function(r){assert(this.args.length==1);var h=this.args[0].evaluate(r);var l=[];var a;if(h.type=="node-set"){a=[];var b=h.nodeSetValue();for(var g=0;g<b.length;++g){var o=xmlValue(b[g]).split(/\s+/);for(var q=0;q<o.length;++q){a.push(o[q])}}}else{a=h.stringValue().split(/\s+/)}var m=r.node.ownerDocument;for(var g=0;g<a.length;++g){var f=m.getElementById(a[g]);if(f){l.push(f)}}return new NodeSetValue(l)},"local-name":function(a){alert("not implmented yet: XPath function local-name()")},"namespace-uri":function(a){alert("not implmented yet: XPath function namespace-uri()")},name:function(a){assert(this.args.length==1||this.args.length==0);var b;if(this.args.length==0){b=[a.node]}else{b=this.args[0].evaluate(a).nodeSetValue()}if(b.length==0){return new StringValue("")}else{return new StringValue(b[0].nodeName)}},string:function(a){assert(this.args.length==1||this.args.length==0);if(this.args.length==0){return new StringValue(new NodeSetValue([a.node]).stringValue())}else{return new StringValue(this.args[0].evaluate(a).stringValue())}},concat:function(a){var b="";for(var d=0;d<this.args.length;++d){b+=this.args[d].evaluate(a).stringValue()}return new StringValue(b)},"starts-with":function(a){assert(this.args.length==2);var d=this.args[0].evaluate(a).stringValue();var b=this.args[1].evaluate(a).stringValue();return new BooleanValue(d.indexOf(b)==0)},contains:function(a){assert(this.args.length==2);var d=this.args[0].evaluate(a).stringValue();var b=this.args[1].evaluate(a).stringValue();return new BooleanValue(d.indexOf(b)!=-1)},"substring-before":function(a){assert(this.args.length==2);var g=this.args[0].evaluate(a).stringValue();var f=this.args[1].evaluate(a).stringValue();var d=g.indexOf(f);var b;if(d==-1){b=""}else{b=g.substr(0,d)}return new StringValue(b)},"substring-after":function(a){assert(this.args.length==2);var g=this.args[0].evaluate(a).stringValue();var f=this.args[1].evaluate(a).stringValue();var d=g.indexOf(f);var b;if(d==-1){b=""}else{b=g.substr(d+f.length)}return new StringValue(b)},substring:function(a){assert(this.args.length==2||this.args.length==3);var h=this.args[0].evaluate(a).stringValue();var f=this.args[1].evaluate(a).numberValue();var d;if(this.args.length==2){var l=Math.max(0,Math.round(f)-1);d=h.substr(l)}else{var b=this.args[2].evaluate(a).numberValue();var m=Math.round(f)-1;var l=Math.max(0,m);var g=Math.round(b)-Math.max(0,-m);d=h.substr(l,g)}return new StringValue(d)},"string-length":function(a){var b;if(this.args.length>0){b=this.args[0].evaluate(a).stringValue()}else{b=new NodeSetValue([a.node]).stringValue()}return new NumberValue(b.length)},"normalize-space":function(a){var b;if(this.args.length>0){b=this.args[0].evaluate(a).stringValue()}else{b=new NodeSetValue([a.node]).stringValue()}b=b.replace(/^\s*/,"").replace(/\s*$/,"").replace(/\s+/g," ");return new StringValue(b)},translate:function(a){assert(this.args.length==3);var g=this.args[0].evaluate(a).stringValue();var f=this.args[1].evaluate(a).stringValue();var b=this.args[2].evaluate(a).stringValue();for(var d=0;d<f.length;++d){g=g.replace(new RegExp(f.charAt(d),"g"),b.charAt(d))}return new StringValue(g)},"boolean":function(a){assert(this.args.length==1);return new BooleanValue(this.args[0].evaluate(a).booleanValue())},not:function(a){assert(this.args.length==1);var b=!this.args[0].evaluate(a).booleanValue();return new BooleanValue(b)},"true":function(a){assert(this.args.length==0);return new BooleanValue(true)},"false":function(a){assert(this.args.length==0);return new BooleanValue(false)},lang:function(a){assert(this.args.length==1);var d=this.args[0].evaluate(a).stringValue();var g;var f=a.node;while(f&&f!=f.parentNode){g=f.getAttribute("xml:lang");if(g){break}f=f.parentNode}if(!g){return new BooleanValue(false)}else{var b=new RegExp("^"+d+"$","i");return new BooleanValue(g.match(b)||g.replace(/_.*$/,"").match(b))}},number:function(a){assert(this.args.length==1||this.args.length==0);if(this.args.length==1){return new NumberValue(this.args[0].evaluate(a).numberValue())}else{return new NumberValue(new NodeSetValue([a.node]).numberValue())}},sum:function(a){assert(this.args.length==1);var f=this.args[0].evaluate(a).nodeSetValue();var d=0;for(var b=0;b<f.length;++b){d+=xmlValue(f[b])-0}return new NumberValue(d)},floor:function(a){assert(this.args.length==1);var b=this.args[0].evaluate(a).numberValue();return new NumberValue(Math.floor(b))},ceiling:function(a){assert(this.args.length==1);var b=this.args[0].evaluate(a).numberValue();return new NumberValue(Math.ceil(b))},round:function(a){assert(this.args.length==1);var b=this.args[0].evaluate(a).numberValue();return new NumberValue(Math.round(b))},"ext-join":function(a){assert(this.args.length==2);var b=this.args[0].evaluate(a).nodeSetValue();var g=this.args[1].evaluate(a).stringValue();var d="";for(var f=0;f<b.length;++f){if(d){d+=g}d+=xmlValue(b[f])}return new StringValue(d)},"ext-if":function(a){assert(this.args.length==3);if(this.args[0].evaluate(a).booleanValue()){return this.args[1].evaluate(a)}else{return this.args[2].evaluate(a)}},"ext-cardinal":function(a){assert(this.args.length>=1);var f=this.args[0].evaluate(a).numberValue();var b=[];for(var d=0;d<f;++d){b.push(a.node)}return new NodeSetValue(b)}};function UnionExpr(b,a){this.expr1=b;this.expr2=a}UnionExpr.prototype.evaluate=function(d){var b=this.expr1.evaluate(d).nodeSetValue();var a=this.expr2.evaluate(d).nodeSetValue();var h=b.length;for(var f=0;f<a.length;++f){var m=a[f];var l=false;for(var g=0;g<h;++g){if(b[g]==m){l=true;g=h}}if(!l){b.push(m)}}return new NodeSetValue(b)};function PathExpr(b,a){this.filter=b;this.rel=a}PathExpr.prototype.evaluate=function(b){var f=this.filter.evaluate(b).nodeSetValue();var a=[];for(var g=0;g<f.length;++g){var d=this.rel.evaluate(b.clone(f[g],g,f)).nodeSetValue();for(var h=0;h<d.length;++h){a.push(d[h])}}return new NodeSetValue(a)};function FilterExpr(b,a){this.expr=b;this.predicate=a}FilterExpr.prototype.evaluate=function(a){var d=this.expr.evaluate(a).nodeSetValue();for(var g=0;g<this.predicate.length;++g){var b=d;d=[];for(var f=0;f<b.length;++f){var h=b[f];if(this.predicate[g].evaluate(a.clone(h,f,b)).booleanValue()){d.push(h)}}}return new NodeSetValue(d)};function UnaryMinusExpr(a){this.expr=a}UnaryMinusExpr.prototype.evaluate=function(a){return new NumberValue(-this.expr.evaluate(a).numberValue())};function BinaryExpr(b,d,a){this.expr1=b;this.expr2=a;this.op=d}BinaryExpr.prototype.evaluate=function(a){var b;switch(this.op.value){case"or":b=new BooleanValue(this.expr1.evaluate(a).booleanValue()||this.expr2.evaluate(a).booleanValue());break;case"and":b=new BooleanValue(this.expr1.evaluate(a).booleanValue()&&this.expr2.evaluate(a).booleanValue());break;case"+":b=new NumberValue(this.expr1.evaluate(a).numberValue()+this.expr2.evaluate(a).numberValue());break;case"-":b=new NumberValue(this.expr1.evaluate(a).numberValue()-this.expr2.evaluate(a).numberValue());break;case"*":b=new NumberValue(this.expr1.evaluate(a).numberValue()*this.expr2.evaluate(a).numberValue());break;case"mod":b=new NumberValue(this.expr1.evaluate(a).numberValue()%this.expr2.evaluate(a).numberValue());break;case"div":b=new NumberValue(this.expr1.evaluate(a).numberValue()/this.expr2.evaluate(a).numberValue());break;case"=":b=this.compare(a,function(f,d){return f==d});break;case"!=":b=this.compare(a,function(f,d){return f!=d});break;case"<":b=this.compare(a,function(f,d){return f<d});break;case"<=":b=this.compare(a,function(f,d){return f<=d});break;case">":b=this.compare(a,function(f,d){return f>d});break;case">=":b=this.compare(a,function(f,d){return f>=d});break;default:alert("BinaryExpr.evaluate: "+this.op.value)}return b};BinaryExpr.prototype.compare=function(t,m){var q=this.expr1.evaluate(t);var o=this.expr2.evaluate(t);var l;if(q.type=="node-set"&&o.type=="node-set"){var h=q.nodeSetValue();var g=o.nodeSetValue();l=false;for(var d=0;d<h.length;++d){for(var b=0;b<g.length;++b){if(m(xmlValue(h[d]),xmlValue(g[b]))){l=true;b=g.length;d=h.length}}}}else{if(q.type=="node-set"||o.type=="node-set"){if(q.type=="number"){var u=q.numberValue();var a=o.nodeSetValue();l=false;for(var f=0;f<a.length;++f){var r=xmlValue(a[f])-0;if(m(u,r)){l=true;break}}}else{if(o.type=="number"){var a=q.nodeSetValue();var u=o.numberValue();l=false;for(var f=0;f<a.length;++f){var r=xmlValue(a[f])-0;if(m(r,u)){l=true;break}}}else{if(q.type=="string"){var u=q.stringValue();var a=o.nodeSetValue();l=false;for(var f=0;f<a.length;++f){var r=xmlValue(a[f]);if(m(u,r)){l=true;break}}}else{if(o.type=="string"){var a=q.nodeSetValue();var u=o.stringValue();l=false;for(var f=0;f<a.length;++f){var r=xmlValue(a[f]);if(m(r,u)){l=true;break}}}else{l=m(q.booleanValue(),o.booleanValue())}}}}}else{if(q.type=="boolean"||o.type=="boolean"){l=m(q.booleanValue(),o.booleanValue())}else{if(q.type=="number"||o.type=="number"){l=m(q.numberValue(),o.numberValue())}else{l=m(q.stringValue(),o.stringValue())}}}}return new BooleanValue(l)};function LiteralExpr(a){this.value=a}LiteralExpr.prototype.evaluate=function(a){return new StringValue(this.value)};function NumberExpr(a){this.value=a}NumberExpr.prototype.evaluate=function(a){return new NumberValue(this.value)};function VariableExpr(a){this.name=a}VariableExpr.prototype.evaluate=function(a){return a.getVariable(this.name)};function makeTokenExpr(a){return new TokenExpr(a)}function passExpr(a){return a}function makeLocationExpr1(b,a){a.absolute=true;return a}function makeLocationExpr2(b,a){a.absolute=true;a.prependStep(makeAbbrevStep(b.value));return a}function makeLocationExpr3(b){var a=new LocationExpr();a.appendStep(makeAbbrevStep("."));a.absolute=true;return a}function makeLocationExpr4(b){var a=new LocationExpr();a.absolute=true;a.appendStep(makeAbbrevStep(b.value));return a}function makeLocationExpr5(b){var a=new LocationExpr();a.appendStep(b);return a}function makeLocationExpr6(a,b,d){a.appendStep(d);return a}function makeLocationExpr7(a,b,d){a.appendStep(makeAbbrevStep(b.value));return a}function makeStepExpr1(a){return makeAbbrevStep(a.value)}function makeStepExpr2(a){return makeAbbrevStep(a.value)}function makeStepExpr3(a,b,d){return new StepExpr(a.value,d)}function makeStepExpr4(a,b){return new StepExpr("attribute",b)}function makeStepExpr5(a){return new StepExpr("child",a)}function makeStepExpr6(b,a){b.appendPredicate(a);return b}function makeAbbrevStep(a){switch(a){case"//":return new StepExpr("descendant-or-self",new NodeTestAny);case".":return new StepExpr("self",new NodeTestAny);case"..":return new StepExpr("parent",new NodeTestAny)}}function makeNodeTestExpr1(a){return new NodeTestElementOrAttribute}function makeNodeTestExpr2(a,b,d){return new NodeTestNC(a.value)}function makeNodeTestExpr3(a){return new NodeTestName(a.value)}function makeNodeTestExpr4(d,a){var b=d.value.replace(/\s*\($/,"");switch(b){case"node":return new NodeTestAny;case"text":return new NodeTestText;case"comment":return new NodeTestComment;case"processing-instruction":return new NodeTestPI("")}}function makeNodeTestExpr5(f,d,a){var b=f.replace(/\s*\($/,"");if(b!="processing-instruction"){throw b}return new NodeTestPI(d.value)}function makePredicateExpr(d,b,a){return new PredicateExpr(b)}function makePrimaryExpr(d,b,a){return b}function makeFunctionCallExpr1(b,d,a){return new FunctionCallExpr(b)}function makeFunctionCallExpr2(g,l,f,d,a){var b=new FunctionCallExpr(g);b.appendArg(f);for(var h=0;h<d.length;++h){b.appendArg(d[h])}return b}function makeArgumentExpr(a,b){return b}function makeUnionExpr(d,a,b){return new UnionExpr(d,b)}function makePathExpr1(d,b,a){return new PathExpr(d,a)}function makePathExpr2(d,b,a){a.prependStep(makeAbbrevStep(b.value));return new PathExpr(d,a)}function makeFilterExpr(b,a){if(a.length>0){return new FilterExpr(b,a)}else{return b}}function makeUnaryMinusExpr(a,b){return new UnaryMinusExpr(b)}function makeBinaryExpr(b,d,a){return new BinaryExpr(b,d,a)}function makeLiteralExpr(a){var b=a.value.substring(1,a.value.length-1);return new LiteralExpr(b)}function makeNumberExpr(a){return new NumberExpr(a.value)}function makeVariableReference(a,b){return new VariableExpr(b.value)}function makeSimpleExpr(g){if(g.charAt(0)=="$"){return new VariableExpr(g.substr(1))}else{if(g.charAt(0)=="@"){var f=new NodeTestName(g.substr(1));var d=new StepExpr("attribute",f);var h=new LocationExpr();h.appendStep(d);return h}else{if(g.match(/^[0-9]+$/)){return new NumberExpr(g)}else{var f=new NodeTestName(g);var d=new StepExpr("child",f);var h=new LocationExpr();h.appendStep(d);return h}}}}function makeSimpleExpr2(l){var g=stringSplit(l,"/");var m=new LocationExpr();for(var h=0;h<g.length;++h){var f=new NodeTestName(g[h]);var d=new StepExpr("child",f);m.appendStep(d)}return m}var xpathAxis={ANCESTOR_OR_SELF:"ancestor-or-self",ANCESTOR:"ancestor",ATTRIBUTE:"attribute",CHILD:"child",DESCENDANT_OR_SELF:"descendant-or-self",DESCENDANT:"descendant",FOLLOWING_SIBLING:"following-sibling",FOLLOWING:"following",NAMESPACE:"namespace",PARENT:"parent",PRECEDING_SIBLING:"preceding-sibling",PRECEDING:"preceding",SELF:"self"};var xpathAxesRe=[xpathAxis.ANCESTOR_OR_SELF,xpathAxis.ANCESTOR,xpathAxis.ATTRIBUTE,xpathAxis.CHILD,xpathAxis.DESCENDANT_OR_SELF,xpathAxis.DESCENDANT,xpathAxis.FOLLOWING_SIBLING,xpathAxis.FOLLOWING,xpathAxis.NAMESPACE,xpathAxis.PARENT,xpathAxis.PRECEDING_SIBLING,xpathAxis.PRECEDING,xpathAxis.SELF].join("|");var TOK_PIPE={label:"|",prec:17,re:new RegExp("^\\|")};var TOK_DSLASH={label:"//",prec:19,re:new RegExp("^//")};var TOK_SLASH={label:"/",prec:30,re:new RegExp("^/")};var TOK_AXIS={label:"::",prec:20,re:new RegExp("^::")};var TOK_COLON={label:":",prec:1000,re:new RegExp("^:")};var TOK_AXISNAME={label:"[axis]",re:new RegExp("^("+xpathAxesRe+")")};var TOK_PARENO={label:"(",prec:34,re:new RegExp("^\\(")};var TOK_PARENC={label:")",re:new RegExp("^\\)")};var TOK_DDOT={label:"..",prec:34,re:new RegExp("^\\.\\.")};var TOK_DOT={label:".",prec:34,re:new RegExp("^\\.")};var TOK_AT={label:"@",prec:34,re:new RegExp("^@")};var TOK_COMMA={label:",",re:new RegExp("^,")};var TOK_OR={label:"or",prec:10,re:new RegExp("^or\\b")};var TOK_AND={label:"and",prec:11,re:new RegExp("^and\\b")};var TOK_EQ={label:"=",prec:12,re:new RegExp("^=")};var TOK_NEQ={label:"!=",prec:12,re:new RegExp("^!=")};var TOK_GE={label:">=",prec:13,re:new RegExp("^>=")};var TOK_GT={label:">",prec:13,re:new RegExp("^>")};var TOK_LE={label:"<=",prec:13,re:new RegExp("^<=")};var TOK_LT={label:"<",prec:13,re:new RegExp("^<")};var TOK_PLUS={label:"+",prec:14,re:new RegExp("^\\+"),left:true};var TOK_MINUS={label:"-",prec:14,re:new RegExp("^\\-"),left:true};var TOK_DIV={label:"div",prec:15,re:new RegExp("^div\\b"),left:true};var TOK_MOD={label:"mod",prec:15,re:new RegExp("^mod\\b"),left:true};var TOK_BRACKO={label:"[",prec:32,re:new RegExp("^\\[")};var TOK_BRACKC={label:"]",re:new RegExp("^\\]")};var TOK_DOLLAR={label:"$",re:new RegExp("^\\$")};var TOK_NCNAME={label:"[ncname]",re:new RegExp("^"+XML_NC_NAME)};var TOK_ASTERISK={label:"*",prec:15,re:new RegExp("^\\*"),left:true};var TOK_LITERALQ={label:"[litq]",prec:20,re:new RegExp("^'[^\\']*'")};var TOK_LITERALQQ={label:"[litqq]",prec:20,re:new RegExp('^"[^\\"]*"')};var TOK_NUMBER={label:"[number]",prec:35,re:new RegExp("^\\d+(\\.\\d*)?")};var TOK_QNAME={label:"[qname]",re:new RegExp("^("+XML_NC_NAME+":)?"+XML_NC_NAME)};var TOK_NODEO={label:"[nodetest-start]",re:new RegExp("^(processing-instruction|comment|text|node)\\(")};var xpathTokenRules=[TOK_DSLASH,TOK_SLASH,TOK_DDOT,TOK_DOT,TOK_AXIS,TOK_COLON,TOK_AXISNAME,TOK_NODEO,TOK_PARENO,TOK_PARENC,TOK_BRACKO,TOK_BRACKC,TOK_AT,TOK_COMMA,TOK_OR,TOK_AND,TOK_NEQ,TOK_EQ,TOK_GE,TOK_GT,TOK_LE,TOK_LT,TOK_PLUS,TOK_MINUS,TOK_ASTERISK,TOK_PIPE,TOK_MOD,TOK_DIV,TOK_LITERALQ,TOK_LITERALQQ,TOK_NUMBER,TOK_QNAME,TOK_NCNAME,TOK_DOLLAR];var XPathLocationPath={label:"LocationPath"};var XPathRelativeLocationPath={label:"RelativeLocationPath"};var XPathAbsoluteLocationPath={label:"AbsoluteLocationPath"};var XPathStep={label:"Step"};var XPathNodeTest={label:"NodeTest"};var XPathPredicate={label:"Predicate"};var XPathLiteral={label:"Literal"};var XPathExpr={label:"Expr"};var XPathPrimaryExpr={label:"PrimaryExpr"};var XPathVariableReference={label:"Variablereference"};var XPathNumber={label:"Number"};var XPathFunctionCall={label:"FunctionCall"};var XPathArgumentRemainder={label:"ArgumentRemainder"};var XPathPathExpr={label:"PathExpr"};var XPathUnionExpr={label:"UnionExpr"};var XPathFilterExpr={label:"FilterExpr"};var XPathDigits={label:"Digits"};var xpathNonTerminals=[XPathLocationPath,XPathRelativeLocationPath,XPathAbsoluteLocationPath,XPathStep,XPathNodeTest,XPathPredicate,XPathLiteral,XPathExpr,XPathPrimaryExpr,XPathVariableReference,XPathNumber,XPathFunctionCall,XPathArgumentRemainder,XPathPathExpr,XPathUnionExpr,XPathFilterExpr,XPathDigits];var Q_01={label:"?"};var Q_MM={label:"*"};var Q_1M={label:"+"};var ASSOC_LEFT=true;var xpathGrammarRules=[[XPathLocationPath,[XPathRelativeLocationPath],18,passExpr],[XPathLocationPath,[XPathAbsoluteLocationPath],18,passExpr],[XPathAbsoluteLocationPath,[TOK_SLASH,XPathRelativeLocationPath],18,makeLocationExpr1],[XPathAbsoluteLocationPath,[TOK_DSLASH,XPathRelativeLocationPath],18,makeLocationExpr2],[XPathAbsoluteLocationPath,[TOK_SLASH],0,makeLocationExpr3],[XPathAbsoluteLocationPath,[TOK_DSLASH],0,makeLocationExpr4],[XPathRelativeLocationPath,[XPathStep],31,makeLocationExpr5],[XPathRelativeLocationPath,[XPathRelativeLocationPath,TOK_SLASH,XPathStep],31,makeLocationExpr6],[XPathRelativeLocationPath,[XPathRelativeLocationPath,TOK_DSLASH,XPathStep],31,makeLocationExpr7],[XPathStep,[TOK_DOT],33,makeStepExpr1],[XPathStep,[TOK_DDOT],33,makeStepExpr2],[XPathStep,[TOK_AXISNAME,TOK_AXIS,XPathNodeTest],33,makeStepExpr3],[XPathStep,[TOK_AT,XPathNodeTest],33,makeStepExpr4],[XPathStep,[XPathNodeTest],33,makeStepExpr5],[XPathStep,[XPathStep,XPathPredicate],33,makeStepExpr6],[XPathNodeTest,[TOK_ASTERISK],33,makeNodeTestExpr1],[XPathNodeTest,[TOK_NCNAME,TOK_COLON,TOK_ASTERISK],33,makeNodeTestExpr2],[XPathNodeTest,[TOK_QNAME],33,makeNodeTestExpr3],[XPathNodeTest,[TOK_NODEO,TOK_PARENC],33,makeNodeTestExpr4],[XPathNodeTest,[TOK_NODEO,XPathLiteral,TOK_PARENC],33,makeNodeTestExpr5],[XPathPredicate,[TOK_BRACKO,XPathExpr,TOK_BRACKC],33,makePredicateExpr],[XPathPrimaryExpr,[XPathVariableReference],33,passExpr],[XPathPrimaryExpr,[TOK_PARENO,XPathExpr,TOK_PARENC],33,makePrimaryExpr],[XPathPrimaryExpr,[XPathLiteral],30,passExpr],[XPathPrimaryExpr,[XPathNumber],30,passExpr],[XPathPrimaryExpr,[XPathFunctionCall],30,passExpr],[XPathFunctionCall,[TOK_QNAME,TOK_PARENO,TOK_PARENC],-1,makeFunctionCallExpr1],[XPathFunctionCall,[TOK_QNAME,TOK_PARENO,XPathExpr,XPathArgumentRemainder,Q_MM,TOK_PARENC],-1,makeFunctionCallExpr2],[XPathArgumentRemainder,[TOK_COMMA,XPathExpr],-1,makeArgumentExpr],[XPathUnionExpr,[XPathPathExpr],20,passExpr],[XPathUnionExpr,[XPathUnionExpr,TOK_PIPE,XPathPathExpr],20,makeUnionExpr],[XPathPathExpr,[XPathLocationPath],20,passExpr],[XPathPathExpr,[XPathFilterExpr],19,passExpr],[XPathPathExpr,[XPathFilterExpr,TOK_SLASH,XPathRelativeLocationPath],20,makePathExpr1],[XPathPathExpr,[XPathFilterExpr,TOK_DSLASH,XPathRelativeLocationPath],20,makePathExpr2],[XPathFilterExpr,[XPathPrimaryExpr,XPathPredicate,Q_MM],20,makeFilterExpr],[XPathExpr,[XPathPrimaryExpr],16,passExpr],[XPathExpr,[XPathUnionExpr],16,passExpr],[XPathExpr,[TOK_MINUS,XPathExpr],-1,makeUnaryMinusExpr],[XPathExpr,[XPathExpr,TOK_OR,XPathExpr],-1,makeBinaryExpr],[XPathExpr,[XPathExpr,TOK_AND,XPathExpr],-1,makeBinaryExpr],[XPathExpr,[XPathExpr,TOK_EQ,XPathExpr],-1,makeBinaryExpr],[XPathExpr,[XPathExpr,TOK_NEQ,XPathExpr],-1,makeBinaryExpr],[XPathExpr,[XPathExpr,TOK_LT,XPathExpr],-1,makeBinaryExpr],[XPathExpr,[XPathExpr,TOK_LE,XPathExpr],-1,makeBinaryExpr],[XPathExpr,[XPathExpr,TOK_GT,XPathExpr],-1,makeBinaryExpr],[XPathExpr,[XPathExpr,TOK_GE,XPathExpr],-1,makeBinaryExpr],[XPathExpr,[XPathExpr,TOK_PLUS,XPathExpr],-1,makeBinaryExpr,ASSOC_LEFT],[XPathExpr,[XPathExpr,TOK_MINUS,XPathExpr],-1,makeBinaryExpr,ASSOC_LEFT],[XPathExpr,[XPathExpr,TOK_ASTERISK,XPathExpr],-1,makeBinaryExpr,ASSOC_LEFT],[XPathExpr,[XPathExpr,TOK_DIV,XPathExpr],-1,makeBinaryExpr,ASSOC_LEFT],[XPathExpr,[XPathExpr,TOK_MOD,XPathExpr],-1,makeBinaryExpr,ASSOC_LEFT],[XPathLiteral,[TOK_LITERALQ],-1,makeLiteralExpr],[XPathLiteral,[TOK_LITERALQQ],-1,makeLiteralExpr],[XPathNumber,[TOK_NUMBER],-1,makeNumberExpr],[XPathVariableReference,[TOK_DOLLAR,TOK_QNAME],200,makeVariableReference]];var xpathRules=[];function xpathParseInit(){if(xpathRules.length){return}xpathGrammarRules.sort(function(n,m){var q=n[1].length;var o=m[1].length;if(q<o){return 1}else{if(q>o){return -1}else{return 0}}});var a=1;for(var d=0;d<xpathNonTerminals.length;++d){xpathNonTerminals[d].key=a++}for(d=0;d<xpathTokenRules.length;++d){xpathTokenRules[d].key=a++}xpathLog("XPath parse INIT: "+a+" rules");function g(o,m,n){if(!o[m]){o[m]=[]}o[m].push(n)}for(d=0;d<xpathGrammarRules.length;++d){var l=xpathGrammarRules[d];var h=l[1];for(var b=h.length-1;b>=0;--b){if(h[b]==Q_1M){g(xpathRules,h[b-1].key,l);break}else{if(h[b]==Q_MM||h[b]==Q_01){g(xpathRules,h[b-1].key,l);--b}else{g(xpathRules,h[b].key,l);break}}}}xpathLog("XPath parse INIT: "+xpathRules.length+" rule bins");var f=0;mapExec(xpathRules,function(m){if(m){f+=m.length}});xpathLog("XPath parse INIT: "+(f/xpathRules.length)+" average bin size")}function xpathCollectDescendants(b,a){for(var d=a.firstChild;d;d=d.nextSibling){b.push(d);arguments.callee(b,d)}}function xpathCollectDescendantsReverse(b,a){for(var d=a.lastChild;d;d=d.previousSibling){b.push(d);arguments.callee(b,d)}}function xpathDomEval(d,b){var f=xpathParse(d);var a=f.evaluate(new ExprContext(b));return a}function xpathSort(m,h){if(h.length==0){return}var r=[];for(var l=0;l<m.contextSize();++l){var d=m.nodelist[l];var f={node:d,key:[]};var b=m.clone(d,0,[d]);for(var g=0;g<h.length;++g){var q=h[g];var o=q.expr.evaluate(b);var n;if(q.type=="text"){n=o.stringValue()}else{if(q.type=="number"){n=o.numberValue()}}f.key.push({value:n,order:q.order})}f.key.push({value:l,order:"ascending"});r.push(f)}r.sort(xpathSortByKey);var a=[];for(var l=0;l<r.length;++l){a.push(r[l].node)}m.nodelist=a;m.setNode(0)}function xpathSortByKey(f,d){for(var a=0;a<f.key.length;++a){var b=f.key[a].order=="descending"?-1:1;if(f.key[a].value>d.key[a].value){return +1*b}else{if(f.key[a].value<d.key[a].value){return -1*b}}}return 0}function xpathEval(a,d){var f=xpathParse(a);var b=f.evaluate(d);return b}var Spry;if(!Spry){Spry={}}if(!Spry.Utils){Spry.Utils={}}Spry.Utils.msProgIDs=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0"];Spry.Utils.createXMLHttpRequest=function(){var a=null;try{if(window.ActiveXObject){while(!a&&Spry.Utils.msProgIDs.length){try{a=new ActiveXObject(Spry.Utils.msProgIDs[0])}catch(b){a=null}if(!a){Spry.Utils.msProgIDs.splice(0,1)}}}if(!a&&window.XMLHttpRequest){a=new XMLHttpRequest()}}catch(b){a=null}if(!a){Spry.Debug.reportError("Failed to create an XMLHttpRequest object!")}return a};Spry.Utils.loadURL=function(m,b,d,l,g){var f=new Spry.Utils.loadURL.Request();f.method=m;f.url=b;f.async=d;f.successCallback=l;Spry.Utils.setOptions(f,g);try{f.xhRequest=Spry.Utils.createXMLHttpRequest();if(!f.xhRequest){return null}if(f.async){f.xhRequest.onreadystatechange=function(){Spry.Utils.loadURL.callback(f)}}f.xhRequest.open(f.method,f.url,f.async,f.username,f.password);if(f.headers){for(var a in f.headers){f.xhRequest.setRequestHeader(a,f.headers[a])}}f.xhRequest.send(f.postData);if(!f.async){Spry.Utils.loadURL.callback(f)}}catch(h){if(f.errorCallback){f.errorCallback(f)}else{Spry.Debug.reportError("Exception caught while loading "+b+": "+h)}f=null}return f};Spry.Utils.loadURL.callback=function(a){if(!a||a.xhRequest.readyState!=4){return}if(a.successCallback&&(a.xhRequest.status==200||a.xhRequest.status==0)){a.successCallback(a)}else{if(a.errorCallback){a.errorCallback(a)}}};Spry.Utils.loadURL.Request=function(){var b=Spry.Utils.loadURL.Request.props;var d=b.length;for(var a=0;a<d;a++){this[b[a]]=null}this.method="GET";this.async=true;this.headers={}};Spry.Utils.loadURL.Request.props=["method","url","async","username","password","postData","successCallback","errorCallback","headers","userData","xhRequest"];Spry.Utils.loadURL.Request.prototype.extractRequestOptions=function(f,d){if(!f){return}var b=Spry.Utils.loadURL.Request.props;var g=b.length;for(var a=0;a<g;a++){var h=b[a];if(f[h]!=undefined){this[h]=f[h];if(d){f[h]=undefined}}}};Spry.Utils.loadURL.Request.prototype.clone=function(){var b=Spry.Utils.loadURL.Request.props;var f=b.length;var d=new Spry.Utils.loadURL.Request;for(var a=0;a<f;a++){d[b[a]]=this[b[a]]}if(this.headers){d.headers={};Spry.Utils.setOptions(d.headers,this.headers)}return d};Spry.Utils.setInnerHTML=function(ele,str,preventScripts){if(!ele){return}ele=Spry.$(ele);var scriptExpr="<script[^>]*>(.|s|\n|\r)*?<\/script>";ele.innerHTML=str.replace(new RegExp(scriptExpr,"img"),"");if(preventScripts){return}var matches=str.match(new RegExp(scriptExpr,"img"));if(matches){var numMatches=matches.length;for(var i=0;i<numMatches;i++){var s=matches[i].replace(/<script[^>]*>[\s\r\n]*(<\!--)?|(-->)?[\s\r\n]*<\/script>/img,"");Spry.Utils.eval(s)}}};Spry.Utils.updateContent=function(f,b,a,d){Spry.Utils.loadURL("GET",b,true,function(g){Spry.Utils.setInnerHTML(f,g.xhRequest.responseText);if(a){a(f,b)}},d)};if(!Spry.$$){Spry.Utils.addEventListener=function(d,b,f,a){try{d=Spry.$(d);if(d.addEventListener){d.addEventListener(b,f,a)}else{if(d.attachEvent){d.attachEvent("on"+b,f)}}}catch(g){}};Spry.Utils.removeEventListener=function(d,b,f,a){try{d=Spry.$(d);if(d.removeEventListener){d.removeEventListener(b,f,a)}else{if(d.detachEvent){d.detachEvent("on"+b,f)}}}catch(g){}};Spry.Utils.addLoadListener=function(a){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",a,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",a,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",a)}}}};Spry.Utils.addClassName=function(b,a){b=Spry.$(b);if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))!=-1)){return}b.className+=(b.className?" ":"")+a};Spry.Utils.removeClassName=function(b,a){b=Spry.$(b);if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))==-1)){return}b.className=b.className.replace(new RegExp("\\s*\\b"+a+"\\b","g"),"")};Spry.Utils.getObjectByName=function(d){var a=null;if(d){var g=window;var b=d.split(".");for(var f=0;g&&f<b.length;f++){a=g[b[f]];g=a}}return a};Spry.$=function(b){if(arguments.length>1){for(var a=0,f=[],d=arguments.length;a<d;a++){f.push(Spry.$(arguments[a]))}return f}if(typeof b=="string"){b=document.getElementById(b)}return b}}Spry.Utils.eval=function(str){return eval(str)};Spry.Utils.escapeQuotesAndLineBreaks=function(a){if(a){a=a.replace(/\\/g,"\\\\");a=a.replace(/["']/g,"\\$&");a=a.replace(/\n/g,"\\n");a=a.replace(/\r/g,"\\r")}return a};Spry.Utils.encodeEntities=function(a){if(a&&a.search(/[&<>"]/)!=-1){a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");a=a.replace(/"/g,"&quot;")}return a};Spry.Utils.decodeEntities=function(b){var a=Spry.Utils.decodeEntities.div;if(!a){a=document.createElement("div");Spry.Utils.decodeEntities.div=a;if(!a){return b}}a.innerHTML=b;if(a.childNodes.length==1&&a.firstChild.nodeType==3&&a.firstChild.nextSibling==null){b=a.firstChild.data}else{b=b.replace(/&lt;/gi,"<");b=b.replace(/&gt;/gi,">");b=b.replace(/&quot;/gi,'"');b=b.replace(/&amp;/gi,"&")}return b};Spry.Utils.fixupIETagAttributes=function(m){var b="";var a=m.match(/^<[^\s>]+\s*/)[0];var g=m.match(/\s*\/?>$/)[0];var n=m.replace(/^<[^\s>]+\s*|\s*\/?>/g,"");b+=a;if(n){var l=0;var d=0;while(l<n.length){while(n.charAt(d)!="="&&d<n.length){++d}if(d>=n.length){b+=n.substring(l,d);break}++d;b+=n.substring(l,d);l=d;if(n.charAt(d)=='"'||n.charAt(d)=="'"){var h=d++;while(d<n.length){if(n.charAt(d)==n.charAt(h)){d++;break}else{if(n.charAt(d)=="\\"){d++}}d++}b+=n.substring(l,d);l=d}else{b+='"';var f=n.slice(d).search(/\s/);d=(f!=-1)?(d+f):n.length;b+=n.slice(l,d);b+='"';l=d}}}b+=g;return b};Spry.Utils.fixUpIEInnerHTML=function(h){var g="";var f=new RegExp("<\\!--|<\\!\\[CDATA\\[|<\\w+[^<>]*>|-->|\\]\\](>|&gt;)","g");var a=0;var b=0;while(h.length){var d=f.exec(h);if(!d||!d[0]){g+=h.substr(a,h.length-a);break}if(d.index!=a){g+=h.substr(a,d.index-a)}if(d[0]=="<!--"||d[0]=="<![CDATA["){++b;g+=d[0]}else{if(d[0]=="-->"||d[0]=="]]>"||(b&&d[0]=="]]&gt;")){--b;g+=d[0]}else{if(!b&&d[0].charAt(0)=="<"){g+=Spry.Utils.fixupIETagAttributes(d[0])}else{g+=d[0]}}}a=f.lastIndex}return g};Spry.Utils.stringToXMLDoc=function(g){var b=null;try{var a=new ActiveXObject("Microsoft.XMLDOM");a.async=false;a.loadXML(g);b=a}catch(d){try{var f=new DOMParser;b=f.parseFromString(g,"text/xml")}catch(d){Spry.Debug.reportError("Caught exception in Spry.Utils.stringToXMLDoc(): "+d+"\n");b=null}}return b};Spry.Utils.serializeObject=function(f){var h="";var d=true;if(f==null||f==undefined){return h+f}var g=typeof f;if(g=="number"||g=="boolean"){h+=f}else{if(g=="string"){h+='"'+Spry.Utils.escapeQuotesAndLineBreaks(f)+'"'}else{if(f.constructor==Array){h+="[";for(var a=0;a<f.length;a++){if(!d){h+=", "}h+=Spry.Utils.serializeObject(f[a]);d=false}h+="]"}else{if(g=="object"){h+="{";for(var b in f){if(!d){h+=", "}h+='"'+b+'": '+Spry.Utils.serializeObject(f[b]);d=false}h+="}"}}}}return h};Spry.Utils.getNodesByFunc=function(a,f){var g=new Array;var d=new Array;var b=a;while(b){if(f(b)){d.push(b)}if(b.hasChildNodes()){g.push(b);b=b.firstChild}else{if(b==a){b=null}else{try{b=b.nextSibling}catch(h){b=null}}}while(!b&&g.length>0){b=g.pop();if(b==a){b=null}else{try{b=b.nextSibling}catch(h){b=null}}}}if(g&&g.length>0){Spry.Debug.trace("-- WARNING: Spry.Utils.getNodesByFunc() failed to traverse all nodes!\n")}return d};Spry.Utils.getFirstChildWithNodeName=function(a,d){var b=a.firstChild;while(b){if(b.nodeName==d){return b}b=b.nextSibling}return null};Spry.Utils.setOptions=function(f,d,a){if(!d){return}for(var b in d){if(a&&d[b]==undefined){continue}f[b]=d[b]}};Spry.Utils.SelectionManager={};Spry.Utils.SelectionManager.selectionGroups=new Object;Spry.Utils.SelectionManager.SelectionGroup=function(){this.selectedElements=new Array};Spry.Utils.SelectionManager.SelectionGroup.prototype.select=function(b,d,g){var f=null;if(!g){this.clearSelection()}else{for(var a=0;a<this.selectedElements.length;a++){f=this.selectedElements[a].element;if(f.element==b){if(f.className!=d){Spry.Utils.removeClassName(b,f.className);Spry.Utils.addClassName(b,d)}return}}}f=new Object;f.element=b;f.className=d;this.selectedElements.push(f);Spry.Utils.addClassName(b,d)};Spry.Utils.SelectionManager.SelectionGroup.prototype.unSelect=function(b){for(var a=0;a<this.selectedElements.length;a++){var d=this.selectedElements[a].element;if(d.element==b){Spry.Utils.removeClassName(d.element,d.className);return}}};Spry.Utils.SelectionManager.SelectionGroup.prototype.clearSelection=function(){var a=null;do{a=this.selectedElements.shift();if(a){Spry.Utils.removeClassName(a.element,a.className)}}while(a)};Spry.Utils.SelectionManager.getSelectionGroup=function(a){if(!a){return null}var b=Spry.Utils.SelectionManager.selectionGroups[a];if(!b){b=new Spry.Utils.SelectionManager.SelectionGroup();Spry.Utils.SelectionManager.selectionGroups[a]=b}return b};Spry.Utils.SelectionManager.select=function(a,b,d,g){var f=Spry.Utils.SelectionManager.getSelectionGroup(a);if(!f){return}f.select(b,d,g)};Spry.Utils.SelectionManager.unSelect=function(a,b){var d=Spry.Utils.SelectionManager.getSelectionGroup(a);if(!d){return}d.unSelect(b,className)};Spry.Utils.SelectionManager.clearSelection=function(a){var b=Spry.Utils.SelectionManager.getSelectionGroup(a);if(!b){return}b.clearSelection()};Spry.Utils.Notifier=function(){this.observers=[];this.suppressNotifications=0};Spry.Utils.Notifier.prototype.addObserver=function(b){if(!b){return}var a=this.observers.length;for(var d=0;d<a;d++){if(this.observers[d]==b){return}}this.observers[a]=b};Spry.Utils.Notifier.prototype.removeObserver=function(a){if(!a){return}for(var b=0;b<this.observers.length;b++){if(this.observers[b]==a){this.observers.splice(b,1);break}}};Spry.Utils.Notifier.prototype.notifyObservers=function(b,f){if(!b){return}if(!this.suppressNotifications){var a=this.observers.length;for(var d=0;d<a;d++){var g=this.observers[d];if(g){if(typeof g=="function"){g(b,this,f)}else{if(g[b]){g[b](this,f)}}}}}};Spry.Utils.Notifier.prototype.enableNotifications=function(){if(--this.suppressNotifications<0){this.suppressNotifications=0;Spry.Debug.reportError("Unbalanced enableNotifications() call!\n")}};Spry.Utils.Notifier.prototype.disableNotifications=function(){++this.suppressNotifications};Spry.Debug={};Spry.Debug.enableTrace=true;Spry.Debug.debugWindow=null;Spry.Debug.onloadDidFire=false;Spry.Utils.addLoadListener(function(){Spry.Debug.onloadDidFire=true;Spry.Debug.flushQueuedMessages()});Spry.Debug.flushQueuedMessages=function(){if(Spry.Debug.flushQueuedMessages.msgs){var b=Spry.Debug.flushQueuedMessages.msgs;for(var a=0;a<b.length;a++){Spry.Debug.debugOut(b[a].msg,b[a].color)}Spry.Debug.flushQueuedMessages.msgs=null}};Spry.Debug.createDebugWindow=function(){if(!Spry.Debug.enableTrace||Spry.Debug.debugWindow||!Spry.Debug.onloadDidFire){return}try{Spry.Debug.debugWindow=document.createElement("div");var b=Spry.Debug.debugWindow;b.style.fontSize="12px";b.style.fontFamily="console";b.style.position="absolute";b.style.width="400px";b.style.height="300px";b.style.overflow="auto";b.style.border="solid 1px black";b.style.backgroundColor="white";b.style.color="black";b.style.bottom="0px";b.style.right="0px";b.setAttribute("id","SpryDebugWindow");document.body.appendChild(Spry.Debug.debugWindow)}catch(a){}};Spry.Debug.debugOut=function(f,a){if(!Spry.Debug.debugWindow){Spry.Debug.createDebugWindow();if(!Spry.Debug.debugWindow){if(!Spry.Debug.flushQueuedMessages.msgs){Spry.Debug.flushQueuedMessages.msgs=new Array}Spry.Debug.flushQueuedMessages.msgs.push({msg:f,color:a});return}}var b=document.createElement("div");if(a){b.style.backgroundColor=a}b.innerHTML=f;Spry.Debug.debugWindow.appendChild(b)};Spry.Debug.trace=function(a){Spry.Debug.debugOut(a)};Spry.Debug.reportError=function(a){Spry.Debug.debugOut(a,"red")};Spry.Data={};Spry.Data.regionsArray={};Spry.Data.initRegionsOnLoad=true;Spry.Data.initRegions=function(f){f=f?Spry.$(f):document.body;var s=null;var l=Spry.Utils.getNodesByFunc(f,function(A){try{if(A.nodeType!=1){return false}var y="spry:region";var x=A.attributes.getNamedItem(y);if(!x){y="spry:detailregion";x=A.attributes.getNamedItem(y)}if(x){if(s){var z=A.parentNode;while(z){if(z==s){Spry.Debug.reportError("Found a nested "+y+" in the following markup. Nested regions are currently not supported.<br/><pre>"+Spry.Utils.encodeEntities(z.innerHTML)+"</pre>");return false}z=z.parentNode}}if(x.value){x=A.attributes.getNamedItem("id");if(!x||!x.value){A.setAttribute("id","spryregion"+(++Spry.Data.initRegions.nextUniqueRegionID))}s=A;return true}else{Spry.Debug.reportError(y+" attributes require one or more data set names as values!")}}}catch(B){}return false});var a,t,n;var m=[];for(n=0;n<l.length;n++){var d=l[n];var o=false;a=d.attributes.getNamedItem("id").value;attr=d.attributes.getNamedItem("spry:region");if(!attr){attr=d.attributes.getNamedItem("spry:detailregion");o=true}if(!attr.value){Spry.Debug.reportError("spry:region and spry:detailregion attributes require one or more data set names as values!");continue}d.attributes.removeNamedItem(attr.nodeName);Spry.Utils.removeClassName(d,Spry.Data.Region.hiddenRegionClassName);t=Spry.Data.Region.strToDataSetsArray(attr.value);if(!t.length){Spry.Debug.reportError("spry:region or spry:detailregion attribute has no data set!");continue}var q=false;var v=false;var h="";var w=null;var b={};var g={};attr=d.attributes.getNamedItem("spry:readystate");if(attr&&attr.value){g.ready=attr.value}attr=d.attributes.getNamedItem("spry:errorstate");if(attr&&attr.value){g.error=attr.value}attr=d.attributes.getNamedItem("spry:loadingstate");if(attr&&attr.value){g.loading=attr.value}attr=d.attributes.getNamedItem("spry:expiredstate");if(attr&&attr.value){g.expired=attr.value}var r=Spry.Utils.getNodesByFunc(d,function(L){try{if(L.nodeType==1){var D=L.attributes;var A=Spry.Data.Region.PI.orderedInstructions.length;var y=null;var x=null;for(var N=0;N<A;N++){var M=Spry.Data.Region.PI.orderedInstructions[N];var K=D.getNamedItem(M);if(!K){continue}var J=Spry.Data.Region.PI.instructions[M];var F=(L==d)?true:J.childrenOnly;var I=J.getOpenTag(L,M);var C=J.getCloseTag(L,M);if(F){var G=document.createComment(I);var H=document.createComment(C);if(!y){L.insertBefore(G,L.firstChild)}else{L.insertBefore(G,y.nextSibling)}y=G;if(!x){L.appendChild(H)}else{L.insertBefore(H,x)}x=H}else{var E=L.parentNode;E.insertBefore(document.createComment(I),L);E.insertBefore(document.createComment(C),L.nextSibling)}if(M=="spry:state"){b[K.value]=true}L.removeAttribute(M)}if(Spry.Data.Region.enableBehaviorAttributes){var P=Spry.Data.Region.behaviorAttrs;for(var z in P){var B=D.getNamedItem(z);if(B){q=true;if(P[z].setup){P[z].setup(L,B.value)}}}}}}catch(O){}return false});h=d.innerHTML;if(window.ActiveXObject&&!Spry.Data.Region.disableIEInnerHTMLFixUp&&h.search(/=\{/)!=-1){if(Spry.Data.Region.debug){Spry.Debug.trace("<hr />Performing IE innerHTML fix up of Region: "+a+"<br /><br />"+Spry.Utils.encodeEntities(h))}h=Spry.Utils.fixUpIEInnerHTML(h)}if(Spry.Data.Region.debug){Spry.Debug.trace("<hr />Region template markup for '"+a+"':<br /><br />"+Spry.Utils.encodeEntities(h))}if(!v){d.innerHTML=""}var u=new Spry.Data.Region(d,a,o,h,t,b,g,q);Spry.Data.regionsArray[u.name]=u;m.push(u)}for(var n=0;n<m.length;n++){m[n].updateContent()}};Spry.Data.initRegions.nextUniqueRegionID=0;Spry.Data.updateRegion=function(b){if(!b||!Spry.Data.regionsArray||!Spry.Data.regionsArray[b]){return}try{Spry.Data.regionsArray[b].updateContent()}catch(a){Spry.Debug.reportError("Spry.Data.updateRegion("+b+") caught an exception: "+a+"\n")}};Spry.Data.getRegion=function(a){return Spry.Data.regionsArray[a]};Spry.Data.updateAllRegions=function(){if(!Spry.Data.regionsArray){return}for(var a in Spry.Data.regionsArray){Spry.Data.updateRegion(a)}};Spry.Data.getDataSetByName=function(a){var b=window[a];if(typeof b!="object"||!b.getData||!b.filter){return null}return b};Spry.Data.DataSet=function(a){Spry.Utils.Notifier.call(this);this.name="";this.internalID=Spry.Data.DataSet.nextDataSetID++;this.curRowID=0;this.data=[];this.unfilteredData=null;this.dataHash={};this.columnTypes={};this.filterFunc=null;this.filterDataFunc=null;this.distinctOnLoad=false;this.distinctFieldsOnLoad=null;this.sortOnLoad=null;this.sortOrderOnLoad="ascending";this.keepSorted=false;this.dataWasLoaded=false;this.pendingRequest=null;this.lastSortColumns=[];this.lastSortOrder="";this.loadIntervalID=0;Spry.Utils.setOptions(this,a)};Spry.Data.DataSet.prototype=new Spry.Utils.Notifier();Spry.Data.DataSet.prototype.constructor=Spry.Data.DataSet;Spry.Data.DataSet.prototype.getData=function(a){return(a&&this.unfilteredData)?this.unfilteredData:this.data};Spry.Data.DataSet.prototype.getUnfilteredData=function(){return this.getData(true)};Spry.Data.DataSet.prototype.getLoadDataRequestIsPending=function(){return this.pendingRequest!=null};Spry.Data.DataSet.prototype.getDataWasLoaded=function(){return this.dataWasLoaded};Spry.Data.DataSet.prototype.getValue=function(d,b){var a=undefined;if(!b){b=this.getCurrentRow()}switch(d){case"ds_RowNumber":a=this.getRowNumber(b);break;case"ds_RowNumberPlus1":a=this.getRowNumber(b)+1;break;case"ds_RowCount":a=this.getRowCount();break;case"ds_UnfilteredRowCount":a=this.getRowCount(true);break;case"ds_CurrentRowNumber":a=this.getCurrentRowNumber();break;case"ds_CurrentRowID":a=this.getCurrentRowID();break;case"ds_EvenOddRow":a=(this.getRowNumber(b)%2)?Spry.Data.Region.evenRowClassName:Spry.Data.Region.oddRowClassName;break;case"ds_SortOrder":a=this.getSortOrder();break;case"ds_SortColumn":a=this.getSortColumn();break;default:if(b){a=b[d]}break}return a};Spry.Data.DataSet.prototype.setDataFromArray=function(a,g){this.notifyObservers("onPreLoad");this.unfilteredData=null;this.filteredData=null;this.data=[];this.dataHash={};var b=a.length;for(var d=0;d<b;d++){var f=a[d];if(f.ds_RowID==undefined){f.ds_RowID=d}this.dataHash[f.ds_RowID]=f;this.data.push(f)}this.loadData(g)};Spry.Data.DataSet.prototype.loadData=function(d){var a=this;this.pendingRequest=new Object;this.dataWasLoaded=false;var b=function(){a.pendingRequest=null;a.dataWasLoaded=true;a.applyColumnTypes();a.disableNotifications();a.filterAndSortData();a.enableNotifications();a.notifyObservers("onPostLoad");a.notifyObservers("onDataChanged")};if(d){b()}else{this.pendingRequest.timer=setTimeout(b,0)}};Spry.Data.DataSet.prototype.filterAndSortData=function(){if(this.filterDataFunc){this.filterData(this.filterDataFunc,true)}if(this.distinctOnLoad){this.distinct(this.distinctFieldsOnLoad)}if(this.keepSorted&&this.getSortColumn()){this.sort(this.lastSortColumns,this.lastSortOrder)}else{if(this.sortOnLoad){this.sort(this.sortOnLoad,this.sortOrderOnLoad)}}if(this.filterFunc){this.filter(this.filterFunc,true)}if(this.data&&this.data.length>0){this.curRowID=this.data[0]["ds_RowID"]}else{this.curRowID=0}};Spry.Data.DataSet.prototype.cancelLoadData=function(){if(this.pendingRequest&&this.pendingRequest.timer){clearTimeout(this.pendingRequest.timer)}this.pendingRequest=null};Spry.Data.DataSet.prototype.getRowCount=function(a){var b=this.getData(a);return b?b.length:0};Spry.Data.DataSet.prototype.getRowByID=function(a){if(!this.data){return null}return this.dataHash[a]};Spry.Data.DataSet.prototype.getRowByRowNumber=function(a,b){var d=this.getData(b);if(d&&a>=0&&a<d.length){return d[a]}return null};Spry.Data.DataSet.prototype.getCurrentRow=function(){return this.getRowByID(this.curRowID)};Spry.Data.DataSet.prototype.setCurrentRow=function(b){if(this.curRowID==b){return}var a={oldRowID:this.curRowID,newRowID:b};this.curRowID=b;this.notifyObservers("onCurrentRowChanged",a)};Spry.Data.DataSet.prototype.getRowNumber=function(g,a){if(g){var d=this.getData(a);if(d&&d.length){var f=d.length;for(var b=0;b<f;b++){if(d[b]==g){return b}}}}return -1};Spry.Data.DataSet.prototype.getCurrentRowNumber=function(){return this.getRowNumber(this.getCurrentRow())};Spry.Data.DataSet.prototype.getCurrentRowID=function(){return this.curRowID};Spry.Data.DataSet.prototype.setCurrentRowNumber=function(a){if(!this.data||a>=this.data.length){Spry.Debug.trace("Invalid row number: "+a+"\n");return}var b=this.data[a]["ds_RowID"];if(b==undefined||this.curRowID==b){return}this.setCurrentRow(b)};Spry.Data.DataSet.prototype.findRowsWithColumnValues=function(h,a,d){var f=[];var o=this.getData(d);if(o){var l=o.length;for(var g=0;g<l;g++){var n=o[g];var b=true;for(var m in h){if(h[m]!=n[m]){b=false;break}}if(b){if(a){return n}f.push(n)}}}return a?null:f};Spry.Data.DataSet.prototype.setColumnType=function(d,b){if(d){if(typeof d=="string"){d=[d]}for(var a=0;a<d.length;a++){this.columnTypes[d[a]]=b}}};Spry.Data.DataSet.prototype.getColumnType=function(a){if(this.columnTypes[a]){return this.columnTypes[a]}return"string"};Spry.Data.DataSet.prototype.applyColumnTypes=function(){var f=this.getData(true);var h=f.length;var g=[];if(h<1){return}for(var a in this.columnTypes){var d=this.columnTypes[a];if(d!="string"){for(var b=0;b<h;b++){var m=f[b];var l=m[a];if(l!=undefined){if(d=="number"){m[a]=new Number(l)}else{if(d=="html"){m[a]=Spry.Utils.decodeEntities(l)}}}}}}};Spry.Data.DataSet.prototype.distinct=function(m){if(this.data){var h=this.data;this.data=[];this.dataHash={};var f=false;var l={};var g=0;var o=[];if(typeof m=="string"){o=[m]}else{if(m){o=m}else{for(var a in h[0]){o[g++]=a}}}for(var g=0;g<h.length;g++){var b=h[g];var n="";for(var d=0;d<o.length;d++){a=o[d];if(a!="ds_RowID"){if(n){n+=","}n+=a+':"'+b[a]+'"'}}if(!l[n]){this.data.push(b);this.dataHash[b.ds_RowID]=b;l[n]=true}else{f=true}}if(f){this.notifyObservers("onDataChanged")}}};Spry.Data.DataSet.prototype.getSortColumn=function(){return(this.lastSortColumns&&this.lastSortColumns.length>0)?this.lastSortColumns[0]:""};Spry.Data.DataSet.prototype.getSortOrder=function(){return this.lastSortOrder?this.lastSortOrder:""};Spry.Data.DataSet.prototype.sort=function(h,g){if(!h){return}if(typeof h=="string"){h=[h,"ds_RowID"]}else{if(h.length<2&&h[0]!="ds_RowID"){h.push("ds_RowID")}}if(!g){g="toggle"}if(g=="toggle"){if(this.lastSortColumns.length>0&&this.lastSortColumns[0]==h[0]&&this.lastSortOrder=="ascending"){g="descending"}else{g="ascending"}}if(g!="ascending"&&g!="descending"){Spry.Debug.reportError("Invalid sort order type specified: "+g+"\n");return}var f={oldSortColumns:this.lastSortColumns,oldSortOrder:this.lastSortOrder,newSortColumns:h,newSortOrder:g};this.notifyObservers("onPreSort",f);var b=h[h.length-1];var a=Spry.Data.DataSet.prototype.sort.getSortFunc(b,this.getColumnType(b),g);for(var d=h.length-2;d>=0;d--){b=h[d];a=Spry.Data.DataSet.prototype.sort.buildSecondarySortFunc(Spry.Data.DataSet.prototype.sort.getSortFunc(b,this.getColumnType(b),g),a)}if(this.unfilteredData){this.unfilteredData.sort(a);if(this.filterFunc){this.filter(this.filterFunc,true)}}else{this.data.sort(a)}this.lastSortColumns=h.slice(0);this.lastSortOrder=g;this.notifyObservers("onPostSort",f)};Spry.Data.DataSet.prototype.sort.getSortFunc=function(f,d,a){var b=null;if(d=="number"){if(a=="ascending"){b=function(h,g){h=h[f];g=g[f];if(h==undefined||g==undefined){return(h==g)?0:(h?1:-1)}return h-g}}else{b=function(h,g){h=h[f];g=g[f];if(h==undefined||g==undefined){return(h==g)?0:(h?-1:1)}return g-h}}}else{if(d=="date"){if(a=="ascending"){b=function(l,g){var m=l[f];var h=g[f];m=m?(new Date(m)):0;h=h?(new Date(h)):0;return m-h}}else{b=function(l,g){var m=l[f];var h=g[f];m=m?(new Date(m)):0;h=h?(new Date(h)):0;return h-m}}}else{if(a=="ascending"){b=function(q,o){q=q[f];o=o[f];if(q==undefined||o==undefined){return(q==o)?0:(q?1:-1)}var t=q.toString();var r=o.toString();var g=t.toLowerCase();var h=r.toLowerCase();var m=t.length>r.length?r.length:t.length;for(var l=0;l<m;l++){var u=g.charAt(l);var s=h.charAt(l);var n=t.charAt(l);var v=r.charAt(l);if(u>s){return 1}else{if(u<s){return -1}else{if(n>v){return 1}else{if(n<v){return -1}}}}}if(t.length==r.length){return 0}else{if(t.length>r.length){return 1}}return -1}}else{b=function(q,o){q=q[f];o=o[f];if(q==undefined||o==undefined){return(q==o)?0:(q?-1:1)}var t=q.toString();var r=o.toString();var g=t.toLowerCase();var h=r.toLowerCase();var m=t.length>r.length?r.length:t.length;for(var l=0;l<m;l++){var u=g.charAt(l);var s=h.charAt(l);var n=t.charAt(l);var v=r.charAt(l);if(u>s){return -1}else{if(u<s){return 1}else{if(n>v){return -1}else{if(n<v){return 1}}}}}if(t.length==r.length){return 0}else{if(t.length>r.length){return -1}}return 1}}}}return b};Spry.Data.DataSet.prototype.sort.buildSecondarySortFunc=function(b,a){return function(f,d){var g=b(f,d);if(g==0){g=a(f,d)}return g}};Spry.Data.DataSet.prototype.filterData=function(g,d){var f=false;if(!g){this.filterDataFunc=null;f=true}else{this.filterDataFunc=g;if(this.dataWasLoaded&&((this.unfilteredData&&this.unfilteredData.length)||(this.data&&this.data.length))){if(this.unfilteredData){this.data=this.unfilteredData;this.unfilteredData=null}var h=this.data;this.data=[];this.dataHash={};for(var b=0;b<h.length;b++){var a=g(this,h[b],b);if(a){this.data.push(a);this.dataHash[a.ds_RowID]=a}}f=true}}if(f){if(!d){this.disableNotifications();if(this.filterFunc){this.filter(this.filterFunc,true)}this.enableNotifications()}this.notifyObservers("onDataChanged")}};Spry.Data.DataSet.prototype.filter=function(h,d){var g=false;if(!h){if(this.filterFunc&&this.unfilteredData){this.data=this.unfilteredData;this.unfilteredData=null;this.filterFunc=null;g=true}}else{this.filterFunc=h;if(this.dataWasLoaded&&(this.unfilteredData||(this.data&&this.data.length))){if(!this.unfilteredData){this.unfilteredData=this.data}var f=this.unfilteredData;this.data=[];for(var b=0;b<f.length;b++){var a=h(this,f[b],b);if(a){this.data.push(a)}}g=true}}if(g){this.notifyObservers("onDataChanged")}};Spry.Data.DataSet.prototype.startLoadInterval=function(b){this.stopLoadInterval();if(b>0){var a=this;this.loadInterval=b;this.loadIntervalID=setInterval(function(){a.loadData()},b)}};Spry.Data.DataSet.prototype.stopLoadInterval=function(){if(this.loadIntervalID){clearInterval(this.loadIntervalID)}this.loadInterval=0;this.loadIntervalID=null};Spry.Data.DataSet.nextDataSetID=0;Spry.Data.HTTPSourceDataSet=function(a,b){Spry.Data.DataSet.call(this);this.url=a;this.dataSetsForDataRefStrings=new Array;this.hasDataRefStrings=false;this.useCache=true;this.setRequestInfo(b,true);Spry.Utils.setOptions(this,b,true);this.recalculateDataSetDependencies();if(this.loadInterval>0){this.startLoadInterval(this.loadInterval)}};Spry.Data.HTTPSourceDataSet.prototype=new Spry.Data.DataSet();Spry.Data.HTTPSourceDataSet.prototype.constructor=Spry.Data.HTTPSourceDataSet;Spry.Data.HTTPSourceDataSet.prototype.setRequestInfo=function(a,b){this.requestInfo=new Spry.Utils.loadURL.Request();this.requestInfo.extractRequestOptions(a,b);if(this.requestInfo.method=="POST"){if(!this.requestInfo.headers){this.requestInfo.headers={}}if(!this.requestInfo.headers["Content-Type"]){this.requestInfo.headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"}}};Spry.Data.HTTPSourceDataSet.prototype.recalculateDataSetDependencies=function(){this.hasDataRefStrings=false;var b=0;for(b=0;b<this.dataSetsForDataRefStrings.length;b++){var f=this.dataSetsForDataRefStrings[b];if(f){f.removeObserver(this)}}this.dataSetsForDataRefStrings=new Array();var a=this.getDataRefStrings();var d=0;for(var l=0;l<a.length;l++){var g=Spry.Data.Region.getTokensFromStr(a[l]);for(b=0;g&&b<g.length;b++){if(g[b].search(/{[^}:]+::[^}]+}/)!=-1){var h=g[b].replace(/^\{|::.*\}/g,"");var f=null;if(!this.dataSetsForDataRefStrings[h]){f=Spry.Data.getDataSetByName(h);if(h&&f){this.dataSetsForDataRefStrings[h]=f;this.dataSetsForDataRefStrings[d++]=f;this.hasDataRefStrings=true}}}}}for(b=0;b<this.dataSetsForDataRefStrings.length;b++){var f=this.dataSetsForDataRefStrings[b];f.addObserver(this)}};Spry.Data.HTTPSourceDataSet.prototype.getDataRefStrings=function(){var a=[];if(this.url){a.push(this.url)}if(this.requestInfo&&this.requestInfo.postData){a.push(this.requestInfo.postData)}return a};Spry.Data.HTTPSourceDataSet.prototype.attemptLoadData=function(){for(var a=0;a<this.dataSetsForDataRefStrings.length;a++){var b=this.dataSetsForDataRefStrings[a];if(b.getLoadDataRequestIsPending()||!b.getDataWasLoaded()){return}}this.loadData()};Spry.Data.HTTPSourceDataSet.prototype.onCurrentRowChanged=function(b,a){this.attemptLoadData()};Spry.Data.HTTPSourceDataSet.prototype.onPostSort=function(b,a){this.attemptLoadData()};Spry.Data.HTTPSourceDataSet.prototype.onDataChanged=function(b,a){this.attemptLoadData()};Spry.Data.HTTPSourceDataSet.prototype.loadData=function(){if(!this.url){return}this.cancelLoadData();var d=this.url;var a=this.requestInfo.postData;if(this.hasDataRefStrings){var b=true;for(var f=0;f<this.dataSetsForDataRefStrings.length;f++){var h=this.dataSetsForDataRefStrings[f];if(h.getLoadDataRequestIsPending()){b=false}else{if(!h.getDataWasLoaded()){h.loadData();b=false}}}if(!b){return}d=Spry.Data.Region.processDataRefString(null,this.url,this.dataSetsForDataRefStrings);if(!d){return}if(a&&(typeof a)=="string"){a=Spry.Data.Region.processDataRefString(null,a,this.dataSetsForDataRefStrings)}}this.notifyObservers("onPreLoad");this.data=null;this.dataWasLoaded=false;this.unfilteredData=null;this.dataHash=null;this.curRowID=0;var g=this.requestInfo.clone();g.url=d;g.postData=a;this.pendingRequest=new Object;this.pendingRequest.data=Spry.Data.HTTPSourceDataSet.LoadManager.loadData(g,this,this.useCache)};Spry.Data.HTTPSourceDataSet.prototype.cancelLoadData=function(){if(this.pendingRequest){Spry.Data.HTTPSourceDataSet.LoadManager.cancelLoadData(this.pendingRequest.data,this);this.pendingRequest=null}};Spry.Data.HTTPSourceDataSet.prototype.getURL=function(){return this.url};Spry.Data.HTTPSourceDataSet.prototype.setURL=function(b,a){if(this.url==b){if(!a||(this.requestInfo.method==a.method&&(a.method!="POST"||this.requestInfo.postData==a.postData))){return}}this.url=b;this.setRequestInfo(a);this.cancelLoadData();this.recalculateDataSetDependencies();this.dataWasLoaded=false};Spry.Data.HTTPSourceDataSet.prototype.setDataFromDoc=function(a){this.pendingRequest=null;this.loadDataIntoDataSet(a);this.applyColumnTypes();this.disableNotifications();this.filterAndSortData();this.enableNotifications();this.notifyObservers("onPostLoad");this.notifyObservers("onDataChanged")};Spry.Data.HTTPSourceDataSet.prototype.loadDataIntoDataSet=function(a){this.dataHash=new Object;this.data=new Array;this.dataWasLoaded=true};Spry.Data.HTTPSourceDataSet.prototype.xhRequestProcessor=function(a){var b=a.responseText;if(a.status==200||a.status==0){return b}return null};Spry.Data.HTTPSourceDataSet.prototype.sessionExpiredChecker=function(a){if(a.xhRequest.responseText=="session expired"){return true}return false};Spry.Data.HTTPSourceDataSet.prototype.setSessionExpiredChecker=function(a){this.sessionExpiredChecker=a};Spry.Data.HTTPSourceDataSet.prototype.onRequestResponse=function(a,b){this.setDataFromDoc(a.rawData)};Spry.Data.HTTPSourceDataSet.prototype.onRequestError=function(a,b){this.notifyObservers("onLoadError",b)};Spry.Data.HTTPSourceDataSet.prototype.onRequestSessionExpired=function(a,b){this.notifyObservers("onSessionExpired",b)};Spry.Data.HTTPSourceDataSet.LoadManager={};Spry.Data.HTTPSourceDataSet.LoadManager.cache=[];Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest=function(a,b,d){Spry.Utils.Notifier.call(this);this.reqInfo=a;this.rawData=null;this.timer=null;this.state=Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.NOT_LOADED;this.xhRequestProcessor=b;this.sessionExpiredChecker=d};Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.prototype=new Spry.Utils.Notifier();Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.prototype.constructor=Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest;Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.NOT_LOADED=1;Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.LOAD_REQUESTED=2;Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.LOAD_FAILED=3;Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.LOAD_SUCCESSFUL=4;Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.prototype.loadDataCallback=function(a){if(a.xhRequest.readyState!=4){return}var b=null;if(this.xhRequestProcessor){b=this.xhRequestProcessor(a.xhRequest)}if(this.sessionExpiredChecker){Spry.Utils.setOptions(a,{rawData:b},false);if(this.sessionExpiredChecker(a)){this.state=Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.LOAD_FAILED;this.notifyObservers("onRequestSessionExpired",a);this.observers.length=0;return}}if(!b){this.state=Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.LOAD_FAILED;this.notifyObservers("onRequestError",a);this.observers.length=0;return}this.rawData=b;this.state=Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.LOAD_SUCCESSFUL;this.notifyObservers("onRequestResponse",a);this.observers.length=0};Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.prototype.loadData=function(){var a=this;this.cancelLoadData();this.rawData=null;this.state=Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.LOAD_REQUESTED;var b=this.reqInfo.clone();b.successCallback=function(d){a.loadDataCallback(d)};b.errorCallback=b.successCallback;this.timer=setTimeout(function(){a.timer=null;Spry.Utils.loadURL(b.method,b.url,b.async,b.successCallback,b)},0)};Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.prototype.cancelLoadData=function(){if(this.state==Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.LOAD_REQUESTED){if(this.timer){this.timer.clearTimeout();this.timer=null}this.rawData=null;this.state=Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.NOT_LOADED}};Spry.Data.HTTPSourceDataSet.LoadManager.getCacheKey=function(a){return a.method+"::"+a.url+"::"+a.postData+"::"+a.username};Spry.Data.HTTPSourceDataSet.LoadManager.loadData=function(d,f,b){if(!d){return null}var a=null;var g=null;if(b){g=Spry.Data.HTTPSourceDataSet.LoadManager.getCacheKey(d);a=Spry.Data.HTTPSourceDataSet.LoadManager.cache[g]}if(a){if(a.state==Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.LOAD_REQUESTED){if(f){a.addObserver(f)}return a}else{if(a.state==Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.LOAD_SUCCESSFUL){if(f){setTimeout(function(){f.setDataFromDoc(a.rawData)},0)}return a}}}if(!a){a=new Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest(d,(f?f.xhRequestProcessor:null),(f?f.sessionExpiredChecker:null));if(b){Spry.Data.HTTPSourceDataSet.LoadManager.cache[g]=a;a.addObserver({onRequestError:function(){Spry.Data.HTTPSourceDataSet.LoadManager.cache[g]=undefined}})}}if(f){a.addObserver(f)}a.loadData();return a};Spry.Data.HTTPSourceDataSet.LoadManager.cancelLoadData=function(a,b){if(a){if(b){a.removeObserver(b)}else{a.cancelLoadData()}}};Spry.Data.XMLDataSet=function(b,a,f){this.xpath=a;this.doc=null;this.subPaths=[];this.entityEncodeStrings=true;Spry.Data.HTTPSourceDataSet.call(this,b,f);var d=typeof this.subPaths;if(d=="string"||(d=="object"&&this.subPaths.constructor!=Array)){this.subPaths=[this.subPaths]}};Spry.Data.XMLDataSet.prototype=new Spry.Data.HTTPSourceDataSet();Spry.Data.XMLDataSet.prototype.constructor=Spry.Data.XMLDataSet;Spry.Data.XMLDataSet.prototype.getDataRefStrings=function(){var a=[];if(this.url){a.push(this.url)}if(this.xpath){a.push(this.xpath)}if(this.requestInfo&&this.requestInfo.postData){a.push(this.requestInfo.postData)}return a};Spry.Data.XMLDataSet.prototype.getDocument=function(){return this.doc};Spry.Data.XMLDataSet.prototype.getXPath=function(){return this.xpath};Spry.Data.XMLDataSet.prototype.setXPath=function(a){if(this.xpath!=a){this.xpath=a;if(this.dataWasLoaded&&this.doc){this.notifyObservers("onPreLoad");this.setDataFromDoc(this.doc)}}};Spry.Data.XMLDataSet.nodeContainsElementNode=function(a){if(a){a=a.firstChild;while(a){if(a.nodeType==1){return true}a=a.nextSibling}}return false};Spry.Data.XMLDataSet.getNodeText=function(f,d,b){var a="";if(!f){return}try{var h=f.firstChild;while(h){try{if(h.nodeType==3){a+=d?Spry.Utils.encodeEntities(h.data):h.data}else{if(h.nodeType==4){a+=b?Spry.Utils.encodeEntities(h.data):h.data}}}catch(g){Spry.Debug.reportError("Spry.Data.XMLDataSet.getNodeText() exception caught: "+g+"\n")}h=h.nextSibling}}catch(g){Spry.Debug.reportError("Spry.Data.XMLDataSet.getNodeText() exception caught: "+g+"\n")}return a};Spry.Data.XMLDataSet.createObjectForNode=function(d,l,n){if(!d){return null}var f=new Object();var g=0;var m=null;try{for(g=0;g<d.attributes.length;g++){m=d.attributes[g];if(m&&m.nodeType==2){f["@"+m.name]=m.value}}}catch(h){Spry.Debug.reportError("Spry.Data.XMLDataSet.createObjectForNode() caught exception while accessing attributes: "+h+"\n")}var b=d.firstChild;if(b&&!b.nextSibling&&b.nodeType!=1){f[d.nodeName]=Spry.Data.XMLDataSet.getNodeText(d,l,n)}while(b){if(b.nodeType==1){if(!Spry.Data.XMLDataSet.nodeContainsElementNode(b)){f[b.nodeName]=Spry.Data.XMLDataSet.getNodeText(b,l,n);try{var a=b.nodeName+"/@";for(g=0;g<b.attributes.length;g++){m=b.attributes[g];if(m&&m.nodeType==2){f[a+m.name]=m.value}}}catch(h){Spry.Debug.reportError("Spry.Data.XMLDataSet.createObjectForNode() caught exception while accessing attributes: "+h+"\n")}}}b=b.nextSibling}return f};Spry.Data.XMLDataSet.getRecordSetFromXMLDoc=function(u,t,o,q){if(!u||!t){return null}var r=new Object();r.xmlDoc=u;r.xmlPath=t;r.dataHash=new Object;r.data=new Array;r.getData=function(){return this.data};var s=new ExprContext(u);var b=xpathParse(t);var l=b.evaluate(s);var d=l.nodeSetValue();var a=true;if(d&&d.length>0){a=d[0].nodeType!=2}var g=0;var h=true;var n=false;if(typeof q=="boolean"){h=n=q}for(var f=0;f<d.length;f++){var m=null;if(o){m=new Object}else{if(a){m=Spry.Data.XMLDataSet.createObjectForNode(d[f],h,n)}else{m=new Object;m["@"+d[f].name]=d[f].value}}if(m){m.ds_RowID=g++;m.ds_XMLNode=d[f];r.dataHash[m.ds_RowID]=m;r.data.push(m)}}return r};Spry.Data.XMLDataSet.PathNode=function(a){this.path=a;this.subPaths=[];this.xpath=""};Spry.Data.XMLDataSet.PathNode.prototype.addSubPath=function(b){var a=this.findSubPath(b);if(!a){a=new Spry.Data.XMLDataSet.PathNode(b);this.subPaths.push(a)}return a};Spry.Data.XMLDataSet.PathNode.prototype.findSubPath=function(f){var a=this.subPaths.length;for(var d=0;d<a;d++){var b=this.subPaths[d];if(f==b.path){return b}}return null};Spry.Data.XMLDataSet.PathNode.prototype.consolidate=function(){var a=this.subPaths.length;if(!this.xpath&&a==1){var b=this.subPaths[0];this.path+=((b[0]!="/")?"/":"")+b.path;this.xpath=b.xpath;this.subPaths=b.subPaths;this.consolidate();return}for(var d=0;d<a;d++){this.subPaths[d].consolidate()}};Spry.Data.XMLDataSet.prototype.convertXPathsToPathTree=function(m){var g=m.length;var o=new Spry.Data.XMLDataSet.PathNode("");for(var l=0;l<g;l++){var n=m[l];var f=n.replace(/\/\//g,"/__SPRYDS__");f=f.replace(/^\//,"");var a=f.split(/\//);var b=a.length;var d=o;for(var h=0;h<b;h++){var q=a[h].replace(/__SPRYDS__/,"//");d=d.addSubPath(q)}d.xpath=n}o.consolidate();return o};Spry.Data.XMLDataSet.prototype.flattenSubPaths=function(v,q){if(!v||!q){return}var B=q.length;if(B<1){return}var I=v.data;var z={};var r=[];var a=[];for(var E=0;E<B;E++){var s=q[E];if(typeof s=="object"){s=s.path}if(!s){s=""}r[E]=Spry.Data.Region.processDataRefString(null,s,this.dataSetsForDataRefStrings);a[E]=r[E].replace(/\[.*\]/g,"")}var t;var o=I.length;var w=[];for(var E=0;E<o;E++){t=I[E];var G=[t];for(var D=0;D<B;D++){var H=Spry.Data.XMLDataSet.getRecordSetFromXMLDoc(t.ds_XMLNode,r[D],(q[D].xpath?false:true),this.entityEncodeStrings);if(H&&H.data&&H.data.length){if(typeof q[D]=="object"&&q[D].subPaths){var F=q[D].subPaths;spType=typeof F;if(spType=="string"){F=[F]}else{if(spType=="object"&&spType.constructor==Object){F=[F]}}this.flattenSubPaths(H,F)}var y=H.data;var g=y.length;var x=a[D]+"/";var f=G.length;var u=[];for(var C=0;C<f;C++){var m=G[C];for(var A=0;A<g;A++){var d=new Object;var b=y[A];for(h in m){d[h]=m[h]}for(var h in b){var n=x+h;if(x==(h+"/")||x.search(new RegExp("\\/"+h+"\\/$"))!=-1){n=a[D]}d[n]=b[h]}u.push(d)}}G=u}}w=w.concat(G)}I=w;o=I.length;for(E=0;E<o;E++){t=I[E];t.ds_RowID=E;z[t.ds_RowID]=t}v.data=I;v.dataHash=z};Spry.Data.XMLDataSet.prototype.loadDataIntoDataSet=function(g){var b=null;var a=Spry.Data.Region.processDataRefString(null,this.xpath,this.dataSetsForDataRefStrings);var h=this.subPaths;var l=false;if(this.subPaths&&this.subPaths.length>0){var o=[];var n=h.length;for(var f=0;f<n;f++){var m=Spry.Data.Region.processDataRefString(null,h[f],this.dataSetsForDataRefStrings);if(m.charAt(0)!="/"){m=a+"/"+m}o.push(m)}o.unshift(a);var d=this.convertXPathsToPathTree(o);a=d.path;h=d.subPaths;l=d.xpath?false:true}b=Spry.Data.XMLDataSet.getRecordSetFromXMLDoc(g,a,l,this.entityEncodeStrings);if(!b){Spry.Debug.reportError("Spry.Data.XMLDataSet.loadDataIntoDataSet() failed to create dataSet '"+this.name+"'for '"+this.xpath+"' - "+this.url+"\n");return}this.flattenSubPaths(b,h);this.doc=b.xmlDoc;this.data=b.data;this.dataHash=b.dataHash;this.dataWasLoaded=(this.doc!=null)};Spry.Data.XMLDataSet.prototype.xhRequestProcessor=function(b){var d=b.responseXML;var a=false;if(b.status!=200){if(b.status==0){if(b.responseText&&(!d||!d.firstChild)){a=true}}}else{if(!d){a=true}}if(a){d=Spry.Utils.stringToXMLDoc(b.responseText)}if(!d||!d.firstChild||d.firstChild.nodeName=="parsererror"){return null}return d};Spry.Data.XMLDataSet.prototype.sessionExpiredChecker=function(a){if(a.xhRequest.responseText=="session expired"){return true}else{if(a.rawData){var b=a.rawData.documentElement.firstChild;if(b&&b.nodeValue=="session expired"){return true}}}return false};Spry.Data.Region=function(f,a,m,l,q,b,g,o){this.regionNode=f;this.name=a;this.isDetailRegion=m;this.data=l;this.dataSets=q;this.hasBehaviorAttributes=o;this.tokens=null;this.currentState=null;this.states={ready:true};this.stateMap={};Spry.Utils.setOptions(this.states,b);Spry.Utils.setOptions(this.stateMap,g);for(var h=0;h<this.dataSets.length;h++){var d=this.dataSets[h];try{if(d){d.addObserver(this)}}catch(n){Spry.Debug.reportError("Failed to add '"+this.name+"' as a dataSet observer!\n")}}};Spry.Data.Region.hiddenRegionClassName="SpryHiddenRegion";Spry.Data.Region.evenRowClassName="even";Spry.Data.Region.oddRowClassName="odd";Spry.Data.Region.notifiers={};Spry.Data.Region.evalScripts=true;Spry.Data.Region.addObserver=function(b,a){var d=Spry.Data.Region.notifiers[b];if(!d){d=new Spry.Utils.Notifier();Spry.Data.Region.notifiers[b]=d}d.addObserver(a)};Spry.Data.Region.removeObserver=function(b,a){var d=Spry.Data.Region.notifiers[b];if(d){d.removeObserver(a)}};Spry.Data.Region.notifyObservers=function(b,f,d){var g=Spry.Data.Region.notifiers[f.name];if(g){var a={};if(d&&typeof d=="object"){a=d}else{a.data=d}a.region=f;a.regionID=f.name;a.regionNode=f.regionNode;g.notifyObservers(b,a)}};Spry.Data.Region.RS_Error=1;Spry.Data.Region.RS_LoadingData=2;Spry.Data.Region.RS_PreUpdate=4;Spry.Data.Region.RS_PostUpdate=8;Spry.Data.Region.prototype.getState=function(){return this.currentState};Spry.Data.Region.prototype.mapState=function(b,a){this.stateMap[b]=a};Spry.Data.Region.prototype.getMappedState=function(b){var a=this.stateMap[b];return a?a:b};Spry.Data.Region.prototype.setState=function(b,d){var a={state:b,mappedState:this.getMappedState(b)};if(!d){Spry.Data.Region.notifyObservers("onPreStateChange",this,a)}this.currentState=a.mappedState?a.mappedState:b;if(this.states[b]){var g={state:this.currentState};if(!d){Spry.Data.Region.notifyObservers("onPreUpdate",this,g)}var f=this.transform();if(Spry.Data.Region.debug){Spry.Debug.trace("<hr />Generated region markup for '"+this.name+"':<br /><br />"+Spry.Utils.encodeEntities(f))}Spry.Utils.setInnerHTML(this.regionNode,f,!Spry.Data.Region.evalScripts);if(this.hasBehaviorAttributes){this.attachBehaviors()}if(!d){Spry.Data.Region.notifyObservers("onPostUpdate",this,g)}}if(!d){Spry.Data.Region.notifyObservers("onPostStateChange",this,a)}};Spry.Data.Region.prototype.getDataSets=function(){return this.dataSets};Spry.Data.Region.prototype.addDataSet=function(b){if(!b){return}if(!this.dataSets){this.dataSets=new Array}for(var a=0;a<this.dataSets.length;a++){if(this.dataSets[a]==b){return}}this.dataSets.push(b);b.addObserver(this)};Spry.Data.Region.prototype.removeDataSet=function(b){if(!b||this.dataSets){return}for(var a=0;a<this.dataSets.length;a++){if(this.dataSets[a]==b){this.dataSets.splice(a,1);b.removeObserver(this);return}}};Spry.Data.Region.prototype.onPreLoad=function(a){if(this.currentState!="loading"){this.setState("loading")}};Spry.Data.Region.prototype.onLoadError=function(a){if(this.currentState!="error"){this.setState("error")}Spry.Data.Region.notifyObservers("onError",this)};Spry.Data.Region.prototype.onSessionExpired=function(a){if(this.currentState!="expired"){this.setState("expired")}Spry.Data.Region.notifyObservers("onExpired",this)};Spry.Data.Region.prototype.onCurrentRowChanged=function(a,b){if(this.isDetailRegion){this.updateContent()}};Spry.Data.Region.prototype.onPostSort=function(a,b){this.updateContent()};Spry.Data.Region.prototype.onDataChanged=function(a,b){this.updateContent()};Spry.Data.Region.enableBehaviorAttributes=true;Spry.Data.Region.behaviorAttrs={};Spry.Data.Region.behaviorAttrs["spry:select"]={attach:function(a,d,f){var b=null;try{b=d.attributes.getNamedItem("spry:selectgroup").value}catch(g){}if(!b){b="default"}Spry.Utils.addEventListener(d,"click",function(h){Spry.Utils.SelectionManager.select(b,d,f)},false);if(d.attributes.getNamedItem("spry:selected")){Spry.Utils.SelectionManager.select(b,d,f)}}};Spry.Data.Region.behaviorAttrs["spry:hover"]={attach:function(a,b,d){Spry.Utils.addEventListener(b,"mouseover",function(f){Spry.Utils.addClassName(b,d)},false);Spry.Utils.addEventListener(b,"mouseout",function(f){Spry.Utils.removeClassName(b,d)},false)}};Spry.Data.Region.setUpRowNumberForEvenOddAttr=function(f,a,g,b){if(!g){Spry.Debug.showError("The "+a+" attribute requires a CSS class name as its value!");f.attributes.removeNamedItem(a);return}var h="";var d=g.split(/\s/);if(d.length>1){h=d[0];f.setAttribute(a,d[1])}f.setAttribute(b,"{"+(h?(h+"::"):"")+"ds_RowNumber}")};Spry.Data.Region.behaviorAttrs["spry:even"]={setup:function(a,b){Spry.Data.Region.setUpRowNumberForEvenOddAttr(a,"spry:even",b,"spryevenrownumber")},attach:function(a,b,d){if(d){rowNumAttr=b.attributes.getNamedItem("spryevenrownumber");if(rowNumAttr&&rowNumAttr.value){var f=parseInt(rowNumAttr.value);if(f%2){Spry.Utils.addClassName(b,d)}}}b.removeAttribute("spry:even");b.removeAttribute("spryevenrownumber")}};Spry.Data.Region.behaviorAttrs["spry:odd"]={setup:function(a,b){Spry.Data.Region.setUpRowNumberForEvenOddAttr(a,"spry:odd",b,"spryoddrownumber")},attach:function(a,b,d){if(d){rowNumAttr=b.attributes.getNamedItem("spryoddrownumber");if(rowNumAttr&&rowNumAttr.value){var f=parseInt(rowNumAttr.value);if(f%2==0){Spry.Utils.addClassName(b,d)}}}b.removeAttribute("spry:odd");b.removeAttribute("spryoddrownumber")}};Spry.Data.Region.setRowAttrClickHandler=function(d,h,a,g){if(h){var f=Spry.Data.getDataSetByName(h);if(f){rowIDAttr=d.attributes.getNamedItem(a);if(rowIDAttr){var b=rowIDAttr.value;if(b){Spry.Utils.addEventListener(d,"click",function(l){f[g](b)},false)}}}}};Spry.Data.Region.behaviorAttrs["spry:setrow"]={setup:function(a,b){if(!b){Spry.Debug.reportError("The spry:setrow attribute requires a data set name as its value!");a.removeAttribute("spry:setrow");return}a.setAttribute("spryrowid","{"+b+"::ds_RowID}")},attach:function(a,b,d){Spry.Data.Region.setRowAttrClickHandler(b,d,"spryrowid","setCurrentRow");b.removeAttribute("spry:setrow");b.removeAttribute("spryrowid")}};Spry.Data.Region.behaviorAttrs["spry:setrownumber"]={setup:function(a,b){if(!b){Spry.Debug.reportError("The spry:setrownumber attribute requires a data set name as its value!");a.removeAttribute("spry:setrownumber");return}a.setAttribute("spryrownumber","{"+b+"::ds_RowID}")},attach:function(a,b,d){Spry.Data.Region.setRowAttrClickHandler(b,d,"spryrownumber","setCurrentRowNumber");b.removeAttribute("spry:setrownumber");b.removeAttribute("spryrownumber")}};Spry.Data.Region.behaviorAttrs["spry:sort"]={attach:function(a,f,h){if(!h){return}var g=a.getDataSets()[0];var d="toggle";var m=h.split(/\s/);if(m.length>1){var b=Spry.Data.getDataSetByName(m[0]);if(b){g=b;m.shift()}if(m.length>1){var l=m[m.length-1];if(l=="ascending"||l=="descending"||l=="toggle"){d=l;m.pop()}}}if(g&&m.length>0){Spry.Utils.addEventListener(f,"click",function(n){g.sort(m,d)},false)}f.removeAttribute("spry:sort")}};Spry.Data.Region.prototype.attachBehaviors=function(){var a=this;Spry.Utils.getNodesByFunc(this.regionNode,function(h){if(!h||h.nodeType!=1){return false}try{var d=Spry.Data.Region.behaviorAttrs;for(var f in d){var b=h.attributes.getNamedItem(f);if(b){var g=d[f];if(g&&g.attach){g.attach(a,h,b.value)}}}}catch(l){}return false})};Spry.Data.Region.prototype.updateContent=function(){var a=true;var f=this.getDataSets();if(!f||f.length<1){Spry.Debug.reportError("updateContent(): Region '"+this.name+"' has no data set!\n");return}for(var b=0;b<f.length;b++){var d=f[b];if(d){if(d.getLoadDataRequestIsPending()){a=false}else{if(!d.getDataWasLoaded()){d.loadData();a=false}}}}if(!a){Spry.Data.Region.notifyObservers("onLoadingData",this);return}this.setState("ready")};Spry.Data.Region.prototype.clearContent=function(){this.regionNode.innerHTML=""};Spry.Data.Region.processContentPI=function(l){var h="";var f=/<!--\s*<\/?spry:content\s*[^>]*>\s*-->/mg;var a=0;var d=0;while(l.length){var b=f.exec(l);if(!b||!b[0]){h+=l.substr(a,l.length-a);break}if(!d&&b.index!=a){h+=l.substr(a,b.index-a)}if(b[0].search(/<\//)!=-1){--d;if(d){Spry.Debug.reportError("Nested spry:content regions are not allowed!\n")}}else{++d;var g=b[0].replace(/.*\bdataref="/,"");h+=g.replace(/".*$/,"")}a=f.lastIndex}return h};Spry.Data.Region.prototype.tokenizeData=function(v){if(!v){return null}var m=new Spry.Data.Region.Token(Spry.Data.Region.Token.LIST_TOKEN,null,null,null);var h=new Array;var a=Spry.Data.Region.processContentPI(v);h.push(m);var z=/((<!--\s*){0,1}<\/{0,1}spry:[^>]+>(\s*-->){0,1})|((\{|%7[bB])[^\}\s%]+(\}|%7[dD]))/mg;var b=0;while(a.length){var q=z.exec(a);var l=null;if(!q||!q[0]){var r=a.substr(b,a.length-b);l=new Spry.Data.Region.Token(Spry.Data.Region.Token.STRING_TOKEN,null,r,r);h[h.length-1].addChild(l);break}if(q.index!=b){var r=a.substr(b,q.index-b);l=new Spry.Data.Region.Token(Spry.Data.Region.Token.STRING_TOKEN,null,r,r);h[h.length-1].addChild(l)}if(q[0].search(/^({|%7[bB])/)!=-1){var o=q[0];var g=q[0];o=o.replace(/^({|%7[bB])/,"");o=o.replace(/(}|%7[dD])$/,"");var y=null;var x=o.split(/::/);if(x.length>1){y=x[0];o=x[1]}g=g.replace(/^%7[bB]/,"{");g=g.replace(/%7[dD]$/,"}");l=new Spry.Data.Region.Token(Spry.Data.Region.Token.VALUE_TOKEN,y,o,new String(g));h[h.length-1].addChild(l)}else{if(q[0].charAt(0)=="<"){var u=q[0].replace(/^(<!--\s*){0,1}<\/?/,"");u=u.replace(/>(\s*-->){0,1}|\s.*$/,"");if(q[0].search(/<\//)!=-1){if(h[h.length-1].tokenType!=Spry.Data.Region.Token.PROCESSING_INSTRUCTION_TOKEN){Spry.Debug.reportError("Invalid processing instruction close tag: "+u+" -- "+q[0]+"\n");return null}h.pop()}else{var n=Spry.Data.Region.PI.instructions[u];if(n){var t=null;var d="";if(q[0].search(/^.*\bselect=\"/)!=-1){d=q[0].replace(/^.*\bselect=\"/,"");d=d.replace(/".*$/,"");if(d){t=Spry.Data.getDataSetByName(d);if(!t){Spry.Debug.reportError("Failed to retrieve data set ("+d+") for "+u+"\n");d=""}}}var f=null;if(q[0].search(/^.*\btest=\"/)!=-1){f=q[0].replace(/^.*\btest=\"/,"");f=f.replace(/".*$/,"");f=Spry.Utils.decodeEntities(f)}var w=null;if(q[0].search(/^.*\bname=\"/)!=-1){w=q[0].replace(/^.*\bname=\"/,"");w=w.replace(/".*$/,"");w=Spry.Utils.decodeEntities(w)}var s=new Spry.Data.Region.Token.PIData(u,d,f,w);l=new Spry.Data.Region.Token(Spry.Data.Region.Token.PROCESSING_INSTRUCTION_TOKEN,t,s,new String(q[0]));h[h.length-1].addChild(l);h.push(l)}else{Spry.Debug.reportError("Unsupported region processing instruction: "+q[0]+"\n");return null}}}else{Spry.Debug.reportError("Invalid region token: "+q[0]+"\n");return null}}b=z.lastIndex}return m};Spry.Data.Region.prototype.callScriptFunction=function(f,b){var a=undefined;f=f.replace(/^\s*\{?\s*function::\s*|\s*\}?\s*$/g,"");var d=Spry.Utils.getObjectByName(f);if(d){a=d(this.name,function(){return b.getValueFromDataSet.apply(b,arguments)})}return a};Spry.Data.Region.prototype.evaluateExpression=function(exprStr,processContext){var result=undefined;try{if(exprStr.search(/^\s*function::/)!=-1){result=this.callScriptFunction(exprStr,processContext)}else{result=Spry.Utils.eval(Spry.Data.Region.processDataRefString(processContext,exprStr,null,true))}}catch(e){Spry.Debug.trace("Caught exception in Spry.Data.Region.prototype.evaluateExpression() while evaluating: "+Spry.Utils.encodeEntities(exprStr)+"\n    Exception:"+e+"\n")}return result};Spry.Data.Region.prototype.processTokenChildren=function(h,g,b){var f=g.children;var a=f.length;for(var d=0;d<a;d++){this.processTokens(h,f[d],b)}};Spry.Data.Region.prototype.processTokens=function(o,f,t){var l=0;switch(f.tokenType){case Spry.Data.Region.Token.LIST_TOKEN:this.processTokenChildren(o,f,t);break;case Spry.Data.Region.Token.STRING_TOKEN:o.push(f.data);break;case Spry.Data.Region.Token.PROCESSING_INSTRUCTION_TOKEN:if(f.data.name=="spry:repeat"){var m=null;if(f.dataSet){m=f.dataSet}else{m=this.dataSets[0]}if(m){var h=t.getDataSetContext(m);if(!h){Spry.Debug.reportError("processTokens() failed to get a data set context!\n");break}h.pushState();var r=h.getData();var q=r.length;for(l=0;l<q;l++){h.setRowIndex(l);var s=true;if(f.data.jsExpr){s=this.evaluateExpression(f.data.jsExpr,t)}if(s){this.processTokenChildren(o,f,t)}}h.popState()}}else{if(f.data.name=="spry:if"){var s=true;if(f.data.jsExpr){s=this.evaluateExpression(f.data.jsExpr,t)}if(s){this.processTokenChildren(o,f,t)}}else{if(f.data.name=="spry:choose"){var a=null;var n=null;var s=false;var g=0;for(g=0;g<f.children.length;g++){var b=f.children[g];if(b.tokenType==Spry.Data.Region.Token.PROCESSING_INSTRUCTION_TOKEN){if(b.data.name=="spry:when"){if(b.data.jsExpr){s=this.evaluateExpression(b.data.jsExpr,t);if(s){n=b;break}}}else{if(b.data.name=="spry:default"){a=b}}}}if(!n&&a){n=a}if(n){this.processTokenChildren(o,n,t)}}else{if(f.data.name=="spry:state"){var s=true;if(!f.data.regionState||f.data.regionState==this.currentState){this.processTokenChildren(o,f,t)}}else{Spry.Debug.reportError("processTokens(): Unknown processing instruction: "+f.data.name+"\n");return""}}}}break;case Spry.Data.Region.Token.VALUE_TOKEN:var m=f.dataSet;var d=undefined;if(m&&m=="function"){d=this.callScriptFunction(f.data,t)}else{if(!m&&this.dataSets&&this.dataSets.length>0&&this.dataSets[0]){m=this.dataSets[0]}if(!m){Spry.Debug.reportError("processTokens(): Value reference has no data set specified: "+f.regionStr+"\n");return""}d=t.getValueFromDataSet(m,f.data)}if(typeof d!="undefined"){o.push(d+"")}break;default:Spry.Debug.reportError("processTokens(): Invalid token type: "+f.regionStr+"\n");break}};Spry.Data.Region.prototype.transform=function(){if(this.data&&!this.tokens){this.tokens=this.tokenizeData(this.data)}if(!this.tokens){return""}processContext=new Spry.Data.Region.ProcessingContext(this);if(!processContext){return""}var a=[""];this.processTokens(a,this.tokens,processContext);return a.join("")};Spry.Data.Region.PI={};Spry.Data.Region.PI.instructions={};Spry.Data.Region.PI.buildOpenTagForValueAttr=function(d,a,b){if(!d||!a){return""}var h="";try{var g=d.attributes.getNamedItem(a);if(g&&g.value){h=Spry.Utils.encodeEntities(g.value)}}catch(f){h=""}if(!h){Spry.Debug.reportError(a+" attribute requires a JavaScript expression that returns true or false!\n");return""}return"<"+Spry.Data.Region.PI.instructions[a].tagName+" "+b+'="'+h+'">'};Spry.Data.Region.PI.buildOpenTagForTest=function(b,a){return Spry.Data.Region.PI.buildOpenTagForValueAttr(b,a,"test")};Spry.Data.Region.PI.buildOpenTagForState=function(b,a){return Spry.Data.Region.PI.buildOpenTagForValueAttr(b,a,"name")};Spry.Data.Region.PI.buildOpenTagForRepeat=function(f,b){if(!f||!b){return""}var a="";try{var l=f.attributes.getNamedItem(b);if(l&&l.value){a=l.value;a=a.replace(/\s/g,"")}}catch(h){a=""}if(!a){Spry.Debug.reportError(b+" attribute requires a data set name!\n");return""}var d="";try{var g=f.attributes.getNamedItem("spry:test");if(g){if(g.value){d=' test="'+Spry.Utils.encodeEntities(g.value)+'"'}f.attributes.removeNamedItem(g.nodeName)}}catch(h){d=""}return"<"+Spry.Data.Region.PI.instructions[b].tagName+' select="'+a+'"'+d+">"};Spry.Data.Region.PI.buildOpenTagForContent=function(d,a){if(!d||!a){return""}var g="";try{var b=d.attributes.getNamedItem(a);if(b&&b.value){g=Spry.Utils.encodeEntities(b.value)}}catch(f){g=""}if(!g){Spry.Debug.reportError(a+" attribute requires a data reference!\n");return""}return"<"+Spry.Data.Region.PI.instructions[a].tagName+' dataref="'+g+'">'};Spry.Data.Region.PI.buildOpenTag=function(b,a){return"<"+Spry.Data.Region.PI.instructions[a].tagName+">"};Spry.Data.Region.PI.buildCloseTag=function(b,a){return"</"+Spry.Data.Region.PI.instructions[a].tagName+">"};Spry.Data.Region.PI.instructions["spry:state"]={tagName:"spry:state",childrenOnly:false,getOpenTag:Spry.Data.Region.PI.buildOpenTagForState,getCloseTag:Spry.Data.Region.PI.buildCloseTag};Spry.Data.Region.PI.instructions["spry:if"]={tagName:"spry:if",childrenOnly:false,getOpenTag:Spry.Data.Region.PI.buildOpenTagForTest,getCloseTag:Spry.Data.Region.PI.buildCloseTag};Spry.Data.Region.PI.instructions["spry:repeat"]={tagName:"spry:repeat",childrenOnly:false,getOpenTag:Spry.Data.Region.PI.buildOpenTagForRepeat,getCloseTag:Spry.Data.Region.PI.buildCloseTag};Spry.Data.Region.PI.instructions["spry:repeatchildren"]={tagName:"spry:repeat",childrenOnly:true,getOpenTag:Spry.Data.Region.PI.buildOpenTagForRepeat,getCloseTag:Spry.Data.Region.PI.buildCloseTag};Spry.Data.Region.PI.instructions["spry:choose"]={tagName:"spry:choose",childrenOnly:true,getOpenTag:Spry.Data.Region.PI.buildOpenTag,getCloseTag:Spry.Data.Region.PI.buildCloseTag};Spry.Data.Region.PI.instructions["spry:when"]={tagName:"spry:when",childrenOnly:false,getOpenTag:Spry.Data.Region.PI.buildOpenTagForTest,getCloseTag:Spry.Data.Region.PI.buildCloseTag};Spry.Data.Region.PI.instructions["spry:default"]={tagName:"spry:default",childrenOnly:false,getOpenTag:Spry.Data.Region.PI.buildOpenTag,getCloseTag:Spry.Data.Region.PI.buildCloseTag};Spry.Data.Region.PI.instructions["spry:content"]={tagName:"spry:content",childrenOnly:true,getOpenTag:Spry.Data.Region.PI.buildOpenTagForContent,getCloseTag:Spry.Data.Region.PI.buildCloseTag};Spry.Data.Region.PI.orderedInstructions=["spry:state","spry:if","spry:repeat","spry:repeatchildren","spry:choose","spry:when","spry:default","spry:content"];Spry.Data.Region.getTokensFromStr=function(a){if(!a){return null}return a.match(/{[^}]+}/g)};Spry.Data.Region.processDataRefString=function(o,q,l,a){if(!q){return""}if(!o&&!l){return q}var m="";var s=new RegExp("\\{([^\\}:]+::)?[^\\}]+\\}","g");var n=0;while(n<q.length){var h=s.exec(q);if(!h||!h[0]){m+=q.substr(n,q.length-n);return m}if(h.index!=n){m+=q.substr(n,h.index-n)}var b="";if(h[0].search(/^\{[^}:]+::/)!=-1){b=h[0].replace(/^\{|::.*/g,"")}var r=h[0].replace(/^\{|.*::|\}/g,"");var t=null;var g="";if(o){g=o.getValueFromDataSet(b,r)}else{var f=b?l[b]:l[0];if(f){g=f.getValue(r)}}if(typeof g!="undefined"){g+="";m+=a?Spry.Utils.escapeQuotesAndLineBreaks(g):g}if(n==s.lastIndex){var d=h.index+h[0].length;if(d<q.length){m+=q.substr(d)}break}n=s.lastIndex}return m};Spry.Data.Region.strToDataSetsArray=function(m,g){var l=new Array;var b={};if(!m){return l}m=m.replace(/\s+/g," ");m=m.replace(/^\s|\s$/g,"");var a=m.split(/ /);for(var f=0;f<a.length;f++){if(a[f]&&!Spry.Data.Region.PI.instructions[a[f]]){try{var d=Spry.Data.getDataSetByName(a[f]);if(!b[a[f]]){if(g){l.push(a[f])}else{l.push(d)}b[a[f]]=true}}catch(h){}}}return l};Spry.Data.Region.DSContext=function(d,h){var f=d;var a=h;var l=[{rowIndex:-1}];var b=null;var g=[];var m=function(){return l[l.length-1].rowIndex};this.resetAll=function(){l=[{rowIndex:f.getCurrentRow()}]};this.getDataSet=function(){return f};this.getNumRows=function(n){var o=this.getCurrentState().data;return o?o.length:f.getRowCount(n)};this.getData=function(){var n=this.getCurrentState().data;return n?n:f.getData()};this.setData=function(n){this.getCurrentState().data=n};this.getValue=function(s,o){var n="";var r=this.getCurrentState();var q=r.nestedDS?r.nestedDS:this.getDataSet();if(q){n=q.getValue(s,o)}return n};this.getCurrentRow=function(){if(l.length<2||m()<0){return f.getCurrentRow()}var o=this.getData();var n=m();if(n<0||n>o.length){Spry.Debug.reportError("Invalid index used in Spry.Data.Region.DSContext.getCurrentRow()!\n");return null}return o[n]};this.getRowIndex=function(){var n=m();if(n>=0){return n}return f.getRowNumber(f.getCurrentRow())};this.setRowIndex=function(r){this.getCurrentState().rowIndex=r;var o=this.getData();var q=g.length;for(var n=0;n<q;n++){g[n].syncDataWithParentRow(this,r,o)}};this.syncDataWithParentRow=function(r,u,n){var t=n[u];if(t){nestedDS=f.getNestedDataSetForParentRow(t);if(nestedDS){var q=this.getCurrentState();q.nestedDS=nestedDS;q.data=nestedDS.getData();q.rowIndex=nestedDS.getCurrentRowNumber();q.rowIndex=q.rowIndex<0?0:q.rowIndex;var s=g.length;for(var o=0;o<s;o++){g[o].syncDataWithParentRow(this,q.rowIndex,q.data)}}}};this.pushState=function(){var r=this.getCurrentState();var q=new Object;q.rowIndex=r.rowIndex;q.data=r.data;q.nestedDS=r.nestedDS;l.push(q);var o=g.length;for(var n=0;n<o;n++){g[n].pushState()}};this.popState=function(){if(l.length<2){Spry.Debug.reportError("Stack underflow in Spry.Data.Region.DSContext.popState()!\n");return}var o=g.length;for(var n=0;n<o;n++){g[n].popState()}l.pop()};this.getCurrentState=function(){return l[l.length-1]};this.addChild=function(q){var o=g.length;for(var n=0;n<o;n++){if(g[n]==q){return}}g.push(q)}};Spry.Data.Region.ProcessingContext=function(h){this.region=h;this.dataSetContexts=[];if(h&&h.dataSets){var l=h.dataSets.slice(0);var g=l.length;for(var f=0;f<g;f++){var b=h.dataSets[f];while(b&&b.getParentDataSet){var o=false;b=b.getParentDataSet();if(b&&this.indexOf(l,b)==-1){l.push(b)}}}for(f=0;f<l.length;f++){this.dataSetContexts.push(new Spry.Data.Region.DSContext(l[f],this))}var q=this.dataSetContexts;var m=q.length;for(f=0;f<m;f++){var d=q[f];var b=d.getDataSet();if(b.getParentDataSet){var n=b.getParentDataSet();if(n){var a=this.getDataSetContext(n);if(a){a.addChild(d)}}}}}};Spry.Data.Region.ProcessingContext.prototype.indexOf=function(a,f){if(a){var b=a.length;for(var d=0;d<b;d++){if(a[d]==f){return d}}}return -1};Spry.Data.Region.ProcessingContext.prototype.getDataSetContext=function(b){if(!b){if(this.dataSetContexts.length>0){return this.dataSetContexts[0]}return null}if(typeof b=="string"){b=Spry.Data.getDataSetByName(b);if(!b){return null}}for(var a=0;a<this.dataSetContexts.length;a++){var d=this.dataSetContexts[a];if(d.getDataSet()==b){return d}}return null};Spry.Data.Region.ProcessingContext.prototype.getValueFromDataSet=function(){var g="";var f="";if(arguments.length>1){g=arguments[0];f=arguments[1]}else{var d=arguments[0].replace(/\s*{\s*|\s*}\s*/g,"");if(d.search("::")!=-1){g=d.replace(/::.*/,"");f=d.replace(/.*::/,"")}else{f=d}}var b="";var a=this.getDataSetContext(g);if(a){b=a.getValue(f,a.getCurrentRow())}else{Spry.Debug.reportError("getValueFromDataSet: Failed to get "+g+" context for the "+this.region.regionNode.id+" region.\n")}return b};Spry.Data.Region.ProcessingContext.prototype.$v=Spry.Data.Region.ProcessingContext.prototype.getValueFromDataSet;Spry.Data.Region.ProcessingContext.prototype.getCurrentRowForDataSet=function(a){var b=this.getDataSetContext(a);if(b){return b.getCurrentRow()}return null};Spry.Data.Region.Token=function(g,b,f,d){var a=this;this.tokenType=g;this.dataSet=b;this.data=f;this.regionStr=d;this.parent=null;this.children=null};Spry.Data.Region.Token.prototype.addChild=function(a){if(!a){return}if(!this.children){this.children=new Array}this.children.push(a);a.parent=this};Spry.Data.Region.Token.LIST_TOKEN=0;Spry.Data.Region.Token.STRING_TOKEN=1;Spry.Data.Region.Token.PROCESSING_INSTRUCTION_TOKEN=2;Spry.Data.Region.Token.VALUE_TOKEN=3;Spry.Data.Region.Token.PIData=function(b,d,f,g){var a=this;this.name=b;this.data=d;this.jsExpr=f;this.regionState=g};Spry.Utils.addLoadListener(function(){setTimeout(function(){if(Spry.Data.initRegionsOnLoad){Spry.Data.initRegions()}},0)});var Spry;if(!Spry){Spry={}}if(!Spry.Utils){Spry.Utils={}}Spry.$=function(b){if(arguments.length>1){for(var a=0,f=[],d=arguments.length;a<d;a++){f.push(Spry.$(arguments[a]))}return f}if(typeof b=="string"){b=document.getElementById(b)}return b};Spry.Utils.setAttribute=function(d,a,b){d=Spry.$(d);if(!d||!a){return}if(a=="class"){d.className=b}else{d.setAttribute(a,b)}};Spry.Utils.removeAttribute=function(b,a){b=Spry.$(b);if(!b||!a){return}try{b.removeAttribute(a);if(a=="class"){b.removeAttribute("className")}}catch(d){}};Spry.Utils.addClassName=function(b,a){b=Spry.$(b);if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))!=-1)){return}b.className+=(b.className?" ":"")+a};Spry.Utils.removeClassName=function(b,a){b=Spry.$(b);if(Spry.Utils.hasClassName(b,a)){b.className=b.className.replace(new RegExp("\\s*\\b"+a+"\\b","g"),"")}};Spry.Utils.toggleClassName=function(b,a){if(Spry.Utils.hasClassName(b,a)){Spry.Utils.removeClassName(b,a)}else{Spry.Utils.addClassName(b,a)}};Spry.Utils.hasClassName=function(b,a){b=Spry.$(b);if(!b||!a||!b.className||b.className.search(new RegExp("\\b"+a+"\\b"))==-1){return false}return true};Spry.Utils.camelizeString=function(h){var g="";var b=h.split("-");for(var d=0;d<b.length;d++){var f=b[d];if(f){g=g?(g+f.charAt(0).toUpperCase()+f.substring(1)):f}}return g};Spry.Utils.styleStringToObject=function(h){var g={};if(h){pvA=h.split(";");for(var b=0;b<pvA.length;b++){var f=pvA[b];if(f&&f.indexOf(":")!=-1){var d=f.split(":");var l=d[0].replace(/^\s*|\s*$/g,"");var a=d[1].replace(/^\s*|\s*$/g,"");if(l&&a){g[Spry.Utils.camelizeString(l)]=a}}}}return g};Spry.Utils.addEventListener=function(d,b,f,a){try{if(!Spry.Utils.eventListenerIsBoundToElement(d,b,f,a)){d=Spry.$(d);f=Spry.Utils.bindEventListenerToElement(d,b,f,a);if(d.addEventListener){d.addEventListener(b,f,a)}else{if(d.attachEvent){d.attachEvent("on"+b,f)}}}}catch(g){}};Spry.Utils.removeEventListener=function(d,b,f,a){try{d=Spry.$(d);f=Spry.Utils.unbindEventListenerFromElement(d,b,f,a);if(d.removeEventListener){d.removeEventListener(b,f,a)}else{if(d.detachEvent){d.detachEvent("on"+b,f)}}}catch(g){}};Spry.Utils.eventListenerHash={};Spry.Utils.nextEventListenerID=1;Spry.Utils.getHashForElementAndHandler=function(d,b,f,a){var g=null;d=Spry.$(d);if(d){if(typeof d.spryEventListenerID=="undefined"){d.spryEventListenerID="e"+(Spry.Utils.nextEventListenerID++)}if(typeof f.spryEventHandlerID=="undefined"){f.spryEventHandlerID="h"+(Spry.Utils.nextEventListenerID++)}g=d.spryEventListenerID+"-"+f.spryEventHandlerID+"-"+b+(a?"-capture":"")}return g};Spry.Utils.eventListenerIsBoundToElement=function(d,b,f,a){d=Spry.$(d);var g=Spry.Utils.getHashForElementAndHandler(d,b,f,a);return Spry.Utils.eventListenerHash[g]!=undefined};Spry.Utils.bindEventListenerToElement=function(d,b,f,a){d=Spry.$(d);var g=Spry.Utils.getHashForElementAndHandler(d,b,f,a);if(Spry.Utils.eventListenerHash[g]){return Spry.Utils.eventListenerHash[g]}return Spry.Utils.eventListenerHash[g]=function(l){l=l||window.event;if(!l.preventDefault){l.preventDefault=function(){this.returnValue=false}}if(!l.stopPropagation){l.stopPropagation=function(){this.cancelBubble=true}}var h=f.call(d,l);if(h==false){l.preventDefault();l.stopPropagation()}return h}};Spry.Utils.unbindEventListenerFromElement=function(d,b,f,a){d=Spry.$(d);var g=Spry.Utils.getHashForElementAndHandler(d,b,f,a);if(Spry.Utils.eventListenerHash[g]){f=Spry.Utils.eventListenerHash[g];Spry.Utils.eventListenerHash[g]=undefined}return f};Spry.Utils.addLoadListener=function(a){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",a,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",a,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",a)}}}};Spry.Utils.getAncestor=function(f,a){f=Spry.$(f);if(f){var d=Spry.$$.tokenizeSequence(a?a:"*")[0];var b=d?d[0]:null;if(b){var g=f.parentNode;while(g){if(b.match(g)){return g}g=g.parentNode}}}return null};Spry.$$=function(r,d){if(!d){d=document}else{d=Spry.$(d)}var o=Spry.$$.tokenizeSequence(r);var l=[];Spry.$$.addExtensions(l);++Spry.$$.queryID;var a=0;var q=o.length;for(var h=0;h<q;h++){var f=Spry.$$.processTokens(o[h],d);var s=f.length;for(var g=0;g<s;g++){var b=f[g];if(!b.spry$$ID){b.spry$$ID=++a;l.push(b)}}}var s=l.length;for(h=0;h<s;h++){l[h].spry$$ID=undefined}return l};Spry.$$.cache={};Spry.$$.queryID=0;Spry.$$.Token=function(){this.type=Spry.$$.Token.SELECTOR;this.name="*";this.id="";this.classes=[];this.attrs=[];this.pseudos=[]};Spry.$$.Token.Attr=function(b,a){this.name=b;this.value=a?new RegExp(a):undefined};Spry.$$.Token.PseudoClass=function(a){this.name=a.replace(/\(.*/,"");this.arg=a.replace(/^[^\(\)]*\(?\s*|\)\s*$/g,"");this.func=Spry.$$.pseudoFuncs[this.name]};Spry.$$.Token.SELECTOR=0;Spry.$$.Token.COMBINATOR=1;Spry.$$.Token.prototype.match=function(q,f){if(this.type==Spry.$$.Token.COMBINATOR){return false}if(!f&&this.name!="*"&&this.name!=q.nodeName.toLowerCase()){return false}if(this.id&&this.id!=q.id){return false}var g=this.classes;var m=g.length;for(var h=0;h<m;h++){if(!q.className||!g[h].value.test(q.className)){return false}}var o=this.attrs;m=o.length;for(var h=0;h<m;h++){var n=o[h];var l=q.attributes.getNamedItem(n.name);if(!l||(!n.value&&l.nodeValue==undefined)||(n.value&&!n.value.test(l.nodeValue))){return false}}var b=this.pseudos;var m=b.length;for(var h=0;h<m;h++){var d=b[h];if(d&&d.func&&!d.func(d.arg,q,this)){return false}}return true};Spry.$$.Token.prototype.getNodeNameIfTypeMatches=function(a){var b=a.nodeName.toLowerCase();if(this.name!="*"){if(this.name!=b){return null}return this.name}return b};Spry.$$.escapeRegExpCharsRE=/\/|\.|\*|\+|\(|\)|\[|\]|\{|\}|\\|\|/g;Spry.$$.tokenizeSequence=function(u){var h=Spry.$$.cache[u];if(h){return h}var v=/(\[[^\"'~\^\$\*\|\]=]+([~\^\$\*\|]?=\s*('[^']*'|"[^"]*"|[^"'\]]+))?\s*\])|((:[^\.#:\s,>~\+\[\]]+\(([^\(\)]+|\([^\(\)]*\))*\))|[\.#:]?[^\.#:\s,>~\+\[\]]+)|(\s*[\s,>~\+]\s*)/g;var g=new Spry.$$.Token;var l=[];l.push(g);var d=[];d.push(l);u=u.replace(/^\s*|\s*$/,"");var q=v.exec(u);while(q){var m=q[0];var o=m.charAt(0);switch(o){case".":g.classes.push(new Spry.$$.Token.Attr("class","\\b"+m.substr(1)+"\\b"));break;case"#":g.id=m.substr(1);break;case":":g.pseudos.push(new Spry.$$.Token.PseudoClass(m));break;case"[":var t=m.match(/\[([^\"'~\^\$\*\|\]=]+)(([~\^\$\*\|]?=)\s*('[^']*'|"[^"]*"|[^"'\]]+))?\s*\]/);var b=t[1];var a=t[3];var f=t[4];if(f){f=f.replace(/^['"]|['"]$/g,"");f=f.replace(Spry.$$.escapeRegExpCharsRE,"\\$&")}var r=undefined;switch(a){case"=":r="^"+f+"$";break;case"^=":r="^"+f;break;case"$=":r=f+"$";break;case"~=":case"|=":r="\\b"+f+"\\b";break;case"*=":r=f;break}g.attrs.push(new Spry.$$.Token.Attr(b,r));break;default:var n=m.match(/^\s*([\s,~>\+])\s*$/);if(n){if(n[1]==","){l=new Array;d.push(l);g=new Spry.$$.Token;l.push(g)}else{g=new Spry.$$.Token;g.type=Spry.$$.Token.COMBINATOR;g.name=n[1];l.push(g);g=new Spry.$$.Token();l.push(g)}}else{g.name=m.toLowerCase()}break}q=v.exec(u)}Spry.$$.cache[u]=d;return d};Spry.$$.combinatorFuncs={" ":function(a,d){var m=++Spry.$$.uniqueID;var h=[];var r=a.length;for(var l=0;l<r;l++){var b=a[l];if(m!=b.spry$$uid){var q=a[l].getElementsByTagName(d.name);var f=q.length;for(var g=0;g<f;g++){var o=q[g];if(d.match(o,true)){h.push(o)}o.spry$$uid=m}}}return h},">":function(a,f){var d=[];var h=a.length;for(var b=0;b<h;b++){var g=a[b].firstChild;while(g){if(g.nodeType==1&&f.match(g)){d.push(g)}g=g.nextSibling}}return d},"+":function(a,f){var d=[];var h=a.length;for(var b=0;b<h;b++){var g=a[b].nextSibling;while(g&&g.nodeType!=1){g=g.nextSibling}if(g&&f.match(g)){d.push(g)}}return d},"~":function(a,g){var f=++Spry.$$.uniqueID;var d=[];var l=a.length;for(var b=0;b<l;b++){var h=a[b].nextSibling;while(h){if(h.nodeType==1){if(f==h.spry$$uid){break}if(g.match(h)){d.push(h);h.spry$$uid=f}}h=h.nextSibling}}return d}};Spry.$$.uniqueID=0;Spry.$$.pseudoFuncs={":first-child":function(a,d,b){var f=d.previousSibling;while(f){if(f.nodeType==1){return false}f=f.previousSibling}return true},":last-child":function(a,d,b){var f=d.nextSibling;while(f){if(f.nodeType==1){return false}f=f.nextSibling}return true},":empty":function(a,d,b){var f=d.firstChild;while(f){switch(f.nodeType){case 1:case 3:case 4:case 5:return false}f=f.nextSibling}return true},":nth-child":function(a,d,b){return Spry.$$.nthChild(a,d,b)},":nth-last-child":function(a,d,b){return Spry.$$.nthChild(a,d,b,true)},":nth-of-type":function(a,d,b){return Spry.$$.nthChild(a,d,b,false,true)},":nth-last-of-type":function(a,d,b){return Spry.$$.nthChild(a,d,b,true,true)},":first-of-type":function(a,d,b){var g=b.getNodeNameIfTypeMatches(d);if(!g){return false}var f=d.previousSibling;while(f){if(f.nodeType==1&&g==f.nodeName.toLowerCase()){return false}f=f.previousSibling}return true},":last-of-type":function(a,d,b){var g=b.getNodeNameIfTypeMatches(d);if(!g){return false}var f=d.nextSibling;while(f){if(f.nodeType==1&&g==f.nodeName.toLowerCase()){return false}f=f.nextSibling}return true},":only-child":function(a,d,b){var g=Spry.$$.pseudoFuncs;return g[":first-child"](a,d,b)&&g[":last-child"](a,d,b)},":only-of-type":function(a,d,b){var g=Spry.$$.pseudoFuncs;return g[":first-of-type"](a,d,b)&&g[":last-of-type"](a,d,b)},":not":function(a,g,d){var f=Spry.$$.tokenizeSequence(a)[0];var b=f?f[0]:null;return !b||!b.match(g)},":enabled":function(a,d,b){return !d.disabled},":disabled":function(a,d,b){return d.disabled},":checked":function(a,d,b){return d.checked},":root":function(a,d,b){return d.parentNode&&d.ownerDocument&&d.parentNode==d.ownerDocument}};Spry.$$.nthRegExp=/((-|[0-9]+)?n)?([+-]?[0-9]*)/;Spry.$$.nthCache={even:{a:2,b:0,mode:1,invalid:false},odd:{a:2,b:1,mode:1,invalid:false},"2n":{a:2,b:0,mode:1,invalid:false},"2n+1":{a:2,b:1,mode:1,invalid:false}};Spry.$$.parseNthChildString=function(r){var q=Spry.$$.nthCache[r];if(!q){var f=r.match(Spry.$$.nthRegExp);var s=f[1];var g=f[2];var d=f[3];if(!g){g=s?1:0}else{if(g=="-"){g=-1}else{g=parseInt(g,10)}}d=d?parseInt(d,10):0;var l=(g==0)?0:((g>0)?1:-1);var h=false;if(g>0&&d<0){d=d%g;d=((d=(d%g))<0)?g+d:d}else{if(g<0){if(d<0){h=true}else{g=Math.abs(g)}}}q=new Object;q.a=g;q.b=d;q.mode=l;q.invalid=h;Spry.$$.nthCache[r]=q}return q};Spry.$$.nthChild=function(t,d,f,m,s){if(s){var q=f.getNodeNameIfTypeMatches(d);if(!q){return false}}var b=Spry.$$.parseNthChildString(t);if(b.invalid){return false}var g="spry$$ncQueryID";var a="spry$$ncPos";var h="spry$$ncCount";if(s){g+=q;a+=q;h+=q}var r=d.parentNode;if(r[g]!=Spry.$$.queryID){var n=0;r[g]=Spry.$$.queryID;var l=r.firstChild;while(l){if(l.nodeType==1&&(!s||q==l.nodeName.toLowerCase())){l[a]=++n}l=l.nextSibling}r[h]=n}n=d[a];if(m){n=r[h]-n+1}if(b.mode==0){return n==b.b}if(b.mode>0){return(n<b.b)?false:(!((n-b.b)%b.a))}return(n>b.b)?false:(!((b.b-n)%b.a))};Spry.$$.processTokens=function(g,a){var f=g.length;var h=[a];var l=null;for(var d=0;d<f&&h.length>0;d++){var b=g[d];if(b.type==Spry.$$.Token.SELECTOR){if(l){h=l(h,b);l=null}else{h=Spry.$$.getMatchingElements(h,b)}}else{l=Spry.$$.combinatorFuncs[b.name]}}return h};Spry.$$.getMatchingElements=function(a,d){var h=[];if(d.id){b=a[0];if(b&&b.ownerDocument){var m=b.ownerDocument.getElementById(d.id);if(m){if(d.match(m)){h.push(m)}}return h}}var q=a.length;for(var l=0;l<q;l++){var b=a[l];var o=b.getElementsByTagName(d.name);var f=o.length;for(var g=0;g<f;g++){var m=o[g];if(d.match(m,true)){h.push(m)}}}return h};Spry.$$.addExtensions=function(b){for(var d in Spry.$$.Results){b[d]=Spry.$$.Results[d]}};Spry.$$.Results={};Spry.$$.Results.forEach=function(b){var d=this.length;for(var a=0;a<d;a++){b(this[a])}return this};Spry.$$.Results.setAttribute=function(a,b){return this.forEach(function(d){Spry.Utils.setAttribute(d,a,b)})};Spry.$$.Results.removeAttribute=function(a){return this.forEach(function(b){Spry.Utils.removeAttribute(b,a)})};Spry.$$.Results.addClassName=function(a){return this.forEach(function(b){Spry.Utils.addClassName(b,a)})};Spry.$$.Results.removeClassName=function(a){return this.forEach(function(b){Spry.Utils.removeClassName(b,a)})};Spry.$$.Results.toggleClassName=function(a){return this.forEach(function(b){Spry.Utils.toggleClassName(b,a)})};Spry.$$.Results.addEventListener=function(b,f,a,d){return this.forEach(function(g){Spry.Utils.addEventListener(g,b,f,a,d)})};Spry.$$.Results.removeEventListener=function(b,d,a){return this.forEach(function(f){Spry.Utils.removeEventListener(f,b,d,a)})};Spry.$$.Results.setStyle=function(a){if(a){a=Spry.Utils.styleStringToObject(a);this.forEach(function(f){for(var d in a){try{f.style[d]=a[d]}catch(b){}}})}return this};Spry.$$.Results.setProperty=function(d,a){if(d){if(typeof d=="string"){var b={};b[d]=a;d=b}this.forEach(function(h){for(var g in d){try{h[g]=d[g]}catch(f){}}})}return this};var Spry;if(!Spry){Spry={}}if(!Spry.Utils){Spry.Utils={}}Spry.Utils.DOMreadyCallback=[];Spry.Utils.DOMTimer;Spry.Utils.DOMready;Spry.Utils.onDOMReady=function(g){if(Spry.Utils.DOMreadyCallback.length==0){var f=navigator.userAgent.toString();var d=/MSIE.([0-9\.]*)/i;var a=/WebKit/i;var b=function(){if(!Spry.Utils.DOMready){Spry.Utils.DOMCallback()}};if(document.readyState&&f.match(d)){document.write("<script id='DOMReady' defer=true src=//:><\/script>");Spry.$("DOMReady").onreadystatechange=function(){if(this.readyState=="complete"&&(!Spry.Utils.DOMready)){Spry.Utils.DOMCallback()}}}else{if(document.readyState&&f.match(a)){Spry.Utils.DOMTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){Spry.Utils.DOMCallback()}},10)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("DOMContentLoaded",b,false)}else{window.setTimeout(Spry.Utils.DOMCallback,0)}}}Spry.Utils.addLoadListener(b)}Spry.Utils.DOMreadyCallback.push(g)};Spry.Utils.DOMCallback=function(){if(Spry.Utils.DOMready==true){return}Spry.Utils.DOMready=true;if(Spry.Utils.DOMTimer){clearInterval(Spry.Utils.DOMTimer)}for(i=0;i<Spry.Utils.DOMreadyCallback.length;i++){Spry.Utils.DOMreadyCallback[i]()}Spry.Utils.DOMreadyCallback=null};var Spry;if(!Spry){Spry={}}if(!Spry.Utils){Spry.Utils={}}Spry.Utils.urlComponentToObject=function(m,h,l){var b=new Object;if(m){if(!h){h="&"}if(!l){l="="}var f=m.split(h);for(var g=0;g<f.length;g++){var q=f[g].split(l);var d=decodeURIComponent(q[0]?q[0]:"");var r=decodeURIComponent(q[1]?q[1]:"");if(r.match(/^0$|^[1-9]\d*$/)){r=parseInt(r)}if(typeof b[d]=="undefined"){b[d]=r}else{if(typeof b[d]!="object"){var s=b[d];b[d]=new Array;b[d].push(s)}b[d].push(r)}}}return b};Spry.Utils.getLocationHashParamsAsObject=function(a,b){return Spry.Utils.urlComponentToObject(window.location.hash.replace(/^#/,""),a,b)};Spry.Utils.getLocationParamsAsObject=function(){return Spry.Utils.urlComponentToObject(window.location.search.replace(/^\?/,""))};Spry.Utils.getURLHashParamsAsObject=function(a,d,f){var b;if(a&&(b=a.search("#"))>=0){return Spry.Utils.urlComponentToObject(a.substr(b+1),d,f)}return new Object};Spry.Utils.getURLParamsAsObject=function(a){var b;if(a&&(b=a.match(/\?[^#]*/))&&b){return Spry.Utils.urlComponentToObject(b[0].replace(/^\?/,""))}return new Object};Spry.Data.HTMLDataSet=function(a,b,d){this.sourceElementID=b;this.sourceElement=null;this.sourceWasInitialized=false;this.usesExternalFile=(a!=null)?true:false;this.firstRowAsHeaders=true;this.useColumnsAsRows=false;this.columnNames=null;this.hideDataSourceElement=true;this.rowSelector=null;this.dataSelector=null;this.tableModeEnabled=true;Spry.Data.HTTPSourceDataSet.call(this,a,d)};Spry.Data.HTMLDataSet.prototype=new Spry.Data.HTTPSourceDataSet();Spry.Data.HTMLDataSet.prototype.constructor=Spry.Data.HTMLDataSet;Spry.Data.HTMLDataSet.prototype.getDataRefStrings=function(){var a=[];if(this.url){a.push(this.url)}if(typeof this.sourceElementID=="string"){a.push(this.sourceElementID)}return a};Spry.Data.HTMLDataSet.prototype.setDisplay=function(a,b){if(a){a.style.display=b}};Spry.Data.HTMLDataSet.prototype.initDataSource=function(a){if(!this.loadDependentDataSets()){return}if(!this.usesExternalFile){this.setSourceElement();if(this.hideDataSourceElement){this.setDisplay(this.sourceElement,"none")}}};Spry.Data.HTMLDataSet.prototype.setSourceElement=function(f){this.sourceElement=null;if(!this.sourceElementID){if(f){this.sourceElement=f}else{this.hideDataSourceElement=false;this.sourceElement=document.body}return}var d=Spry.Data.Region.processDataRefString(null,this.sourceElementID,this.dataSetsForDataRefStrings);if(!this.usesExternalFile){this.sourceElement=Spry.$(d)}else{if(f){var b=false;var a=Spry.Utils.getNodesByFunc(f,function(g){if(b){return false}if(g.nodeType!=1){return false}if(g.id&&g.id.toLowerCase()==d.toLowerCase()){b=true;return true}});this.sourceElement=a[0]}}if(!this.sourceElement){Spry.Debug.reportError("Spry.Data.HTMLDataSet: '"+d+"' is not a valid element ID")}};Spry.Data.HTMLDataSet.prototype.getSourceElement=function(){return this.sourceElement};Spry.Data.HTMLDataSet.prototype.getSourceElementID=function(){return this.sourceElementID};Spry.Data.HTMLDataSet.prototype.setSourceElementID=function(a){if(this.sourceElementID!=a){this.sourceElementID=a;this.recalculateDataSetDependencies();this.dataWasLoaded=false}};Spry.Data.HTMLDataSet.prototype.getDataSelector=function(){return this.dataSelector};Spry.Data.HTMLDataSet.prototype.setDataSelector=function(a){if(this.dataSelector!=a){this.dataSelector=a;this.dataWasLoaded=false}};Spry.Data.HTMLDataSet.prototype.getRowSelector=function(){return this.rowSelector};Spry.Data.HTMLDataSet.prototype.setRowSelector=function(a){if(this.rowSelector!=a){this.rowSelector=a;this.dataWasLoaded=false}};Spry.Data.HTMLDataSet.prototype.loadDataIntoDataSet=function(b){var d=b;d=Spry.Data.HTMLDataSet.cleanupSource(d);var f=document.createElement("div");f.id="htmlsource"+this.internalID;f.innerHTML=d;this.setSourceElement(f);if(this.sourceElement){var a=this.getDataFromSourceElement();if(a){this.dataHash=a.dataHash;this.data=a.data}}this.dataWasLoaded=true;f=null};Spry.Data.HTMLDataSet.prototype.loadDependentDataSets=function(){if(this.hasDataRefStrings){var a=true;for(var b=0;b<this.dataSetsForDataRefStrings.length;b++){var d=this.dataSetsForDataRefStrings[b];if(d.getLoadDataRequestIsPending()){a=false}else{if(!d.getDataWasLoaded()){d.loadData();a=false}}}if(!a){return false}}return true};Spry.Data.HTMLDataSet.prototype.loadData=function(){this.cancelLoadData();this.initDataSource();var b=this;if(!this.usesExternalFile){this.notifyObservers("onPreLoad");this.dataHash=new Object;this.data=new Array;this.dataWasLoaded=false;this.unfilteredData=null;this.curRowID=0;this.pendingRequest=new Object;this.pendingRequest.timer=setTimeout(function(){b.pendingRequest=null;var g=b.getDataFromSourceElement();if(g){b.dataHash=g.dataHash;b.data=g.data}b.dataWasLoaded=true;b.disableNotifications();b.filterAndSortData();b.enableNotifications();b.notifyObservers("onPostLoad");b.notifyObservers("onDataChanged")},0)}else{var d=Spry.Data.Region.processDataRefString(null,this.url,this.dataSetsForDataRefStrings);var a=this.requestInfo.postData;if(a&&(typeof a)=="string"){a=Spry.Data.Region.processDataRefString(null,a,this.dataSetsForDataRefStrings)}this.notifyObservers("onPreLoad");this.dataHash=new Object;this.data=new Array;this.dataWasLoaded=false;this.unfilteredData=null;this.curRowID=0;var f=this.requestInfo.clone();f.url=d;f.postData=a;this.pendingRequest=new Object;this.pendingRequest.data=Spry.Data.HTTPSourceDataSet.LoadManager.loadData(f,this,this.useCache)}};Spry.Data.HTMLDataSet.cleanupSource=function(a){a=a.replace(/<(img|script|link|frame|iframe|input)([^>]+)>/gi,function(f,d,g){return"<"+d+g.replace(/\b(src|href)\s*=/gi,function(l,h){return"spry_"+h+"="})+">"});return a};Spry.Data.HTMLDataSet.undoCleanupSource=function(a){a=a.replace(/<(img|script|link|frame|iframe|input)([^>]+)>/gi,function(f,d,g){return"<"+d+g.replace(/\bspry_(src|href)\s*=/gi,function(l,h){return h+"="})+">"});return a};Spry.Data.HTMLDataSet.normalizeColumnName=function(a){a=a.replace(/(?:^[\s\t]+|[\s\t]+$)/gi,"");a=a.replace(/<\/?([a-z]+)([^>]+)>/gi,"");a=a.replace(/[\s\t]+/gi,"_");return a};Spry.Data.HTMLDataSet.prototype.getDataFromSourceElement=function(){if(!this.sourceElement){return null}var h;var r=(this.tableModeEnabled&&this.sourceElement.nodeName.toLowerCase()=="table");if(r){h=this.getDataFromHTMLTable()}else{h=this.getDataFromNestedStructure()}if(!h){return null}if(this.useColumnsAsRows){var m=new Array;for(var b=0;b<h.length;b++){var s=h[b];for(var a=0;a<s.length;a++){if(!m[a]){m[a]=new Array}m[a][b]=s[a]}}h=m}var d=new Object();d.dataHash=new Object;d.data=new Array;if(h.length==0){return d}var q=new Array;var n=h[0];for(var a=0;a<n.length;a++){if(r&&this.firstRowAsHeaders){q[a]=Spry.Data.HTMLDataSet.normalizeColumnName(n[a])}else{q[a]="column"+a}}if(this.columnNames&&this.columnNames.length){if(this.columnNames.length<q.length){Spry.Debug.reportError("Too few elements in the columnNames array. The columNames length must match the actual number of columns.")}else{for(var g=0;g<q.length;g++){if(this.columnNames[g]){q[g]=this.columnNames[g]}}}}var l=0;var f=(r&&this.firstRowAsHeaders)?1:0;for(var b=f;b<h.length;b++){var s=h[b];if(q.length!=s.length){Spry.Debug.reportError("Unbalanced column names for row #"+(b+1)+". Skipping row.");continue}var o={};for(var a=0;a<s.length;a++){o[q[a]]=s[a]}o.ds_RowID=l++;d.dataHash[o.ds_RowID]=o;d.data.push(o)}return d};Spry.Data.HTMLDataSet.getElementChildren=function(b){var a=[];var d=b.firstChild;while(d){if(d.nodeType==1){a.push(d)}d=d.nextSibling}return a};Spry.Data.HTMLDataSet.prototype.getDataFromHTMLTable=function(){var b=this.sourceElement.tHead;var o=this.sourceElement.tBodies[0];var t=[];var w=[];if(b){t=Spry.Data.HTMLDataSet.getElementChildren(b)}if(o){w=Spry.Data.HTMLDataSet.getElementChildren(o)}var y=new Array;var u=t.concat(w);if(this.rowSelector){u=Spry.Data.HTMLDataSet.applySelector(u,this.rowSelector)}for(var f=0;f<u.length;f++){var s=u[f];var v;if(y[f]){v=y[f]}else{v=new Array}var q=0;var m=s.cells;if(this.dataSelector){m=Spry.Data.HTMLDataSet.applySelector(m,this.dataSelector)}for(var a=0;a<m.length;a++){var d=m[a];var r=a+q;while(v[r]){q++;r++}var z=Spry.Data.HTMLDataSet.undoCleanupSource(d.innerHTML);v[r]=z;var h=d.colSpan;if(h==0){h=1}var A=q;for(var x=1;x<h;x++){q++;r=a+q;v[r]=z}var B=d.rowSpan;if(B==0){B=1}for(var g=1;g<B;g++){nextRowIndex=f+g;var l;if(y[nextRowIndex]){l=y[nextRowIndex]}else{l=new Array}var n=A;for(var x=0;x<h;x++){r=a+n;l[r]=z;n++}y[nextRowIndex]=l}}y[f]=v}return y};Spry.Data.HTMLDataSet.prototype.getDataFromNestedStructure=function(){var d=new Array;if(this.sourceElementID&&!this.rowSelector&&!this.dataSelector){d[0]=[Spry.Data.HTMLDataSet.undoCleanupSource(this.sourceElement.innerHTML)];return d}var a=this;var h=[];if(!this.rowSelector){h=[this.sourceElement]}else{h=Spry.Utils.getNodesByFunc(this.sourceElement,function(m){return Spry.Data.HTMLDataSet.evalSelector(m,a.sourceElement,a.rowSelector)})}for(var g=0;g<h.length;g++){var l=h[g];var b=[];if(!this.dataSelector){b=[l]}else{b=Spry.Utils.getNodesByFunc(l,function(m){return Spry.Data.HTMLDataSet.evalSelector(m,l,a.dataSelector)})}d[g]=new Array;for(var f=0;f<b.length;f++){d[g][f]=Spry.Data.HTMLDataSet.undoCleanupSource(b[f].innerHTML)}}return d};Spry.Data.HTMLDataSet.applySelector=function(h,b,d){var f=[];for(var a=0;a<h.length;a++){var g=h[a];if(Spry.Data.HTMLDataSet.evalSelector(g,d?d:g.parentNode,b)){f.push(g)}}return f};Spry.Data.HTMLDataSet.evalSelector=function(f,n,g){if(f.nodeType!=1){return false}if(f==n){return false}var q=g.split(",");for(var o=0;o<q.length;o++){var a=q[o].replace(/^\s+/,"").replace(/\s+$/,"");var d=null;var m=null;var b=null;var l=true;if(a.substring(0,1)==">"){if(f.parentNode!=n){l=false}else{a=a.substring(1).replace(/^\s+/,"")}}if(l){d=a.toLowerCase();if(a.indexOf(".")!=-1){var h=a.split(".");d=h[0];m=h[1]}else{if(a.indexOf("#")!=-1){var h=a.split("#");d=h[0];b=h[1]}}}if(l&&d!=""&&d!="*"){if(f.nodeName.toLowerCase()!=d){l=false}}if(l&&b&&f.id!=b){l=false}if(l&&m&&f.className.search(new RegExp("\\b"+m+"\\b","i"))==-1){l=false}if(l){return true}}return false};var Spry;if(!Spry){Spry={}}Spry.forwards=1;Spry.backwards=2;if(!Spry.Effect){Spry.Effect={}}Spry.Effect.Transitions={linearTransition:function(d,a,f,b){if(d>b){return f+a}return a+(d/b)*f},sinusoidalTransition:function(d,a,f,b){if(d>b){return f+a}return a+((-Math.cos((d/b)*Math.PI)/2)+0.5)*f},squareTransition:function(d,a,f,b){if(d>b){return f+a}return a+Math.pow(d/b,2)*f},squarerootTransition:function(d,a,f,b){if(d>b){return f+a}return a+Math.sqrt(d/b)*f},fifthTransition:function(d,a,f,b){if(d>b){return f+a}return a+Math.sqrt((-Math.cos((d/b)*Math.PI)/2)+0.5)*f},circleTransition:function(d,a,g,b){if(d>b){return g+a}var f=d/b;return a+Math.sqrt(1-Math.pow((f-1),2))*g},pulsateTransition:function(d,a,f,b){if(d>b){return f+a}return a+(0.5+Math.sin(17*d/b)/2)*f},growSpecificTransition:function(d,a,g,b){if(d>b){return g+a}var f=d/b;return a+(5*Math.pow(f,3)-6.4*Math.pow(f,2)+2*f)*g}};for(var trans in Spry.Effect.Transitions){Spry[trans]=Spry.Effect.Transitions[trans]}Spry.Effect.Registry=function(){this.effects=[]};Spry.Effect.Registry.prototype.getRegisteredEffect=function(g,d){var b={};b.element=Spry.Effect.getElement(g);b.options=d;for(var f=0;f<this.effects.length;f++){if(this.effectsAreTheSame(this.effects[f],b)){return this.effects[f].effect}}return false};Spry.Effect.Registry.prototype.addEffect=function(g,d,b){if(!this.getRegisteredEffect(d,b)){var a=this.effects.length;this.effects[a]={};var f=this.effects[a];f.effect=g;f.element=Spry.Effect.getElement(d);f.options=b}};Spry.Effect.Registry.prototype.effectsAreTheSame=function(b,a){if(b.element!=a.element){return false}var d=Spry.Effect.Utils.optionsAreIdentical(b.options,a.options);if(d){if(typeof a.options.setup=="function"){b.options.setup=a.options.setup}if(typeof a.options.finish=="function"){b.options.finish=a.options.finish}}return d};var SpryRegistry=new Spry.Effect.Registry;if(!Spry.Effect.Utils){Spry.Effect.Utils={}}Spry.Effect.Utils.showError=function(a){alert("Spry.Effect ERR: "+a)};Spry.Effect.Utils.showInitError=function(a){Spry.Effect.Utils.showError("The "+a+" class can't be accessed as a static function anymore. \nPlease read Spry Effects migration documentation.");return false};Spry.Effect.Utils.Position=function(){this.x=0;this.y=0;this.units="px"};Spry.Effect.Utils.Rectangle=function(){this.width=0;this.height=0;this.units="px"};Spry.Effect.Utils.intToHex=function(b){var a=b.toString(16);if(a.length==1){a="0"+a}return a};Spry.Effect.Utils.hexToInt=function(a){return parseInt(a,16)};Spry.Effect.Utils.rgb=function(d,g,f){var b=Spry.Effect.Utils.intToHex;var h=b(d);var a=b(g);var l=b(f);compositeColorHex=h.concat(a,l).toUpperCase();compositeColorHex="#"+compositeColorHex;return compositeColorHex};Spry.Effect.Utils.longColorVersion=function(a){if(a.match(/^#[0-9a-f]{3}$/i)){var d=a.split("");var a="#";for(var b=1;b<d.length;b++){a+=d[b]+""+d[b]}}return a};Spry.Effect.Utils.camelize=function(a){if(a.indexOf("-")==-1){return a}var g=a.split("-");var b=true;var d="";for(var f=0;f<g.length;f++){if(g[f].length>0){if(b){d=g[f];b=false}else{var h=g[f];d+=h.charAt(0).toUpperCase()+h.substring(1)}}}return d};Spry.Effect.Utils.isPercentValue=function(b){var a=false;if(typeof b=="string"&&b.length>0&&b.lastIndexOf("%")>0){a=true}return a};Spry.Effect.Utils.getPercentValue=function(b){var a=0;try{a=Number(b.substring(0,b.lastIndexOf("%")))}catch(d){Spry.Effect.Utils.showError("Spry.Effect.Utils.getPercentValue: "+d)}return a};Spry.Effect.Utils.getPixelValue=function(d){var a=0;if(typeof d=="number"){return d}var b=d.lastIndexOf("px");if(b==-1){b=d.length}try{a=parseInt(d.substring(0,b),10)}catch(f){}return a};Spry.Effect.Utils.getFirstChildElement=function(b){if(b){var a=b.firstChild;while(a){if(a.nodeType==1){return a}a=a.nextSibling}}return null};Spry.Effect.Utils.fetchChildImages=function(b,g){if(!b||b.nodeType!=1||!g){return}if(b.hasChildNodes()){var a=b.getElementsByTagName("img");var f=a.length;for(var d=0;d<f;d++){var l=a[d];var h=Spry.Effect.getDimensions(l);g.push([l,h.width,h.height])}}};Spry.Effect.Utils.optionsAreIdentical=function(g,f){if(g==null&&f==null){return true}if(g!=null&&f!=null){var d=0;var b=0;for(var n in g){d++}for(var m in f){b++}if(d!=b){return false}for(var a in g){var l=typeof g[a];var h=typeof f[a];if(l!=h||(l!="undefined"&&g[a]!=f[a])){return false}}return true}return false};Spry.Effect.Utils.DoEffect=function(b,f,d){if(!d){var d={}}d.name=b;var a=SpryRegistry.getRegisteredEffect(f,d);if(!a){a=new Spry.Effect[b](f,d);SpryRegistry.addEffect(a,f,d)}a.start();return true};if(!Spry.Utils){Spry.Utils={}}Spry.Utils.Notifier=function(){this.observers=[];this.suppressNotifications=0};Spry.Utils.Notifier.prototype.addObserver=function(b){if(!b){return}var a=this.observers.length;for(var d=0;d<a;d++){if(this.observers[d]==b){return}}this.observers[a]=b};Spry.Utils.Notifier.prototype.removeObserver=function(a){if(!a){return}for(var b=0;b<this.observers.length;b++){if(this.observers[b]==a){this.observers.splice(b,1);break}}};Spry.Utils.Notifier.prototype.notifyObservers=function(b,f){if(!b){return}if(!this.suppressNotifications){var a=this.observers.length;for(var d=0;d<a;d++){var g=this.observers[d];if(g){if(typeof g=="function"){g(b,this,f)}else{if(g[b]){g[b](this,f)}}}}}};Spry.Utils.Notifier.prototype.enableNotifications=function(){if(--this.suppressNotifications<0){this.suppressNotifications=0;Spry.Effect.Utils.showError("Unbalanced enableNotifications() call!\n")}};Spry.Utils.Notifier.prototype.disableNotifications=function(){++this.suppressNotifications};Spry.Effect.getElement=function(b){var a=b;if(typeof b=="string"){a=document.getElementById(b)}if(a==null){Spry.Effect.Utils.showError('Element "'+b+'" not found.')}return a};Spry.Effect.getStyleProp=function(b,h){var f;var d=Spry.Effect.Utils.camelize(h);try{if(b.style){f=b.style[d]}if(!f){if(document.defaultView&&document.defaultView.getComputedStyle){var a=document.defaultView.getComputedStyle(b,null);f=a?a.getPropertyValue(h):null}else{if(b.currentStyle){f=b.currentStyle[d]}}}}catch(g){Spry.Effect.Utils.showError("Spry.Effect.getStyleProp: "+g)}return f=="auto"?null:f};Spry.Effect.setStyleProp=function(a,f,b){try{a.style[Spry.Effect.Utils.camelize(f)]=b}catch(d){Spry.Effect.Utils.showError("Spry.Effect.setStyleProp: "+d)}};Spry.Effect.getStylePropRegardlessOfDisplayState=function(d,l,g){var h=g?g:d;var f=Spry.Effect.getStyleProp(h,"display");var b=Spry.Effect.getStyleProp(h,"visibility");if(f=="none"){Spry.Effect.setStyleProp(h,"visibility","hidden");Spry.Effect.setStyleProp(h,"display","block");if(window.opera){h.focus()}}var a=Spry.Effect.getStyleProp(d,l);if(f=="none"){Spry.Effect.setStyleProp(h,"display","none");Spry.Effect.setStyleProp(h,"visibility",b)}return a};Spry.Effect.makePositioned=function(a){var b=Spry.Effect.getStyleProp(a,"position");if(!b||b=="static"){a.style.position="relative";if(window.opera){a.style.top=0;a.style.left=0}}};Spry.Effect.isInvisible=function(d){var a=Spry.Effect.getStyleProp(d,"display");if(a&&a.toLowerCase()=="none"){return true}var b=Spry.Effect.getStyleProp(d,"visibility");if(b&&b.toLowerCase()=="hidden"){return true}return false};Spry.Effect.enforceVisible=function(d){var a=Spry.Effect.getStyleProp(d,"display");if(a&&a.toLowerCase()=="none"){Spry.Effect.setStyleProp(d,"display","block")}var b=Spry.Effect.getStyleProp(d,"visibility");if(b&&b.toLowerCase()=="hidden"){Spry.Effect.setStyleProp(d,"visibility","visible")}};Spry.Effect.makeClipping=function(b){var f=Spry.Effect.getStyleProp(b,"overflow");if(!f||(f.toLowerCase()!="hidden"&&f.toLowerCase()!="scroll")){var a=0;var d=/MSIE 7.0/.test(navigator.userAgent)&&/Windows NT/.test(navigator.userAgent);if(d){a=Spry.Effect.getDimensionsRegardlessOfDisplayState(b).height}Spry.Effect.setStyleProp(b,"overflow","hidden");if(d){Spry.Effect.setStyleProp(b,"height",a+"px")}}};Spry.Effect.cleanWhitespace=function(b){var g=b.childNodes.length;for(var a=g-1;a>=0;a--){var d=b.childNodes[a];if(d.nodeType==3&&!/\S/.test(d.nodeValue)){try{b.removeChild(d)}catch(f){Spry.Effect.Utils.showError("Spry.Effect.cleanWhitespace: "+f)}}}};Spry.Effect.getComputedStyle=function(a){return/MSIE/.test(navigator.userAgent)?a.currentStyle:document.defaultView.getComputedStyle(a,null)};Spry.Effect.getDimensions=function(b){var f=new Spry.Effect.Utils.Rectangle;var a=null;if(b.style.width&&/px/i.test(b.style.width)){f.width=parseInt(b.style.width,10)}else{a=Spry.Effect.getComputedStyle(b);var d=a&&a.width&&/px/i.test(a.width);if(d){f.width=parseInt(a.width,10)}if(!d||f.width==0){f.width=b.offsetWidth}}if(b.style.height&&/px/i.test(b.style.height)){f.height=parseInt(b.style.height,10)}else{if(!a){a=Spry.Effect.getComputedStyle(b)}var d=a&&a.height&&/px/i.test(a.height);if(d){f.height=parseInt(a.height,10)}if(!d||f.height==0){f.height=b.offsetHeight}}return f};Spry.Effect.getDimensionsRegardlessOfDisplayState=function(b,g){var h=g?g:b;var f=Spry.Effect.getStyleProp(h,"display");var a=Spry.Effect.getStyleProp(h,"visibility");if(f=="none"){Spry.Effect.setStyleProp(h,"visibility","hidden");Spry.Effect.setStyleProp(h,"display","block");if(window.opera){h.focus()}}var d=Spry.Effect.getDimensions(b);if(f=="none"){Spry.Effect.setStyleProp(h,"display","none");Spry.Effect.setStyleProp(h,"visibility",a)}return d};Spry.Effect.getOpacity=function(a){var b=Spry.Effect.getStyleProp(a,"opacity");if(typeof b=="undefined"||b==null){b=1}return b};Spry.Effect.getBgColor=function(a){return Spry.Effect.getStyleProp(a,"background-color")};Spry.Effect.intPropStyle=function(b,d){var a=parseInt(Spry.Effect.getStyleProp(b,d),10);if(isNaN(a)){return 0}return a};Spry.Effect.getPosition=function(d){var a=new Spry.Effect.Utils.Position;var b=null;if(d.style.left&&/px/i.test(d.style.left)){a.x=parseInt(d.style.left,10)}else{b=Spry.Effect.getComputedStyle(d);var f=b&&b.left&&/px/i.test(b.left);if(f){a.x=parseInt(b.left,10)}if(!f||a.x==0){a.x=d.offsetLeft}}if(d.style.top&&/px/i.test(d.style.top)){a.y=parseInt(d.style.top,10)}else{if(!b){b=Spry.Effect.getComputedStyle(d)}var f=b&&b.top&&/px/i.test(b.top);if(f){a.y=parseInt(b.top,10)}if(!f||a.y==0){a.y=d.offsetTop}}return a};Spry.Effect.getOffsetPosition=Spry.Effect.getPosition;Spry.Effect.Animator=function(b){Spry.Utils.Notifier.call(this);this.name="Animator";this.element=null;this.startMilliseconds=0;this.repeat="none";this.isRunning=false;this.timer=null;this.cancelRemaining=0;if(!b){var b={}}if(b.toggle){this.direction=false}else{this.direction=Spry.forwards}var a=this;if(b.setup!=null){this.addObserver({onPreEffect:function(){try{a.options.setup(a.element,a)}catch(d){Spry.Effect.Utils.showError("Spry.Effect.Animator.prototype.start: setup callback: "+d)}}})}if(b.finish!=null){this.addObserver({onPostEffect:function(){try{a.options.finish(a.element,a)}catch(d){Spry.Effect.Utils.showError("Spry.Effect.Animator.prototype.stop: finish callback: "+d)}}})}this.options={duration:1000,toggle:false,transition:Spry.linearTransition,interval:16};this.setOptions(b);if(b.transition){this.setTransition(b.transition)}if(b.fps){this.setFps(b.fps)}};Spry.Effect.Animator.prototype=new Spry.Utils.Notifier();Spry.Effect.Animator.prototype.constructor=Spry.Utils.Animator;Spry.Effect.Animator.prototype.notStaticAnimator=true;Spry.Effect.Animator.prototype.setOptions=function(a){if(!a){return}for(var b in a){this.options[b]=a[b]}};Spry.Effect.Animator.prototype.setTransition=function(d){if(typeof d=="number"||d=="1"||d=="2"){switch(parseInt(d,10)){case 1:d=Spry.linearTransition;break;case 2:d=Spry.sinusoidalTransition;break;default:Spry.Effect.Utils.showError("unknown transition")}}else{if(typeof d=="string"){if(typeof window[d]=="function"){d=window[d]}else{if(typeof Spry[d]=="function"){d=Spry[d]}else{Spry.Effect.Utils.showError("unknown transition")}}}}this.options.transition=d;if(typeof this.effectsArray!="undefined"){var a=this.effectsArray.length;for(var b=0;b<a;b++){this.effectsArray[b].effect.setTransition(d)}}};Spry.Effect.Animator.prototype.setDuration=function(d){this.options.duration=d;if(typeof this.effectsArray!="undefined"){var a=this.effectsArray.length;for(var b=0;b<a;b++){this.effectsArray[b].effect.setDuration(d)}}};Spry.Effect.Animator.prototype.setFps=function(d){this.options.interval=parseInt(1000/d,10);this.options.fps=d;if(typeof this.effectsArray!="undefined"){var a=this.effectsArray.length;for(var b=0;b<a;b++){this.effectsArray[b].effect.setFps(d)}}};Spry.Effect.Animator.prototype.start=function(g){if(!this.element){return}if(arguments.length==0){g=false}if(this.isRunning){this.cancel()}this.prepareStart();var f=new Date();this.startMilliseconds=f.getTime();if(this.element.id){this.element=document.getElementById(this.element.id)}if(this.cancelRemaining!=0&&this.options.toggle){if(this.cancelRemaining<1&&typeof this.options.transition=="function"){var d=0;var b=this.options.duration;var a=0;var h=1;var l=0;this.cancelRemaining=Math.round(this.cancelRemaining*1000)/1000;var q=false;var o=0;while(!q){if(l++>this.options.duration){break}var n=d+((b-d)/2);o=Math.round(this.options.transition(n,1,-1,this.options.duration)*1000)/1000;if(o==this.cancelRemaining){this.startMilliseconds-=n;q=true}if(o<this.cancelRemaining){b=n;h=o}else{d=n;a=o}}}this.cancelRemaining=0}this.notifyObservers("onPreEffect",this);if(g==false){var m=this;this.timer=setInterval(function(){m.drawEffect()},this.options.interval)}this.isRunning=true};Spry.Effect.Animator.prototype.stopFlagReset=function(){if(this.timer){clearInterval(this.timer);this.timer=null}this.startMilliseconds=0};Spry.Effect.Animator.prototype.stop=function(){this.stopFlagReset();this.notifyObservers("onPostEffect",this);this.isRunning=false};Spry.Effect.Animator.prototype.cancel=function(){var a=this.getElapsedMilliseconds();if(this.startMilliseconds>0&&a<this.options.duration){this.cancelRemaining=this.options.transition(a,0,1,this.options.duration)}this.stopFlagReset();this.notifyObservers("onCancel",this);this.isRunning=false};Spry.Effect.Animator.prototype.drawEffect=function(){var b=true;this.notifyObservers("onStep",this);var a=this.getElapsedMilliseconds();if(typeof this.options.transition!="function"){Spry.Effect.Utils.showError("unknown transition");return}this.animate();if(a>this.options.duration){b=false;this.stop()}return b};Spry.Effect.Animator.prototype.getElapsedMilliseconds=function(){if(this.startMilliseconds>0){var a=new Date();return(a.getTime()-this.startMilliseconds)}return 0};Spry.Effect.Animator.prototype.doToggle=function(){if(!this.direction){this.direction=Spry.forwards;return}if(this.options.toggle==true){if(this.direction==Spry.forwards){this.direction=Spry.backwards;this.notifyObservers("onToggle",this)}else{if(this.direction==Spry.backwards){this.direction=Spry.forwards}}}};Spry.Effect.Animator.prototype.prepareStart=function(){if(this.options&&this.options.toggle){this.doToggle()}};Spry.Effect.Animator.prototype.animate=function(){};Spry.Effect.Animator.prototype.onStep=function(a){if(a!=this){this.notifyObservers("onStep",this)}};Spry.Effect.Move=function(d,b,f,a){this.dynamicFromPos=false;if(arguments.length==3){a=f;f=b;b=Spry.Effect.getPosition(d);this.dynamicFromPos=true}Spry.Effect.Animator.call(this,a);this.name="Move";this.element=Spry.Effect.getElement(d);if(!this.element){return}if(b.units!=f.units){Spry.Effect.Utils.showError("Spry.Effect.Move: Conflicting units ("+b.units+", "+f.units+")")}this.units=b.units;this.startX=Number(b.x);this.stopX=Number(f.x);this.startY=Number(b.y);this.stopY=Number(f.y)};Spry.Effect.Move.prototype=new Spry.Effect.Animator();Spry.Effect.Move.prototype.constructor=Spry.Effect.Move;Spry.Effect.Move.prototype.animate=function(){var f=0;var d=0;var b=Math.floor;var a=this.getElapsedMilliseconds();if(this.direction==Spry.forwards){f=b(this.options.transition(a,this.startX,this.stopX-this.startX,this.options.duration));d=b(this.options.transition(a,this.startY,this.stopY-this.startY,this.options.duration))}else{if(this.direction==Spry.backwards){f=b(this.options.transition(a,this.stopX,this.startX-this.stopX,this.options.duration));d=b(this.options.transition(a,this.stopY,this.startY-this.stopY,this.options.duration))}}this.element.style.left=f+this.units;this.element.style.top=d+this.units};Spry.Effect.Move.prototype.prepareStart=function(){if(this.options&&this.options.toggle){this.doToggle()}if(this.dynamicFromPos==true){var a=Spry.Effect.getPosition(this.element);this.startX=a.x;this.startY=a.y;this.rangeMoveX=this.startX-this.stopX;this.rangeMoveY=this.startY-this.stopY}};Spry.Effect.Size=function(h,b,q,r){this.dynamicFromRect=false;if(arguments.length==3){r=q;q=b;b=Spry.Effect.getDimensionsRegardlessOfDisplayState(h);this.dynamicFromRect=true}Spry.Effect.Animator.call(this,r);this.name="Size";this.element=Spry.Effect.getElement(h);if(!this.element){return}h=this.element;if(b.units!=q.units){Spry.Effect.Utils.showError("Spry.Effect.Size: Conflicting units ("+b.units+", "+q.units+")");return false}this.units=b.units;var d=Spry.Effect.getDimensionsRegardlessOfDisplayState(h);this.originalWidth=d.width;this.originalHeight=d.height;this.startWidth=b.width;this.startHeight=b.height;this.stopWidth=q.width;this.stopHeight=q.height;this.childImages=new Array();if(this.options.useCSSBox){Spry.Effect.makePositioned(this.element);var n=Spry.Effect.intPropStyle;this.startFromBorder_top=n(h,"border-top-width");this.startFromBorder_bottom=n(h,"border-bottom-width");this.startFromBorder_left=n(h,"border-left-width");this.startFromBorder_right=n(h,"border-right-width");this.startFromPadding_top=n(h,"padding-top");this.startFromPadding_bottom=n(h,"padding-bottom");this.startFromPadding_left=n(h,"padding-left");this.startFromPadding_right=n(h,"padding-right");this.startFromMargin_top=n(h,"margin-top");this.startFromMargin_bottom=n(h,"margin-bottom");this.startFromMargin_right=n(h,"margin-right");this.startFromMargin_left=n(h,"margin-left");this.startLeft=n(h,"left");this.startTop=n(h,"top")}if(this.options.scaleContent){Spry.Effect.Utils.fetchChildImages(h,this.childImages)}this.fontFactor=1;var o=Spry.Effect.getStyleProp(this.element,"font-size");if(o&&/em\s*$/.test(o)){this.fontFactor=parseFloat(o)}var a=Spry.Effect.Utils.isPercentValue;if(a(this.startWidth)){var f=Spry.Effect.Utils.getPercentValue(this.startWidth);this.startWidth=d.width*(f/100)}if(a(this.startHeight)){var l=Spry.Effect.Utils.getPercentValue(this.startHeight);this.startHeight=d.height*(l/100)}if(a(this.stopWidth)){var g=Spry.Effect.Utils.getPercentValue(this.stopWidth);this.stopWidth=d.width*(g/100)}if(a(this.stopHeight)){var m=Spry.Effect.Utils.getPercentValue(this.stopHeight);this.stopHeight=d.height*(m/100)}this.enforceVisible=Spry.Effect.isInvisible(this.element)};Spry.Effect.Size.prototype=new Spry.Effect.Animator();Spry.Effect.Size.prototype.constructor=Spry.Effect.Size;Spry.Effect.Size.prototype.animate=function(){var r=0;var q=0;var b=0;var E=0;var w=Math.floor;var a=this.getElapsedMilliseconds();if(this.direction==Spry.forwards){r=w(this.options.transition(a,this.startWidth,this.stopWidth-this.startWidth,this.options.duration));q=w(this.options.transition(a,this.startHeight,this.stopHeight-this.startHeight,this.options.duration));E=1}else{if(this.direction==Spry.backwards){r=w(this.options.transition(a,this.stopWidth,this.startWidth-this.stopWidth,this.options.duration));q=w(this.options.transition(a,this.stopHeight,this.startHeight-this.stopHeight,this.options.duration));E=-1}}var A=r/this.originalWidth;b=this.fontFactor*A;var u=this.element.style;if(r<0){r=0}if(q<0){q=0}u.width=r+this.units;u.height=q+this.units;if(typeof this.options.useCSSBox!="undefined"&&this.options.useCSSBox==true){var f=Spry.Effect.intPropStyle;var x=f(this.element,"top");var F=f(this.element,"left");var z=f(this.element,"margin-top");var h=f(this.element,"margin-left");var o=A;var y=q/this.originalHeight;var g=w(this.startFromBorder_top*y);var l=w(this.startFromBorder_bottom*y);var B=w(this.startFromBorder_left*o);var m=w(this.startFromBorder_right*o);var d=w(this.startFromPadding_top*y);var G=w(this.startFromPadding_bottom*y);var t=w(this.startFromPadding_left*o);var n=w(this.startFromPadding_right*o);var H=w(this.startFromMargin_top*y);var s=w(this.startFromMargin_bottom*y);var D=w(this.startFromMargin_right*o);var C=w(this.startFromMargin_left*o);u.borderTopWidth=g+this.units;u.borderBottomWidth=l+this.units;u.borderLeftWidth=B+this.units;u.borderRightWidth=m+this.units;u.paddingTop=d+this.units;u.paddingBottom=G+this.units;u.paddingLeft=t+this.units;u.paddingRight=n+this.units;u.marginTop=H+this.units;u.marginBottom=s+this.units;u.marginLeft=C+this.units;u.marginRight=D+this.units;u.left=w(F+h-C)+this.units;u.top=w(x+z-H)+this.units}if(this.options.scaleContent){for(var v=0;v<this.childImages.length;v++){this.childImages[v][0].style.width=A*this.childImages[v][1]+this.units;this.childImages[v][0].style.height=A*this.childImages[v][2]+this.units}this.element.style.fontSize=b+"em"}if(this.enforceVisible){Spry.Effect.enforceVisible(this.element);this.enforceVisible=false}};Spry.Effect.Size.prototype.prepareStart=function(){if(this.options&&this.options.toggle){this.doToggle()}if(this.dynamicFromRect==true){var a=Spry.Effect.getDimensions(this.element);this.startWidth=a.width;this.startHeight=a.height;this.widthRange=this.startWidth-this.stopWidth;this.heightRange=this.startHeight-this.stopHeight}};Spry.Effect.Opacity=function(d,b,f,a){this.dynamicStartOpacity=false;if(arguments.length==3){a=f;f=b;b=Spry.Effect.getOpacity(d);this.dynamicStartOpacity=true}Spry.Effect.Animator.call(this,a);this.name="Opacity";this.element=Spry.Effect.getElement(d);if(!this.element){return}if(/MSIE/.test(navigator.userAgent)&&(!this.element.hasLayout)){Spry.Effect.setStyleProp(this.element,"zoom","1")}this.startOpacity=b;this.stopOpacity=f;this.enforceVisible=Spry.Effect.isInvisible(this.element)};Spry.Effect.Opacity.prototype=new Spry.Effect.Animator();Spry.Effect.Opacity.prototype.constructor=Spry.Effect.Opacity;Spry.Effect.Opacity.prototype.animate=function(){var b=0;var a=this.getElapsedMilliseconds();if(this.direction==Spry.forwards){b=this.options.transition(a,this.startOpacity,this.stopOpacity-this.startOpacity,this.options.duration)}else{if(this.direction==Spry.backwards){b=this.options.transition(a,this.stopOpacity,this.startOpacity-this.stopOpacity,this.options.duration)}}if(b<0){b=0}if(/MSIE/.test(navigator.userAgent)){var d=Spry.Effect.getStyleProp(this.element,"filter");if(d){d=d.replace(/alpha\(opacity=[0-9]{1,3}\)/g,"")}this.element.style.filter=d+"alpha(opacity="+Math.floor(b*100)+")"}else{this.element.style.opacity=b}if(this.enforceVisible){Spry.Effect.enforceVisible(this.element);this.enforceVisible=false}};Spry.Effect.Opacity.prototype.prepareStart=function(){if(this.options&&this.options.toggle){this.doToggle()}if(this.dynamicStartOpacity==true){this.startOpacity=Spry.Effect.getOpacity(this.element);this.opacityRange=this.startOpacity-this.stopOpacity}};Spry.Effect.Color=function(d,f,a,b){this.dynamicStartColor=false;if(arguments.length==3){b=a;a=f;f=Spry.Effect.getBgColor(d);this.dynamicStartColor=true}Spry.Effect.Animator.call(this,b);this.name="Color";this.element=Spry.Effect.getElement(d);if(!this.element){return}this.startColor=f;this.stopColor=a;this.startRedColor=Spry.Effect.Utils.hexToInt(f.substr(1,2));this.startGreenColor=Spry.Effect.Utils.hexToInt(f.substr(3,2));this.startBlueColor=Spry.Effect.Utils.hexToInt(f.substr(5,2));this.stopRedColor=Spry.Effect.Utils.hexToInt(a.substr(1,2));this.stopGreenColor=Spry.Effect.Utils.hexToInt(a.substr(3,2));this.stopBlueColor=Spry.Effect.Utils.hexToInt(a.substr(5,2))};Spry.Effect.Color.prototype=new Spry.Effect.Animator();Spry.Effect.Color.prototype.constructor=Spry.Effect.Color;Spry.Effect.Color.prototype.animate=function(){var d=0;var g=0;var f=0;var b=Math.floor;var a=this.getElapsedMilliseconds();if(this.direction==Spry.forwards){d=b(this.options.transition(a,this.startRedColor,this.stopRedColor-this.startRedColor,this.options.duration));g=b(this.options.transition(a,this.startGreenColor,this.stopGreenColor-this.startGreenColor,this.options.duration));f=b(this.options.transition(a,this.startBlueColor,this.stopBlueColor-this.startBlueColor,this.options.duration))}else{if(this.direction==Spry.backwards){d=b(this.options.transition(a,this.stopRedColor,this.startRedColor-this.stopRedColor,this.options.duration));g=b(this.options.transition(a,this.stopGreenColor,this.startGreenColor-this.stopGreenColor,this.options.duration));f=b(this.options.transition(a,this.stopBlueColor,this.startBlueColor-this.stopBlueColor,this.options.duration))}}this.element.style.backgroundColor=Spry.Effect.Utils.rgb(d,g,f)};Spry.Effect.Color.prototype.prepareStart=function(){if(this.options&&this.options.toggle){this.doToggle()}if(this.dynamicStartColor==true){this.startColor=Spry.Effect.getBgColor(element);this.startRedColor=Spry.Effect.Utils.hexToInt(startColor.substr(1,2));this.startGreenColor=Spry.Effect.Utils.hexToInt(startColor.substr(3,2));this.startBlueColor=Spry.Effect.Utils.hexToInt(startColor.substr(5,2));this.redColorRange=this.startRedColor-this.stopRedColor;this.greenColorRange=this.startGreenColor-this.stopGreenColor;this.blueColorRange=this.startBlueColor-this.stopBlueColor}};Spry.Effect.Cluster=function(b){Spry.Effect.Animator.call(this,b);this.name="Cluster";this.effectsArray=new Array();this.currIdx=-1;var a=function(f,d){this.effect=f;this.kind=d;this.isRunning=false};this.ClusteredEffect=a};Spry.Effect.Cluster.prototype=new Spry.Effect.Animator();Spry.Effect.Cluster.prototype.constructor=Spry.Effect.Cluster;Spry.Effect.Cluster.prototype.setInterval=function(b){var a=this.effectsArray.length;this.options.interval=b;for(var d=0;d<a;d++){this.effectsArray[d].effect.setInterval(b)}};Spry.Effect.Cluster.prototype.drawEffect=function(){var h=true;var f=false;var m=false;var a=false;if((this.currIdx==-1&&this.direction==Spry.forwards)||(this.currIdx==this.effectsArray.length&&this.direction==Spry.backwards)){this.initNextEffectsRunning()}var l=this.direction==Spry.forwards?0:this.effectsArray.length-1;var d=this.direction==Spry.forwards?this.effectsArray.length:-1;var g=this.direction==Spry.forwards?1:-1;for(var b=l;b!=d;b+=g){if(this.effectsArray[b].isRunning==true){m=this.effectsArray[b].effect.drawEffect();if(m==false&&b==this.currIdx){this.effectsArray[b].isRunning=false;a=true}}}if(a==true){f=this.initNextEffectsRunning()}if(f==true){this.stop();h=false;for(var b=0;b<this.effectsArray.length;b++){this.effectsArray[b].isRunning=false}this.currIdx=this.direction==Spry.forwards?this.effectsArray.length:-1}return h};Spry.Effect.Cluster.prototype.initNextEffectsRunning=function(){var d=false;var f=this.direction==Spry.forwards?1:-1;var b=this.direction==Spry.forwards?this.effectsArray.length:-1;this.currIdx+=f;if((this.currIdx>(this.effectsArray.length-1)&&this.direction==Spry.forwards)||(this.currIdx<0&&this.direction==Spry.backwards)){d=true}else{for(var a=this.currIdx;a!=b;a+=f){if((a>this.currIdx&&this.direction==Spry.forwards||a<this.currIdx&&this.direction==Spry.backwards)&&this.effectsArray[a].kind=="queue"){break}this.effectsArray[a].effect.start(true);this.effectsArray[a].isRunning=true;this.currIdx=a}}return d};Spry.Effect.Cluster.prototype.toggleCluster=function(){if(!this.direction){this.direction=Spry.forwards;return}if(this.options.toggle==true){if(this.direction==Spry.forwards){this.direction=Spry.backwards;this.notifyObservers("onToggle",this);this.currIdx=this.effectsArray.length}else{if(this.direction==Spry.backwards){this.direction=Spry.forwards;this.currIdx=-1}}}else{if(this.direction==Spry.forwards){this.currIdx=-1}else{if(this.direction==Spry.backwards){this.currIdx=this.effectsArray.length}}}};Spry.Effect.Cluster.prototype.doToggle=function(){this.toggleCluster();for(var a=0;a<this.effectsArray.length;a++){if(this.effectsArray[a].effect.options&&(this.effectsArray[a].effect.options.toggle!=null)){if(this.effectsArray[a].effect.options.toggle==true){this.effectsArray[a].effect.doToggle()}}}};Spry.Effect.Cluster.prototype.cancel=function(){for(var b=0;b<this.effectsArray.length;b++){if(this.effectsArray[b].effect.isRunning){this.effectsArray[b].effect.cancel()}}var a=this.getElapsedMilliseconds();if(this.startMilliseconds>0&&a<this.options.duration){this.cancelRemaining=this.options.transition(a,0,1,this.options.duration)}this.stopFlagReset();this.notifyObservers("onCancel",this);this.isRunning=false};Spry.Effect.Cluster.prototype.addNextEffect=function(a){a.addObserver(this);this.effectsArray[this.effectsArray.length]=new this.ClusteredEffect(a,"queue");if(this.effectsArray.length==1){this.element=a.element}};Spry.Effect.Cluster.prototype.addParallelEffect=function(a){if(this.effectsArray.length==0||this.effectsArray[this.effectsArray.length-1].kind!="parallel"){a.addObserver(this)}this.effectsArray[this.effectsArray.length]=new this.ClusteredEffect(a,"parallel");if(this.effectsArray.length==1){this.element=a.element}};Spry.Effect.Cluster.prototype.prepareStart=function(){this.toggleCluster()};Spry.Effect.Fade=function(g,n){if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("Fade")}Spry.Effect.Cluster.call(this,n);this.name="Fade";var g=Spry.Effect.getElement(g);this.element=g;if(!this.element){return}var b=1000;var m=0;var f=100;var o=false;var h=Spry.fifthTransition;var d=60;var a=0;if(/MSIE/.test(navigator.userAgent)){a=parseInt(Spry.Effect.getStylePropRegardlessOfDisplayState(this.element,"filter").replace(/alpha\(opacity=([0-9]{1,3})\)/g,"$1"),10)}else{a=parseInt(Spry.Effect.getStylePropRegardlessOfDisplayState(this.element,"opacity")*100,10)}if(isNaN(a)){a=100}if(n){if(n.duration!=null){b=n.duration}if(n.from!=null){if(Spry.Effect.Utils.isPercentValue(n.from)){m=Spry.Effect.Utils.getPercentValue(n.from)*a/100}else{m=n.from}}if(n.to!=null){if(Spry.Effect.Utils.isPercentValue(n.to)){f=Spry.Effect.Utils.getPercentValue(n.to)*a/100}else{f=n.to}}if(n.toggle!=null){o=n.toggle}if(n.transition!=null){h=n.transition}if(n.fps!=null){d=n.fps}else{this.options.transition=h}}m=m/100;f=f/100;n={duration:b,toggle:o,transition:h,from:m,to:f,fps:d};var l=new Spry.Effect.Opacity(g,m,f,n);this.addNextEffect(l)};Spry.Effect.Fade.prototype=new Spry.Effect.Cluster();Spry.Effect.Fade.prototype.constructor=Spry.Effect.Fade;Spry.Effect.Blind=function(n,u){if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("Blind")}Spry.Effect.Cluster.call(this,u);this.name="Blind";var n=Spry.Effect.getElement(n);this.element=n;if(!this.element){return}var b=1000;var v=false;var d=Spry.circleTransition;var g=60;var m=false;Spry.Effect.makeClipping(n);var h=Spry.Effect.getDimensionsRegardlessOfDisplayState(n);var l=h.height;var r=0;var q=u?u.from:h.height;var a=u?u.to:0;var s=false;if(u){if(u.duration!=null){b=u.duration}if(u.from!=null){if(Spry.Effect.Utils.isPercentValue(u.from)){l=Spry.Effect.Utils.getPercentValue(u.from)*h.height/100}else{l=Spry.Effect.Utils.getPixelValue(u.from)}}if(u.to!=null){if(Spry.Effect.Utils.isPercentValue(u.to)){r=Spry.Effect.Utils.getPercentValue(u.to)*h.height/100}else{r=Spry.Effect.Utils.getPixelValue(u.to)}}if(u.toggle!=null){v=u.toggle}if(u.transition!=null){d=u.transition}if(u.fps!=null){g=u.fps}if(u.useCSSBox!=null){s=u.useCSSBox}}var f=new Spry.Effect.Utils.Rectangle;f.width=h.width;f.height=l;var t=new Spry.Effect.Utils.Rectangle;t.width=h.width;t.height=r;u={duration:b,toggle:v,transition:d,scaleContent:m,useCSSBox:s,from:q,to:a,fps:g};var o=new Spry.Effect.Size(n,f,t,u);this.addNextEffect(o)};Spry.Effect.Blind.prototype=new Spry.Effect.Cluster();Spry.Effect.Blind.prototype.constructor=Spry.Effect.Blind;Spry.Effect.Highlight=function(h,m){if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("Highlight")}Spry.Effect.Cluster.call(this,m);this.name="Highlight";var a=1000;var b="#ffffff";var n=false;var d=Spry.sinusoidalTransition;var f=60;var h=Spry.Effect.getElement(h);this.element=h;if(!this.element){return}var l=Spry.Effect.getBgColor(h);if(l=="transparent"){l="#ffff99"}if(m){if(m.duration!=null){a=m.duration}if(m.from!=null){l=m.from}if(m.to!=null){b=m.to}if(m.toggle!=null){n=m.toggle}if(m.transition!=null){d=m.transition}if(m.fps!=null){f=m.fps}}if(l.indexOf("rgb")!=-1){var l=Spry.Effect.Utils.rgb(parseInt(l.substring(l.indexOf("(")+1,l.indexOf(",")),10),parseInt(l.substring(l.indexOf(",")+1,l.lastIndexOf(",")),10),parseInt(l.substring(l.lastIndexOf(",")+1,l.indexOf(")")),10))}if(b.indexOf("rgb")!=-1){var b=Spry.Effect.Utils.rgb(parseInt(b.substring(b.indexOf("(")+1,b.indexOf(",")),10),parseInt(b.substring(b.indexOf(",")+1,b.lastIndexOf(",")),10),parseInt(b.substring(b.lastIndexOf(",")+1,b.indexOf(")")),10))}var l=Spry.Effect.Utils.longColorVersion(l);var b=Spry.Effect.Utils.longColorVersion(b);this.restoreBackgroundImage=Spry.Effect.getStyleProp(h,"background-image");m={duration:a,toggle:n,transition:d,fps:f};var g=new Spry.Effect.Color(h,l,b,m);this.addNextEffect(g);this.addObserver({onPreEffect:function(o){Spry.Effect.setStyleProp(o.element,"background-image","none")},onPostEffect:function(o){Spry.Effect.setStyleProp(o.element,"background-image",o.restoreBackgroundImage);if(o.direction==Spry.forwards&&o.options.restoreColor){Spry.Effect.setStyleProp(h,"background-color",o.options.restoreColor)}}})};Spry.Effect.Highlight.prototype=new Spry.Effect.Cluster();Spry.Effect.Highlight.prototype.constructor=Spry.Effect.Highlight;Spry.Effect.Slide=function(a,f){if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("Slide")}Spry.Effect.Cluster.call(this,f);this.name="Slide";var a=Spry.Effect.getElement(a);this.element=a;if(!this.element){return}var q=1000;var v=false;var x=Spry.sinusoidalTransition;var b=60;var m=false;var n=Spry.Effect.Utils.getFirstChildElement(a);var y=-1;if(/MSIE 7.0/.test(navigator.userAgent)&&/Windows NT/.test(navigator.userAgent)){Spry.Effect.makePositioned(a)}Spry.Effect.makeClipping(a);if(/MSIE 6.0/.test(navigator.userAgent)&&/Windows NT/.test(navigator.userAgent)){var h=Spry.Effect.getStyleProp(a,"position");if(h&&(h=="static"||h=="fixed")){Spry.Effect.setStyleProp(a,"position","relative");Spry.Effect.setStyleProp(a,"top","");Spry.Effect.setStyleProp(a,"left","")}}if(n){Spry.Effect.makePositioned(n);Spry.Effect.makeClipping(n);var o=Spry.Effect.getDimensionsRegardlessOfDisplayState(n,a);Spry.Effect.setStyleProp(n,"width",o.width+"px")}var g=Spry.Effect.getDimensionsRegardlessOfDisplayState(a);var l=new Spry.Effect.Utils.Rectangle();var d=new Spry.Effect.Utils.Rectangle();l.width=d.width=g.width;l.height=d.height=g.height;if(!this.options.to){if(!f){f={}}f.to="0%"}if(f&&f.horizontal!==null&&f.horizontal===true){m=true}if(f.duration!=null){q=f.duration}if(f.from!=null){if(m){if(Spry.Effect.Utils.isPercentValue(f.from)){g.width=l.width*Spry.Effect.Utils.getPercentValue(f.from)/100}else{g.width=Spry.Effect.Utils.getPixelValue(f.from)}}else{if(Spry.Effect.Utils.isPercentValue(f.from)){g.height=l.height*Spry.Effect.Utils.getPercentValue(f.from)/100}else{g.height=Spry.Effect.Utils.getPixelValue(f.from)}}}if(f.to!=null){if(m){if(Spry.Effect.Utils.isPercentValue(f.to)){d.width=l.width*Spry.Effect.Utils.getPercentValue(f.to)/100}else{d.width=Spry.Effect.Utils.getPixelValue(f.to)}}else{if(Spry.Effect.Utils.isPercentValue(f.to)){d.height=l.height*Spry.Effect.Utils.getPercentValue(f.to)/100}else{d.height=Spry.Effect.Utils.getPixelValue(f.to)}}}if(f.toggle!=null){v=f.toggle}if(f.transition!=null){x=f.transition}if(f.fps!=null){b=f.fps}f={duration:q,transition:x,scaleContent:false,toggle:v,fps:b};var r=new Spry.Effect.Size(a,g,d,f);this.addParallelEffect(r);if((g.width<d.width&&m)||(g.height<d.height&&!m)){y=1}var u=new Spry.Effect.Utils.Position();var t=new Spry.Effect.Utils.Position();t.x=u.x=Spry.Effect.intPropStyle(n,"left");t.y=u.y=Spry.Effect.intPropStyle(n,"top");t.units=u.units;if(m){t.x=parseInt(u.x+y*(g.width-d.width),10)}else{t.y=parseInt(u.y+y*(g.height-d.height),10)}if(y==1){var w=u;var u=t;var t=w}f={duration:q,transition:x,toggle:v,from:u,to:t,fps:b};var s=new Spry.Effect.Move(n,u,t,f);this.addParallelEffect(s)};Spry.Effect.Slide.prototype=new Spry.Effect.Cluster();Spry.Effect.Slide.prototype.constructor=Spry.Effect.Slide;Spry.Effect.Grow=function(b,f){if(!b){return}if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("Grow")}Spry.Effect.Cluster.call(this,f);this.name="Grow";var t=1000;var A=false;var w=true;var g=false;var q=true;var z=false;var C=Spry.squareTransition;var d=60;var b=Spry.Effect.getElement(b);this.element=b;if(!this.element){return}Spry.Effect.makeClipping(b);var s=Spry.Effect.getDimensionsRegardlessOfDisplayState(b);var D=s.width;var u=s.height;var B=(D==0)?1:u/D;var y=new Spry.Effect.Utils.Rectangle;y.width=0;y.height=0;var a=new Spry.Effect.Utils.Rectangle;a.width=D;a.height=u;var m=f?f.from:s.width;var l=f?f.to:0;var n=Spry.Effect.Utils.getPixelValue;if(f){if(f.growCenter!=null){q=f.growCenter}if(f.duration!=null){t=f.duration}if(f.useCSSBox!=null){z=f.useCSSBox}if(f.scaleContent!=null){w=f.scaleContent}if(f.from!=null){if(Spry.Effect.Utils.isPercentValue(f.from)){y.width=D*(Spry.Effect.Utils.getPercentValue(f.from)/100);y.height=u*(Spry.Effect.Utils.getPercentValue(f.from)/100)}else{if(g){y.height=n(f.from);y.width=n(f.from)/B}else{y.width=n(f.from);y.height=B*n(f.from)}}}if(f.to!=null){if(Spry.Effect.Utils.isPercentValue(f.to)){a.width=D*(Spry.Effect.Utils.getPercentValue(f.to)/100);a.height=u*(Spry.Effect.Utils.getPercentValue(f.to)/100)}else{if(g){a.height=n(f.to);a.width=n(f.to)/B}else{a.width=n(f.to);a.height=B*n(f.to)}}}if(f.toggle!=null){A=f.toggle}if(f.transition!=null){C=f.transition}if(f.fps!=null){d=f.fps}}f={duration:t,toggle:A,transition:C,scaleContent:w,useCSSBox:z,fps:d};var r=new Spry.Effect.Size(b,y,a,f);this.addParallelEffect(r);if(q){Spry.Effect.makePositioned(b);var o=new Spry.Effect.Utils.Position();o.x=parseInt(Spry.Effect.getStylePropRegardlessOfDisplayState(b,"left"),10);o.y=parseInt(Spry.Effect.getStylePropRegardlessOfDisplayState(b,"top"),10);if(!o.x){o.x=0}if(!o.y){o.y=0}f={duration:t,toggle:A,transition:C,from:m,to:l,fps:d};var x=new Spry.Effect.Utils.Position;x.x=o.x+(D-y.width)/2;x.y=o.y+(u-y.height)/2;var v=new Spry.Effect.Utils.Position;v.x=o.x+(D-a.width)/2;v.y=o.y+(u-a.height)/2;var h=new Spry.Effect.Move(b,x,v,f);this.addParallelEffect(h)}};Spry.Effect.Grow.prototype=new Spry.Effect.Cluster();Spry.Effect.Grow.prototype.constructor=Spry.Effect.Grow;Spry.Effect.Shake=function(n,u){if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("Shake")}Spry.Effect.Cluster.call(this,u);this.options.direction=false;if(this.options.toggle){this.options.toggle=false}this.name="Shake";var n=Spry.Effect.getElement(n);this.element=n;if(!this.element){return}var b=100;var d=Spry.linearTransition;var g=60;var r=4;if(u){if(u.duration!=null){r=Math.ceil(this.options.duration/b)-1}if(u.fps!=null){g=u.fps}if(u.transition!=null){d=u.transition}}Spry.Effect.makePositioned(n);var h=new Spry.Effect.Utils.Position();h.x=parseInt(Spry.Effect.getStyleProp(n,"left"),10);h.y=parseInt(Spry.Effect.getStyleProp(n,"top"),10);if(!h.x){h.x=0}if(!h.y){h.y=0}var f=new Spry.Effect.Utils.Position;f.x=h.x;f.y=h.y;var o=new Spry.Effect.Utils.Position;o.x=h.x+20;o.y=h.y+0;var l=new Spry.Effect.Utils.Position;l.x=h.x+-20;l.y=h.y+0;u={duration:Math.ceil(b/2),toggle:false,fps:g,transition:d};var t=new Spry.Effect.Move(n,f,o,u);this.addNextEffect(t);u={duration:b,toggle:false,fps:g,transition:d};var s=new Spry.Effect.Move(n,o,l,u);var a=new Spry.Effect.Move(n,l,o,u);for(var m=0;m<r;m++){if(m%2==0){this.addNextEffect(s)}else{this.addNextEffect(a)}}var q=(r%2==0)?o:l;u={duration:Math.ceil(b/2),toggle:false,fps:g,transition:d};var t=new Spry.Effect.Move(n,q,f,u);this.addNextEffect(t)};Spry.Effect.Shake.prototype=new Spry.Effect.Cluster();Spry.Effect.Shake.prototype.constructor=Spry.Effect.Shake;Spry.Effect.Shake.prototype.doToggle=function(){};Spry.Effect.Squish=function(b,a){if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("Squish")}if(!a){a={}}if(!a.to){a.to="0%"}if(!a.from){a.from="100%"}a.growCenter=false;Spry.Effect.Grow.call(this,b,a);this.name="Squish"};Spry.Effect.Squish.prototype=new Spry.Effect.Grow();Spry.Effect.Squish.prototype.constructor=Spry.Effect.Squish;Spry.Effect.Pulsate=function(l,r){if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("Pulsate")}Spry.Effect.Cluster.call(this,r);this.options.direction=false;if(this.options.toggle){this.options.toggle=false}var l=Spry.Effect.getElement(l);var a=0;this.element=l;if(!this.element){return}this.name="Pulsate";var b=100;var q=100;var g=0;var s=false;var d=Spry.linearTransition;var f=60;if(/MSIE/.test(navigator.userAgent)){a=parseInt(Spry.Effect.getStylePropRegardlessOfDisplayState(this.element,"filter").replace(/alpha\(opacity=([0-9]{1,3})\)/g,"$1"),10)}else{a=parseInt(Spry.Effect.getStylePropRegardlessOfDisplayState(this.element,"opacity")*100,10)}if(isNaN(a)){a=100}if(r){if(r.from!=null){if(Spry.Effect.Utils.isPercentValue(r.from)){q=Spry.Effect.Utils.getPercentValue(r.from)*a/100}else{q=r.from}}if(r.to!=null){if(Spry.Effect.Utils.isPercentValue(r.to)){g=Spry.Effect.Utils.getPercentValue(r.to)*a/100}else{g=r.to}}if(r.transition!=null){d=r.transition}if(r.fps!=null){f=r.fps}}r={duration:b,toggle:s,transition:d,fps:f};q=q/100;g=g/100;var n=new Spry.Effect.Opacity(l,q,g,r);var o=new Spry.Effect.Opacity(l,g,q,r);var m=parseInt(this.options.duration/200,10);for(var h=0;h<m;h++){this.addNextEffect(n);this.addNextEffect(o)}};Spry.Effect.Pulsate.prototype=new Spry.Effect.Cluster();Spry.Effect.Pulsate.prototype.constructor=Spry.Effect.Pulsate;Spry.Effect.Pulsate.prototype.doToggle=function(){};Spry.Effect.Puff=function(n,v){if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("Puff")}Spry.Effect.Cluster.call(this,v);var n=Spry.Effect.getElement(n);this.element=n;if(!this.element){return}this.name="Puff";var w=false;var l=false;var b=1000;var d=Spry.fifthTransition;var f=60;Spry.Effect.makePositioned(n);if(v){if(v.toggle!=null){w=v.toggle}if(v.duration!=null){b=v.duration}if(v.transition!=null){d=v.transition}if(v.fps!=null){f=v.fps}}var g=Spry.Effect.getDimensions(n);var m=g.width;var s=g.height;v={duration:b,toggle:w,transition:d,fps:f};var r=1;var h=0;var a=new Spry.Effect.Opacity(n,r,h,v);this.addParallelEffect(a);var u=Spry.Effect.getPosition(n);var q=new Spry.Effect.Utils.Position;q.x=m/2*-1;q.y=s/2*-1;v={duration:b,toggle:w,transition:d,from:u,to:q,fps:f};var o=new Spry.Effect.Move(n,u,q,v);this.addParallelEffect(o);var t=this;this.addObserver({onPreEffect:function(){if(t.direction==Spry.backwards){t.element.style.display="block"}},onPostEffect:function(){if(t.direction==Spry.forwards){t.element.style.display="none"}}})};Spry.Effect.Puff.prototype=new Spry.Effect.Cluster;Spry.Effect.Puff.prototype.constructor=Spry.Effect.Puff;Spry.Effect.DropOut=function(l,t){if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("DropOut")}Spry.Effect.Cluster.call(this,t);var l=Spry.Effect.getElement(l);this.element=l;if(!this.element){return}var b=1000;var f=60;var d=Spry.fifthTransition;var q=Spry.forwards;var u=false;this.name="DropOut";Spry.Effect.makePositioned(l);if(t){if(t.duration!=null){b=t.duration}if(t.toggle!=null){u=t.toggle}if(t.fps!=null){f=t.fps}if(t.transition!=null){d=t.transition}if(t.dropIn!=null){q=-1}}var g=new Spry.Effect.Utils.Position();g.x=parseInt(Spry.Effect.getStyleProp(l,"left"),10);g.y=parseInt(Spry.Effect.getStyleProp(l,"top"),10);if(!g.x){g.x=0}if(!g.y){g.y=0}var s=new Spry.Effect.Utils.Position;s.x=g.x+0;s.y=g.y+0;var n=new Spry.Effect.Utils.Position;n.x=g.x+0;n.y=g.y+(q*160);t={from:s,to:n,duration:b,toggle:u,transition:d,fps:f};var m=new Spry.Effect.Move(l,t.from,t.to,t);this.addParallelEffect(m);var o=1;var h=0;t={duration:b,toggle:u,transition:d,fps:f};var a=new Spry.Effect.Opacity(l,o,h,t);this.addParallelEffect(a);var r=this;this.addObserver({onPreEffect:function(){r.element.style.display="block"},onPostEffect:function(){if(r.direction==Spry.forwards){r.element.style.display="none"}}})};Spry.Effect.DropOut.prototype=new Spry.Effect.Cluster();Spry.Effect.DropOut.prototype.constructor=Spry.Effect.DropOut;Spry.Effect.Fold=function(o,u){if(!this.notStaticAnimator){return Spry.Effect.Utils.showInitError("Fold")}Spry.Effect.Cluster.call(this,u);var o=Spry.Effect.getElement(o);this.element=o;if(!this.element){return}this.name="Fold";var a=1000;var v=false;var m=true;var s=false;var b=Spry.fifthTransition;var f=f;Spry.Effect.makeClipping(o);var g=Spry.Effect.getDimensionsRegardlessOfDisplayState(o);var n=g.width;var r=g.height;var h=n;var l=r/5;var d=new Spry.Effect.Utils.Rectangle;d.width=n;d.height=r;var t=new Spry.Effect.Utils.Rectangle;t.width=h;t.height=l;if(u){if(u.duration!=null){a=Math.ceil(u.duration/2)}if(u.toggle!=null){v=u.toggle}if(u.useCSSBox!=null){s=u.useCSSBox}if(u.fps!=null){f=u.fps}if(u.transition!=null){b=u.transition}}u={duration:a,toggle:v,scaleContent:m,useCSSBox:s,transition:b,fps:f};var q=new Spry.Effect.Size(o,d,t,u);this.addNextEffect(q);d.width=t.width;d.height=t.height;t.width="0%";var q=new Spry.Effect.Size(o,d,t,u);this.addNextEffect(q)};Spry.Effect.Fold.prototype=new Spry.Effect.Cluster();Spry.Effect.Fold.prototype.constructor=Spry.Effect.Fold;Spry.Effect.DoFade=function(b,a){return Spry.Effect.Utils.DoEffect("Fade",b,a)};Spry.Effect.DoBlind=function(b,a){return Spry.Effect.Utils.DoEffect("Blind",b,a)};Spry.Effect.DoHighlight=function(b,a){return Spry.Effect.Utils.DoEffect("Highlight",b,a)};Spry.Effect.DoSlide=function(b,a){return Spry.Effect.Utils.DoEffect("Slide",b,a)};Spry.Effect.DoGrow=function(b,a){return Spry.Effect.Utils.DoEffect("Grow",b,a)};Spry.Effect.DoShake=function(b,a){return Spry.Effect.Utils.DoEffect("Shake",b,a)};Spry.Effect.DoSquish=function(b,a){return Spry.Effect.Utils.DoEffect("Squish",b,a)};Spry.Effect.DoPulsate=function(b,a){return Spry.Effect.Utils.DoEffect("Pulsate",b,a)};Spry.Effect.DoPuff=function(b,a){return Spry.Effect.Utils.DoEffect("Puff",b,a)};Spry.Effect.DoDropOut=function(b,a){return Spry.Effect.Utils.DoEffect("DropOut",b,a)};Spry.Effect.DoFold=function(b,a){return Spry.Effect.Utils.DoEffect("Fold",b,a)};var Spry;if(!Spry){Spry={}}if(!Spry.Widget){Spry.Widget={}}Spry.Widget.Accordion=function(a,b){this.element=this.getElement(a);this.defaultPanel=0;this.hoverClass="AccordionPanelTabHover";this.openClass="AccordionPanelOpen";this.closedClass="AccordionPanelClosed";this.focusedClass="AccordionFocused";this.enableAnimation=true;this.enableKeyboardNavigation=true;this.currentPanel=null;this.animator=null;this.hasFocus=null;this.previousPanelKeyCode=Spry.Widget.Accordion.KEY_UP;this.nextPanelKeyCode=Spry.Widget.Accordion.KEY_DOWN;this.useFixedPanelHeights=true;this.fixedPanelHeight=0;Spry.Widget.Accordion.setOptions(this,b,true);this.attachBehaviors()};Spry.Widget.Accordion.prototype.getElement=function(a){if(a&&typeof a=="string"){return document.getElementById(a)}return a};Spry.Widget.Accordion.prototype.addClassName=function(b,a){if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))!=-1)){return}b.className+=(b.className?" ":"")+a};Spry.Widget.Accordion.prototype.removeClassName=function(b,a){if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))==-1)){return}b.className=b.className.replace(new RegExp("\\s*\\b"+a+"\\b","g"),"")};Spry.Widget.Accordion.setOptions=function(f,d,a){if(!d){return}for(var b in d){if(a&&d[b]==undefined){continue}f[b]=d[b]}};Spry.Widget.Accordion.prototype.onPanelTabMouseOver=function(b,a){if(a){this.addClassName(this.getPanelTab(a),this.hoverClass)}return false};Spry.Widget.Accordion.prototype.onPanelTabMouseOut=function(b,a){if(a){this.removeClassName(this.getPanelTab(a),this.hoverClass)}return false};Spry.Widget.Accordion.prototype.openPanel=function(d){var g=this.currentPanel;var f;if(typeof d=="number"){f=this.getPanels()[d]}else{f=this.getElement(d)}if(!f||g==f){return null}var b=g?this.getPanelContent(g):null;var a=this.getPanelContent(f);if(!a){return null}if(this.useFixedPanelHeights&&!this.fixedPanelHeight){this.fixedPanelHeight=(b.offsetHeight)?b.offsetHeight:b.scrollHeight}if(this.enableAnimation){if(this.animator){this.animator.stop()}this.animator=new Spry.Widget.Accordion.PanelAnimator(this,f,{duration:this.duration,fps:this.fps,transition:this.transition});this.animator.start()}else{if(b){b.style.display="none";b.style.height="0px"}a.style.display="block";a.style.height=this.useFixedPanelHeights?this.fixedPanelHeight+"px":"auto"}if(g){this.removeClassName(g,this.openClass);this.addClassName(g,this.closedClass)}this.removeClassName(f,this.closedClass);this.addClassName(f,this.openClass);this.currentPanel=f;return f};Spry.Widget.Accordion.prototype.closePanel=function(){if(!this.useFixedPanelHeights&&this.currentPanel){var a=this.currentPanel;var b=this.getPanelContent(a);if(b){if(this.enableAnimation){if(this.animator){this.animator.stop()}this.animator=new Spry.Widget.Accordion.PanelAnimator(this,null,{duration:this.duration,fps:this.fps,transition:this.transition});this.animator.start()}else{b.style.display="none";b.style.height="0px"}}this.removeClassName(a,this.openClass);this.addClassName(a,this.closedClass);this.currentPanel=null}};Spry.Widget.Accordion.prototype.openNextPanel=function(){return this.openPanel(this.getCurrentPanelIndex()+1)};Spry.Widget.Accordion.prototype.openPreviousPanel=function(){return this.openPanel(this.getCurrentPanelIndex()-1)};Spry.Widget.Accordion.prototype.openFirstPanel=function(){return this.openPanel(0)};Spry.Widget.Accordion.prototype.openLastPanel=function(){var a=this.getPanels();return this.openPanel(a[a.length-1])};Spry.Widget.Accordion.prototype.onPanelTabClick=function(b,a){if(a!=this.currentPanel){this.openPanel(a)}else{this.closePanel()}if(this.enableKeyboardNavigation){this.focus()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}if(b.stopPropagation){b.stopPropagation()}else{b.cancelBubble=true}return false};Spry.Widget.Accordion.prototype.onFocus=function(a){this.hasFocus=true;this.addClassName(this.element,this.focusedClass);return false};Spry.Widget.Accordion.prototype.onBlur=function(a){this.hasFocus=false;this.removeClassName(this.element,this.focusedClass);return false};Spry.Widget.Accordion.KEY_UP=38;Spry.Widget.Accordion.KEY_DOWN=40;Spry.Widget.Accordion.prototype.onKeyDown=function(d){var b=d.keyCode;if(!this.hasFocus||(b!=this.previousPanelKeyCode&&b!=this.nextPanelKeyCode)){return true}var a=this.getPanels();if(!a||a.length<1){return false}var g=this.currentPanel?this.currentPanel:a[0];var f=(b==this.nextPanelKeyCode)?g.nextSibling:g.previousSibling;while(f){if(f.nodeType==1){break}f=(b==this.nextPanelKeyCode)?f.nextSibling:f.previousSibling}if(f&&g!=f){this.openPanel(f)}if(d.preventDefault){d.preventDefault()}else{d.returnValue=false}if(d.stopPropagation){d.stopPropagation()}else{d.cancelBubble=true}return false};Spry.Widget.Accordion.prototype.attachPanelHandlers=function(a){if(!a){return}var d=this.getPanelTab(a);if(d){var b=this;Spry.Widget.Accordion.addEventListener(d,"click",function(f){return b.onPanelTabClick(f,a)},false);Spry.Widget.Accordion.addEventListener(d,"mouseover",function(f){return b.onPanelTabMouseOver(f,a)},false);Spry.Widget.Accordion.addEventListener(d,"mouseout",function(f){return b.onPanelTabMouseOut(f,a)},false)}};Spry.Widget.Accordion.addEventListener=function(d,b,f,a){try{if(d.addEventListener){d.addEventListener(b,f,a)}else{if(d.attachEvent){d.attachEvent("on"+b,f)}}}catch(g){}};Spry.Widget.Accordion.prototype.initPanel=function(a,d){var b=this.getPanelContent(a);if(d){this.currentPanel=a;this.removeClassName(a,this.closedClass);this.addClassName(a,this.openClass);if(b){if(this.useFixedPanelHeights){if(this.fixedPanelHeight){b.style.height=this.fixedPanelHeight+"px"}}else{b.style.height="auto"}}}else{this.removeClassName(a,this.openClass);this.addClassName(a,this.closedClass);if(b){b.style.height="0px";b.style.display="none"}}this.attachPanelHandlers(a)};Spry.Widget.Accordion.prototype.attachBehaviors=function(){var b=this.getPanels();for(var d=0;d<b.length;d++){this.initPanel(b[d],d==this.defaultPanel)}this.enableKeyboardNavigation=(this.enableKeyboardNavigation&&this.element.attributes.getNamedItem("tabindex"));if(this.enableKeyboardNavigation){var a=this;Spry.Widget.Accordion.addEventListener(this.element,"focus",function(f){return a.onFocus(f)},false);Spry.Widget.Accordion.addEventListener(this.element,"blur",function(f){return a.onBlur(f)},false);Spry.Widget.Accordion.addEventListener(this.element,"keydown",function(f){return a.onKeyDown(f)},false)}};Spry.Widget.Accordion.prototype.getPanels=function(){return this.getElementChildren(this.element)};Spry.Widget.Accordion.prototype.getCurrentPanel=function(){return this.currentPanel};Spry.Widget.Accordion.prototype.getPanelIndex=function(a){var b=this.getPanels();for(var d=0;d<b.length;d++){if(a==b[d]){return d}}return -1};Spry.Widget.Accordion.prototype.getCurrentPanelIndex=function(){return this.getPanelIndex(this.currentPanel)};Spry.Widget.Accordion.prototype.getPanelTab=function(a){if(!a){return null}return this.getElementChildren(a)[0]};Spry.Widget.Accordion.prototype.getPanelContent=function(a){if(!a){return null}return this.getElementChildren(a)[1]};Spry.Widget.Accordion.prototype.getElementChildren=function(b){var a=[];var d=b.firstChild;while(d){if(d.nodeType==1){a.push(d)}d=d.nextSibling}return a};Spry.Widget.Accordion.prototype.focus=function(){if(this.element&&this.element.focus){this.element.focus()}};Spry.Widget.Accordion.prototype.blur=function(){if(this.element&&this.element.blur){this.element.blur()}};Spry.Widget.Accordion.PanelAnimator=function(m,b,a){this.timer=null;this.interval=0;this.fps=30;this.duration=500;this.startTime=0;this.transition=Spry.Widget.Accordion.PanelAnimator.defaultTransition;this.onComplete=null;this.panel=b;this.panelToOpen=m.getElement(b);this.panelData=[];this.useFixedPanelHeights=m.useFixedPanelHeights;Spry.Widget.Accordion.setOptions(this,a,true);this.interval=Math.floor(1000/this.fps);var n=m.getPanels();for(var g=0;g<n.length;g++){var d=n[g];var o=m.getPanelContent(d);if(o){var l=o.offsetHeight;if(l==undefined){l=0}if(d==b&&l==0){o.style.display="block"}if(d==b||l>0){var f=new Object;f.panel=d;f.content=o;f.fromHeight=l;f.toHeight=(d==b)?(m.useFixedPanelHeights?m.fixedPanelHeight:o.scrollHeight):0;f.distance=f.toHeight-f.fromHeight;f.overflow=o.style.overflow;this.panelData.push(f);o.style.overflow="hidden";o.style.height=l+"px"}}}};Spry.Widget.Accordion.PanelAnimator.defaultTransition=function(f,b,a,d){f/=d;return b+((2-f)*f*a)};Spry.Widget.Accordion.PanelAnimator.prototype.start=function(){var a=this;this.startTime=(new Date).getTime();this.timer=setTimeout(function(){a.stepAnimation()},this.interval)};Spry.Widget.Accordion.PanelAnimator.prototype.stop=function(){if(this.timer){clearTimeout(this.timer);for(i=0;i<this.panelData.length;i++){obj=this.panelData[i];obj.content.style.overflow=obj.overflow}}this.timer=null};Spry.Widget.Accordion.PanelAnimator.prototype.stepAnimation=function(){var g=(new Date).getTime();var b=g-this.startTime;var f,h;if(b>=this.duration){for(f=0;f<this.panelData.length;f++){h=this.panelData[f];if(h.panel!=this.panel){h.content.style.display="none";h.content.style.height="0px"}h.content.style.overflow=h.overflow;h.content.style.height=(this.useFixedPanelHeights||h.toHeight==0)?h.toHeight+"px":"auto"}if(this.onComplete){this.onComplete()}return}for(f=0;f<this.panelData.length;f++){h=this.panelData[f];var d=this.transition(b,h.fromHeight,h.distance,this.duration);h.content.style.height=((d<0)?0:d)+"px"}var a=this;this.timer=setTimeout(function(){a.stepAnimation()},this.interval)};var Spry;if(!Spry){Spry={}}if(!Spry.Widget){Spry.Widget={}}Spry.Widget.TabbedPanels=function(a,d){this.element=this.getElement(a);this.defaultTab=0;this.tabSelectedClass="TabbedPanelsTabSelected";this.tabHoverClass="TabbedPanelsTabHover";this.tabFocusedClass="TabbedPanelsTabFocused";this.panelVisibleClass="TabbedPanelsContentVisible";this.focusElement=null;this.hasFocus=false;this.currentTabIndex=0;this.enableKeyboardNavigation=true;this.nextPanelKeyCode=Spry.Widget.TabbedPanels.KEY_RIGHT;this.previousPanelKeyCode=Spry.Widget.TabbedPanels.KEY_LEFT;Spry.Widget.TabbedPanels.setOptions(this,d);if(typeof(this.defaultTab)=="number"){if(this.defaultTab<0){this.defaultTab=0}else{var b=this.getTabbedPanelCount();if(this.defaultTab>=b){this.defaultTab=(b>1)?(b-1):0}}this.defaultTab=this.getTabs()[this.defaultTab]}if(this.defaultTab){this.defaultTab=this.getElement(this.defaultTab)}this.attachBehaviors()};Spry.Widget.TabbedPanels.prototype.getElement=function(a){if(a&&typeof a=="string"){return document.getElementById(a)}return a};Spry.Widget.TabbedPanels.prototype.getElementChildren=function(b){var a=[];var d=b.firstChild;while(d){if(d.nodeType==1){a.push(d)}d=d.nextSibling}return a};Spry.Widget.TabbedPanels.prototype.addClassName=function(b,a){if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))!=-1)){return}b.className+=(b.className?" ":"")+a};Spry.Widget.TabbedPanels.prototype.removeClassName=function(b,a){if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))==-1)){return}b.className=b.className.replace(new RegExp("\\s*\\b"+a+"\\b","g"),"")};Spry.Widget.TabbedPanels.setOptions=function(f,d,a){if(!d){return}for(var b in d){if(a&&d[b]==undefined){continue}f[b]=d[b]}};Spry.Widget.TabbedPanels.prototype.getTabGroup=function(){if(this.element){var a=this.getElementChildren(this.element);if(a.length){return a[0]}}return null};Spry.Widget.TabbedPanels.prototype.getTabs=function(){var a=[];var b=this.getTabGroup();if(b){a=this.getElementChildren(b)}return a};Spry.Widget.TabbedPanels.prototype.getContentPanelGroup=function(){if(this.element){var a=this.getElementChildren(this.element);if(a.length>1){return a[1]}}return null};Spry.Widget.TabbedPanels.prototype.getContentPanels=function(){var a=[];var b=this.getContentPanelGroup();if(b){a=this.getElementChildren(b)}return a};Spry.Widget.TabbedPanels.prototype.getIndex=function(d,a){d=this.getElement(d);if(d&&a&&a.length){for(var b=0;b<a.length;b++){if(d==a[b]){return b}}}return -1};Spry.Widget.TabbedPanels.prototype.getTabIndex=function(b){var a=this.getIndex(b,this.getTabs());if(a<0){a=this.getIndex(b,this.getContentPanels())}return a};Spry.Widget.TabbedPanels.prototype.getCurrentTabIndex=function(){return this.currentTabIndex};Spry.Widget.TabbedPanels.prototype.getTabbedPanelCount=function(a){return Math.min(this.getTabs().length,this.getContentPanels().length)};Spry.Widget.TabbedPanels.addEventListener=function(d,b,f,a){try{if(d.addEventListener){d.addEventListener(b,f,a)}else{if(d.attachEvent){d.attachEvent("on"+b,f)}}}catch(g){}};Spry.Widget.TabbedPanels.prototype.cancelEvent=function(a){if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}return false};Spry.Widget.TabbedPanels.prototype.onTabClick=function(b,a){this.showPanel(a);return this.cancelEvent(b)};Spry.Widget.TabbedPanels.prototype.onTabMouseOver=function(b,a){this.addClassName(a,this.tabHoverClass);return false};Spry.Widget.TabbedPanels.prototype.onTabMouseOut=function(b,a){this.removeClassName(a,this.tabHoverClass);return false};Spry.Widget.TabbedPanels.prototype.onTabFocus=function(b,a){this.hasFocus=true;this.addClassName(a,this.tabFocusedClass);return false};Spry.Widget.TabbedPanels.prototype.onTabBlur=function(b,a){this.hasFocus=false;this.removeClassName(a,this.tabFocusedClass);return false};Spry.Widget.TabbedPanels.KEY_UP=38;Spry.Widget.TabbedPanels.KEY_DOWN=40;Spry.Widget.TabbedPanels.KEY_LEFT=37;Spry.Widget.TabbedPanels.KEY_RIGHT=39;Spry.Widget.TabbedPanels.prototype.onTabKeyDown=function(h,g){var d=h.keyCode;if(!this.hasFocus||(d!=this.previousPanelKeyCode&&d!=this.nextPanelKeyCode)){return true}var b=this.getTabs();for(var a=0;a<b.length;a++){if(b[a]==g){var f=false;if(d==this.previousPanelKeyCode&&a>0){f=b[a-1]}else{if(d==this.nextPanelKeyCode&&a<b.length-1){f=b[a+1]}}if(f){this.showPanel(f);f.focus();break}}}return this.cancelEvent(h)};Spry.Widget.TabbedPanels.prototype.preorderTraversal=function(a,b){var f=false;if(a){f=b(a);if(a.hasChildNodes()){var g=a.firstChild;while(!f&&g){f=this.preorderTraversal(g,b);try{g=g.nextSibling}catch(d){g=null}}}}return f};Spry.Widget.TabbedPanels.prototype.addPanelEventListeners=function(f,b){var d=this;Spry.Widget.TabbedPanels.addEventListener(f,"click",function(h){return d.onTabClick(h,f)},false);Spry.Widget.TabbedPanels.addEventListener(f,"mouseover",function(h){return d.onTabMouseOver(h,f)},false);Spry.Widget.TabbedPanels.addEventListener(f,"mouseout",function(h){return d.onTabMouseOut(h,f)},false);if(this.enableKeyboardNavigation){var g=null;var a=null;this.preorderTraversal(f,function(h){if(h.nodeType==1){var l=f.attributes.getNamedItem("tabindex");if(l){g=h;return true}if(!a&&h.nodeName.toLowerCase()=="a"){a=h}}return false});if(g){this.focusElement=g}else{if(a){this.focusElement=a}}if(this.focusElement){Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"focus",function(h){return d.onTabFocus(h,f)},false);Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"blur",function(h){return d.onTabBlur(h,f)},false);Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"keydown",function(h){return d.onTabKeyDown(h,f)},false)}}};Spry.Widget.TabbedPanels.prototype.showPanel=function(b){var h=-1;if(typeof b=="number"){h=b}else{h=this.getTabIndex(b)}if(!h<0||h>=this.getTabbedPanelCount()){return}var g=this.getTabs();var d=this.getContentPanels();var a=Math.max(g.length,d.length);for(var f=0;f<a;f++){if(f!=h){if(g[f]){this.removeClassName(g[f],this.tabSelectedClass)}if(d[f]){this.removeClassName(d[f],this.panelVisibleClass);d[f].style.display="none"}}}this.addClassName(g[h],this.tabSelectedClass);this.addClassName(d[h],this.panelVisibleClass);d[h].style.display="block";this.currentTabIndex=h};Spry.Widget.TabbedPanels.prototype.attachBehaviors=function(f){var d=this.getTabs();var a=this.getContentPanels();var g=this.getTabbedPanelCount();for(var b=0;b<g;b++){this.addPanelEventListeners(d[b],a[b])}this.showPanel(this.defaultTab)};var Spry;if(!Spry){Spry={}}if(!Spry.Widget){Spry.Widget={}}Spry.Widget.SlidingPanels=function(a,b){this.element=this.getElement(a);this.enableAnimation=true;this.currentPanel=null;this.enableKeyboardNavigation=true;this.hasFocus=false;this.previousPanelKeyCode=Spry.Widget.SlidingPanels.KEY_LEFT;this.nextPanelKeyCode=Spry.Widget.SlidingPanels.KEY_RIGHT;this.currentPanelClass="SlidingPanelsCurrentPanel";this.focusedClass="SlidingPanelsFocused";this.animatingClass="SlidingPanelsAnimating";Spry.Widget.SlidingPanels.setOptions(this,b);if(this.element){this.element.style.overflow="hidden"}if(this.defaultPanel){if(typeof this.defaultPanel=="number"){this.currentPanel=this.getContentPanels()[this.defaultPanel]}else{this.currentPanel=this.getElement(this.defaultPanel)}}if(!this.currentPanel){this.currentPanel=this.getContentPanels()[0]}if(Spry.Widget.SlidingPanels.onloadDidFire){this.attachBehaviors()}else{Spry.Widget.SlidingPanels.loadQueue.push(this)}};Spry.Widget.SlidingPanels.prototype.onFocus=function(a){this.hasFocus=true;this.addClassName(this.element,this.focusedClass);return false};Spry.Widget.SlidingPanels.prototype.onBlur=function(a){this.hasFocus=false;this.removeClassName(this.element,this.focusedClass);return false};Spry.Widget.SlidingPanels.KEY_LEFT=37;Spry.Widget.SlidingPanels.KEY_UP=38;Spry.Widget.SlidingPanels.KEY_RIGHT=39;Spry.Widget.SlidingPanels.KEY_DOWN=40;Spry.Widget.SlidingPanels.prototype.onKeyDown=function(b){var a=b.keyCode;if(!this.hasFocus||(a!=this.previousPanelKeyCode&&a!=this.nextPanelKeyCode)){return true}if(a==this.nextPanelKeyCode){this.showNextPanel()}else{this.showPreviousPanel()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}if(b.stopPropagation){b.stopPropagation()}else{b.cancelBubble=true}return false};Spry.Widget.SlidingPanels.prototype.attachBehaviors=function(){var g=this.element;if(!g){return}if(this.enableKeyboardNavigation){var a=null;var f=g.attributes.getNamedItem("tabindex");if(f||g.nodeName.toLowerCase()=="a"){a=g}if(a){var b=this;Spry.Widget.SlidingPanels.addEventListener(a,"focus",function(h){return b.onFocus(h||window.event)},false);Spry.Widget.SlidingPanels.addEventListener(a,"blur",function(h){return b.onBlur(h||window.event)},false);Spry.Widget.SlidingPanels.addEventListener(a,"keydown",function(h){return b.onKeyDown(h||window.event)},false)}}if(this.currentPanel){var d=this.enableAnimation;this.enableAnimation=false;this.showPanel(this.currentPanel);this.enableAnimation=d}};Spry.Widget.SlidingPanels.prototype.getElement=function(a){if(a&&typeof a=="string"){return document.getElementById(a)}return a};Spry.Widget.SlidingPanels.prototype.addClassName=function(b,a){if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))!=-1)){return}b.className+=(b.className?" ":"")+a};Spry.Widget.SlidingPanels.prototype.removeClassName=function(b,a){if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))==-1)){return}b.className=b.className.replace(new RegExp("\\s*\\b"+a+"\\b","g"),"")};Spry.Widget.SlidingPanels.setOptions=function(f,d,a){if(!d){return}for(var b in d){if(a&&d[b]==undefined){continue}f[b]=d[b]}};Spry.Widget.SlidingPanels.prototype.getElementChildren=function(b){var a=[];var d=b.firstChild;while(d){if(d.nodeType==1){a.push(d)}d=d.nextSibling}return a};Spry.Widget.SlidingPanels.prototype.getCurrentPanel=function(){return this.currentPanel};Spry.Widget.SlidingPanels.prototype.getContentGroup=function(){return this.getElementChildren(this.element)[0]};Spry.Widget.SlidingPanels.prototype.getContentPanels=function(){return this.getElementChildren(this.getContentGroup())};Spry.Widget.SlidingPanels.prototype.getContentPanelsCount=function(){return this.getContentPanels().length};Spry.Widget.SlidingPanels.onloadDidFire=false;Spry.Widget.SlidingPanels.loadQueue=[];Spry.Widget.SlidingPanels.addLoadListener=function(a){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",a,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",a,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",a)}}}};Spry.Widget.SlidingPanels.processLoadQueue=function(d){Spry.Widget.SlidingPanels.onloadDidFire=true;var f=Spry.Widget.SlidingPanels.loadQueue;var a=f.length;for(var b=0;b<a;b++){f[b].attachBehaviors()}};Spry.Widget.SlidingPanels.addLoadListener(Spry.Widget.SlidingPanels.processLoadQueue);Spry.Widget.SlidingPanels.addEventListener=function(d,b,f,a){try{if(d.addEventListener){d.addEventListener(b,f,a)}else{if(d.attachEvent){d.attachEvent("on"+b,f)}}}catch(g){}};Spry.Widget.SlidingPanels.prototype.getContentPanelIndex=function(f){if(f){f=this.getElement(f);var b=this.getContentPanels();var a=b.length;for(var d=0;d<a;d++){if(b[d]==f){return d}}}return -1};Spry.Widget.SlidingPanels.prototype.showPanel=function(n){var l=-1;if(typeof n=="number"){l=n}else{l=this.getContentPanelIndex(n)}var g=this.getContentPanelsCount();if(g>0){l=(l>=g)?g-1:l}else{l=0}var a=this.getContentPanels()[l];var m=this.getContentGroup();if(a&&m){if(this.currentPanel){this.removeClassName(this.currentPanel,this.currentPanelClass)}this.currentPanel=a;var h=-a.offsetLeft;var f=-a.offsetTop;if(this.enableAnimation){if(this.animator){this.animator.stop()}var d=m.offsetLeft;var b=m.offsetTop;if(d!=h||b!=f){var o=this;this.addClassName(this.element,this.animatingClass);this.animator=new Spry.Widget.SlidingPanels.PanelAnimator(m,d,b,h,f,{duration:this.duration,fps:this.fps,transition:this.transition,finish:function(){o.removeClassName(o.element,o.animatingClass);o.addClassName(a,o.currentPanelClass)}});this.animator.start()}}else{m.style.left=h+"px";m.style.top=f+"px";this.addClassName(a,this.currentPanelClass)}}return a};Spry.Widget.SlidingPanels.prototype.showFirstPanel=function(){return this.showPanel(0)};Spry.Widget.SlidingPanels.prototype.showLastPanel=function(){return this.showPanel(this.getContentPanels().length-1)};Spry.Widget.SlidingPanels.prototype.showPreviousPanel=function(){return this.showPanel(this.getContentPanelIndex(this.currentPanel)-1)};Spry.Widget.SlidingPanels.prototype.showNextPanel=function(){return this.showPanel(this.getContentPanelIndex(this.currentPanel)+1)};Spry.Widget.SlidingPanels.PanelAnimator=function(g,b,a,l,h,f){this.element=g;this.curX=b;this.curY=a;this.dstX=l;this.dstY=h;this.fps=60;this.duration=500;this.transition=Spry.Widget.SlidingPanels.PanelAnimator.defaultTransition;this.startTime=0;this.timerID=0;this.finish=null;var d=this;this.intervalFunc=function(){d.step()};Spry.Widget.SlidingPanels.setOptions(this,f,true);this.interval=1000/this.fps};Spry.Widget.SlidingPanels.PanelAnimator.defaultTransition=function(f,b,a,d){f/=d;return b+((2-f)*f*a)};Spry.Widget.SlidingPanels.PanelAnimator.prototype.start=function(){this.stop();this.startTime=(new Date()).getTime();this.timerID=setTimeout(this.intervalFunc,this.interval)};Spry.Widget.SlidingPanels.PanelAnimator.prototype.stop=function(){if(this.timerID){clearTimeout(this.timerID)}this.timerID=0};Spry.Widget.SlidingPanels.PanelAnimator.prototype.step=function(){var d=(new Date()).getTime()-this.startTime;var b=d>=this.duration;var a,f;if(b){a=this.curX=this.dstX;f=this.curY=this.dstY}else{a=this.transition(d,this.curX,this.dstX-this.curX,this.duration);f=this.transition(d,this.curY,this.dstY-this.curY,this.duration)}this.element.style.left=a+"px";this.element.style.top=f+"px";if(!b){this.timerID=setTimeout(this.intervalFunc,this.interval)}else{if(this.finish){this.finish()}}};var Spry;if(!Spry){Spry={}}if(!Spry.Widget){Spry.Widget={}}Spry.Widget.BrowserSniff=function(){var n=navigator.appName.toString();var g=navigator.platform.toString();var d=navigator.userAgent.toString();this.mozilla=this.ie=this.opera=this.safari=false;var l=/Opera.([0-9\.]*)/i;var f=/MSIE.([0-9\.]*)/i;var h=/gecko/i;var m=/(applewebkit|safari)\/([\d\.]*)/i;var a=false;if((a=d.match(l))){this.opera=true;this.version=parseFloat(a[1])}else{if((a=d.match(f))){this.ie=true;this.version=parseFloat(a[1])}else{if((a=d.match(m))){this.safari=true;if(parseFloat(a[2])<420){this.version=2}else{this.version=3}}else{if(d.match(h)){var o=/rv:\s*([0-9\.]+)/i;a=d.match(o);this.mozilla=true;this.version=parseFloat(a[1])}}}}this.windows=this.mac=this.linux=false;this.Platform=d.match(/windows/i)?"windows":(d.match(/linux/i)?"linux":(d.match(/mac/i)?"mac":d.match(/unix/i)?"unix":"unknown"));this[this.Platform]=true;this.v=this.version;if(this.safari&&this.mac&&this.mozilla){this.mozilla=false}};Spry.is=new Spry.Widget.BrowserSniff();Spry.Widget.Tooltip=function(d,b,a){a=Spry.Widget.Utils.firstValid(a,{});this.init(b,d,a);if(Spry.Widget.Tooltip.onloadDidFire){this.attachBehaviors()}Spry.Widget.Tooltip.loadQueue.push(this)};Spry.Widget.Tooltip.prototype.init=function(f,g,a){var d=Spry.Widget.Utils;this.triggerElements=d.getElementsByClassName(f);this.tooltipElement=d.getElement(g);a.showDelay=parseInt(d.firstValid(a.showDelay,0),10);a.hideDelay=parseInt(d.firstValid(a.hideDelay,0),10);if(typeof this.triggerElements=="undefined"||!(this.triggerElements.length>0)){this.showError('The element(s) "'+f+'" do not exist in the page');return false}if(typeof this.tooltipElement=="undefined"||!this.tooltipElement){this.showError('The element "'+g+'" do not exists in the page');return false}this.listenersAttached=false;this.hoverClass="";this.followMouse=false;this.offsetX=15;this.offsetY=15;this.closeOnTooltipLeave=false;this.useEffect=false;d.setOptions(this,a);this.animator=null;for(var b=0;b<this.triggerElements.length;b++){if(!this.triggerElements[b].className){this.triggerElements[b].className=""}}if(this.useEffect){switch(this.useEffect.toString().toLowerCase()){case"blind":this.useEffect="Blind";break;case"fade":this.useEffect="Fade";break;default:this.useEffect=false}}this.visibleTooltip=false;this.tooltipElement.offsetHeight;if(Spry.Widget.Utils.getStyleProperty(this.tooltipElement,"display")!="none"){this.tooltipElement.style.display="none"}if(typeof this.offsetX!="numeric"){this.offsetX=parseInt(this.offsetX,10)}if(isNaN(this.offsetX)){this.offsetX=0}if(typeof this.offsetY!="numeric"){this.offsetY=parseInt(this.offsetY,10)}if(isNaN(this.offsetY)){this.offsetY=0}this.tooltipElement.style.position="absolute";this.tooltipElement.style.top="0px";this.tooltipElement.style.left="0px"};Spry.Widget.Tooltip.onloadDidFire=false;Spry.Widget.Tooltip.loadQueue=[];Spry.Widget.Tooltip.addLoadListener=function(a){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",a,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",a,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",a)}}}};Spry.Widget.Tooltip.processLoadQueue=function(d){Spry.Widget.Tooltip.onloadDidFire=true;var f=Spry.Widget.Tooltip.loadQueue;var a=f.length;for(var b=0;b<a;b++){if(!f[b].listenersAttached){f[b].attachBehaviors()}}};Spry.Widget.Tooltip.addLoadListener(Spry.Widget.Tooltip.processLoadQueue);Spry.Widget.Tooltip.prototype.addClassName=function(b,a){if(!b||!a){return}if(b.className.indexOf(a)==-1){b.className+=(b.className?" ":"")+a}};Spry.Widget.Tooltip.prototype.removeClassName=function(b,a){if(!b||!a){return}b.className=b.className.replace(new RegExp("\\s*\\b"+a+"\\b","g"),"")};Spry.Widget.Tooltip.prototype.showTooltip=function(){if(!this.visibleTooltip){this.tooltipElement.style.visibility="hidden";this.tooltipElement.style.zIndex="9999";this.tooltipElement.style.display="block"}Spry.Widget.Utils.putElementAt(this.tooltipElement,this.pos,{x:this.offsetX,y:this.offsetY},true);if(Spry.is.ie&&Spry.is.version=="6"){this.createIframeLayer(this.tooltipElement)}if(!this.visibleTooltip){if(this.useEffect){if(typeof this.showEffect=="undefined"){this.showEffect=new Spry.Widget.Tooltip[this.useEffect](this.tooltipElement,{from:0,to:1})}this.showEffect.start()}else{this.tooltipElement.style.visibility="visible"}}this.visibleTooltip=true};Spry.Widget.Tooltip.prototype.hideTooltip=function(b){if(this.useEffect&&!b){if(typeof this.hideEffect=="undefined"){this.hideEffect=new Spry.Widget.Tooltip[this.useEffect](this.tooltipElement,{from:1,to:0})}this.hideEffect.start()}else{if(typeof this.showEffect!="undefined"){this.showEffect.stop()}this.tooltipElement.style.display="none"}if(Spry.is.ie&&Spry.is.version=="6"){this.removeIframeLayer(this.tooltipElement)}if(this.hoverClass&&!this.hideTimer){for(var a=0;a<this.triggerElements.length;a++){this.removeClassName(this.triggerElements[a],this.hoverClass)}}this.visibleTooltip=false};Spry.Widget.Tooltip.prototype.displayTooltip=function(a){if(this.tooltipElement){if(this.hoverClass){for(var d=0;d<this.triggerElements.length;d++){this.removeClassName(this.triggerElements[d],this.hoverClass)}}if(a){if(this.hideTimer){clearInterval(this.hideTimer);delete (this.hideTimer)}if(this.hoverClass){if(typeof this.triggerHighlight!="undefined"){this.addClassName(this.triggerHighlight,this.hoverClass)}}var b=this;this.showTimer=setTimeout(function(){b.showTooltip()},this.showDelay)}else{if(this.showTimer){clearInterval(this.showTimer);delete (this.showTimer)}var b=this;this.hideTimer=setTimeout(function(){b.hideTooltip()},this.hideDelay)}}this.refreshTimeout()};Spry.Widget.Tooltip.prototype.onMouseOverTrigger=function(f){var d="";if(Spry.is.ie){d=f.srcElement}else{d=f.target}var b=Spry.Widget.Utils.contains;for(var a=0;a<this.triggerElements.length;a++){if(b(this.triggerElements[a],d)){d=this.triggerElements[a];break}}if(a==this.triggerElements.length){return}if(this.visibleTooltip&&this.triggerHighlight&&this.triggerHighlight==d){if(this.hideTimer){clearInterval(this.hideTimer);delete (this.hideTimer)}if(this.hoverClass){if(typeof this.triggerHighlight!="undefined"){this.addClassName(this.triggerHighlight,this.hoverClass)}}return}var g=Spry.Widget.Utils.getAbsoluteMousePosition(f);this.pos={x:g.x+this.offsetX,y:g.y+this.offsetY};this.triggerHighlight=d;Spry.Widget.Tooltip.closeAll();this.displayTooltip(true)};Spry.Widget.Tooltip.prototype.onMouseMoveTrigger=function(a){var b=Spry.Widget.Utils.getAbsoluteMousePosition(a);this.pos={x:b.x+this.offsetX,y:b.y+this.offsetY};if(this.visibleTooltip){this.showTooltip()}};Spry.Widget.Tooltip.prototype.onMouseOutTrigger=function(f){var d="";if(Spry.is.ie){d=f.toElement}else{d=f.relatedTarget}var b=Spry.Widget.Utils.contains;for(var a=0;a<this.triggerElements.length;a++){if(b(this.triggerElements[a],d)){return}}this.displayTooltip(false)};Spry.Widget.Tooltip.prototype.onMouseOutTooltip=function(d){var b="";if(Spry.is.ie){b=d.toElement}else{b=d.relatedTarget}var a=Spry.Widget.Utils.contains;if(a(this.tooltipElement,b)){return}this.displayTooltip(false)};Spry.Widget.Tooltip.prototype.onMouseOverTooltip=function(a){if(this.hideTimer){clearInterval(this.hideTimer);delete (this.hideTimer)}if(this.hoverClass){if(typeof this.triggerHighlight!="undefined"){this.addClassName(this.triggerHighlight,this.hoverClass)}}};Spry.Widget.Tooltip.prototype.refreshTimeout=function(){if(Spry.Widget.Tooltip.refreshTimeout!=null){clearTimeout(Spry.Widget.Tooltip.refreshTimeout);Spry.Widget.Tooltip.refreshTimeout=null}Spry.Widget.Tooltip.refreshTimeout=setTimeout(Spry.Widget.Tooltip.refreshAll,100)};Spry.Widget.Tooltip.prototype.destroy=function(){for(var a in this){try{if(typeof this.k=="object"&&typeof this.k.destroy=="function"){this.k.destroy()}delete this.k}catch(b){}}};Spry.Widget.Tooltip.prototype.checkDestroyed=function(){if(!this.tooltipElement||this.tooltipElement.parentNode==null){return true}return false};Spry.Widget.Tooltip.prototype.attachBehaviors=function(){var a=this;var d=Spry.Widget.Utils.addEventListener;for(var b=0;b<this.triggerElements.length;b++){d(this.triggerElements[b],"mouseover",function(f){a.onMouseOverTrigger(f||event);return true},false);d(this.triggerElements[b],"mouseout",function(f){a.onMouseOutTrigger(f||event);return true},false);if(this.followMouse){d(this.triggerElements[b],"mousemove",function(f){a.onMouseMoveTrigger(f||event);return true},false)}}if(this.closeOnTooltipLeave){d(this.tooltipElement,"mouseover",function(f){a.onMouseOverTooltip(f||event);return true},false);d(this.tooltipElement,"mouseout",function(f){a.onMouseOutTooltip(f||event);return true},false)}this.listenersAttached=true};Spry.Widget.Tooltip.prototype.createIframeLayer=function(b){if(typeof this.iframeLayer=="undefined"){var a=document.createElement("iframe");a.tabIndex="-1";a.src='javascript:"";';a.scrolling="no";a.frameBorder="0";a.className="iframeTooltip";b.parentNode.appendChild(a);this.iframeLayer=a}this.iframeLayer.style.left=b.offsetLeft+"px";this.iframeLayer.style.top=b.offsetTop+"px";this.iframeLayer.style.width=b.offsetWidth+"px";this.iframeLayer.style.height=b.offsetHeight+"px";this.iframeLayer.style.display="block"};Spry.Widget.Tooltip.prototype.removeIframeLayer=function(a){if(this.iframeLayer){this.iframeLayer.style.display="none"}};Spry.Widget.Tooltip.prototype.showError=function(a){alert("Spry.Widget.Tooltip ERR: "+a)};Spry.Widget.Tooltip.refreshAll=function(){var d=Spry.Widget.Tooltip.loadQueue;var a=d.length;for(var b=0;b<a;b++){if(d[b].checkDestroyed()){d[b].destroy();d.splice(b,1);b--;a=d.length}}};Spry.Widget.Tooltip.closeAll=function(){var d=Spry.Widget.Tooltip.loadQueue;var a=d.length;for(var b=0;b<a;b++){if(d[b].visibleTooltip){d[b].hideTooltip(true)}if(d[b].showTimer){clearTimeout(d[b].showTimer)}if(d[b].hideTimer){clearTimeout(d[b].hideTimer)}}};Spry.Widget.Tooltip.Animator=function(a,b){this.timer=null;this.fps=60;this.duration=500;this.startTime=0;this.transition=Spry.Widget.Tooltip.Animator.defaultTransition;this.onComplete=null;if(typeof a=="undefined"){return}this.element=Spry.Widget.Utils.getElement(a);Spry.Widget.Utils.setOptions(this,b,true);this.interval=this.duration/this.fps};Spry.Widget.Tooltip.Animator.defaultTransition=function(f,b,a,d){f/=d;return b+((2-f)*f*a)};Spry.Widget.Tooltip.Animator.prototype.start=function(){var a=this;this.startTime=(new Date).getTime();this.beforeStart();this.timer=setInterval(function(){a.stepAnimation()},this.interval)};Spry.Widget.Tooltip.Animator.prototype.stop=function(){if(this.timer){clearTimeout(this.timer)}this.timer=null};Spry.Widget.Tooltip.Animator.prototype.stepAnimation=function(){};Spry.Widget.Tooltip.Animator.prototype.beforeStart=function(){};Spry.Widget.Tooltip.Animator.prototype.destroy=function(){for(var a in this){try{delete this.k}catch(b){}}};Spry.Widget.Tooltip.Fade=function(a,b){Spry.Widget.Tooltip.Animator.call(this,a,b);if(Spry.is.ie){this.origOpacity=this.element.style.filter}else{this.origOpacity=this.element.style.opacity}};Spry.Widget.Tooltip.Fade.prototype=new Spry.Widget.Tooltip.Animator();Spry.Widget.Tooltip.Fade.prototype.constructor=Spry.Widget.Tooltip.Fade;Spry.Widget.Tooltip.Fade.prototype.stepAnimation=function(){var g=(new Date).getTime();var a=g-this.startTime;var d,h;if(a>=this.duration){this.beforeStop();this.stop();return}var b=this.transition(a,this.from,this.to-this.from,this.duration);if(Spry.is.ie){var f=this.element.style.filter.replace(/alpha\s*\(\s*opacity\s*=\s*[0-9\.]{1,3}\)/,"");this.element.style.filter=f+"alpha(opacity="+parseInt(b*100,10)+")"}else{this.element.style.opacity=b}this.element.style.visibility="visible";this.element.style.display="block"};Spry.Widget.Tooltip.Fade.prototype.beforeStop=function(){if(this.from>this.to){this.element.style.display="none"}if(Spry.is.mozilla){this.element.style.filter=this.origOpacity}else{this.element.style.opacity=this.origOpacity}};Spry.Widget.Tooltip.Blind=function(a,b){this.from=0;this.to=100;Spry.Widget.Tooltip.Animator.call(this,a,b);this.element.style.visibility="hidden";this.element.style.display="block";this.origHeight=parseInt(Spry.Widget.Utils.getStyleProperty(this.element,"height"),10);if(isNaN(this.origHeight)){this.origHeight=this.element.offsetHeight}if(this.to==0){this.from=this.origHeight}else{this.to=this.origHeight}};Spry.Widget.Tooltip.Blind.prototype=new Spry.Widget.Tooltip.Animator();Spry.Widget.Tooltip.Blind.prototype.constructor=Spry.Widget.Tooltip.Blind;Spry.Widget.Tooltip.Blind.prototype.beforeStart=function(){this.origOverflow=Spry.Widget.Utils.getStyleProperty(this.element,"overflow");this.element.style.overflow="hidden"};Spry.Widget.Tooltip.Blind.prototype.stepAnimation=function(){var f=(new Date).getTime();var a=f-this.startTime;var d,g;if(a>=this.duration){this.beforeStop();this.stop();return}var b=this.transition(a,this.from,this.to-this.from,this.duration);this.element.style.height=Math.floor(b)+"px";this.element.style.visibility="visible";this.element.style.display="block"};Spry.Widget.Tooltip.Blind.prototype.beforeStop=function(){this.element.style.overflow=this.origOverflow;if(this.from>this.to){this.element.style.display="none"}this.element.style.height=this.origHeight+"px"};if(!Spry.Widget.Utils){Spry.Widget.Utils={}}Spry.Widget.Utils.setOptions=function(f,d,a){if(!d){return}for(var b in d){if(a&&d[b]==undefined){continue}f[b]=d[b]}};Spry.Widget.Utils.getElement=function(a){if(a&&typeof a=="string"){return document.getElementById(a)}return a};Spry.Widget.Utils.getElementsByClassName=function(a){if(!a.length>0){return null}var s=a.split(",");var b=[];for(var h=0;h<s.length;h++){var m=s[h];var q=m.split(" ");var r=[];r[0]=[];r[0][0]=document.body;for(var g=0;g<q.length;g++){var o=Spry.Widget.Utils.getSelectorTokens(q[g]);for(var f=0;f<r[g].length;f++){var n=r[g][f].getElementsByTagName("*");r[g+1]=[];for(var d=0;d<n.length;d++){if(Spry.Widget.Utils.hasSelector(n[d],o)){r[g+1].push(n[d])}}}}if(r[g]){for(var f=0;f<r[g].length;f++){b.push(r[g][f])}}}return b};Spry.Widget.Utils.firstValid=function(){var d=null;var b=Spry.Widget.Utils.firstValid;for(var f=0;f<b.arguments.length;f++){if(typeof(b.arguments[f])!="undefined"){d=b.arguments[f];break}}return d};Spry.Widget.Utils.getSelectorTokens=function(a){a=a.replace(/\./g," .");a=a.replace(/\#/g," #");a=a.replace(/^\s+|\s+$/g,"");return a.split(" ")};Spry.Widget.Utils.hasSelector=function(b,d){for(var a=0;a<d.length;a++){switch(d[a].charAt(0)){case".":if(!b.className||b.className.indexOf(d[a].substr(1))==-1){return false}break;case"#":if(!b.id||b.id!=d[a].substr(1)){return false}break;default:if(b.nodeName.toLowerCase!=d[a]){return false}break}}return true};Spry.Widget.Utils.addEventListener=function(d,b,f,a){try{if(d.addEventListener){d.addEventListener(b,f,a)}else{if(d.attachEvent){d.attachEvent("on"+b,f)}}}catch(g){}};Spry.Widget.Utils.getStyleProperty=function(b,h){var f;var d=Spry.Widget.Utils.camelize(h);try{if(b.style){f=b.style[d]}if(!f){if(document.defaultView&&document.defaultView.getComputedStyle){var a=document.defaultView.getComputedStyle(b,null);f=a?a.getPropertyValue(h):null}else{if(b.currentStyle){f=b.currentStyle[d]}}}}catch(g){}return f=="auto"?null:f};Spry.Widget.Utils.camelize=function(h){if(h.indexOf("-")==-1){return h}var f=h.split("-");var a=true;var b="";for(var d=0;d<f.length;d++){if(f[d].length>0){if(a){b=f[d];a=false}else{var g=f[d];b+=g.charAt(0).toUpperCase()+g.substring(1)}}}return b};Spry.Widget.Utils.getPixels=function(a,d){var b=Spry.Widget.Utils.getStyleProperty(a,d);if(b=="medium"){b=2}else{b=parseInt(b,10)}b=isNaN(b)?0:b;return b};Spry.Widget.Utils.getAbsoluteMousePosition=function(a){var b={x:0,y:0};if(a.pageX){b.x=a.pageX}else{if(a.clientX){b.x=a.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)}}if(isNaN(b.x)){b.x=0}if(a.pageY){b.y=a.pageY}else{if(a.clientY){b.y=a.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}}if(isNaN(b.y)){b.y=0}return b};Spry.Widget.Utils.getBorderBox=function(d,n){n=n||document;if(typeof d=="string"){d=n.getElementById(d)}if(!d){return false}if(d.parentNode===null||Spry.Widget.Utils.getStyleProperty(d,"display")=="none"){return false}var l={x:0,y:0,width:0,height:0};var o=null;var g;if(d.getBoundingClientRect){g=d.getBoundingClientRect();var b=n.documentElement.scrollTop||n.body.scrollTop;var f=n.documentElement.scrollLeft||n.body.scrollLeft;l.x=g.left+f;l.y=g.top+b;l.width=g.right-g.left;l.height=g.bottom-g.top}else{if(n.getBoxObjectFor){g=n.getBoxObjectFor(d);l.x=g.x;l.y=g.y;l.width=g.width;l.height=g.height;var m=Spry.Widget.Utils.getPixels(d,"border-top-width");var h=Spry.Widget.Utils.getPixels(d,"border-left-width");l.x-=h;l.y-=m}else{l.x=d.offsetLeft;l.y=d.offsetTop;l.width=d.offsetWidth;l.height=d.offsetHeight;o=d.offsetParent;if(o!=d){while(o){l.x+=o.offsetLeft;l.y+=o.offsetTop;o=o.offsetParent}}var h=Spry.Widget.Utils.getPixels(d,"border-left-width");var m=Spry.Widget.Utils.getPixels(d,"border-top-width");l.x-=h;l.y-=m;var a=navigator.userAgent.toLowerCase();if(Spry.is.opera||Spry.is.safari&&Spry.Widget.Utils.getStyleProperty(d,"position")=="absolute"){l.y-=n.body.offsetTop}}}if(d.parentNode){o=d.parentNode}else{o=null}while(o&&o.tagName!="BODY"&&o.tagName!="HTML"){l.x-=o.scrollLeft;l.y-=o.scrollTop;if(o.parentNode){o=o.parentNode}else{o=null}}return l};Spry.Widget.Utils.setBorderBox=function(b,d){var g=Spry.Widget.Utils.getBorderBox(b,b.ownerDocument);if(g===false){return false}var f={x:Spry.Widget.Utils.getPixels(b,"left"),y:Spry.Widget.Utils.getPixels(b,"top")};var a={x:0,y:0,w:0,h:0};if(typeof d.x=="number"){a.x=d.x-g.x+f.x}if(typeof d.y=="number"){a.y=d.y-g.y+f.y}if(typeof d.x=="number"){b.style.left=a.x+"px"}if(typeof d.y=="number"){b.style.top=a.y+"px"}return true};Spry.Widget.Utils.putElementAt=function(b,d,g,a){a=Spry.Widget.Utils.firstValid(a,true);var f=Spry.Widget.Utils.getBorderBox(b,b.ownerDocument);Spry.Widget.Utils.setBorderBox(b,d);if(a){Spry.Widget.Utils.bringIntoView(b)}return true};Spry.Widget.Utils.bringIntoView=function(f){var q=Spry.Widget.Utils.getBorderBox(f,f.ownerDocument);if(q===false){return false}var s={x:Spry.Widget.Utils.getPixels(f,"left"),y:Spry.Widget.Utils.getPixels(f,"top")};var w={x:0,y:0};var n={x:0,y:0};var g=f.ownerDocument.compatMode=="CSS1Compat";var v=(Spry.is.ie&&g||Spry.is.mozilla)?f.ownerDocument.documentElement:f.ownerDocument.body;n.x=Spry.Widget.Utils.getPixels(v,"border-left-width");n.y=Spry.Widget.Utils.getPixels(v,"border-top-width");var y=v.scrollTop;var d=self.innerHeight?self.innerHeight:v.clientHeight;var x=q.y+(Spry.is.ie?-n.y:n.y);var u=q.y+q.height+(Spry.is.ie?-n.y:n.y);if(u-y>d){w.y=d-(u-y);if(x+w.y<y){w.y=y-x}}else{if(x<y){w.y=y-x}}if(w.y!=0){f.style.top=(s.y+w.y)+"px"}var m=v.scrollLeft;var o=v.clientWidth;var h=q.x+(Spry.is.ie?-n.x:n.x);var a=q.x+q.width+(Spry.is.ie?-n.x:n.x);if(a-m>o){w.x=o-(a-m);if(h+w.x<m){w.x=m-h}}else{if(h<m){w.x=m-h}}if(w.x!=0){f.style.left=(s.x+w.x)+"px"}};Spry.Widget.Utils.contains=function(f,g){if(typeof f.contains=="object"){return g&&f&&(f==g||f.contains(g))}else{var d=g;while(d){try{if(d==f){return true}d=d.parentNode}catch(b){return false}}return false}};function showAboutUs(){Spry.Effect.DoBlind("about_collapse",{duration:750,from:"0px",to:Spry.$("about_column_container").offsetHeight+"px"});Spry.Effect.DoBlind("about_link_open_container",{duration:750,from:15+(Spry.$("about_link_open").offsetHeight)+"px",to:"0px"})}function hideAboutUs(){Spry.Effect.DoBlind("about_collapse",{duration:750,from:Spry.$("about_column_container").offsetHeight+"px",to:"0px"});Spry.Effect.DoBlind("about_link_open_container",{duration:750,from:"0px",to:15+(Spry.$("about_link_open").offsetHeight)+"px"})}Spry.Utils.addLoadListener(function(){Spry.$$("#open_aboutus, #open_aboutus_dot").addEventListener("click",function(){showAboutUs();return false},false);Spry.$$("#close_aboutus, #close_aboutus_dot").addEventListener("click",function(){hideAboutUs();return false},false);Spry.$$("#topic_tabs a").addEventListener("click",function(){Spry.$$("#topic_tabs li").removeClassName("selected_tab");Spry.Utils.addClassName(Spry.Utils.getAncestor(this,"li"),"selected_tab");slider.showPanel(this.href.replace(/.*#/,""));return false},false)});try{document.documentElement.className="jsEnabled"}catch(e){}function openPopWindow(b,a,d){window.open(b,a,d)}function makeEmailLink(a,d,b){document.write('<a href="mailto:'+a+"@"+d+'">'+a+"@"+d+"</a>"+b)}function showAboutUs(){Spry.Effect.DoBlind("about_collapse",{duration:750,from:"0px",to:Spry.$("about_column_container").offsetHeight+"px"});Spry.Effect.DoBlind("about_link_open_container",{duration:750,from:15+(Spry.$("about_link_open").offsetHeight)+"px",to:"0px"})}function hideAboutUs(){Spry.Effect.DoBlind("about_collapse",{duration:750,from:Spry.$("about_column_container").offsetHeight+"px",to:"0px"});Spry.Effect.DoBlind("about_link_open_container",{duration:750,from:"0px",to:15+(Spry.$("about_link_open").offsetHeight)+"px"})}Spry.Utils.addLoadListener(function(){Spry.$$("#open_aboutus, #open_aboutus_dot").addEventListener("click",function(){showAboutUs();return false},false);Spry.$$("#close_aboutus, #close_aboutus_dot").addEventListener("click",function(){hideAboutUs();return false},false)});try{document.documentElement.className="jsEnabled"}catch(e){}(function(a){var b={onClick:function(){a(this).find(">a").each(function(){if(this.href){window.location=this.href}})},arrowSrc:"",subDelay:300,mainDelay:10};a.fn.clickMenu=function(h){var d=false;var v=((a.browser.msie)?4:2);var u=a.extend({},b,h);var f=function(D,C){if(D.timer&&!D.isVisible){clearTimeout(D.timer)}else{if(D.timer){return}}if(D.isVisible){D.timer=setTimeout(function(){a(o(l(D,"UL"),"LI")).unbind("mouseover",m).unbind("mouseout",w).unbind("click",u.onClick);a(D).hide();D.isVisible=false;D.timer=null},C)}};var r=function(D,C){if(D.timer){clearTimeout(D.timer)}if(!D.isVisible){D.timer=setTimeout(function(){if(!A(D.parentNode,"hover")){return}a(o(l(D,"UL"),"LI")).mouseover(m).mouseout(w).click(u.onClick);if(!A(D.parentNode,"main")){a(D).css("left",D.parentNode.offsetWidth-v)}D.isVisible=true;a(D).show();if(a.browser.msie){var E=a(l(D,"UL")).width();if(E<100){E=100}a(D).css("width",E)}D.timer=null},C)}};var B=function(D){var C=(D.type=="mouseover"?D.fromElement:D.toElement)||D.relatedTarget;while(C&&C!=this){try{C=C.parentNode}catch(D){C=this}}if(C==this){return false}return true};var x=function(F){var C=o(this.parentNode,"LI");var E=new RegExp("(^|\\s)hover(\\s|$)");for(var D=0;D<C.length;D++){if(E.test(C[D].className)){a(C[D]).removeClass("hover")}}a(this).addClass("hover");if(d){t(this,u.mainDelay)}};var m=function(C){if(!B(C)){return false}if(C.target!=this){if(!n(this,C.target)){return}}t(this,u.subDelay)};var t=function(C,D){var F=l(C,"DIV");var H=C.parentNode.firstChild;for(;H;H=H.nextSibling){if(H.nodeType==1&&H.nodeName.toUpperCase()=="LI"){var G=l(H,"DIV");if(G&&G.timer&&!G.isVisible){clearTimeout(G.timer);G.timer=null}}}var E=C.parentNode;for(;E;E=E.parentNode){if(E.nodeType==1&&E.nodeName.toUpperCase()=="DIV"){if(E.timer){clearTimeout(E.timer);E.timer=null;a(E.parentNode).addClass("hover")}}}a(C).addClass("hover");if(F&&F.isVisible){if(F.timer){clearTimeout(F.timer);F.timer=null}else{return}}a(C.parentNode.getElementsByTagName("DIV")).each(function(){if(this!=F&&this.isVisible){f(this,D);a(this.parentNode).removeClass("hover")}});if(F){r(F,D)}};var w=function(C){if(!B(C)){return false}if(C.target!=this){if(!n(this,C.target)){return}}var D=l(this,"DIV");if(!D){a(this).removeClass("hover")}else{if(!D.isVisible){a(this).removeClass("hover")}}};var y=function(E){var F=l(this,"DIV");var D=E.relatedTarget||E.toElement;var C;if(!d){a(this).removeClass("hover")}else{if(!F&&D){C=g(E.target,"UL","clickMenu");if(C.contains(D)){a(this).removeClass("hover")}}else{if(D){C=g(E.target,"UL","clickMenu");if(!F.isVisible&&(C.contains(D))){a(this).removeClass("hover")}}}}};var q=function(){var C=l(this,"DIV");if(C&&C.isVisible){s();a(this).addClass("hover")}else{t(this,u.mainDelay);d=true;a(document).bind("mousedown",z)}return false};var z=function(E){var D=false;var C=g(E.target,"UL","clickMenu");if(C){a(C.getElementsByTagName("DIV")).each(function(){if(this.isVisible){D=true}})}if(!D){s()}};var s=function(){a("ul.clickMenu div.outerbox").each(function(){if(this.timer){clearTimeout(this.timer);this.timer=null}if(this.isVisible){a(this).hide();this.isVisible=false}});a("ul.clickMenu li").removeClass("hover");a("ul.clickMenu>li li").unbind("mouseover",m).unbind("mouseout",w).unbind("click",u.onClick);a(document).unbind("mousedown",z);d=false};var l=function(D,C){if(!D){return null}var E=D.firstChild;for(;E;E=E.nextSibling){if(E.nodeType==1&&E.nodeName.toUpperCase()==C){return E}}return null};var o=function(E,C){if(!E){return[]}var D=[];var F=E.firstChild;for(;F;F=F.nextSibling){if(F.nodeType==1&&F.nodeName.toUpperCase()==C){D[D.length]=F}}return D};var g=function(E,D,G){var C=E.parentNode;var F=new RegExp("(^|\\s)"+G+"(\\s|$)");for(;C;C=C.parentNode){if(C.nodeType==1&&C.nodeName.toUpperCase()==D&&F.test(C.className)){return C}}return null};var A=function(C,E){var D=new RegExp("(^|\\s)"+E+"(\\s|$)");if(D.test(C.className)){return true}return false};var n=function(D,C){var E=D.firstChild;for(;E;E=E.nextSibling){if(E==C){return true}}return false};return this.each(function(){if(window.Node&&Node.prototype&&!Node.prototype.contains){Node.prototype.contains=function(E){return !!(this.compareDocumentPosition(E)&16)}}if(!A(this,"clickMenu")){a(this).addClass("clickMenu")}a("ul",this).shadowBox();if(a.browser.msie&&(!a.browser.version||parseInt(a.browser.version)<=6)){if(a.fn.bgiframe){a("div.outerbox",this).bgiframe()}else{a("div.outerbox",this).append('<iframe style="display:block;position:absolute;top:0;left:0;z-index:-1;filter:mask();width:expression(this.parentNode.offsetWidth);height:expression(this.parentNode.offsetHeight)"/>')}}a(this).bind("closemenu",function(){s()});var C=o(this,"LI");for(var D=0;D<C.length;D++){if(l(l(l(C[D],"DIV"),"UL"),"LI")){a(C[D]).click(q)}}a(C).hover(x,y).addClass("main").find(">div").addClass("inner");if(u.arrowSrc){a("div.inner div.outerbox",this).before('<img src="'+u.arrowSrc+'" class="liArrow" />')}a(this).wrap('<div class="cmDiv"></div>').after('<div style="clear: both; visibility: hidden;"></div>')})};a.fn.clickMenu.setDefaults=function(d){a.extend(b,d)}})(jQuery);(function(a){a.fn.shadowBox=function(){return this.each(function(){var b=a('<div class="outerbox"></div>').get(0);if(a(this).css("position")=="absolute"){a(b).css({position:"relative",width:this.offsetWidth,height:this.offsetHeight})}else{a(b).css("position","absolute")}a(this).addClass("innerBox").wrap(b).before('<div class="shadowbox1"></div><div class="shadowbox2"></div><div class="shadowbox3"></div>')})}})(jQuery);var tb_pathToImage="/auc/includes/thickbox/loadingAnimation.gif";
/*!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
$(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image();imgLoader.src=tb_pathToImage});function tb_init(a){$(a).click(function(){var d=this.title||this.name||null;var b=this.href||this.alt;var f=this.rel||false;tb_show(d,b,f);this.blur();return false})}function tb_show(n,b,l){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{$("#TB_overlay").addClass("TB_overlayBG")}if(n===null){n=""}$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$("#TB_load").show();var d;if(b.indexOf("?")!==-1){d=b.substr(0,b.indexOf("?"))}else{d=b}var g=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var o=d.toLowerCase().match(g);if(o==".jpg"||o==".jpeg"||o==".png"||o==".gif"||o==".bmp"){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(l){TB_TempArray=$("a[@rel="+l+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var h=TB_TempArray[TB_Counter].href.toLowerCase().match(g);if(!(TB_TempArray[TB_Counter].href==b)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>"}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var t=tb_getPageSize();var r=t[0]-150;var w=t[1]-150;var s=imgPreloader.width;var q=imgPreloader.height;if(s>r){q=q*(r/s);s=r;if(q>w){s=s*(w/q);q=w}}else{if(q>w){s=s*(w/q);q=w;if(s>r){q=q*(r/s);s=r}}}TB_WIDTH=s+30;TB_HEIGHT=q+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+b+"' width='"+s+"' height='"+q+"' alt='"+n+"'/></a><div id='TB_caption'>"+n+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='/sites/all/themes/auc_v3/images/close_overlay.gif' style='border:none;'></a></div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function v(){if($(document).unbind("click",v)){$(document).unbind("click",v)}$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,l);return false}$("#TB_prev").click(v)}if(!(TB_NextHTML==="")){function u(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,l);return false}$("#TB_next").click(u)}document.onkeydown=function(x){if(x==null){keycode=event.keyCode}else{keycode=x.which}if(keycode==27){tb_remove()}else{if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";u()}}else{if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";v()}}}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"})};imgPreloader.src=b}else{var a=b.replace(/^[^\?]+\??/,"");var f=tb_parseQuery(a);TB_WIDTH=(f.width*1)+30||630;TB_HEIGHT=(f.height*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(b.indexOf("TB_iframe")!=-1){urlNoQuery=b.split("TB_");$("#TB_iframeContent").remove();if(f.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+n+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else{if($("#TB_window").css("display")!="block"){if(f.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+n+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(n)}}$("#TB_closeWindowButton").click(tb_remove);if(b.indexOf("TB_inline")!=-1){$("#TB_ajaxContent").append($("#"+f.inlineId).children());$("#TB_window").unload(function(){$("#"+f.inlineId).append($("#TB_ajaxContent").children())});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"})}else{if(b.indexOf("TB_iframe")!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"})}}else{$("#TB_ajaxContent").load(b+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"})})}}}if(!f.modal){document.onkeyup=function(q){if(q==null){keycode=event.keyCode}else{keycode=q.which}if(keycode==27){tb_remove()}}}}catch(m){}}function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"})}function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}function tb_position(){$("#TB_window").css({marginLeft:"-"+parseInt((TB_WIDTH/2),10)+"px",width:TB_WIDTH+"px"});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:"-"+parseInt((TB_HEIGHT/2),10)+"px"})}}function tb_parseQuery(f){var g={};if(!f){return g}var a=f.split(/[;&]/);for(var d=0;d<a.length;d++){var l=a[d].split("=");if(!l||l.length!=2){continue}var b=unescape(l[0]);var h=unescape(l[1]);h=h.replace(/\+/g," ");g[b]=h}return g}function tb_getPageSize(){var d=document.documentElement;var a=window.innerWidth||self.innerWidth||(d&&d.clientWidth)||document.body.clientWidth;var b=window.innerHeight||self.innerHeight||(d&&d.clientHeight)||document.body.clientHeight;arrayPageSize=[a,b];return arrayPageSize}function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(a.indexOf("mac")!=-1&&a.indexOf("firefox")!=-1){return true}}AJS={BASE_URL:"",drag_obj:null,drag_elm:null,_drop_zones:[],_cur_pos:null,getScrollTop:function(){var a;if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollTop}}return a},addClass:function(){var d=AJS.forceArray(arguments);var b=d.pop();var a=function(f){if(!new RegExp("(^|\\s)"+b+"(\\s|$)").test(f.className)){f.className+=(f.className?" ":"")+b}};AJS.map(d,function(f){a(f)})},setStyle:function(){var d=AJS.forceArray(arguments);var b=d.pop();var a=d.pop();AJS.map(d,function(f){f.style[a]=AJS.getCssDim(b)})},extend:function(f){var d=new this("no_init");for(k in f){var b=d[k];var a=f[k];if(b&&b!=a&&typeof a=="function"){a=this._parentize(a,b)}d[k]=a}return new AJS.Class(d)},log:function(a){if(window.console){console.log(a)}else{var b=AJS.$("ajs_logger");if(!b){b=AJS.DIV({id:"ajs_logger",style:"color: green; position: absolute; left: 0"});b.style.top=AJS.getScrollTop()+"px";AJS.ACN(AJS.getBody(),b)}AJS.setHTML(b,""+a)}},setHeight:function(){var a=AJS.forceArray(arguments);a.splice(a.length-1,0,"height");AJS.setStyle.apply(null,a)},_getRealScope:function(a,d){d=AJS.$A(d);var b=a._cscope||window;return function(){var f=AJS.$FA(arguments).concat(d);return a.apply(b,f)}},documentInsert:function(a){if(typeof(a)=="string"){a=AJS.HTML2DOM(a)}document.write('<span id="dummy_holder"></span>');AJS.swapDOM(AJS.$("dummy_holder"),a)},getWindowSize:function(d){d=d||document;var b,a;if(self.innerHeight){b=self.innerWidth;a=self.innerHeight}else{if(d.documentElement&&d.documentElement.clientHeight){b=d.documentElement.clientWidth;a=d.documentElement.clientHeight}else{if(d.body){b=d.body.clientWidth;a=d.body.clientHeight}}}return{w:b,h:a}},flattenList:function(b){var d=[];var a=function(g,f){AJS.map(f,function(h){if(h==null){}else{if(AJS.isArray(h)){a(g,h)}else{g.push(h)}}})};a(d,b);return d},isFunction:function(a){return(typeof a=="function")},setEventKey:function(a){a.key=a.keyCode?a.keyCode:a.charCode;if(window.event){a.ctrl=window.event.ctrlKey;a.shift=window.event.shiftKey}else{a.ctrl=a.ctrlKey;a.shift=a.shiftKey}switch(a.key){case 63232:a.key=38;break;case 63233:a.key=40;break;case 63235:a.key=39;break;case 63234:a.key=37;break}},removeElement:function(){var a=AJS.forceArray(arguments);AJS.map(a,function(b){AJS.swapDOM(b,null)})},_unloadListeners:function(){if(AJS.listeners){AJS.map(AJS.listeners,function(d,b,a){AJS.REV(d,b,a)})}AJS.listeners=[]},join:function(b,a){try{return a.join(b)}catch(f){var d=a[0]||"";AJS.map(a,function(g){d+=b+g},1);return d+""}},getIndex:function(f,d,b){for(var a=0;a<d.length;a++){if(b&&b(d[a])||f==d[a]){return a}}return -1},isIn:function(d,a){var b=AJS.getIndex(d,a);if(b!=-1){return true}else{return false}},isArray:function(a){return a instanceof Array},setLeft:function(){var a=AJS.forceArray(arguments);a.splice(a.length-1,0,"left");AJS.setStyle.apply(null,a)},appendChildNodes:function(a){if(arguments.length>=2){AJS.map(arguments,function(b){if(AJS.isString(b)){b=AJS.TN(b)}if(AJS.isDefined(b)){a.appendChild(b)}},1)}return a},getElementsByTagAndClassName:function(l,h,f,b){var m=[];if(!AJS.isDefined(f)){f=document}if(!AJS.isDefined(l)){l="*"}var a=f.getElementsByTagName(l);var g=a.length;var d=new RegExp("(^|\\s)"+h+"(\\s|$)");for(i=0,j=0;i<g;i++){if(d.test(a[i].className)||h==null){m[j]=a[i];j++}}if(b){return m[0]}else{return m}},isOpera:function(){return(navigator.userAgent.toLowerCase().indexOf("opera")!=-1)},isString:function(a){return(typeof a=="string")},hideElement:function(b){var a=AJS.forceArray(arguments);AJS.map(a,function(d){d.style.display="none"})},setOpacity:function(b,a){b.style.opacity=a;b.style.filter="alpha(opacity="+a*100+")"},insertBefore:function(b,a){a.parentNode.insertBefore(b,a);return b},setWidth:function(){var a=AJS.forceArray(arguments);a.splice(a.length-1,0,"width");AJS.setStyle.apply(null,a)},createArray:function(a){if(AJS.isArray(a)&&!AJS.isString(a)){return a}else{if(!a){return[]}else{return[a]}}},isDict:function(b){var a=String(b);return a.indexOf(" Object")!=-1},isMozilla:function(){return(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210)},removeEventListener:function(g,f,a,d){var b="ajsl_"+f+a;if(!d){d=false}a=g[b]||a;if(g["on"+f]==a){g["on"+f]=g[b+"old"]}if(g.removeEventListener){g.removeEventListener(f,a,d);if(AJS.isOpera()){g.removeEventListener(f,a,!d)}}else{if(g.detachEvent){g.detachEvent("on"+f,a)}}},callLater:function(a,d){var b=function(){a()};window.setTimeout(b,d)},setTop:function(){var a=AJS.forceArray(arguments);a.splice(a.length-1,0,"top");AJS.setStyle.apply(null,a)},_createDomShortcuts:function(){var b=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","h4","h5","h6","br","textarea","form","p","select","option","optgroup","iframe","script","center","dl","dt","dd","small","pre","i"];var a=function(d){AJS[d.toUpperCase()]=function(){return AJS.createDOM.apply(null,[d,arguments])}};AJS.map(b,a);AJS.TN=function(d){return document.createTextNode(d)}},addCallback:function(a){this.callbacks.unshift(a)},bindMethods:function(d){for(var b in d){var a=d[b];if(typeof(a)=="function"){d[b]=AJS.$b(a,d)}}},partial:function(b){var a=AJS.$FA(arguments);a.shift();return function(){a=a.concat(AJS.$FA(arguments));return b.apply(window,a)}},isNumber:function(a){return(typeof a=="number")},getCssDim:function(a){if(AJS.isString(a)){return a}else{return a+"px"}},isIe:function(){return(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)},removeClass:function(){var d=AJS.forceArray(arguments);var a=d.pop();var b=function(f){f.className=f.className.replace(new RegExp("\\s?"+a,"g"),"")};AJS.map(d,function(f){b(f)})},setHTML:function(b,a){b.innerHTML=a;return b},map:function(f,h,d,a){var g=0,b=f.length;if(d){g=d}if(a){b=a}for(g;g<b;g++){var m=h(f[g],g);if(m!=undefined){return m}}},addEventListener:function(m,l,n,h,g){var f="ajsl_"+l+n;if(!g){g=false}AJS.listeners=AJS.$A(AJS.listeners);if(AJS.isIn(l,["keypress","keydown","keyup","click"])){var d=n;n=function(o){AJS.setEventKey(o);return d.apply(window,arguments)}}var b=AJS.isIn(l,["submit","load","scroll","resize"]);var a=AJS.$A(m);AJS.map(a,function(q){if(h){var o=n;n=function(t){AJS.REV(q,l,n);return o.apply(window,arguments)}}if(b){var s=q["on"+l];var r=function(){if(s){n(arguments);return s(arguments)}else{return n(arguments)}};q[f]=r;q[f+"old"]=s;m["on"+l]=r}else{q[f]=n;if(q.attachEvent){q.attachEvent("on"+l,n)}else{if(q.addEventListener){q.addEventListener(l,n,g)}}AJS.listeners.push([q,l,n])}})},preloadImages:function(){AJS.AEV(window,"load",AJS.$p(function(a){AJS.map(a,function(d){var b=new Image();b.src=d})},arguments))},forceArray:function(a){var b=[];AJS.map(a,function(d){b.push(d)});return b},update:function(b,a){for(var d in a){b[d]=a[d]}return b},getBody:function(){return AJS.$bytc("body")[0]},HTML2DOM:function(b,a){var f=AJS.DIV();f.innerHTML=b;if(a){return f.childNodes[0]}else{return f}},getElement:function(a){if(AJS.isString(a)||AJS.isNumber(a)){return document.getElementById(a)}else{return a}},showElement:function(){var a=AJS.forceArray(arguments);AJS.map(a,function(b){b.style.display=""})},bind:function(b,d,a){b._cscope=d;return AJS._getRealScope(b,a)},createDOM:function(h,f){var g=0,d;var m=document.createElement(h);var a=f[0];if(AJS.isDict(f[g])){for(k in a){d=a[k];if(k=="style"||k=="s"){m.style.cssText=d}else{if(k=="c"||k=="class"||k=="className"){m.className=d}else{m.setAttribute(k,d)}}}g++}if(a==null){g=1}for(var b=g;b<f.length;b++){var d=f[b];if(d){var l=typeof(d);if(l=="string"||l=="number"){d=AJS.TN(d)}m.appendChild(d)}}return m},swapDOM:function(d,b){d=AJS.getElement(d);var a=d.parentNode;if(b){b=AJS.getElement(b);a.replaceChild(b,d)}else{a.removeChild(d)}return b},isDefined:function(a){return(a!="undefined"&&a!=null)}};AJS.$=AJS.getElement;AJS.$$=AJS.getElements;AJS.$f=AJS.getFormElement;AJS.$p=AJS.partial;AJS.$b=AJS.bind;AJS.$A=AJS.createArray;AJS.DI=AJS.documentInsert;AJS.ACN=AJS.appendChildNodes;AJS.RCN=AJS.replaceChildNodes;AJS.AEV=AJS.addEventListener;AJS.REV=AJS.removeEventListener;AJS.$bytc=AJS.getElementsByTagAndClassName;AJS.$AP=AJS.absolutePosition;AJS.$FA=AJS.forceArray;AJS.addEventListener(window,"unload",AJS._unloadListeners);AJS._createDomShortcuts();AJS.Class=function(b){var a=function(){if(arguments[0]!="no_init"){return this.init.apply(this,arguments)}};a.prototype=b;AJS.update(a,AJS.Class.prototype);return a};AJS.Class.prototype={extend:function(d){var b=new this("no_init");for(k in d){var a=b[k];var f=d[k];if(a&&a!=f&&typeof f=="function"){f=this._parentize(f,a)}b[k]=f}return new AJS.Class(b)},implement:function(a){AJS.update(this.prototype,a)},_parentize:function(b,a){return function(){this.parent=a;return b.apply(this,arguments)}}};script_loaded=true;script_loaded=true;AJS.fx={_shades:{0:"ffffff",1:"ffffee",2:"ffffdd",3:"ffffcc",4:"ffffbb",5:"ffffaa",6:"ffff99"},highlight:function(d,b){var a=new AJS.fx.Base();a.elm=AJS.$(d);a.options.duration=600;a.setOptions(b);AJS.update(a,{increase:function(){if(this.now==7){d.style.backgroundColor="#fff"}else{d.style.backgroundColor="#"+AJS.fx._shades[Math.floor(this.now)]}}});return a.custom(6,0)},fadeIn:function(d,a){a=a||{};if(!a.from){a.from=0;AJS.setOpacity(d,0)}if(!a.to){a.to=1}var b=new AJS.fx.Style(d,"opacity",a);return b.custom(a.from,a.to)},fadeOut:function(b,a){a=a||{};if(!a.from){a.from=1}if(!a.to){a.to=0}a.duration=300;var d=new AJS.fx.Style(b,"opacity",a);return d.custom(a.from,a.to)},setWidth:function(b,a){var d=new AJS.fx.Style(b,"width",a);return d.custom(a.from,a.to)},setHeight:function(b,a){var d=new AJS.fx.Style(b,"height",a);return d.custom(a.from,a.to)}};AJS.fx.Base=new AJS.Class({init:function(a){this.options={onStart:function(){},onComplete:function(){},transition:AJS.fx.Transitions.sineInOut,duration:500,wait:true,fps:50};AJS.update(this.options,a);AJS.bindMethods(this)},setOptions:function(a){AJS.update(this.options,a)},step:function(){var a=new Date().getTime();if(a<this.time+this.options.duration){this.cTime=a-this.time;this.setNow()}else{setTimeout(AJS.$b(this.options.onComplete,this,[this.elm]),10);this.clearTimer();this.now=this.to}this.increase()},setNow:function(){this.now=this.compute(this.from,this.to)},compute:function(b,d){var a=d-b;return this.options.transition(this.cTime,b,a,this.options.duration)},clearTimer:function(){clearInterval(this.timer);this.timer=null;return this},_start:function(a,b){if(!this.options.wait){this.clearTimer()}if(this.timer){return}setTimeout(AJS.$p(this.options.onStart,this.elm),10);this.from=a;this.to=b;this.time=new Date().getTime();this.timer=setInterval(this.step,Math.round(1000/this.options.fps));return this},custom:function(a,b){return this._start(a,b)},set:function(a){this.now=a;this.increase();return this},setStyle:function(d,a,b){if(this.property=="opacity"){AJS.setOpacity(d,b)}else{AJS.setStyle(d,a,b)}}});AJS.fx.Style=AJS.fx.Base.extend({init:function(d,a,b){this.parent();this.elm=d;this.setOptions(b);this.property=a},increase:function(){this.setStyle(this.elm,this.property,this.now)}});AJS.fx.Styles=AJS.fx.Base.extend({init:function(b,a){this.parent();this.elm=AJS.$(b);this.setOptions(a);this.now={}},setNow:function(){for(p in this.from){this.now[p]=this.compute(this.from[p],this.to[p])}},custom:function(b){if(this.timer&&this.options.wait){return}var a={};var d={};for(p in b){a[p]=b[p][0];d[p]=b[p][1]}return this._start(a,d)},increase:function(){for(var a in this.now){this.setStyle(this.elm,a,this.now[a])}}});AJS.fx.Transitions={linear:function(f,a,h,g){return h*f/g+a},sineInOut:function(f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a}};script_loaded=true;script_loaded=true;var GB_CURRENT=null;GB_hide=function(a){GB_CURRENT.hide(a)};GreyBox=new AJS.Class({init:function(d){this.use_fx=AJS.fx;this.type="page";this.overlay_click_close=false;this.salt=0;this.root_dir=GB_ROOT_DIR;this.callback_fns=[];this.reload_on_close=false;this.src_loader=this.root_dir+"loader_frame.html";var b=window.location.hostname.indexOf("www");var a=this.src_loader.indexOf("www");if(b!=-1&&a==-1){this.src_loader=this.src_loader.replace("://","://www.")}if(b==-1&&a!=-1){this.src_loader=this.src_loader.replace("://www.","://")}this.show_loading=true;AJS.update(this,d)},addCallback:function(a){if(a){this.callback_fns.push(a)}},show:function(b){GB_CURRENT=this;this.url=b;var a=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(a),function(d){d.style.visibility="hidden"});this.createElements();return false},hide:function(a){var b=this;AJS.callLater(function(){var g=b.callback_fns;if(g!=[]){AJS.map(g,function(h){h()})}b.onHide();if(b.use_fx){var f=b.overlay;AJS.fx.fadeOut(b.overlay,{onComplete:function(){AJS.removeElement(f);f=null},duration:300});AJS.removeElement(b.g_window)}else{AJS.removeElement(b.g_window,b.overlay)}b.removeFrame();AJS.REV(window,"scroll",_GB_setOverlayDimension);AJS.REV(window,"resize",_GB_update);var d=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(d),function(h){h.style.visibility="visible"});GB_CURRENT=null;if(b.reload_on_close){window.location.reload()}if(AJS.isFunction(a)){a()}},10)},update:function(){this.setOverlayDimension();this.setFrameSize();this.setWindowPosition()},createElements:function(){this.initOverlay();this.g_window=AJS.DIV({id:"GB_window"});AJS.hideElement(this.g_window);AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling);this.initFrame();this.initHook();this.update();var a=this;if(this.use_fx){AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){a.onShow();AJS.showElement(a.g_window);a.startLoading()}})}else{AJS.setOpacity(this.overlay,0.7);AJS.showElement(this.g_window);this.onShow();this.startLoading()}AJS.AEV(window,"scroll",_GB_setOverlayDimension);AJS.AEV(window,"resize",_GB_update)},removeFrame:function(){try{AJS.removeElement(this.iframe)}catch(a){}this.iframe=null},startLoading:function(){this.iframe.src=this.src_loader+"?s="+this.salt++;AJS.showElement(this.iframe)},setOverlayDimension:function(){var b=AJS.getWindowSize();if(AJS.isMozilla()||AJS.isOpera()){AJS.setWidth(this.overlay,"100%")}else{AJS.setWidth(this.overlay,b.w)}var a=Math.max(AJS.getScrollTop()+b.h,AJS.getScrollTop()+this.height);if(a<AJS.getScrollTop()){AJS.setHeight(this.overlay,a)}else{AJS.setHeight(this.overlay,AJS.getScrollTop()+b.h)}},initOverlay:function(){this.overlay=AJS.DIV({id:"GB_overlay"});if(this.overlay_click_close){AJS.AEV(this.overlay,"click",GB_hide)}AJS.setOpacity(this.overlay,0);AJS.getBody().insertBefore(this.overlay,AJS.getBody().firstChild)},initFrame:function(){if(!this.iframe){var a={name:"GB_frame","class":"GB_frame",frameBorder:0};if(AJS.isIe()){a.src='javascript:false;document.write("");'}this.iframe=AJS.IFRAME(a);this.middle_cnt=AJS.DIV({"class":"content"},this.iframe);this.top_cnt=AJS.DIV();this.bottom_cnt=AJS.DIV();AJS.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt)}},onHide:function(){},onShow:function(){},setFrameSize:function(){},setWindowPosition:function(){},initHook:function(){}});_GB_update=function(){if(GB_CURRENT){GB_CURRENT.update()}};_GB_setOverlayDimension=function(){if(GB_CURRENT){GB_CURRENT.setOverlayDimension()}};AJS.preloadImages(GB_ROOT_DIR+"indicator.gif");script_loaded=true;var GB_SETS={};function decoGreyboxLinks(){var a=AJS.$bytc("a");AJS.map(a,function(f){if(f.getAttribute("href")&&f.getAttribute("rel")){var b=f.getAttribute("rel");if(b.indexOf("gb_")==0){var h=b.match(/\w+/)[0];var g=b.match(/\[(.*)\]/)[1];var d=0;var l={caption:f.title||"",url:f.href};if(h=="gb_pageset"||h=="gb_imageset"){if(!GB_SETS[g]){GB_SETS[g]=[]}GB_SETS[g].push(l);d=GB_SETS[g].length}if(h=="gb_pageset"){f.onclick=function(){GB_showFullScreenSet(GB_SETS[g],d);return false}}if(h=="gb_imageset"){f.onclick=function(){GB_showImageSet(GB_SETS[g],d);return false}}if(h=="gb_image"){f.onclick=function(){GB_showImage(l.caption,l.url);return false}}if(h=="gb_page"){f.onclick=function(){var m=g.split(/, ?/);GB_show(l.caption,l.url,parseInt(m[1]),parseInt(m[0]));return false}}if(h=="gb_page_fs"){f.onclick=function(){GB_showFullScreen(l.caption,l.url);return false}}if(h=="gb_page_center"){f.onclick=function(){var m=g.split(/, ?/);GB_showCenter(l.caption,l.url,parseInt(m[1]),parseInt(m[0]));return false}}}}})}AJS.AEV(window,"load",decoGreyboxLinks);GB_showImage=function(d,f,a){var b={width:300,height:300,type:"image",fullscreen:false,center_win:true,caption:d,callback_fn:a};var g=new GB_Gallery(b);return g.show(f)};GB_showPage=function(g,a,f){var b={type:"page",caption:g,callback_fn:f,fullscreen:true,center_win:false};var d=new GB_Gallery(b);return d.show(a)};GB_Gallery=GreyBox.extend({init:function(a){this.parent({});this.img_close=this.root_dir+"g_close.gif";AJS.update(this,a);this.addCallback(this.callback_fn)},initHook:function(){AJS.addClass(this.g_window,"GB_Gallery");var f=AJS.DIV({"class":"inner"});this.header=AJS.DIV({"class":"GB_header"},f);AJS.setOpacity(this.header,0);AJS.getBody().insertBefore(this.header,this.overlay.nextSibling);var b=AJS.TD({id:"GB_caption","class":"caption",width:"40%"},this.caption);var l=AJS.TD({id:"GB_middle","class":"middle",width:"20%"});var h=AJS.IMG({src:this.img_close});AJS.AEV(h,"click",GB_hide);var g=AJS.TD({"class":"close",width:"40%"},h);var d=AJS.TBODY(AJS.TR(b,l,g));var a=AJS.TABLE({cellspacing:"0",cellpadding:0,border:0},d);AJS.ACN(f,a);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this))}else{AJS.AEV(window,"scroll",AJS.$b(this._setHeaderPos,this))}},setFrameSize:function(){var a=this.overlay.offsetWidth;var b=AJS.getWindowSize();if(this.fullscreen){this.width=a-40;this.height=b.h-80}AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height);AJS.setWidth(this.header,a)},_setHeaderPos:function(){AJS.setTop(this.header,AJS.getScrollTop()+10)},setWindowPosition:function(){var d=this.overlay.offsetWidth;var b=AJS.getWindowSize();AJS.setLeft(this.g_window,((d-50-this.width)/2));var a=AJS.getScrollTop()+55;if(!this.center_win){AJS.setTop(this.g_window,a)}else{var f=((b.h-this.height)/2)+20+AJS.getScrollTop();if(f<0){f=0}if(a>f){f=a}AJS.setTop(this.g_window,f)}this._setHeaderPos()},onHide:function(){AJS.removeElement(this.header);AJS.removeClass(this.g_window,"GB_Gallery")},onShow:function(){if(this.use_fx){AJS.fx.fadeIn(this.header,{to:1})}else{AJS.setOpacity(this.header,1)}}});AJS.preloadImages(GB_ROOT_DIR+"g_close.gif");GB_showFullScreenSet=function(g,f,d){var b={type:"page",fullscreen:true,center_win:false};var a=new GB_Sets(b,g);a.addCallback(d);a.showSet(f-1);return false};GB_showImageSet=function(g,f,d){var b={type:"image",fullscreen:false,center_win:true,width:300,height:300};var a=new GB_Sets(b,g);a.addCallback(d);a.showSet(f-1);return false};GB_Sets=GB_Gallery.extend({init:function(a,b){this.parent(a);if(!this.img_next){this.img_next=this.root_dir+"next.gif"}if(!this.img_prev){this.img_prev=this.root_dir+"prev.gif"}this.current_set=b},showSet:function(b){this.current_index=b;var a=this.current_set[this.current_index];this.show(a.url);this._setCaption(a.caption);this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev});this.btn_next=AJS.IMG({"class":"right",src:this.img_next});AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this));AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this));GB_STATUS=AJS.SPAN({"class":"GB_navStatus"});AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next);this.updateStatus()},updateStatus:function(){AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length);if(this.current_index==0){AJS.addClass(this.btn_prev,"disabled")}else{AJS.removeClass(this.btn_prev,"disabled")}if(this.current_index==this.current_set.length-1){AJS.addClass(this.btn_next,"disabled")}else{AJS.removeClass(this.btn_next,"disabled")}},_setCaption:function(a){AJS.setHTML(AJS.$("GB_caption"),a)},updateFrame:function(){var a=this.current_set[this.current_index];this._setCaption(a.caption);this.url=a.url;this.startLoading()},switchPrev:function(){if(this.current_index!=0){this.current_index--;this.updateFrame();this.updateStatus()}},switchNext:function(){if(this.current_index!=this.current_set.length-1){this.current_index++;this.updateFrame();this.updateStatus()}}});AJS.AEV(window,"load",function(){AJS.preloadImages(GB_ROOT_DIR+"next.gif",GB_ROOT_DIR+"prev.gif")});GB_show=function(b,d,l,h,f){var a={caption:b,height:l||500,width:h||500,fullscreen:false,callback_fn:f};var g=new GB_Window(a);return g.show(d)};GB_showCenter=function(l,a,g,d,f){var b={caption:l,center_win:true,height:g||500,width:d||500,fullscreen:false,callback_fn:f};var h=new GB_Window(b);return h.show(a)};GB_showFullScreen=function(f,d,b){var a={caption:f,fullscreen:true,callback_fn:b};var g=new GB_Window(a);return g.show(d)};GB_Window=GreyBox.extend({init:function(a){this.parent({});this.img_header=this.root_dir+"header_bg.gif";this.img_close=this.root_dir+"w_close.gif";this.show_close_img=true;AJS.update(this,a);this.addCallback(this.callback_fn)},initHook:function(){AJS.addClass(this.g_window,"GB_Window");this.header=AJS.TABLE({"class":"header"});this.header.style.backgroundImage="url("+this.img_header+")";var g=AJS.TD({"class":"caption"},this.caption);var d=AJS.TD({"class":"close"});if(this.show_close_img){var b=AJS.IMG({src:this.img_close});var a=AJS.SPAN("Close");var f=AJS.DIV(b,a);AJS.AEV([b,a],"mouseover",function(){AJS.addClass(a,"on")});AJS.AEV([b,a],"mouseout",function(){AJS.removeClass(a,"on")});AJS.AEV([b,a],"mousedown",function(){AJS.addClass(a,"click")});AJS.AEV([b,a],"mouseup",function(){AJS.removeClass(a,"click")});AJS.AEV([b,a],"click",GB_hide);AJS.ACN(d,f)}tbody_header=AJS.TBODY();AJS.ACN(tbody_header,AJS.TR(g,d));AJS.ACN(this.header,tbody_header);AJS.ACN(this.top_cnt,this.header);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this))}},setFrameSize:function(){if(this.fullscreen){var a=AJS.getWindowSize();overlay_h=a.h;this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);this.height=Math.round(overlay_h-(overlay_h/100)*10)}AJS.setWidth(this.header,this.width+6);AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height)},setWindowPosition:function(){var b=AJS.getWindowSize();AJS.setLeft(this.g_window,((b.w-this.width)/2)-13);if(!this.center_win){AJS.setTop(this.g_window,AJS.getScrollTop())}else{var a=((b.h-this.height)/2)-20+AJS.getScrollTop();if(a<0){a=0}AJS.setTop(this.g_window,a)}}});AJS.preloadImages(GB_ROOT_DIR+"w_close.gif",GB_ROOT_DIR+"header_bg.gif");script_loaded=true;