var MooTools={'version':'1.2.1','build':'0d4845aab3d9a4fdee2f0d4a6dd59210e4b697cf'};var Native=function(options){options=options||{};var name=options.name;var legacy=options.legacy;var protect=options.protect;var methods=options.implement;var generics=options.generics;var initialize=options.initialize;var afterImplement=options.afterImplement||function(){};var object=initialize||legacy;generics=generics!==false;object.constructor=Native;object.$family={name:'native'};if(legacy&&initialize)object.prototype=legacy.prototype;object.prototype.constructor=object;if(name){var family=name.toLowerCase();object.prototype.$family={name:family};Native.typize(object,family);}
var add=function(obj,name,method,force){if(!protect||force||!obj.prototype[name])obj.prototype[name]=method;if(generics)Native.genericize(obj,name,protect);afterImplement.call(obj,name,method);return obj;};object.alias=function(a1,a2,a3){if(typeof a1=='string'){if((a1=this.prototype[a1]))return add(this,a2,a1,a3);}
for(var a in a1)this.alias(a,a1[a],a2);return this;};object.implement=function(a1,a2,a3){if(typeof a1=='string')return add(this,a1,a2,a3);for(var p in a1)add(this,p,a1[p],a2);return this;};if(methods)object.implement(methods);return object;};Native.genericize=function(object,property,check){if((!check||!object[property])&&typeof object.prototype[property]=='function')object[property]=function(){var args=Array.prototype.slice.call(arguments);return object.prototype[property].apply(args.shift(),args);};};Native.implement=function(objects,properties){for(var i=0,l=objects.length;i<l;i++)objects[i].implement(properties);};Native.typize=function(object,family){if(!object.type)object.type=function(item){return($type(item)===family);};};(function(){var natives={'Array':Array,'Date':Date,'Function':Function,'Number':Number,'RegExp':RegExp,'String':String};for(var n in natives)new Native({name:n,initialize:natives[n],protect:true});var types={'boolean':Boolean,'native':Native,'object':Object};for(var t in types)Native.typize(types[t],t);var generics={'Array':["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf"],'String':["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]};for(var g in generics){for(var i=generics[g].length;i--;)Native.genericize(window[g],generics[g][i],true);};})();var Hash=new Native({name:'Hash',initialize:function(object){if($type(object)=='hash')object=$unlink(object.getClean());for(var key in object)this[key]=object[key];return this;}});Hash.implement({forEach:function(fn,bind){for(var key in this){if(this.hasOwnProperty(key))fn.call(bind,this[key],key,this);}},getClean:function(){var clean={};for(var key in this){if(this.hasOwnProperty(key))clean[key]=this[key];}
return clean;},getLength:function(){var length=0;for(var key in this){if(this.hasOwnProperty(key))length++;}
return length;}});Hash.alias('forEach','each');Array.implement({forEach:function(fn,bind){for(var i=0,l=this.length;i<l;i++)fn.call(bind,this[i],i,this);}});Array.alias('forEach','each');function $A(iterable){if(iterable.item){var array=[];for(var i=0,l=iterable.length;i<l;i++)array[i]=iterable[i];return array;}
return Array.prototype.slice.call(iterable);};function $arguments(i){return function(){return arguments[i];};};function $chk(obj){return!!(obj||obj===0);};function $clear(timer){clearTimeout(timer);clearInterval(timer);return null;};function $defined(obj){return(obj!=undefined);};function $each(iterable,fn,bind){var type=$type(iterable);((type=='arguments'||type=='collection'||type=='array')?Array:Hash).each(iterable,fn,bind);};function $empty(){};function $extend(original,extended){for(var key in(extended||{}))original[key]=extended[key];return original;};function $H(object){return new Hash(object);};function $lambda(value){return(typeof value=='function')?value:function(){return value;};};function $merge(){var mix={};for(var i=0,l=arguments.length;i<l;i++){var object=arguments[i];if($type(object)!='object')continue;for(var key in object){var op=object[key],mp=mix[key];mix[key]=(mp&&$type(op)=='object'&&$type(mp)=='object')?$merge(mp,op):$unlink(op);}}
return mix;};function $pick(){for(var i=0,l=arguments.length;i<l;i++){if(arguments[i]!=undefined)return arguments[i];}
return null;};function $random(min,max){return Math.floor(Math.random()*(max-min+1)+min);};function $splat(obj){var type=$type(obj);return(type)?((type!='array'&&type!='arguments')?[obj]:obj):[];};var $time=Date.now||function(){return+new Date;};function $try(){for(var i=0,l=arguments.length;i<l;i++){try{return arguments[i]();}catch(e){}}
return null;};function $type(obj){if(obj==undefined)return false;if(obj.$family)return(obj.$family.name=='number'&&!isFinite(obj))?false:obj.$family.name;if(obj.nodeName){switch(obj.nodeType){case 1:return'element';case 3:return(/\S/).test(obj.nodeValue)?'textnode':'whitespace';}}else if(typeof obj.length=='number'){if(obj.callee)return'arguments';else if(obj.item)return'collection';}
return typeof obj;};function $unlink(object){var unlinked;switch($type(object)){case'object':unlinked={};for(var p in object)unlinked[p]=$unlink(object[p]);break;case'hash':unlinked=new Hash(object);break;case'array':unlinked=[];for(var i=0,l=object.length;i<l;i++)unlinked[i]=$unlink(object[i]);break;default:return object;}
return unlinked;};var Browser=$merge({Engine:{name:'unknown',version:0},Platform:{name:(window.orientation!=undefined)?'ipod':(navigator.platform.match(/mac|win|linux/i)||['other'])[0].toLowerCase()},Features:{xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.querySelector)},Plugins:{},Engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getElementsByClassName)?950:925));},trident:function(){return(!window.ActiveXObject)?false:((window.XMLHttpRequest)?5:4);},webkit:function(){return(navigator.taintEnabled)?false:((Browser.Features.xpath)?((Browser.Features.query)?525:420):419);},gecko:function(){return(document.getBoxObjectFor==undefined)?false:((document.getElementsByClassName)?19:18);}}},Browser||{});Browser.Platform[Browser.Platform.name]=true;Browser.detect=function(){for(var engine in this.Engines){var version=this.Engines[engine]();if(version){this.Engine={name:engine,version:version};this.Engine[engine]=this.Engine[engine+version]=true;break;}}
return{name:engine,version:version};};Browser.detect();Browser.Request=function(){return $try(function(){return new XMLHttpRequest();},function(){return new ActiveXObject('MSXML2.XMLHTTP');});};Browser.Features.xhr=!!(Browser.Request());Browser.Plugins.Flash=(function(){var version=($try(function(){return navigator.plugins['Shockwave Flash'].description;},function(){return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');})||'0 r0').match(/\d+/g);return{version:parseInt(version[0]||0+'.'+version[1]||0),build:parseInt(version[2]||0)};})();function $exec(text){if(!text)return text;if(window.execScript){window.execScript(text);}else{var script=document.createElement('script');script.setAttribute('type','text/javascript');script[(Browser.Engine.webkit&&Browser.Engine.version<420)?'innerText':'text']=text;document.head.appendChild(script);document.head.removeChild(script);}
return text;};Native.UID=1;var $uid=(Browser.Engine.trident)?function(item){return(item.uid||(item.uid=[Native.UID++]))[0];}:function(item){return item.uid||(item.uid=Native.UID++);};var Window=new Native({name:'Window',legacy:(Browser.Engine.trident)?null:window.Window,initialize:function(win){$uid(win);if(!win.Element){win.Element=$empty;if(Browser.Engine.webkit)win.document.createElement("iframe");win.Element.prototype=(Browser.Engine.webkit)?window["[[DOMElement.prototype]]"]:{};}
win.document.window=win;return $extend(win,Window.Prototype);},afterImplement:function(property,value){window[property]=Window.Prototype[property]=value;}});Window.Prototype={$family:{name:'window'}};new Window(window);var Document=new Native({name:'Document',legacy:(Browser.Engine.trident)?null:window.Document,initialize:function(doc){$uid(doc);doc.head=doc.getElementsByTagName('head')[0];doc.html=doc.getElementsByTagName('html')[0];if(Browser.Engine.trident&&Browser.Engine.version<=4)$try(function(){doc.execCommand("BackgroundImageCache",false,true);});if(Browser.Engine.trident)doc.window.attachEvent('onunload',function(){doc.window.detachEvent('onunload',arguments.callee);doc.head=doc.html=doc.window=null;});return $extend(doc,Document.Prototype);},afterImplement:function(property,value){document[property]=Document.Prototype[property]=value;}});Document.Prototype={$family:{name:'document'}};new Document(document);Array.implement({every:function(fn,bind){for(var i=0,l=this.length;i<l;i++){if(!fn.call(bind,this[i],i,this))return false;}
return true;},filter:function(fn,bind){var results=[];for(var i=0,l=this.length;i<l;i++){if(fn.call(bind,this[i],i,this))results.push(this[i]);}
return results;},clean:function(){return this.filter($defined);},indexOf:function(item,from){var len=this.length;for(var i=(from<0)?Math.max(0,len+from):from||0;i<len;i++){if(this[i]===item)return i;}
return-1;},map:function(fn,bind){var results=[];for(var i=0,l=this.length;i<l;i++)results[i]=fn.call(bind,this[i],i,this);return results;},some:function(fn,bind){for(var i=0,l=this.length;i<l;i++){if(fn.call(bind,this[i],i,this))return true;}
return false;},associate:function(keys){var obj={},length=Math.min(this.length,keys.length);for(var i=0;i<length;i++)obj[keys[i]]=this[i];return obj;},link:function(object){var result={};for(var i=0,l=this.length;i<l;i++){for(var key in object){if(object[key](this[i])){result[key]=this[i];delete object[key];break;}}}
return result;},contains:function(item,from){return this.indexOf(item,from)!=-1;},extend:function(array){for(var i=0,j=array.length;i<j;i++)this.push(array[i]);return this;},getLast:function(){return(this.length)?this[this.length-1]:null;},getRandom:function(){return(this.length)?this[$random(0,this.length-1)]:null;},include:function(item){if(!this.contains(item))this.push(item);return this;},combine:function(array){for(var i=0,l=array.length;i<l;i++)this.include(array[i]);return this;},erase:function(item){for(var i=this.length;i--;i){if(this[i]===item)this.splice(i,1);}
return this;},empty:function(){this.length=0;return this;},flatten:function(){var array=[];for(var i=0,l=this.length;i<l;i++){var type=$type(this[i]);if(!type)continue;array=array.concat((type=='array'||type=='collection'||type=='arguments')?Array.flatten(this[i]):this[i]);}
return array;},hexToRgb:function(array){if(this.length!=3)return null;var rgb=this.map(function(value){if(value.length==1)value+=value;return value.toInt(16);});return(array)?rgb:'rgb('+rgb+')';},rgbToHex:function(array){if(this.length<3)return null;if(this.length==4&&this[3]==0&&!array)return'transparent';var hex=[];for(var i=0;i<3;i++){var bit=(this[i]-0).toString(16);hex.push((bit.length==1)?'0'+bit:bit);}
return(array)?hex:'#'+hex.join('');}});Function.implement({extend:function(properties){for(var property in properties)this[property]=properties[property];return this;},create:function(options){var self=this;options=options||{};return function(event){var args=options.arguments;args=(args!=undefined)?$splat(args):Array.slice(arguments,(options.event)?1:0);if(options.event)args=[event||window.event].extend(args);var returns=function(){return self.apply(options.bind||null,args);};if(options.delay)return setTimeout(returns,options.delay);if(options.periodical)return setInterval(returns,options.periodical);if(options.attempt)return $try(returns);return returns();};},run:function(args,bind){return this.apply(bind,$splat(args));},pass:function(args,bind){return this.create({bind:bind,arguments:args});},bind:function(bind,args){return this.create({bind:bind,arguments:args});},bindWithEvent:function(bind,args){return this.create({bind:bind,arguments:args,event:true});},attempt:function(args,bind){return this.create({bind:bind,arguments:args,attempt:true})();},delay:function(delay,bind,args){return this.create({bind:bind,arguments:args,delay:delay})();},periodical:function(periodical,bind,args){return this.create({bind:bind,arguments:args,periodical:periodical})();}});Number.implement({limit:function(min,max){return Math.min(max,Math.max(min,this));},round:function(precision){precision=Math.pow(10,precision||0);return Math.round(this*precision)/precision;},times:function(fn,bind){for(var i=0;i<this;i++)fn.call(bind,i,this);},toFloat:function(){return parseFloat(this);},toInt:function(base){return parseInt(this,base||10);}});Number.alias('times','each');(function(math){var methods={};math.each(function(name){if(!Number[name])methods[name]=function(){return Math[name].apply(null,[this].concat($A(arguments)));};});Number.implement(methods);})(['abs','acos','asin','atan','atan2','ceil','cos','exp','floor','log','max','min','pow','sin','sqrt','tan']);String.implement({test:function(regex,params){return((typeof regex=='string')?new RegExp(regex,params):regex).test(this);},contains:function(string,separator){return(separator)?(separator+this+separator).indexOf(separator+string+separator)>-1:this.indexOf(string)>-1;},trim:function(){return this.replace(/^\s+|\s+$/g,'');},clean:function(){return this.replace(/\s+/g,' ').trim();},camelCase:function(){return this.replace(/-\D/g,function(match){return match.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/[A-Z]/g,function(match){return('-'+match.charAt(0).toLowerCase());});},capitalize:function(){return this.replace(/\b[a-z]/g,function(match){return match.toUpperCase();});},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,'\\$1');},toInt:function(base){return parseInt(this,base||10);},toFloat:function(){return parseFloat(this);},hexToRgb:function(array){var hex=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(hex)?hex.slice(1).hexToRgb(array):null;},rgbToHex:function(array){var rgb=this.match(/\d{1,3}/g);return(rgb)?rgb.rgbToHex(array):null;},stripScripts:function(option){var scripts='';var text=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(){scripts+=arguments[1]+'\n';return'';});if(option===true)$exec(scripts);else if($type(option)=='function')option(scripts,text);return text;},substitute:function(object,regexp){return this.replace(regexp||(/\\?\{([^{}]+)\}/g),function(match,name){if(match.charAt(0)=='\\')return match.slice(1);return(object[name]!=undefined)?object[name]:'';});}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(value){for(var key in this){if(this.hasOwnProperty(key)&&this[key]===value)return key;}
return null;},hasValue:function(value){return(Hash.keyOf(this,value)!==null);},extend:function(properties){Hash.each(properties,function(value,key){Hash.set(this,key,value);},this);return this;},combine:function(properties){Hash.each(properties,function(value,key){Hash.include(this,key,value);},this);return this;},erase:function(key){if(this.hasOwnProperty(key))delete this[key];return this;},get:function(key){return(this.hasOwnProperty(key))?this[key]:null;},set:function(key,value){if(!this[key]||this.hasOwnProperty(key))this[key]=value;return this;},empty:function(){Hash.each(this,function(value,key){delete this[key];},this);return this;},include:function(key,value){var k=this[key];if(k==undefined)this[key]=value;return this;},map:function(fn,bind){var results=new Hash;Hash.each(this,function(value,key){results.set(key,fn.call(bind,value,key,this));},this);return results;},filter:function(fn,bind){var results=new Hash;Hash.each(this,function(value,key){if(fn.call(bind,value,key,this))results.set(key,value);},this);return results;},every:function(fn,bind){for(var key in this){if(this.hasOwnProperty(key)&&!fn.call(bind,this[key],key))return false;}
return true;},some:function(fn,bind){for(var key in this){if(this.hasOwnProperty(key)&&fn.call(bind,this[key],key))return true;}
return false;},getKeys:function(){var keys=[];Hash.each(this,function(value,key){keys.push(key);});return keys;},getValues:function(){var values=[];Hash.each(this,function(value){values.push(value);});return values;},toQueryString:function(base){var queryString=[];Hash.each(this,function(value,key){if(base)key=base+'['+key+']';var result;switch($type(value)){case'object':result=Hash.toQueryString(value,key);break;case'array':var qs={};value.each(function(val,i){qs[i]=val;});result=Hash.toQueryString(qs,key);break;default:result=key+'='+encodeURIComponent(value);}
if(value!=undefined)queryString.push(result);});return queryString.join('&');}});Hash.alias({keyOf:'indexOf',hasValue:'contains'});var Event=new Native({name:'Event',initialize:function(event,win){win=win||window;var doc=win.document;event=event||win.event;if(event.$extended)return event;this.$extended=true;var type=event.type;var target=event.target||event.srcElement;while(target&&target.nodeType==3)target=target.parentNode;if(type.test(/key/)){var code=event.which||event.keyCode;var key=Event.Keys.keyOf(code);if(type=='keydown'){var fKey=code-111;if(fKey>0&&fKey<13)key='f'+fKey;}
key=key||String.fromCharCode(code).toLowerCase();}else if(type.match(/(click|mouse|menu)/i)){doc=(!doc.compatMode||doc.compatMode=='CSS1Compat')?doc.html:doc.body;var page={x:event.pageX||event.clientX+doc.scrollLeft,y:event.pageY||event.clientY+doc.scrollTop};var client={x:(event.pageX)?event.pageX-win.pageXOffset:event.clientX,y:(event.pageY)?event.pageY-win.pageYOffset:event.clientY};if(type.match(/DOMMouseScroll|mousewheel/)){var wheel=(event.wheelDelta)?event.wheelDelta/120:-(event.detail||0)/3;}
var rightClick=(event.which==3)||(event.button==2);var related=null;if(type.match(/over|out/)){switch(type){case'mouseover':related=event.relatedTarget||event.fromElement;break;case'mouseout':related=event.relatedTarget||event.toElement;}
if(!(function(){while(related&&related.nodeType==3)related=related.parentNode;return true;}).create({attempt:Browser.Engine.gecko})())related=false;}}
return $extend(this,{event:event,type:type,page:page,client:client,rightClick:rightClick,wheel:wheel,relatedTarget:related,target:target,code:code,key:key,shift:event.shiftKey,control:event.ctrlKey,alt:event.altKey,meta:event.metaKey});}});Event.Keys=new Hash({'enter':13,'up':38,'down':40,'left':37,'right':39,'esc':27,'space':32,'backspace':8,'tab':9,'delete':46});Event.implement({stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this;},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this;}});var Class=new Native({name:'Class',initialize:function(properties){properties=properties||{};var klass=function(){for(var key in this){if($type(this[key])!='function')this[key]=$unlink(this[key]);}
this.constructor=klass;if(Class.prototyping)return this;var instance=(this.initialize)?this.initialize.apply(this,arguments):this;if(this.options&&this.options.initialize)this.options.initialize.call(this);return instance;};for(var mutator in Class.Mutators){if(!properties[mutator])continue;properties=Class.Mutators[mutator](properties,properties[mutator]);delete properties[mutator];}
$extend(klass,this);klass.constructor=Class;klass.prototype=properties;return klass;}});Class.Mutators={Extends:function(self,klass){Class.prototyping=klass.prototype;var subclass=new klass;delete subclass.parent;subclass=Class.inherit(subclass,self);delete Class.prototyping;return subclass;},Implements:function(self,klasses){$splat(klasses).each(function(klass){Class.prototying=klass;$extend(self,($type(klass)=='class')?new klass:klass);delete Class.prototyping;});return self;}};Class.extend({inherit:function(object,properties){var caller=arguments.callee.caller;for(var key in properties){var override=properties[key];var previous=object[key];var type=$type(override);if(previous&&type=='function'){if(override!=previous){if(caller){override.__parent=previous;object[key]=override;}else{Class.override(object,key,override);}}}else if(type=='object'){object[key]=$merge(previous,override);}else{object[key]=override;}}
if(caller)object.parent=function(){return arguments.callee.caller.__parent.apply(this,arguments);};return object;},override:function(object,name,method){var parent=Class.prototyping;if(parent&&object[name]!=parent[name])parent=null;var override=function(){var previous=this.parent;this.parent=parent?parent[name]:object[name];var value=method.apply(this,arguments);this.parent=previous;return value;};object[name]=override;}});Class.implement({implement:function(){var proto=this.prototype;$each(arguments,function(properties){Class.inherit(proto,properties);});return this;}});var Chain=new Class({$chain:[],chain:function(){this.$chain.extend(Array.flatten(arguments));return this;},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false;},clearChain:function(){this.$chain.empty();return this;}});var Events=new Class({$events:{},addEvent:function(type,fn,internal){type=Events.removeOn(type);if(fn!=$empty){this.$events[type]=this.$events[type]||[];this.$events[type].include(fn);if(internal)fn.internal=true;}
return this;},addEvents:function(events){for(var type in events)this.addEvent(type,events[type]);return this;},fireEvent:function(type,args,delay){type=Events.removeOn(type);if(!this.$events||!this.$events[type])return this;this.$events[type].each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);return this;},removeEvent:function(type,fn){type=Events.removeOn(type);if(!this.$events[type])return this;if(!fn.internal)this.$events[type].erase(fn);return this;},removeEvents:function(events){if($type(events)=='object'){for(var type in events)this.removeEvent(type,events[type]);return this;}
if(events)events=Events.removeOn(events);for(var type in this.$events){if(events&&events!=type)continue;var fns=this.$events[type];for(var i=fns.length;i--;i)this.removeEvent(type,fns[i]);}
return this;}});Events.removeOn=function(string){return string.replace(/^on([A-Z])/,function(full,first){return first.toLowerCase();});};var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent)return this;for(var option in this.options){if($type(this.options[option])!='function'||!(/^on[A-Z]/).test(option))continue;this.addEvent(option,this.options[option]);delete this.options[option];}
return this;}});var Element=new Native({name:'Element',legacy:window.Element,initialize:function(tag,props){var konstructor=Element.Constructors.get(tag);if(konstructor)return konstructor(props);if(typeof tag=='string')return document.newElement(tag,props);return $(tag).set(props);},afterImplement:function(key,value){Element.Prototype[key]=value;if(Array[key])return;Elements.implement(key,function(){var items=[],elements=true;for(var i=0,j=this.length;i<j;i++){var returns=this[i][key].apply(this[i],arguments);items.push(returns);if(elements)elements=($type(returns)=='element');}
return(elements)?new Elements(items):items;});}});Element.Prototype={$family:{name:'element'}};Element.Constructors=new Hash;var IFrame=new Native({name:'IFrame',generics:false,initialize:function(){var params=Array.link(arguments,{properties:Object.type,iframe:$defined});var props=params.properties||{};var iframe=$(params.iframe)||false;var onload=props.onload||$empty;delete props.onload;props.id=props.name=$pick(props.id,props.name,iframe.id,iframe.name,'IFrame_'+$time());iframe=new Element(iframe||'iframe',props);var onFrameLoad=function(){var host=$try(function(){return iframe.contentWindow.location.host;});if(host&&host==window.location.host){var win=new Window(iframe.contentWindow);new Document(iframe.contentWindow.document);$extend(win.Element.prototype,Element.Prototype);}
onload.call(iframe.contentWindow,iframe.contentWindow.document);};(window.frames[props.id])?onFrameLoad():iframe.addListener('load',onFrameLoad);return iframe;}});var Elements=new Native({initialize:function(elements,options){options=$extend({ddup:true,cash:true},options);elements=elements||[];if(options.ddup||options.cash){var uniques={},returned=[];for(var i=0,l=elements.length;i<l;i++){var el=$.element(elements[i],!options.cash);if(options.ddup){if(uniques[el.uid])continue;uniques[el.uid]=true;}
returned.push(el);}
elements=returned;}
return(options.cash)?$extend(elements,this):elements;}});Elements.implement({filter:function(filter,bind){if(!filter)return this;return new Elements(Array.filter(this,(typeof filter=='string')?function(item){return item.match(filter);}:filter,bind));}});Document.implement({newElement:function(tag,props){if(Browser.Engine.trident&&props){['name','type','checked'].each(function(attribute){if(!props[attribute])return;tag+=' '+attribute+'="'+props[attribute]+'"';if(attribute!='checked')delete props[attribute];});tag='<'+tag+'>';}
return $.element(this.createElement(tag)).set(props);},newTextNode:function(text){return this.createTextNode(text);},getDocument:function(){return this;},getWindow:function(){return this.window;}});Window.implement({$:function(el,nocash){if(el&&el.$family&&el.uid)return el;var type=$type(el);return($[type])?$[type](el,nocash,this.document):null;},$$:function(selector){if(arguments.length==1&&typeof selector=='string')return this.document.getElements(selector);var elements=[];var args=Array.flatten(arguments);for(var i=0,l=args.length;i<l;i++){var item=args[i];switch($type(item)){case'element':elements.push(item);break;case'string':elements.extend(this.document.getElements(item,true));}}
return new Elements(elements);},getDocument:function(){return this.document;},getWindow:function(){return this;}});$.string=function(id,nocash,doc){id=doc.getElementById(id);return(id)?$.element(id,nocash):null;};$.element=function(el,nocash){$uid(el);if(!nocash&&!el.$family&&!(/^object|embed$/i).test(el.tagName)){var proto=Element.Prototype;for(var p in proto)el[p]=proto[p];};return el;};$.object=function(obj,nocash,doc){if(obj.toElement)return $.element(obj.toElement(doc),nocash);return null;};$.textnode=$.whitespace=$.window=$.document=$arguments(0);Native.implement([Element,Document],{getElement:function(selector,nocash){return $(this.getElements(selector,true)[0]||null,nocash);},getElements:function(tags,nocash){tags=tags.split(',');var elements=[];var ddup=(tags.length>1);tags.each(function(tag){var partial=this.getElementsByTagName(tag.trim());(ddup)?elements.extend(partial):elements=partial;},this);return new Elements(elements,{ddup:ddup,cash:!nocash});}});(function(){var collected={},storage={};var props={input:'checked',option:'selected',textarea:(Browser.Engine.webkit&&Browser.Engine.version<420)?'innerHTML':'value'};var get=function(uid){return(storage[uid]||(storage[uid]={}));};var clean=function(item,retain){if(!item)return;var uid=item.uid;if(Browser.Engine.trident){if(item.clearAttributes){var clone=retain&&item.cloneNode(false);item.clearAttributes();if(clone)item.mergeAttributes(clone);}else if(item.removeEvents){item.removeEvents();}
if((/object/i).test(item.tagName)){for(var p in item){if(typeof item[p]=='function')item[p]=$empty;}
Element.dispose(item);}}
if(!uid)return;collected[uid]=storage[uid]=null;};var purge=function(){Hash.each(collected,clean);if(Browser.Engine.trident)$A(document.getElementsByTagName('object')).each(clean);if(window.CollectGarbage)CollectGarbage();collected=storage=null;};var walk=function(element,walk,start,match,all,nocash){var el=element[start||walk];var elements=[];while(el){if(el.nodeType==1&&(!match||Element.match(el,match))){if(!all)return $(el,nocash);elements.push(el);}
el=el[walk];}
return(all)?new Elements(elements,{ddup:false,cash:!nocash}):null;};var attributes={'html':'innerHTML','class':'className','for':'htmlFor','text':(Browser.Engine.trident||(Browser.Engine.webkit&&Browser.Engine.version<420))?'innerText':'textContent'};var bools=['compact','nowrap','ismap','declare','noshade','checked','disabled','readonly','multiple','selected','noresize','defer'];var camels=['value','accessKey','cellPadding','cellSpacing','colSpan','frameBorder','maxLength','readOnly','rowSpan','tabIndex','useMap'];Hash.extend(attributes,bools.associate(bools));Hash.extend(attributes,camels.associate(camels.map(String.toLowerCase)));var inserters={before:function(context,element){if(element.parentNode)element.parentNode.insertBefore(context,element);},after:function(context,element){if(!element.parentNode)return;var next=element.nextSibling;(next)?element.parentNode.insertBefore(context,next):element.parentNode.appendChild(context);},bottom:function(context,element){element.appendChild(context);},top:function(context,element){var first=element.firstChild;(first)?element.insertBefore(context,first):element.appendChild(context);}};inserters.inside=inserters.bottom;Hash.each(inserters,function(inserter,where){where=where.capitalize();Element.implement('inject'+where,function(el){inserter(this,$(el,true));return this;});Element.implement('grab'+where,function(el){inserter($(el,true),this);return this;});});Element.implement({set:function(prop,value){switch($type(prop)){case'object':for(var p in prop)this.set(p,prop[p]);break;case'string':var property=Element.Properties.get(prop);(property&&property.set)?property.set.apply(this,Array.slice(arguments,1)):this.setProperty(prop,value);}
return this;},get:function(prop){var property=Element.Properties.get(prop);return(property&&property.get)?property.get.apply(this,Array.slice(arguments,1)):this.getProperty(prop);},erase:function(prop){var property=Element.Properties.get(prop);(property&&property.erase)?property.erase.apply(this):this.removeProperty(prop);return this;},setProperty:function(attribute,value){var key=attributes[attribute];if(value==undefined)return this.removeProperty(attribute);if(key&&bools[attribute])value=!!value;(key)?this[key]=value:this.setAttribute(attribute,''+value);return this;},setProperties:function(attributes){for(var attribute in attributes)this.setProperty(attribute,attributes[attribute]);return this;},getProperty:function(attribute){var key=attributes[attribute];var value=(key)?this[key]:this.getAttribute(attribute,2);return(bools[attribute])?!!value:(key)?value:value||null;},getProperties:function(){var args=$A(arguments);return args.map(this.getProperty,this).associate(args);},removeProperty:function(attribute){var key=attributes[attribute];(key)?this[key]=(key&&bools[attribute])?false:'':this.removeAttribute(attribute);return this;},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this;},hasClass:function(className){return this.className.contains(className,' ');},addClass:function(className){if(!this.hasClass(className))this.className=(this.className+' '+className).clean();return this;},removeClass:function(className){this.className=this.className.replace(new RegExp('(^|\\s)'+className+'(?:\\s|$)'),'$1');return this;},toggleClass:function(className){return this.hasClass(className)?this.removeClass(className):this.addClass(className);},adopt:function(){Array.flatten(arguments).each(function(element){element=$(element,true);if(element)this.appendChild(element);},this);return this;},appendText:function(text,where){return this.grab(this.getDocument().newTextNode(text),where);},grab:function(el,where){inserters[where||'bottom']($(el,true),this);return this;},inject:function(el,where){inserters[where||'bottom'](this,$(el,true));return this;},replaces:function(el){el=$(el,true);el.parentNode.replaceChild(this,el);return this;},wraps:function(el,where){el=$(el,true);return this.replaces(el).grab(el,where);},getPrevious:function(match,nocash){return walk(this,'previousSibling',null,match,false,nocash);},getAllPrevious:function(match,nocash){return walk(this,'previousSibling',null,match,true,nocash);},getNext:function(match,nocash){return walk(this,'nextSibling',null,match,false,nocash);},getAllNext:function(match,nocash){return walk(this,'nextSibling',null,match,true,nocash);},getFirst:function(match,nocash){return walk(this,'nextSibling','firstChild',match,false,nocash);},getLast:function(match,nocash){return walk(this,'previousSibling','lastChild',match,false,nocash);},getParent:function(match,nocash){return walk(this,'parentNode',null,match,false,nocash);},getParents:function(match,nocash){return walk(this,'parentNode',null,match,true,nocash);},getChildren:function(match,nocash){return walk(this,'nextSibling','firstChild',match,true,nocash);},getWindow:function(){return this.ownerDocument.window;},getDocument:function(){return this.ownerDocument;},getElementById:function(id,nocash){var el=this.ownerDocument.getElementById(id);if(!el)return null;for(var parent=el.parentNode;parent!=this;parent=parent.parentNode){if(!parent)return null;}
return $.element(el,nocash);},getSelected:function(){return new Elements($A(this.options).filter(function(option){return option.selected;}));},getComputedStyle:function(property){if(this.currentStyle)return this.currentStyle[property.camelCase()];var computed=this.getDocument().defaultView.getComputedStyle(this,null);return(computed)?computed.getPropertyValue([property.hyphenate()]):null;},toQueryString:function(){var queryString=[];this.getElements('input, select, textarea',true).each(function(el){if(!el.name||el.disabled)return;var value=(el.tagName.toLowerCase()=='select')?Element.getSelected(el).map(function(opt){return opt.value;}):((el.type=='radio'||el.type=='checkbox')&&!el.checked)?null:el.value;$splat(value).each(function(val){if(typeof val!='undefined')queryString.push(el.name+'='+encodeURIComponent(val));});});return queryString.join('&');},clone:function(contents,keepid){contents=contents!==false;var clone=this.cloneNode(contents);var clean=function(node,element){if(!keepid)node.removeAttribute('id');if(Browser.Engine.trident){node.clearAttributes();node.mergeAttributes(element);node.removeAttribute('uid');if(node.options){var no=node.options,eo=element.options;for(var j=no.length;j--;)no[j].selected=eo[j].selected;}}
var prop=props[element.tagName.toLowerCase()];if(prop&&element[prop])node[prop]=element[prop];};if(contents){var ce=clone.getElementsByTagName('*'),te=this.getElementsByTagName('*');for(var i=ce.length;i--;)clean(ce[i],te[i]);}
clean(clone,this);return $(clone);},destroy:function(){Element.empty(this);Element.dispose(this);clean(this,true);return null;},empty:function(){$A(this.childNodes).each(function(node){Element.destroy(node);});return this;},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this;},hasChild:function(el){el=$(el,true);if(!el)return false;if(Browser.Engine.webkit&&Browser.Engine.version<420)return $A(this.getElementsByTagName(el.tagName)).contains(el);return(this.contains)?(this!=el&&this.contains(el)):!!(this.compareDocumentPosition(el)&16);},match:function(tag){return(!tag||(tag==this)||(Element.get(this,'tag')==tag));}});Native.implement([Element,Window,Document],{addListener:function(type,fn){if(type=='unload'){var old=fn,self=this;fn=function(){self.removeListener('unload',fn);old();};}else{collected[this.uid]=this;}
if(this.addEventListener)this.addEventListener(type,fn,false);else this.attachEvent('on'+type,fn);return this;},removeListener:function(type,fn){if(this.removeEventListener)this.removeEventListener(type,fn,false);else this.detachEvent('on'+type,fn);return this;},retrieve:function(property,dflt){var storage=get(this.uid),prop=storage[property];if(dflt!=undefined&&prop==undefined)prop=storage[property]=dflt;return $pick(prop);},store:function(property,value){var storage=get(this.uid);storage[property]=value;return this;},eliminate:function(property){var storage=get(this.uid);delete storage[property];return this;}});window.addListener('unload',purge);})();Element.Properties=new Hash;Element.Properties.style={set:function(style){this.style.cssText=style;},get:function(){return this.style.cssText;},erase:function(){this.style.cssText='';}};Element.Properties.tag={get:function(){return this.tagName.toLowerCase();}};Element.Properties.html=(function(){var wrapper=document.createElement('div');var translations={table:[1,'<table>','</table>'],select:[1,'<select>','</select>'],tbody:[2,'<table><tbody>','</tbody></table>'],tr:[3,'<table><tbody><tr>','</tr></tbody></table>']};translations.thead=translations.tfoot=translations.tbody;var html={set:function(){var html=Array.flatten(arguments).join('');var wrap=Browser.Engine.trident&&translations[this.get('tag')];if(wrap){var first=wrapper;first.innerHTML=wrap[1]+html+wrap[2];for(var i=wrap[0];i--;)first=first.firstChild;this.empty().adopt(first.childNodes);}else{this.innerHTML=html;}}};html.erase=html.set;return html;})();if(Browser.Engine.webkit&&Browser.Engine.version<420)Element.Properties.text={get:function(){if(this.innerText)return this.innerText;var temp=this.ownerDocument.newElement('div',{html:this.innerHTML}).inject(this.ownerDocument.body);var text=temp.innerText;temp.destroy();return text;}};Element.Properties.events={set:function(events){this.addEvents(events);}};Native.implement([Element,Window,Document],{addEvent:function(type,fn){var events=this.retrieve('events',{});events[type]=events[type]||{'keys':[],'values':[]};if(events[type].keys.contains(fn))return this;events[type].keys.push(fn);var realType=type,custom=Element.Events.get(type),condition=fn,self=this;if(custom){if(custom.onAdd)custom.onAdd.call(this,fn);if(custom.condition){condition=function(event){if(custom.condition.call(this,event))return fn.call(this,event);return true;};}
realType=custom.base||realType;}
var defn=function(){return fn.call(self);};var nativeEvent=Element.NativeEvents[realType];if(nativeEvent){if(nativeEvent==2){defn=function(event){event=new Event(event,self.getWindow());if(condition.call(self,event)===false)event.stop();};}
this.addListener(realType,defn);}
events[type].values.push(defn);return this;},removeEvent:function(type,fn){var events=this.retrieve('events');if(!events||!events[type])return this;var pos=events[type].keys.indexOf(fn);if(pos==-1)return this;events[type].keys.splice(pos,1);var value=events[type].values.splice(pos,1)[0];var custom=Element.Events.get(type);if(custom){if(custom.onRemove)custom.onRemove.call(this,fn);type=custom.base||type;}
return(Element.NativeEvents[type])?this.removeListener(type,value):this;},addEvents:function(events){for(var event in events)this.addEvent(event,events[event]);return this;},removeEvents:function(events){if($type(events)=='object'){for(var type in events)this.removeEvent(type,events[type]);return this;}
var attached=this.retrieve('events');if(!attached)return this;if(!events){for(var type in attached)this.removeEvents(type);this.eliminate('events');}else if(attached[events]){while(attached[events].keys[0])this.removeEvent(events,attached[events].keys[0]);attached[events]=null;}
return this;},fireEvent:function(type,args,delay){var events=this.retrieve('events');if(!events||!events[type])return this;events[type].keys.each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);return this;},cloneEvents:function(from,type){from=$(from);var fevents=from.retrieve('events');if(!fevents)return this;if(!type){for(var evType in fevents)this.cloneEvents(from,evType);}else if(fevents[type]){fevents[type].keys.each(function(fn){this.addEvent(type,fn);},this);}
return this;}});Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1};(function(){var $check=function(event){var related=event.relatedTarget;if(related==undefined)return true;if(related===false)return false;return($type(this)!='document'&&related!=this&&related.prefix!='xul'&&!this.hasChild(related));};Element.Events=new Hash({mouseenter:{base:'mouseover',condition:$check},mouseleave:{base:'mouseout',condition:$check},mousewheel:{base:(Browser.Engine.gecko)?'DOMMouseScroll':'mousewheel'}});})();Element.Properties.styles={set:function(styles){this.setStyles(styles);}};Element.Properties.opacity={set:function(opacity,novisibility){if(!novisibility){if(opacity==0){if(this.style.visibility!='hidden')this.style.visibility='hidden';}else{if(this.style.visibility!='visible')this.style.visibility='visible';}}
if(!this.currentStyle||!this.currentStyle.hasLayout)this.style.zoom=1;if(Browser.Engine.trident)this.style.filter=(opacity==1)?'':'alpha(opacity='+opacity*100+')';this.style.opacity=opacity;this.store('opacity',opacity);},get:function(){return this.retrieve('opacity',1);}};Element.implement({setOpacity:function(value){return this.set('opacity',value,true);},getOpacity:function(){return this.get('opacity');},setStyle:function(property,value){switch(property){case'opacity':return this.set('opacity',parseFloat(value));case'float':property=(Browser.Engine.trident)?'styleFloat':'cssFloat';}
property=property.camelCase();if($type(value)!='string'){var map=(Element.Styles.get(property)||'@').split(' ');value=$splat(value).map(function(val,i){if(!map[i])return'';return($type(val)=='number')?map[i].replace('@',Math.round(val)):val;}).join(' ');}else if(value==String(Number(value))){value=Math.round(value);}
this.style[property]=value;return this;},getStyle:function(property){switch(property){case'opacity':return this.get('opacity');case'float':property=(Browser.Engine.trident)?'styleFloat':'cssFloat';}
property=property.camelCase();var result=this.style[property];if(!$chk(result)){result=[];for(var style in Element.ShortStyles){if(property!=style)continue;for(var s in Element.ShortStyles[style])result.push(this.getStyle(s));return result.join(' ');}
result=this.getComputedStyle(property);}
if(result){result=String(result);var color=result.match(/rgba?\([\d\s,]+\)/);if(color)result=result.replace(color[0],color[0].rgbToHex());}
if(Browser.Engine.presto||(Browser.Engine.trident&&!$chk(parseInt(result)))){if(property.test(/^(height|width)$/)){var values=(property=='width')?['left','right']:['top','bottom'],size=0;values.each(function(value){size+=this.getStyle('border-'+value+'-width').toInt()+this.getStyle('padding-'+value).toInt();},this);return this['offset'+property.capitalize()]-size+'px';}
if((Browser.Engine.presto)&&String(result).test('px'))return result;if(property.test(/(border(.+)Width|margin|padding)/))return'0px';}
return result;},setStyles:function(styles){for(var style in styles)this.setStyle(style,styles[style]);return this;},getStyles:function(){var result={};Array.each(arguments,function(key){result[key]=this.getStyle(key);},this);return result;}});Element.Styles=new Hash({left:'@px',top:'@px',bottom:'@px',right:'@px',width:'@px',height:'@px',maxWidth:'@px',maxHeight:'@px',minWidth:'@px',minHeight:'@px',backgroundColor:'rgb(@, @, @)',backgroundPosition:'@px @px',color:'rgb(@, @, @)',fontSize:'@px',letterSpacing:'@px',lineHeight:'@px',clip:'rect(@px @px @px @px)',margin:'@px @px @px @px',padding:'@px @px @px @px',border:'@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)',borderWidth:'@px @px @px @px',borderStyle:'@ @ @ @',borderColor:'rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)',zIndex:'@','zoom':'@',fontWeight:'@',textIndent:'@px',opacity:'@'});Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};['Top','Right','Bottom','Left'].each(function(direction){var Short=Element.ShortStyles;var All=Element.Styles;['margin','padding'].each(function(style){var sd=style+direction;Short[style][sd]=All[sd]='@px';});var bd='border'+direction;Short.border[bd]=All[bd]='@px @ rgb(@, @, @)';var bdw=bd+'Width',bds=bd+'Style',bdc=bd+'Color';Short[bd]={};Short.borderWidth[bdw]=Short[bd][bdw]=All[bdw]='@px';Short.borderStyle[bds]=Short[bd][bds]=All[bds]='@';Short.borderColor[bdc]=Short[bd][bdc]=All[bdc]='rgb(@, @, @)';});(function(){Element.implement({scrollTo:function(x,y){if(isBody(this)){this.getWindow().scrollTo(x,y);}else{this.scrollLeft=x;this.scrollTop=y;}
return this;},getSize:function(){if(isBody(this))return this.getWindow().getSize();return{x:this.offsetWidth,y:this.offsetHeight};},getScrollSize:function(){if(isBody(this))return this.getWindow().getScrollSize();return{x:this.scrollWidth,y:this.scrollHeight};},getScroll:function(){if(isBody(this))return this.getWindow().getScroll();return{x:this.scrollLeft,y:this.scrollTop};},getScrolls:function(){var element=this,position={x:0,y:0};while(element&&!isBody(element)){position.x+=element.scrollLeft;position.y+=element.scrollTop;element=element.parentNode;}
return position;},getOffsetParent:function(){var element=this;if(isBody(element))return null;if(!Browser.Engine.trident)return element.offsetParent;while((element=element.parentNode)&&!isBody(element)){if(styleString(element,'position')!='static')return element;}
return null;},getOffsets:function(){if(Browser.Engine.trident){var bound=this.getBoundingClientRect(),html=this.getDocument().documentElement;return{x:bound.left+html.scrollLeft-html.clientLeft,y:bound.top+html.scrollTop-html.clientTop};}
var element=this,position={x:0,y:0};if(isBody(this))return position;while(element&&!isBody(element)){position.x+=element.offsetLeft;position.y+=element.offsetTop;if(Browser.Engine.gecko){if(!borderBox(element)){position.x+=leftBorder(element);position.y+=topBorder(element);}
var parent=element.parentNode;if(parent&&styleString(parent,'overflow')!='visible'){position.x+=leftBorder(parent);position.y+=topBorder(parent);}}else if(element!=this&&Browser.Engine.webkit){position.x+=leftBorder(element);position.y+=topBorder(element);}
element=element.offsetParent;}
if(Browser.Engine.gecko&&!borderBox(this)){position.x-=leftBorder(this);position.y-=topBorder(this);}
return position;},getPosition:function(relative){if(isBody(this))return{x:0,y:0};var offset=this.getOffsets(),scroll=this.getScrolls();var position={x:offset.x-scroll.x,y:offset.y-scroll.y};var relativePosition=(relative&&(relative=$(relative)))?relative.getPosition():{x:0,y:0};return{x:position.x-relativePosition.x,y:position.y-relativePosition.y};},getCoordinates:function(element){if(isBody(this))return this.getWindow().getCoordinates();var position=this.getPosition(element),size=this.getSize();var obj={left:position.x,top:position.y,width:size.x,height:size.y};obj.right=obj.left+obj.width;obj.bottom=obj.top+obj.height;return obj;},computePosition:function(obj){return{left:obj.x-styleNumber(this,'margin-left'),top:obj.y-styleNumber(this,'margin-top')};},position:function(obj){return this.setStyles(this.computePosition(obj));}});Native.implement([Document,Window],{getSize:function(){var win=this.getWindow();if(Browser.Engine.presto||Browser.Engine.webkit)return{x:win.innerWidth,y:win.innerHeight};var doc=getCompatElement(this);return{x:doc.clientWidth,y:doc.clientHeight};},getScroll:function(){var win=this.getWindow();var doc=getCompatElement(this);return{x:win.pageXOffset||doc.scrollLeft,y:win.pageYOffset||doc.scrollTop};},getScrollSize:function(){var doc=getCompatElement(this);var min=this.getSize();return{x:Math.max(doc.scrollWidth,min.x),y:Math.max(doc.scrollHeight,min.y)};},getPosition:function(){return{x:0,y:0};},getCoordinates:function(){var size=this.getSize();return{top:0,left:0,bottom:size.y,right:size.x,height:size.y,width:size.x};}});var styleString=Element.getComputedStyle;function styleNumber(element,style){return styleString(element,style).toInt()||0;};function borderBox(element){return styleString(element,'-moz-box-sizing')=='border-box';};function topBorder(element){return styleNumber(element,'border-top-width');};function leftBorder(element){return styleNumber(element,'border-left-width');};function isBody(element){return(/^(?:body|html)$/i).test(element.tagName);};function getCompatElement(element){var doc=element.getDocument();return(!doc.compatMode||doc.compatMode=='CSS1Compat')?doc.html:doc.body;};})();Native.implement([Window,Document,Element],{getHeight:function(){return this.getSize().y;},getWidth:function(){return this.getSize().x;},getScrollTop:function(){return this.getScroll().y;},getScrollLeft:function(){return this.getScroll().x;},getScrollHeight:function(){return this.getScrollSize().y;},getScrollWidth:function(){return this.getScrollSize().x;},getTop:function(){return this.getPosition().y;},getLeft:function(){return this.getPosition().x;}});Native.implement([Document,Element],{getElements:function(expression,nocash){expression=expression.split(',');var items,local={};for(var i=0,l=expression.length;i<l;i++){var selector=expression[i],elements=Selectors.Utils.search(this,selector,local);if(i!=0&&elements.item)elements=$A(elements);items=(i==0)?elements:(items.item)?$A(items).concat(elements):items.concat(elements);}
return new Elements(items,{ddup:(expression.length>1),cash:!nocash});}});Element.implement({match:function(selector){if(!selector||(selector==this))return true;var tagid=Selectors.Utils.parseTagAndID(selector);var tag=tagid[0],id=tagid[1];if(!Selectors.Filters.byID(this,id)||!Selectors.Filters.byTag(this,tag))return false;var parsed=Selectors.Utils.parseSelector(selector);return(parsed)?Selectors.Utils.filter(this,parsed,{}):true;}});var Selectors={Cache:{nth:{},parsed:{}}};Selectors.RegExps={id:(/#([\w-]+)/),tag:(/^(\w+|\*)/),quick:(/^(\w+|\*)$/),splitter:(/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g),combined:(/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)(["']?)([^\4]*?)\4)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g)};Selectors.Utils={chk:function(item,uniques){if(!uniques)return true;var uid=$uid(item);if(!uniques[uid])return uniques[uid]=true;return false;},parseNthArgument:function(argument){if(Selectors.Cache.nth[argument])return Selectors.Cache.nth[argument];var parsed=argument.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!parsed)return false;var inta=parseInt(parsed[1]);var a=(inta||inta===0)?inta:1;var special=parsed[2]||false;var b=parseInt(parsed[3])||0;if(a!=0){b--;while(b<1)b+=a;while(b>=a)b-=a;}else{a=b;special='index';}
switch(special){case'n':parsed={a:a,b:b,special:'n'};break;case'odd':parsed={a:2,b:0,special:'n'};break;case'even':parsed={a:2,b:1,special:'n'};break;case'first':parsed={a:0,special:'index'};break;case'last':parsed={special:'last-child'};break;case'only':parsed={special:'only-child'};break;default:parsed={a:(a-1),special:'index'};}
return Selectors.Cache.nth[argument]=parsed;},parseSelector:function(selector){if(Selectors.Cache.parsed[selector])return Selectors.Cache.parsed[selector];var m,parsed={classes:[],pseudos:[],attributes:[]};while((m=Selectors.RegExps.combined.exec(selector))){var cn=m[1],an=m[2],ao=m[3],av=m[5],pn=m[6],pa=m[7];if(cn){parsed.classes.push(cn);}else if(pn){var parser=Selectors.Pseudo.get(pn);if(parser)parsed.pseudos.push({parser:parser,argument:pa});else parsed.attributes.push({name:pn,operator:'=',value:pa});}else if(an){parsed.attributes.push({name:an,operator:ao,value:av});}}
if(!parsed.classes.length)delete parsed.classes;if(!parsed.attributes.length)delete parsed.attributes;if(!parsed.pseudos.length)delete parsed.pseudos;if(!parsed.classes&&!parsed.attributes&&!parsed.pseudos)parsed=null;return Selectors.Cache.parsed[selector]=parsed;},parseTagAndID:function(selector){var tag=selector.match(Selectors.RegExps.tag);var id=selector.match(Selectors.RegExps.id);return[(tag)?tag[1]:'*',(id)?id[1]:false];},filter:function(item,parsed,local){var i;if(parsed.classes){for(i=parsed.classes.length;i--;i){var cn=parsed.classes[i];if(!Selectors.Filters.byClass(item,cn))return false;}}
if(parsed.attributes){for(i=parsed.attributes.length;i--;i){var att=parsed.attributes[i];if(!Selectors.Filters.byAttribute(item,att.name,att.operator,att.value))return false;}}
if(parsed.pseudos){for(i=parsed.pseudos.length;i--;i){var psd=parsed.pseudos[i];if(!Selectors.Filters.byPseudo(item,psd.parser,psd.argument,local))return false;}}
return true;},getByTagAndID:function(ctx,tag,id){if(id){var item=(ctx.getElementById)?ctx.getElementById(id,true):Element.getElementById(ctx,id,true);return(item&&Selectors.Filters.byTag(item,tag))?[item]:[];}else{return ctx.getElementsByTagName(tag);}},search:function(self,expression,local){var splitters=[];var selectors=expression.trim().replace(Selectors.RegExps.splitter,function(m0,m1,m2){splitters.push(m1);return':)'+m2;}).split(':)');var items,filtered,item;for(var i=0,l=selectors.length;i<l;i++){var selector=selectors[i];if(i==0&&Selectors.RegExps.quick.test(selector)){items=self.getElementsByTagName(selector);continue;}
var splitter=splitters[i-1];var tagid=Selectors.Utils.parseTagAndID(selector);var tag=tagid[0],id=tagid[1];if(i==0){items=Selectors.Utils.getByTagAndID(self,tag,id);}else{var uniques={},found=[];for(var j=0,k=items.length;j<k;j++)found=Selectors.Getters[splitter](found,items[j],tag,id,uniques);items=found;}
var parsed=Selectors.Utils.parseSelector(selector);if(parsed){filtered=[];for(var m=0,n=items.length;m<n;m++){item=items[m];if(Selectors.Utils.filter(item,parsed,local))filtered.push(item);}
items=filtered;}}
return items;}};Selectors.Getters={' ':function(found,self,tag,id,uniques){var items=Selectors.Utils.getByTagAndID(self,tag,id);for(var i=0,l=items.length;i<l;i++){var item=items[i];if(Selectors.Utils.chk(item,uniques))found.push(item);}
return found;},'>':function(found,self,tag,id,uniques){var children=Selectors.Utils.getByTagAndID(self,tag,id);for(var i=0,l=children.length;i<l;i++){var child=children[i];if(child.parentNode==self&&Selectors.Utils.chk(child,uniques))found.push(child);}
return found;},'+':function(found,self,tag,id,uniques){while((self=self.nextSibling)){if(self.nodeType==1){if(Selectors.Utils.chk(self,uniques)&&Selectors.Filters.byTag(self,tag)&&Selectors.Filters.byID(self,id))found.push(self);break;}}
return found;},'~':function(found,self,tag,id,uniques){while((self=self.nextSibling)){if(self.nodeType==1){if(!Selectors.Utils.chk(self,uniques))break;if(Selectors.Filters.byTag(self,tag)&&Selectors.Filters.byID(self,id))found.push(self);}}
return found;}};Selectors.Filters={byTag:function(self,tag){return(tag=='*'||(self.tagName&&self.tagName.toLowerCase()==tag));},byID:function(self,id){return(!id||(self.id&&self.id==id));},byClass:function(self,klass){return(self.className&&self.className.contains(klass,' '));},byPseudo:function(self,parser,argument,local){return parser.call(self,argument,local);},byAttribute:function(self,name,operator,value){var result=Element.prototype.getProperty.call(self,name);if(!result)return(operator=='!=');if(!operator||value==undefined)return true;switch(operator){case'=':return(result==value);case'*=':return(result.contains(value));case'^=':return(result.substr(0,value.length)==value);case'$=':return(result.substr(result.length-value.length)==value);case'!=':return(result!=value);case'~=':return result.contains(value,' ');case'|=':return result.contains(value,'-');}
return false;}};Selectors.Pseudo=new Hash({checked:function(){return this.checked;},empty:function(){return!(this.innerText||this.textContent||'').length;},not:function(selector){return!Element.match(this,selector);},contains:function(text){return(this.innerText||this.textContent||'').contains(text);},'first-child':function(){return Selectors.Pseudo.index.call(this,0);},'last-child':function(){var element=this;while((element=element.nextSibling)){if(element.nodeType==1)return false;}
return true;},'only-child':function(){var prev=this;while((prev=prev.previousSibling)){if(prev.nodeType==1)return false;}
var next=this;while((next=next.nextSibling)){if(next.nodeType==1)return false;}
return true;},'nth-child':function(argument,local){argument=(argument==undefined)?'n':argument;var parsed=Selectors.Utils.parseNthArgument(argument);if(parsed.special!='n')return Selectors.Pseudo[parsed.special].call(this,parsed.a,local);var count=0;local.positions=local.positions||{};var uid=$uid(this);if(!local.positions[uid]){var self=this;while((self=self.previousSibling)){if(self.nodeType!=1)continue;count++;var position=local.positions[$uid(self)];if(position!=undefined){count=position+count;break;}}
local.positions[uid]=count;}
return(local.positions[uid]%parsed.a==parsed.b);},index:function(index){var element=this,count=0;while((element=element.previousSibling)){if(element.nodeType==1&&++count>index)return false;}
return(count==index);},even:function(argument,local){return Selectors.Pseudo['nth-child'].call(this,'2n+1',local);},odd:function(argument,local){return Selectors.Pseudo['nth-child'].call(this,'2n',local);}});Element.Events.domready={onAdd:function(fn){if(Browser.loaded)fn.call(this);}};(function(){var domready=function(){if(Browser.loaded)return;Browser.loaded=true;window.fireEvent('domready');document.fireEvent('domready');};if(Browser.Engine.trident){var temp=document.createElement('div');(function(){($try(function(){temp.doScroll('left');return $(temp).inject(document.body).set('html','temp').dispose();}))?domready():arguments.callee.delay(50);})();}else if(Browser.Engine.webkit&&Browser.Engine.version<525){(function(){(['loaded','complete'].contains(document.readyState))?domready():arguments.callee.delay(50);})();}else{window.addEvent('load',domready);document.addEvent('DOMContentLoaded',domready);}})();var JSON=new Hash({$specialChars:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},$replaceChars:function(chr){return JSON.$specialChars[chr]||'\\u00'+Math.floor(chr.charCodeAt()/16).toString(16)+(chr.charCodeAt()%16).toString(16);},encode:function(obj){switch($type(obj)){case'string':return'"'+obj.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case'array':return'['+String(obj.map(JSON.encode).filter($defined))+']';case'object':case'hash':var string=[];Hash.each(obj,function(value,key){var json=JSON.encode(value);if(json)string.push(JSON.encode(key)+':'+json);});return'{'+string+'}';case'number':case'boolean':return String(obj);case false:return'null';}
return null;},decode:function(string,secure){if($type(string)!='string'||!string.length)return null;if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,'')))return null;return eval('('+string+')');}});Native.implement([Hash,Array,String,Number],{toJSON:function(){return JSON.encode(this);}});var Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(key,options){this.key=key;this.setOptions(options);},write:function(value){value=encodeURIComponent(value);if(this.options.domain)value+='; domain='+this.options.domain;if(this.options.path)value+='; path='+this.options.path;if(this.options.duration){var date=new Date();date.setTime(date.getTime()+this.options.duration*24*60*60*1000);value+='; expires='+date.toGMTString();}
if(this.options.secure)value+='; secure';this.options.document.cookie=this.key+'='+value;return this;},read:function(){var value=this.options.document.cookie.match('(?:^|;)\\s*'+this.key.escapeRegExp()+'=([^;]*)');return(value)?decodeURIComponent(value[1]):null;},dispose:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write('');return this;}});Cookie.write=function(key,value,options){return new Cookie(key,options).write(value);};Cookie.read=function(key){return new Cookie(key).read();};Cookie.dispose=function(key,options){return new Cookie(key,options).dispose();};var Swiff=new Class({Implements:[Options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:'high',allowScriptAccess:'always',wMode:'transparent',swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object;},initialize:function(path,options){this.instance='Swiff_'+$time();this.setOptions(options);options=this.options;var id=this.id=options.id||this.instance;var container=$(options.container);Swiff.CallBacks[this.instance]={};var params=options.params,vars=options.vars,callBacks=options.callBacks;var properties=$extend({height:options.height,width:options.width},options.properties);var self=this;for(var callBack in callBacks){Swiff.CallBacks[this.instance][callBack]=(function(option){return function(){return option.apply(self.object,arguments);};})(callBacks[callBack]);vars[callBack]='Swiff.CallBacks.'+this.instance+'.'+callBack;}
params.flashVars=Hash.toQueryString(vars);if(Browser.Engine.trident){properties.classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';params.movie=path;}else{properties.type='application/x-shockwave-flash';properties.data=path;}
var build='<object id="'+id+'"';for(var property in properties)build+=' '+property+'="'+properties[property]+'"';build+='>';for(var param in params){if(params[param])build+='<param name="'+param+'" value="'+params[param]+'" />';}
build+='</object>';this.object=((container)?container.empty():new Element('div')).set('html',build).firstChild;},replaces:function(element){element=$(element,true);element.parentNode.replaceChild(this.toElement(),element);return this;},inject:function(element){$(element,true).appendChild(this.toElement());return this;},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].extend(arguments));}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction('<invoke name="'+fn+'" returntype="javascript">'+__flash__argumentsToXML(arguments,2)+'</invoke>');return eval(rs);};var Fx=new Class({Implements:[Chain,Events,Options],options:{fps:50,unit:false,duration:500,link:'ignore'},initialize:function(options){this.subject=this.subject||this;this.setOptions(options);this.options.duration=Fx.Durations[this.options.duration]||this.options.duration.toInt();var wait=this.options.wait;if(wait===false)this.options.link='cancel';},getTransition:function(){return function(p){return-(Math.cos(Math.PI*p)-1)/2;};},step:function(){var time=$time();if(time<this.time+this.options.duration){var delta=this.transition((time-this.time)/this.options.duration);this.set(this.compute(this.from,this.to,delta));}else{this.set(this.compute(this.from,this.to,1));this.complete();}},set:function(now){return now;},compute:function(from,to,delta){return Fx.compute(from,to,delta);},check:function(caller){if(!this.timer)return true;switch(this.options.link){case'cancel':this.cancel();return true;case'chain':this.chain(caller.bind(this,Array.slice(arguments,1)));return false;}
return false;},start:function(from,to){if(!this.check(arguments.callee,from,to))return this;this.from=from;this.to=to;this.time=0;this.transition=this.getTransition();this.startTimer();this.onStart();return this;},complete:function(){if(this.stopTimer())this.onComplete();return this;},cancel:function(){if(this.stopTimer())this.onCancel();return this;},onStart:function(){this.fireEvent('start',this.subject);},onComplete:function(){this.fireEvent('complete',this.subject);if(!this.callChain())this.fireEvent('chainComplete',this.subject);},onCancel:function(){this.fireEvent('cancel',this.subject).clearChain();},pause:function(){this.stopTimer();return this;},resume:function(){this.startTimer();return this;},stopTimer:function(){if(!this.timer)return false;this.time=$time()-this.time;this.timer=$clear(this.timer);return true;},startTimer:function(){if(this.timer)return false;this.time=$time()-this.time;this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);return true;}});Fx.compute=function(from,to,delta){return(to-from)*delta+from;};Fx.Durations={'short':250,'normal':500,'long':1000};Fx.CSS=new Class({Extends:Fx,prepare:function(element,property,values){values=$splat(values);var values1=values[1];if(!$chk(values1)){values[1]=values[0];values[0]=element.getStyle(property);}
var parsed=values.map(this.parse);return{from:parsed[0],to:parsed[1]};},parse:function(value){value=$lambda(value)();value=(typeof value=='string')?value.split(' '):$splat(value);return value.map(function(val){val=String(val);var found=false;Fx.CSS.Parsers.each(function(parser,key){if(found)return;var parsed=parser.parse(val);if($chk(parsed))found={value:parsed,parser:parser};});found=found||{value:val,parser:Fx.CSS.Parsers.String};return found;});},compute:function(from,to,delta){var computed=[];(Math.min(from.length,to.length)).times(function(i){computed.push({value:from[i].parser.compute(from[i].value,to[i].value,delta),parser:from[i].parser});});computed.$family={name:'fx:css:value'};return computed;},serve:function(value,unit){if($type(value)!='fx:css:value')value=this.parse(value);var returned=[];value.each(function(bit){returned=returned.concat(bit.parser.serve(bit.value,unit));});return returned;},render:function(element,property,value,unit){element.setStyle(property,this.serve(value,unit));},search:function(selector){if(Fx.CSS.Cache[selector])return Fx.CSS.Cache[selector];var to={};Array.each(document.styleSheets,function(sheet,j){var href=sheet.href;if(href&&href.contains('://')&&!href.contains(document.domain))return;var rules=sheet.rules||sheet.cssRules;Array.each(rules,function(rule,i){if(!rule.style)return;var selectorText=(rule.selectorText)?rule.selectorText.replace(/^\w+/,function(m){return m.toLowerCase();}):null;if(!selectorText||!selectorText.test('^'+selector+'$'))return;Element.Styles.each(function(value,style){if(!rule.style[style]||Element.ShortStyles[style])return;value=String(rule.style[style]);to[style]=(value.test(/^rgb/))?value.rgbToHex():value;});});});return Fx.CSS.Cache[selector]=to;}});Fx.CSS.Cache={};Fx.CSS.Parsers=new Hash({Color:{parse:function(value){if(value.match(/^#[0-9a-f]{3,6}$/i))return value.hexToRgb(true);return((value=value.match(/(\d+),\s*(\d+),\s*(\d+)/)))?[value[1],value[2],value[3]]:false;},compute:function(from,to,delta){return from.map(function(value,i){return Math.round(Fx.compute(from[i],to[i],delta));});},serve:function(value){return value.map(Number);}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(value,unit){return(unit)?value+unit:value;}},String:{parse:$lambda(false),compute:$arguments(1),serve:$arguments(0)}});Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(element,options){this.element=this.subject=$(element);this.parent(options);},set:function(property,now){if(arguments.length==1){now=property;property=this.property||this.options.property;}
this.render(this.element,property,now,this.options.unit);return this;},start:function(property,from,to){if(!this.check(arguments.callee,property,from,to))return this;var args=Array.flatten(arguments);this.property=this.options.property||args.shift();var parsed=this.prepare(this.element,this.property,args);return this.parent(parsed.from,parsed.to);}});Element.Properties.tween={set:function(options){var tween=this.retrieve('tween');if(tween)tween.cancel();return this.eliminate('tween').store('tween:options',$extend({link:'cancel'},options));},get:function(options){if(options||!this.retrieve('tween')){if(options||!this.retrieve('tween:options'))this.set('tween',options);this.store('tween',new Fx.Tween(this,this.retrieve('tween:options')));}
return this.retrieve('tween');}};Element.implement({tween:function(property,from,to){this.get('tween').start(arguments);return this;},fade:function(how){var fade=this.get('tween'),o='opacity',toggle;how=$pick(how,'toggle');switch(how){case'in':fade.start(o,1);break;case'out':fade.start(o,0);break;case'show':fade.set(o,1);break;case'hide':fade.set(o,0);break;case'toggle':var flag=this.retrieve('fade:flag',this.get('opacity')==1);fade.start(o,(flag)?0:1);this.store('fade:flag',!flag);toggle=true;break;default:fade.start(o,arguments);}
if(!toggle)this.eliminate('fade:flag');return this;},highlight:function(start,end){if(!end){end=this.retrieve('highlight:original',this.getStyle('background-color'));end=(end=='transparent')?'#fff':end;}
var tween=this.get('tween');tween.start('background-color',start||'#ffff88',end).chain(function(){this.setStyle('background-color',this.retrieve('highlight:original'));tween.callChain();}.bind(this));return this;}});Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(element,options){this.element=this.subject=$(element);this.parent(options);},set:function(now){if(typeof now=='string')now=this.search(now);for(var p in now)this.render(this.element,p,now[p],this.options.unit);return this;},compute:function(from,to,delta){var now={};for(var p in from)now[p]=this.parent(from[p],to[p],delta);return now;},start:function(properties){if(!this.check(arguments.callee,properties))return this;if(typeof properties=='string')properties=this.search(properties);var from={},to={};for(var p in properties){var parsed=this.prepare(this.element,p,properties[p]);from[p]=parsed.from;to[p]=parsed.to;}
return this.parent(from,to);}});Element.Properties.morph={set:function(options){var morph=this.retrieve('morph');if(morph)morph.cancel();return this.eliminate('morph').store('morph:options',$extend({link:'cancel'},options));},get:function(options){if(options||!this.retrieve('morph')){if(options||!this.retrieve('morph:options'))this.set('morph',options);this.store('morph',new Fx.Morph(this,this.retrieve('morph:options')));}
return this.retrieve('morph');}};Element.implement({morph:function(props){this.get('morph').start(props);return this;}});Fx.implement({getTransition:function(){var trans=this.options.transition||Fx.Transitions.Sine.easeInOut;if(typeof trans=='string'){var data=trans.split(':');trans=Fx.Transitions;trans=trans[data[0]]||trans[data[0].capitalize()];if(data[1])trans=trans['ease'+data[1].capitalize()+(data[2]?data[2].capitalize():'')];}
return trans;}});Fx.Transition=function(transition,params){params=$splat(params);return $extend(transition,{easeIn:function(pos){return transition(pos,params);},easeOut:function(pos){return 1-transition(1-pos,params);},easeInOut:function(pos){return(pos<=0.5)?transition(2*pos,params)/2:(2-transition(2*(1-pos),params))/2;}});};Fx.Transitions=new Hash({linear:$arguments(0)});Fx.Transitions.extend=function(transitions){for(var transition in transitions)Fx.Transitions[transition]=new Fx.Transition(transitions[transition]);};Fx.Transitions.extend({Pow:function(p,x){return Math.pow(p,x[0]||6);},Expo:function(p){return Math.pow(2,8*(p-1));},Circ:function(p){return 1-Math.sin(Math.acos(p));},Sine:function(p){return 1-Math.sin((1-p)*Math.PI/2);},Back:function(p,x){x=x[0]||1.618;return Math.pow(p,2)*((x+1)*p-x);},Bounce:function(p){var value;for(var a=0,b=1;1;a+=b,b/=2){if(p>=(7-4*a)/11){value=b*b-Math.pow((11-6*a-11*p)/4,2);break;}}
return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x[0]||1)/3);}});['Quad','Cubic','Quart','Quint'].each(function(transition,i){Fx.Transitions[transition]=new Fx.Transition(function(p){return Math.pow(p,[i+2]);});});var Request=new Class({Implements:[Chain,Events,Options],options:{url:'',data:'',headers:{'X-Requested-With':'XMLHttpRequest','Accept':'text/javascript, text/html, application/xml, text/xml, */*'},async:true,format:false,method:'post',link:'ignore',isSuccess:null,emulation:true,urlEncoded:true,encoding:'utf-8',evalScripts:false,evalResponse:false},initialize:function(options){this.xhr=new Browser.Request();this.setOptions(options);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers=new Hash(this.options.headers);},onStateChange:function(){if(this.xhr.readyState!=4||!this.running)return;this.running=false;this.status=0;$try(function(){this.status=this.xhr.status;}.bind(this));if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML};this.success(this.response.text,this.response.xml);}else{this.response={text:null,xml:null};this.failure();}
this.xhr.onreadystatechange=$empty;},isSuccess:function(){return((this.status>=200)&&(this.status<300));},processScripts:function(text){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))return $exec(text);return text.stripScripts(this.options.evalScripts);},success:function(text,xml){this.onSuccess(this.processScripts(text),xml);},onSuccess:function(){this.fireEvent('complete',arguments).fireEvent('success',arguments).callChain();},failure:function(){this.onFailure();},onFailure:function(){this.fireEvent('complete').fireEvent('failure',this.xhr);},setHeader:function(name,value){this.headers.set(name,value);return this;},getHeader:function(name){return $try(function(){return this.xhr.getResponseHeader(name);}.bind(this));},check:function(caller){if(!this.running)return true;switch(this.options.link){case'cancel':this.cancel();return true;case'chain':this.chain(caller.bind(this,Array.slice(arguments,1)));return false;}
return false;},send:function(options){if(!this.check(arguments.callee,options))return this;this.running=true;var type=$type(options);if(type=='string'||type=='element')options={data:options};var old=this.options;options=$extend({data:old.data,url:old.url,method:old.method},options);var data=options.data,url=options.url,method=options.method;switch($type(data)){case'element':data=$(data).toQueryString();break;case'object':case'hash':data=Hash.toQueryString(data);}
if(this.options.format){var format='format='+this.options.format;data=(data)?format+'&'+data:format;}
if(this.options.emulation&&['put','delete'].contains(method)){var _method='_method='+method;data=(data)?_method+'&'+data:_method;method='post';}
if(this.options.urlEncoded&&method=='post'){var encoding=(this.options.encoding)?'; charset='+this.options.encoding:'';this.headers.set('Content-type','application/x-www-form-urlencoded'+encoding);}
if(data&&method=='get'){url=url+(url.contains('?')?'&':'?')+data;data=null;}
this.xhr.open(method.toUpperCase(),url,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(value,key){try{this.xhr.setRequestHeader(key,value);}catch(e){this.fireEvent('exception',[key,value]);}},this);this.fireEvent('request');this.xhr.send(data);if(!this.options.async)this.onStateChange();return this;},cancel:function(){if(!this.running)return this;this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new Browser.Request();this.fireEvent('cancel');return this;}});(function(){var methods={};['get','post','put','delete','GET','POST','PUT','DELETE'].each(function(method){methods[method]=function(){var params=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(params,{method:method.toLowerCase()}));};});Request.implement(methods);})();Element.Properties.send={set:function(options){var send=this.retrieve('send');if(send)send.cancel();return this.eliminate('send').store('send:options',$extend({data:this,link:'cancel',method:this.get('method')||'post',url:this.get('action')},options));},get:function(options){if(options||!this.retrieve('send')){if(options||!this.retrieve('send:options'))this.set('send',options);this.store('send',new Request(this.retrieve('send:options')));}
return this.retrieve('send');}};Element.implement({send:function(url){var sender=this.get('send');sender.send({data:this,url:url||sender.options.url});return this;}});Request.HTML=new Class({Extends:Request,options:{update:false,evalScripts:true,filter:false},processHTML:function(text){var match=text.match(/<body[^>]*>([\s\S]*?)<\/body>/i);text=(match)?match[1]:text;var container=new Element('div');return $try(function(){var root='<root>'+text+'</root>',doc;if(Browser.Engine.trident){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async=false;doc.loadXML(root);}else{doc=new DOMParser().parseFromString(root,'text/xml');}
root=doc.getElementsByTagName('root')[0];for(var i=0,k=root.childNodes.length;i<k;i++){var child=Element.clone(root.childNodes[i],true,true);if(child)container.grab(child);}
return container;})||container.set('html',text);},success:function(text){var options=this.options,response=this.response;response.html=text.stripScripts(function(script){response.javascript=script;});var temp=this.processHTML(response.html);response.tree=temp.childNodes;response.elements=temp.getElements('*');if(options.filter)response.tree=response.elements.filter(options.filter);if(options.update)$(options.update).empty().set('html',response.html);if(options.evalScripts)$exec(response.javascript);this.onSuccess(response.tree,response.elements,response.html,response.javascript);}});Element.Properties.load={set:function(options){var load=this.retrieve('load');if(load)load.cancel();return this.eliminate('load').store('load:options',$extend({data:this,link:'cancel',update:this,method:'get'},options));},get:function(options){if(options||!this.retrieve('load')){if(options||!this.retrieve('load:options'))this.set('load',options);this.store('load',new Request.HTML(this.retrieve('load:options')));}
return this.retrieve('load');}};Element.implement({load:function(){this.get('load').send(Array.link(arguments,{data:Object.type,url:String.type}));return this;}});Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(options){this.parent(options);this.headers.extend({'Accept':'application/json','X-Request':'JSON'});},success:function(text){this.response.json=JSON.decode(text,this.options.secure);this.onSuccess(this.response.json,text);}});Fx.Slide=new Class({Extends:Fx,options:{mode:'vertical'},initialize:function(element,options){this.addEvent('complete',function(){this.open=(this.wrapper['offset'+this.layout.capitalize()]!=0);if(this.open&&Browser.Engine.webkit419)this.element.dispose().inject(this.wrapper);},true);this.element=this.subject=$(element);this.parent(options);var wrapper=this.element.retrieve('wrapper');this.wrapper=wrapper||new Element('div',{styles:$extend(this.element.getStyles('margin','position'),{'overflow':'hidden'})}).wraps(this.element);this.element.store('wrapper',this.wrapper).setStyle('margin',0);this.now=[];this.open=true;},vertical:function(){this.margin='margin-top';this.layout='height';this.offset=this.element.offsetHeight;},horizontal:function(){this.margin='margin-left';this.layout='width';this.offset=this.element.offsetWidth;},set:function(now){this.element.setStyle(this.margin,now[0]);this.wrapper.setStyle(this.layout,now[1]);return this;},compute:function(from,to,delta){var now=[];var x=2;x.times(function(i){now[i]=Fx.compute(from[i],to[i],delta);});return now;},start:function(how,mode){if(!this.check(arguments.callee,how,mode))return this;this[mode||this.options.mode]();var margin=this.element.getStyle(this.margin).toInt();var layout=this.wrapper.getStyle(this.layout).toInt();var caseIn=[[margin,layout],[0,this.offset]];var caseOut=[[margin,layout],[-this.offset,0]];var start;switch(how){case'in':start=caseIn;break;case'out':start=caseOut;break;case'toggle':start=(this.wrapper['offset'+this.layout.capitalize()]==0)?caseIn:caseOut;}
return this.parent(start[0],start[1]);},slideIn:function(mode){return this.start('in',mode);},slideOut:function(mode){return this.start('out',mode);},hide:function(mode){this[mode||this.options.mode]();this.open=false;return this.set([-this.offset,0]);},show:function(mode){this[mode||this.options.mode]();this.open=true;return this.set([0,this.offset]);},toggle:function(mode){return this.start('toggle',mode);}});Element.Properties.slide={set:function(options){var slide=this.retrieve('slide');if(slide)slide.cancel();return this.eliminate('slide').store('slide:options',$extend({link:'cancel'},options));},get:function(options){if(options||!this.retrieve('slide')){if(options||!this.retrieve('slide:options'))this.set('slide',options);this.store('slide',new Fx.Slide(this,this.retrieve('slide:options')));}
return this.retrieve('slide');}};Element.implement({slide:function(how,mode){how=how||'toggle';var slide=this.get('slide'),toggle;switch(how){case'hide':slide.hide(mode);break;case'show':slide.show(mode);break;case'toggle':var flag=this.retrieve('slide:flag',slide.open);slide[(flag)?'slideOut':'slideIn'](mode);this.store('slide:flag',!flag);toggle=true;break;default:slide.start(how,mode);}
if(!toggle)this.eliminate('slide:flag');return this;}});Fx.Scroll=new Class({Extends:Fx,options:{offset:{'x':0,'y':0},wheelStops:true},initialize:function(element,options){this.element=this.subject=$(element);this.parent(options);var cancel=this.cancel.bind(this,false);if($type(this.element)!='element')this.element=$(this.element.getDocument().body);var stopper=this.element;if(this.options.wheelStops){this.addEvent('start',function(){stopper.addEvent('mousewheel',cancel);},true);this.addEvent('complete',function(){stopper.removeEvent('mousewheel',cancel);},true);}},set:function(){var now=Array.flatten(arguments);this.element.scrollTo(now[0],now[1]);},compute:function(from,to,delta){var now=[];var x=2;x.times(function(i){now.push(Fx.compute(from[i],to[i],delta));});return now;},start:function(x,y){if(!this.check(arguments.callee,x,y))return this;var offsetSize=this.element.getSize(),scrollSize=this.element.getScrollSize();var scroll=this.element.getScroll(),values={x:x,y:y};for(var z in values){var max=scrollSize[z]-offsetSize[z];if($chk(values[z]))values[z]=($type(values[z])=='number')?values[z].limit(0,max):max;else values[z]=scroll[z];values[z]+=this.options.offset[z];}
return this.parent([scroll.x,scroll.y],[values.x,values.y]);},toTop:function(){return this.start(false,0);},toLeft:function(){return this.start(0,false);},toRight:function(){return this.start('right',false);},toBottom:function(){return this.start(false,'bottom');},toElement:function(el){var position=$(el).getPosition(this.element);return this.start(position.x,position.y);}});Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(elements,options){this.elements=this.subject=$$(elements);this.parent(options);},compute:function(from,to,delta){var now={};for(var i in from){var iFrom=from[i],iTo=to[i],iNow=now[i]={};for(var p in iFrom)iNow[p]=this.parent(iFrom[p],iTo[p],delta);}
return now;},set:function(now){for(var i in now){var iNow=now[i];for(var p in iNow)this.render(this.elements[i],p,iNow[p],this.options.unit);}
return this;},start:function(obj){if(!this.check(arguments.callee,obj))return this;var from={},to={};for(var i in obj){var iProps=obj[i],iFrom=from[i]={},iTo=to[i]={};for(var p in iProps){var parsed=this.prepare(this.elements[i],p,iProps[p]);iFrom[p]=parsed.from;iTo[p]=parsed.to;}}
return this.parent(from,to);}});var Drag=new Class({Implements:[Events,Options],options:{snap:6,unit:'px',grid:false,style:true,limit:false,handle:false,invert:false,preventDefault:false,modifiers:{x:'left',y:'top'}},initialize:function(){var params=Array.link(arguments,{'options':Object.type,'element':$defined});this.element=$(params.element);this.document=this.element.getDocument();this.setOptions(params.options||{});var htype=$type(this.options.handle);this.handles=(htype=='array'||htype=='collection')?$$(this.options.handle):$(this.options.handle)||this.element;this.mouse={'now':{},'pos':{}};this.value={'start':{},'now':{}};this.selection=(Browser.Engine.trident)?'selectstart':'mousedown';this.bound={start:this.start.bind(this),check:this.check.bind(this),drag:this.drag.bind(this),stop:this.stop.bind(this),cancel:this.cancel.bind(this),eventStop:$lambda(false)};this.attach();},attach:function(){this.handles.addEvent('mousedown',this.bound.start);return this;},detach:function(){this.handles.removeEvent('mousedown',this.bound.start);return this;},start:function(event){if(this.options.preventDefault)event.preventDefault();this.fireEvent('beforeStart',this.element);this.mouse.start=event.page;var limit=this.options.limit;this.limit={'x':[],'y':[]};for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;if(this.options.style)this.value.now[z]=this.element.getStyle(this.options.modifiers[z]).toInt();else this.value.now[z]=this.element[this.options.modifiers[z]];if(this.options.invert)this.value.now[z]*=-1;this.mouse.pos[z]=event.page[z]-this.value.now[z];if(limit&&limit[z]){for(var i=2;i--;i){if($chk(limit[z][i]))this.limit[z][i]=$lambda(limit[z][i])();}}}
if($type(this.options.grid)=='number')this.options.grid={'x':this.options.grid,'y':this.options.grid};this.document.addEvents({mousemove:this.bound.check,mouseup:this.bound.cancel});this.document.addEvent(this.selection,this.bound.eventStop);},check:function(event){if(this.options.preventDefault)event.preventDefault();var distance=Math.round(Math.sqrt(Math.pow(event.page.x-this.mouse.start.x,2)+Math.pow(event.page.y-this.mouse.start.y,2)));if(distance>this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});this.fireEvent('start',this.element).fireEvent('snap',this.element);}},drag:function(event){if(this.options.preventDefault)event.preventDefault();this.mouse.now=event.page;for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.mouse.now[z]-this.mouse.pos[z];if(this.options.invert)this.value.now[z]*=-1;if(this.options.limit&&this.limit[z]){if($chk(this.limit[z][1])&&(this.value.now[z]>this.limit[z][1])){this.value.now[z]=this.limit[z][1];}else if($chk(this.limit[z][0])&&(this.value.now[z]<this.limit[z][0])){this.value.now[z]=this.limit[z][0];}}
if(this.options.grid[z])this.value.now[z]-=(this.value.now[z]%this.options.grid[z]);if(this.options.style)this.element.setStyle(this.options.modifiers[z],this.value.now[z]+this.options.unit);else this.element[this.options.modifiers[z]]=this.value.now[z];}
this.fireEvent('drag',this.element);},cancel:function(event){this.document.removeEvent('mousemove',this.bound.check);this.document.removeEvent('mouseup',this.bound.cancel);if(event){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent('cancel',this.element);}},stop:function(event){this.document.removeEvent(this.selection,this.bound.eventStop);this.document.removeEvent('mousemove',this.bound.drag);this.document.removeEvent('mouseup',this.bound.stop);if(event)this.fireEvent('complete',this.element);}});Element.implement({makeResizable:function(options){return new Drag(this,$merge({modifiers:{'x':'width','y':'height'}},options));}});Drag.Move=new Class({Extends:Drag,options:{droppables:[],container:false},initialize:function(element,options){this.parent(element,options);this.droppables=$$(this.options.droppables);this.container=$(this.options.container);if(this.container&&$type(this.container)!='element')this.container=$(this.container.getDocument().body);element=this.element;var current=element.getStyle('position');var position=(current!='static')?current:'absolute';if(element.getStyle('left')=='auto'||element.getStyle('top')=='auto')element.position(element.getPosition(element.offsetParent));element.setStyle('position',position);this.addEvent('start',function(){this.checkDroppables();},true);},start:function(event){if(this.container){var el=this.element,cont=this.container,ccoo=cont.getCoordinates(el.offsetParent),cps={},ems={};['top','right','bottom','left'].each(function(pad){cps[pad]=cont.getStyle('padding-'+pad).toInt();ems[pad]=el.getStyle('margin-'+pad).toInt();},this);var width=el.offsetWidth+ems.left+ems.right,height=el.offsetHeight+ems.top+ems.bottom;var x=[ccoo.left+cps.left,ccoo.right-cps.right-width];var y=[ccoo.top+cps.top,ccoo.bottom-cps.bottom-height];this.options.limit={x:x,y:y};}
this.parent(event);},checkAgainst:function(el){el=el.getCoordinates();var now=this.mouse.now;return(now.x>el.left&&now.x<el.right&&now.y<el.bottom&&now.y>el.top);},checkDroppables:function(){var overed=this.droppables.filter(this.checkAgainst,this).getLast();if(this.overed!=overed){if(this.overed)this.fireEvent('leave',[this.element,this.overed]);if(overed){this.overed=overed;this.fireEvent('enter',[this.element,overed]);}else{this.overed=null;}}},drag:function(event){this.parent(event);if(this.droppables.length)this.checkDroppables();},stop:function(event){this.checkDroppables();this.fireEvent('drop',[this.element,this.overed]);this.overed=null;return this.parent(event);}});Element.implement({makeDraggable:function(options){return new Drag.Move(this,options);}});Hash.Cookie=new Class({Extends:Cookie,options:{autoSave:true},initialize:function(name,options){this.parent(name,options);this.load();},save:function(){var value=JSON.encode(this.hash);if(!value||value.length>4096)return false;if(value=='{}')this.dispose();else this.write(value);return true;},load:function(){this.hash=new Hash(JSON.decode(this.read(),true));return this;}});Hash.Cookie.implement((function(){var methods={};Hash.each(Hash.prototype,function(method,name){methods[name]=function(){var value=method.apply(this.hash,arguments);if(this.options.autoSave)this.save();return value;};});return methods;})());var Color=new Native({initialize:function(color,type){if(arguments.length>=3){type="rgb";color=Array.slice(arguments,0,3);}else if(typeof color=='string'){if(color.match(/rgb/))color=color.rgbToHex().hexToRgb(true);else if(color.match(/hsb/))color=color.hsbToRgb();else color=color.hexToRgb(true);}
type=type||'rgb';switch(type){case'hsb':var old=color;color=color.hsbToRgb();color.hsb=old;break;case'hex':color=color.hexToRgb(true);break;}
color.rgb=color.slice(0,3);color.hsb=color.hsb||color.rgbToHsb();color.hex=color.rgbToHex();return $extend(color,this);}});Color.implement({mix:function(){var colors=Array.slice(arguments);var alpha=($type(colors.getLast())=='number')?colors.pop():50;var rgb=this.slice();colors.each(function(color){color=new Color(color);for(var i=0;i<3;i++)rgb[i]=Math.round((rgb[i]/100*(100-alpha))+(color[i]/100*alpha));});return new Color(rgb,'rgb');},invert:function(){return new Color(this.map(function(value){return 255-value;}));},setHue:function(value){return new Color([value,this.hsb[1],this.hsb[2]],'hsb');},setSaturation:function(percent){return new Color([this.hsb[0],percent,this.hsb[2]],'hsb');},setBrightness:function(percent){return new Color([this.hsb[0],this.hsb[1],percent],'hsb');}});function $RGB(r,g,b){return new Color([r,g,b],'rgb');};function $HSB(h,s,b){return new Color([h,s,b],'hsb');};function $HEX(hex){return new Color(hex,'hex');};Array.implement({rgbToHsb:function(){var red=this[0],green=this[1],blue=this[2];var hue,saturation,brightness;var max=Math.max(red,green,blue),min=Math.min(red,green,blue);var delta=max-min;brightness=max/255;saturation=(max!=0)?delta/max:0;if(saturation==0){hue=0;}else{var rr=(max-red)/delta;var gr=(max-green)/delta;var br=(max-blue)/delta;if(red==max)hue=br-gr;else if(green==max)hue=2+rr-br;else hue=4+gr-rr;hue/=6;if(hue<0)hue++;}
return[Math.round(hue*360),Math.round(saturation*100),Math.round(brightness*100)];},hsbToRgb:function(){var br=Math.round(this[2]/100*255);if(this[1]==0){return[br,br,br];}else{var hue=this[0]%360;var f=hue%60;var p=Math.round((this[2]*(100-this[1]))/10000*255);var q=Math.round((this[2]*(6000-this[1]*f))/600000*255);var t=Math.round((this[2]*(6000-this[1]*(60-f)))/600000*255);switch(Math.floor(hue/60)){case 0:return[br,t,p];case 1:return[q,br,p];case 2:return[p,br,t];case 3:return[p,q,br];case 4:return[t,p,br];case 5:return[br,p,q];}}
return false;}});String.implement({rgbToHsb:function(){var rgb=this.match(/\d{1,3}/g);return(rgb)?hsb.rgbToHsb():null;},hsbToRgb:function(){var hsb=this.match(/\d{1,3}/g);return(hsb)?hsb.hsbToRgb():null;}});var Group=new Class({initialize:function(){this.instances=Array.flatten(arguments);this.events={};this.checker={};},addEvent:function(type,fn){this.checker[type]=this.checker[type]||{};this.events[type]=this.events[type]||[];if(this.events[type].contains(fn))return false;else this.events[type].push(fn);this.instances.each(function(instance,i){instance.addEvent(type,this.check.bind(this,[type,instance,i]));},this);return this;},check:function(type,instance,i){this.checker[type][i]=true;var every=this.instances.every(function(current,j){return this.checker[type][j]||false;},this);if(!every)return;this.checker[type]={};this.events[type].each(function(event){event.call(this,this.instances,instance);},this);}});var Asset=new Hash({javascript:function(source,properties){properties=$extend({onload:$empty,document:document,check:$lambda(true)},properties);var script=new Element('script',{'src':source,'type':'text/javascript'});var load=properties.onload.bind(script),check=properties.check,doc=properties.document;delete properties.onload;delete properties.check;delete properties.document;script.addEvents({load:load,readystatechange:function(){if(['loaded','complete'].contains(this.readyState))load();}}).setProperties(properties);if(Browser.Engine.webkit419)var checker=(function(){if(!$try(check))return;$clear(checker);load();}).periodical(50);return script.inject(doc.head);},css:function(source,properties){return new Element('link',$merge({'rel':'stylesheet','media':'screen','type':'text/css','href':source},properties)).inject(document.head);},image:function(source,properties){properties=$merge({'onload':$empty,'onabort':$empty,'onerror':$empty},properties);var image=new Image();var element=$(image)||new Element('img');['load','abort','error'].each(function(name){var type='on'+name;var event=properties[type];delete properties[type];image[type]=function(){if(!image)return;if(!element.parentNode){element.width=image.width;element.height=image.height;}
image=image.onload=image.onabort=image.onerror=null;event.delay(1,element,element);element.fireEvent(name,element,1);};});image.src=element.src=source;if(image&&image.complete)image.onload.delay(1);return element.setProperties(properties);},images:function(sources,options){options=$merge({onComplete:$empty,onProgress:$empty},options);if(!sources.push)sources=[sources];var images=[];var counter=0;sources.each(function(source){var img=new Asset.image(source,{'onload':function(){options.onProgress.call(this,counter,sources.indexOf(source));counter++;if(counter==sources.length)options.onComplete();}});images.push(img);});return new Elements(images);}});var Sortables=new Class({Implements:[Events,Options],options:{snap:4,opacity:1,clone:false,revert:false,handle:false,constrain:false},initialize:function(lists,options){this.setOptions(options);this.elements=[];this.lists=[];this.idle=true;this.addLists($$($(lists)||lists));if(!this.options.clone)this.options.revert=false;if(this.options.revert)this.effect=new Fx.Morph(null,$merge({duration:250,link:'cancel'},this.options.revert));},attach:function(){this.addLists(this.lists);return this;},detach:function(){this.lists=this.removeLists(this.lists);return this;},addItems:function(){Array.flatten(arguments).each(function(element){this.elements.push(element);var start=element.retrieve('sortables:start',this.start.bindWithEvent(this,element));(this.options.handle?element.getElement(this.options.handle)||element:element).addEvent('mousedown',start);},this);return this;},addLists:function(){Array.flatten(arguments).each(function(list){this.lists.push(list);this.addItems(list.getChildren());},this);return this;},removeItems:function(){var elements=[];Array.flatten(arguments).each(function(element){elements.push(element);this.elements.erase(element);var start=element.retrieve('sortables:start');(this.options.handle?element.getElement(this.options.handle)||element:element).removeEvent('mousedown',start);},this);return $$(elements);},removeLists:function(){var lists=[];Array.flatten(arguments).each(function(list){lists.push(list);this.lists.erase(list);this.removeItems(list.getChildren());},this);return $$(lists);},getClone:function(event,element){if(!this.options.clone)return new Element('div').inject(document.body);if($type(this.options.clone)=='function')return this.options.clone.call(this,event,element,this.list);return element.clone(true).setStyles({'margin':'0px','position':'absolute','visibility':'hidden','width':element.getStyle('width')}).inject(this.list).position(element.getPosition(element.getOffsetParent()));},getDroppables:function(){var droppables=this.list.getChildren();if(!this.options.constrain)droppables=this.lists.concat(droppables).erase(this.list);return droppables.erase(this.clone).erase(this.element);},insert:function(dragging,element){var where='inside';if(this.lists.contains(element)){this.list=element;this.drag.droppables=this.getDroppables();}else{where=this.element.getAllPrevious().contains(element)?'before':'after';}
this.element.inject(element,where);this.fireEvent('sort',[this.element,this.clone]);},start:function(event,element){if(!this.idle)return;this.idle=false;this.element=element;this.opacity=element.get('opacity');this.list=element.getParent();this.clone=this.getClone(event,element);this.drag=new Drag.Move(this.clone,{snap:this.options.snap,container:this.options.constrain&&this.element.getParent(),droppables:this.getDroppables(),onSnap:function(){event.stop();this.clone.setStyle('visibility','visible');this.element.set('opacity',this.options.opacity||0);this.fireEvent('start',[this.element,this.clone]);}.bind(this),onEnter:this.insert.bind(this),onCancel:this.reset.bind(this),onComplete:this.end.bind(this)});this.clone.inject(this.element,'before');this.drag.start(event);},end:function(){this.drag.detach();this.element.set('opacity',this.opacity);if(this.effect){var dim=this.element.getStyles('width','height');var pos=this.clone.computePosition(this.element.getPosition(this.clone.offsetParent));this.effect.element=this.clone;this.effect.start({top:pos.top,left:pos.left,width:dim.width,height:dim.height,opacity:0.25}).chain(this.reset.bind(this));}else{this.reset();}},reset:function(){this.idle=true;this.clone.destroy();this.fireEvent('complete',this.element);},serialize:function(){var params=Array.link(arguments,{modifier:Function.type,index:$defined});var serial=this.lists.map(function(list){return list.getChildren().map(params.modifier||function(element){return element.get('id');},this);},this);var index=params.index;if(this.lists.length==1)index=0;return $chk(index)&&index>=0&&index<this.lists.length?serial[index]:serial;}});var Tips=new Class({Implements:[Events,Options],options:{onShow:function(tip){tip.setStyle('visibility','visible');},onHide:function(tip){tip.setStyle('visibility','hidden');},showDelay:100,hideDelay:100,className:null,offsets:{x:16,y:16},fixed:false},initialize:function(){var params=Array.link(arguments,{options:Object.type,elements:$defined});this.setOptions(params.options||null);this.tip=new Element('div').inject(document.body);if(this.options.className)this.tip.addClass(this.options.className);var top=new Element('div',{'class':'tip-top'}).inject(this.tip);this.container=new Element('div',{'class':'tip'}).inject(this.tip);var bottom=new Element('div',{'class':'tip-bottom'}).inject(this.tip);this.tip.setStyles({position:'absolute',top:0,left:0,visibility:'hidden'});if(params.elements)this.attach(params.elements);},attach:function(elements){$$(elements).each(function(element){var title=element.retrieve('tip:title',element.get('title'));var text=element.retrieve('tip:text',element.get('rel')||element.get('href'));var enter=element.retrieve('tip:enter',this.elementEnter.bindWithEvent(this,element));var leave=element.retrieve('tip:leave',this.elementLeave.bindWithEvent(this,element));element.addEvents({mouseenter:enter,mouseleave:leave});if(!this.options.fixed){var move=element.retrieve('tip:move',this.elementMove.bindWithEvent(this,element));element.addEvent('mousemove',move);}
element.store('tip:native',element.get('title'));element.erase('title');},this);return this;},detach:function(elements){$$(elements).each(function(element){element.removeEvent('mouseenter',element.retrieve('tip:enter')||$empty);element.removeEvent('mouseleave',element.retrieve('tip:leave')||$empty);element.removeEvent('mousemove',element.retrieve('tip:move')||$empty);element.eliminate('tip:enter').eliminate('tip:leave').eliminate('tip:move');var original=element.retrieve('tip:native');if(original)element.set('title',original);});return this;},elementEnter:function(event,element){$A(this.container.childNodes).each(Element.dispose);var title=element.retrieve('tip:title');if(title){this.titleElement=new Element('div',{'class':'tip-title'}).inject(this.container);this.fill(this.titleElement,title);}
var text=element.retrieve('tip:text');if(text){this.textElement=new Element('div',{'class':'tip-text'}).inject(this.container);this.fill(this.textElement,text);}
this.timer=$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);this.position((!this.options.fixed)?event:{page:element.getPosition()});},elementLeave:function(event){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this);},elementMove:function(event){this.position(event);},position:function(event){var size=window.getSize(),scroll=window.getScroll();var tip={x:this.tip.offsetWidth,y:this.tip.offsetHeight};var props={x:'left',y:'top'};for(var z in props){var pos=event.page[z]+this.options.offsets[z];if((pos+tip[z]-scroll[z])>size[z])pos=event.page[z]-this.options.offsets[z]-tip[z];this.tip.setStyle(props[z],pos);}},fill:function(element,contents){(typeof contents=='string')?element.set('html',contents):element.adopt(contents);},show:function(){this.fireEvent('show',this.tip);},hide:function(){this.fireEvent('hide',this.tip);}});var SmoothScroll=new Class({Extends:Fx.Scroll,initialize:function(options,context){context=context||document;var doc=context.getDocument(),win=context.getWindow();this.parent(doc,options);this.links=(this.options.links)?$$(this.options.links):$$(doc.links);var location=win.location.href.match(/^[^#]*/)[0]+'#';this.links.each(function(link){if(link.href.indexOf(location)!=0)return;var anchor=link.href.substr(location.length);if(anchor&&$(anchor))this.useLink(link,anchor);},this);if(!Browser.Engine.webkit419)this.addEvent('complete',function(){win.location.hash=this.anchor;},true);},useLink:function(link,anchor){link.addEvent('click',function(event){this.anchor=anchor;this.toElement(anchor);event.stop();}.bind(this));}});var Slider=new Class({Implements:[Events,Options],options:{onTick:function(position){if(this.options.snap)position=this.toPosition(this.step);this.knob.setStyle(this.property,position);},snap:false,offset:0,range:false,wheel:false,steps:100,mode:'horizontal'},initialize:function(element,knob,options){this.setOptions(options);this.element=$(element);this.knob=$(knob);this.previousChange=this.previousEnd=this.step=-1;this.element.addEvent('mousedown',this.clickedElement.bind(this));if(this.options.wheel)this.element.addEvent('mousewheel',this.scrolledElement.bindWithEvent(this));var offset,limit={},modifiers={'x':false,'y':false};switch(this.options.mode){case'vertical':this.axis='y';this.property='top';offset='offsetHeight';break;case'horizontal':this.axis='x';this.property='left';offset='offsetWidth';}
this.half=this.knob[offset]/2;this.full=this.element[offset]-this.knob[offset]+(this.options.offset*2);this.min=$chk(this.options.range[0])?this.options.range[0]:0;this.max=$chk(this.options.range[1])?this.options.range[1]:this.options.steps;this.range=this.max-this.min;this.steps=this.options.steps||this.full;this.stepSize=Math.abs(this.range)/this.steps;this.stepWidth=this.stepSize*this.full/Math.abs(this.range);this.knob.setStyle('position','relative').setStyle(this.property,-this.options.offset);modifiers[this.axis]=this.property;limit[this.axis]=[-this.options.offset,this.full-this.options.offset];this.drag=new Drag(this.knob,{snap:0,limit:limit,modifiers:modifiers,onDrag:this.draggedKnob.bind(this),onStart:this.draggedKnob.bind(this),onComplete:function(){this.draggedKnob();this.end();}.bind(this)});if(this.options.snap){this.drag.options.grid=Math.ceil(this.stepWidth);this.drag.options.limit[this.axis][1]=this.full;}},set:function(step){if(!((this.range>0)^(step<this.min)))step=this.min;if(!((this.range>0)^(step>this.max)))step=this.max;this.step=Math.round(step);this.checkStep();this.end();this.fireEvent('tick',this.toPosition(this.step));return this;},clickedElement:function(event){var dir=this.range<0?-1:1;var position=event.page[this.axis]-this.element.getPosition()[this.axis]-this.half;position=position.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+dir*this.toStep(position));this.checkStep();this.end();this.fireEvent('tick',position);},scrolledElement:function(event){var mode=(this.options.mode=='horizontal')?(event.wheel<0):(event.wheel>0);this.set(mode?this.step-this.stepSize:this.step+this.stepSize);event.stop();},draggedKnob:function(){var dir=this.range<0?-1:1;var position=this.drag.value.now[this.axis];position=position.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+dir*this.toStep(position));this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent('change',this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent('complete',this.step+'');}},toStep:function(position){var step=(position+this.options.offset)*this.stepSize/this.full*this.steps;return this.options.steps?Math.round(step-=step%this.stepSize):step;},toPosition:function(step){return(this.full*Math.abs(this.min-step))/(this.steps*this.stepSize)-this.options.offset;}});var Scroller=new Class({Implements:[Events,Options],options:{area:20,velocity:1,onChange:function(x,y){this.element.scrollTo(x,y);}},initialize:function(element,options){this.setOptions(options);this.element=$(element);this.listener=($type(this.element)!='element')?$(this.element.getDocument().body):this.element;this.timer=null;this.coord=this.getCoords.bind(this);},start:function(){this.listener.addEvent('mousemove',this.coord);},stop:function(){this.listener.removeEvent('mousemove',this.coord);this.timer=$clear(this.timer);},getCoords:function(event){this.page=(this.listener.get('tag')=='body')?event.client:event.page;if(!this.timer)this.timer=this.scroll.periodical(50,this);},scroll:function(){var size=this.element.getSize(),scroll=this.element.getScroll(),pos=this.element.getPosition(),change={'x':0,'y':0};for(var z in this.page){if(this.page[z]<(this.options.area+pos[z])&&scroll[z]!=0)
change[z]=(this.page[z]-this.options.area-pos[z])*this.options.velocity;else if(this.page[z]+this.options.area>(size[z]+pos[z])&&size[z]+size[z]!=scroll[z])
change[z]=(this.page[z]-size[z]+this.options.area-pos[z])*this.options.velocity;}
if(change.y||change.x)this.fireEvent('change',[scroll.x+change.x,scroll.y+change.y]);}});var Accordion=new Class({Extends:Fx.Elements,options:{display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var params=Array.link(arguments,{'container':Element.type,'options':Object.type,'togglers':$defined,'elements':$defined});this.parent(params.elements,params.options);this.togglers=$$(params.togglers);this.container=$(params.container);this.previous=-1;if(this.options.alwaysHide)this.options.wait=true;if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show;}
if(this.options.start){this.options.display=false;this.options.show=false;}
this.effects={};if(this.options.opacity)this.effects.opacity='fullOpacity';if(this.options.width)this.effects.width=this.options.fixedWidth?'fullWidth':'offsetWidth';if(this.options.height)this.effects.height=this.options.fixedHeight?'fullHeight':'scrollHeight';for(var i=0,l=this.togglers.length;i<l;i++)this.addSection(this.togglers[i],this.elements[i]);this.elements.each(function(el,i){if(this.options.show===i){this.fireEvent('active',[this.togglers[i],el]);}else{for(var fx in this.effects)el.setStyle(fx,0);}},this);if($chk(this.options.display))this.display(this.options.display);},addSection:function(toggler,element,pos){toggler=$(toggler);element=$(element);var test=this.togglers.contains(toggler);var len=this.togglers.length;this.togglers.include(toggler);this.elements.include(element);if(len&&(!test||pos)){pos=$pick(pos,len-1);toggler.inject(this.togglers[pos],'before');element.inject(toggler,'after');}else if(this.container&&!test){toggler.inject(this.container);element.inject(this.container);}
var idx=this.togglers.indexOf(toggler);toggler.addEvent('click',this.display.bind(this,idx));if(this.options.height)element.setStyles({'padding-top':0,'border-top':'none','padding-bottom':0,'border-bottom':'none'});if(this.options.width)element.setStyles({'padding-left':0,'border-left':'none','padding-right':0,'border-right':'none'});element.fullOpacity=1;if(this.options.fixedWidth)element.fullWidth=this.options.fixedWidth;if(this.options.fixedHeight)element.fullHeight=this.options.fixedHeight;element.setStyle('overflow','hidden');if(!test){for(var fx in this.effects)element.setStyle(fx,0);}
return this;},display:function(index){index=($type(index)=='element')?this.elements.indexOf(index):index;if((this.timer&&this.options.wait)||(index===this.previous&&!this.options.alwaysHide))return this;this.previous=index;var obj={};this.elements.each(function(el,i){obj[i]={};var hide=(i!=index)||(this.options.alwaysHide&&(el.offsetHeight>0));this.fireEvent(hide?'background':'active',[this.togglers[i],el]);for(var fx in this.effects)obj[i][fx]=hide?0:el[this.effects[fx]];},this);return this.start(obj);}});window.addEvent('domready',function(){var menu=new DropMenu('navmenu-h');var Rules={'.sh dt::click':function(element,event){var parent=element.parentNode;if(parent.hasClass("active")){parent.removeClass("active");}else{parent.addClass("active");}}};MooSelectors.start(Rules);init();if(typeof document.attachEvent!='undefined'){document.attachEvent('onmousemove',moveMouse);document.attachEvent('onclick',checkMove);}else{document.addEventListener('mousemove',moveMouse,false);document.addEventListener('click',checkMove,false);}
var request_user=readCookie('raider_user');if(display_profile_bar){if(request_user==page_owner){if(route[1]=='page.id'){$('page_edit_button').setStyle('display','block');}
$('page_create_button').setStyle('display','block');$('page_settings_button').setStyle('display','block');}
$('profile_bar').setStyle('display','block');}
if(request_user){$each($$('a.item'),function(el){el.set('href',el.get('href')+'/full');});$each($$('a.itemquery'),function(el){el.set('href',el.get('href')+'?show=full');});}});var doSeek=function(el,hash,page_id,feeds){var el_update=el.getParent().getParent().getParent().getParent();var el_update_id=el_update.id;var url=seeker_url+'?hash='+hash+'&page_id='+page_id+'&feeds='+feeds;var req=new Request.HTML({url:url,method:'get'});req.setOptions({onComplete:function(req,els,html){if(html!==''){$(el_update_id).innerHTML=html;}}});req.send();};var oDv=document.createElement("div");var dvHdr=document.createElement("div");var dvBdy=document.createElement("div");var windowlock,boxMove,fixposx,fixposy,lockX,lockY,fixx,fixy,ox,oy,boxLeft,boxRight,boxTop,boxBottom,evt,mouseX,mouseY,boxOpen,totalScrollTop,totalScrollLeft;boxOpen=false;ox=10;oy=10;lockX=0;lockY=0;function init(){oDv.appendChild(dvHdr);oDv.appendChild(dvBdy);oDv.style.position="absolute";oDv.style.visibility='hidden';oDv.style.zIndex=999;document.body.appendChild(oDv);}
function defHdrStyle(){dvHdr.innerHTML='&#160;&#160;'+dvHdr.innerHTML;dvHdr.style.fontWeight='bold';dvHdr.style.width='150px';dvHdr.style.fontFamily='arial';dvHdr.style.border='1px solid #A5CFE9';dvHdr.style.padding='3';dvHdr.style.fontSize='11';dvHdr.style.color='#000';dvHdr.style.background='#D5EBF9';dvHdr.style.filter='alpha(opacity=85)';dvHdr.style.opacity='0.85';dvHdr.style.display='none';}
function defBdyStyle(){dvBdy.style.border='1px solid #888';dvBdy.style.width='250px';dvBdy.style.fontFamily='arial';dvBdy.style.fontSize='11px';dvBdy.style.padding='5px';dvBdy.style.color='#444';dvBdy.style.textAlign='left';dvBdy.style.background='#feffee';dvBdy.style.filter='alpha(opacity=96)';dvBdy.style.opacity='0.96';}
function checkElemBO(txt){if(!txt||typeof(txt)!='string')return false;if((txt.indexOf('header')>-1)&&(txt.indexOf('body')>-1)&&(txt.indexOf('[')>-1)&&(txt.indexOf('[')>-1))
return true;else
return false;}
function scanBO(curNode){if(checkElemBO(curNode.title)){curNode.boHDR=getParam('header',curNode.title);curNode.boBDY=getParam('body',curNode.title);curNode.boCSSBDY=getParam('cssbody',curNode.title);curNode.boCSSHDR=getParam('cssheader',curNode.title);curNode.IEbugfix=(getParam('hideselects',curNode.title)=='on')?true:false;curNode.fixX=parseInt(getParam('fixedrelx',curNode.title));curNode.fixY=parseInt(getParam('fixedrely',curNode.title));curNode.absX=parseInt(getParam('fixedabsx',curNode.title));curNode.absY=parseInt(getParam('fixedabsy',curNode.title));curNode.offY=(getParam('offsety',curNode.title)!='')?parseInt(getParam('offsety',curNode.title)):10;curNode.offX=(getParam('offsetx',curNode.title)!='')?parseInt(getParam('offsetx',curNode.title)):20;curNode.fade=(getParam('fade',curNode.title)=='on')?true:false;curNode.fadespeed=(getParam('fadespeed',curNode.title)!='')?getParam('fadespeed',curNode.title):0.04;curNode.delay=(getParam('delay',curNode.title)!='')?parseInt(getParam('delay',curNode.title)):0;if(getParam('requireclick',curNode.title)=='on'){curNode.requireclick=true;document.all?curNode.attachEvent('onclick',showHideBox):curNode.addEventListener('click',showHideBox,false);document.all?curNode.attachEvent('onmouseover',hideBox):curNode.addEventListener('mouseover',hideBox,false);}
else{if(getParam('doubleclickstop',curNode.title)!='off'){document.all?curNode.attachEvent('ondblclick',pauseBox):curNode.addEventListener('dblclick',pauseBox,false);}
if(getParam('singleclickstop',curNode.title)=='on'){document.all?curNode.attachEvent('onclick',pauseBox):curNode.addEventListener('click',pauseBox,false);}}
curNode.windowLock=getParam('windowlock',curNode.title).toLowerCase()=='off'?false:true;curNode.title='';curNode.hasbox=1;}
else
curNode.hasbox=2;}
function getParam(param,list){var reg=new RegExp('([^a-zA-Z]'+param+'|^'+param+')\\s*=\\s*\\[\\s*(((\\[\\[)|(\\]\\])|([^\\]\\[]))*)\\s*\\]');var res=reg.exec(list);var returnvar;if(res)
return res[2].replace('[[','[').replace(']]',']');else
return'';}
function Left(elem){var x=0;if(elem.calcLeft)
return elem.calcLeft;var oElem=elem;while(elem){if((elem.currentStyle)&&(!isNaN(parseInt(elem.currentStyle.borderLeftWidth)))&&(x!=0))
x+=parseInt(elem.currentStyle.borderLeftWidth);x+=elem.offsetLeft;elem=elem.offsetParent;}
oElem.calcLeft=x;return x;}
function Top(elem){var x=0;if(elem.calcTop)
return elem.calcTop;var oElem=elem;while(elem){if((elem.currentStyle)&&(!isNaN(parseInt(elem.currentStyle.borderTopWidth)))&&(x!=0))
x+=parseInt(elem.currentStyle.borderTopWidth);x+=elem.offsetTop;elem=elem.offsetParent;}
oElem.calcTop=x;return x;}
var ah,ab;function applyStyles(){if(ab)
oDv.removeChild(dvBdy);if(ah)
oDv.removeChild(dvHdr);dvHdr=document.createElement("div");dvBdy=document.createElement("div");CBE.boCSSBDY?dvBdy.className=CBE.boCSSBDY:defBdyStyle();CBE.boCSSHDR?dvHdr.className=CBE.boCSSHDR:defHdrStyle();dvHdr.innerHTML=CBE.boHDR;dvBdy.innerHTML=CBE.boBDY;ah=false;ab=false;if(CBE.boHDR!=''){oDv.appendChild(dvHdr);ah=true;}
if(CBE.boBDY!=''){oDv.appendChild(dvBdy);ab=true;}}
var CSE,iterElem,LSE,CBE,LBE,totalScrollLeft,totalScrollTop,width,height;var ini=false;function SHW(){if(document.body&&(document.body.clientWidth!=0)){width=document.body.clientWidth;height=document.body.clientHeight;}
if(document.documentElement&&(document.documentElement.clientWidth!=0)&&(document.body.clientWidth+20>=document.documentElement.clientWidth)){width=document.documentElement.clientWidth;height=document.documentElement.clientHeight;}
return[width,height];}
var ID=null;function moveMouse(e){e?evt=e:evt=event;CSE=evt.target?evt.target:evt.srcElement;if(!CSE.hasbox){iElem=CSE;while((iElem.parentNode)&&(!iElem.hasbox)){scanBO(iElem);iElem=iElem.parentNode;}}
if((CSE!=LSE)&&(!isChild(CSE,dvHdr))&&(!isChild(CSE,dvBdy))){if(!CSE.boxItem){iterElem=CSE;while((iterElem.hasbox==2)&&(iterElem.parentNode))
iterElem=iterElem.parentNode;CSE.boxItem=iterElem;}
iterElem=CSE.boxItem;if(CSE.boxItem&&(CSE.boxItem.hasbox==1)){LBE=CBE;CBE=iterElem;if(CBE!=LBE){if(isReadingEvents){diffBT(true);lohi=CBE.id;displayBoxTime=new Date();}
applyStyles();if(!CBE.requireclick)
if(CBE.fade){if(ID!=null)
clearTimeout(ID);ID=setTimeout("fadeIn("+CBE.fadespeed+")",CBE.delay);}
else{if(ID!=null)
clearTimeout(ID);COL=1;ID=setTimeout("oDv.style.visibility='visible';ID=null;",CBE.delay);}
if(CBE.IEbugfix){hideSelects();}
fixposx=!isNaN(CBE.fixX)?Left(CBE)+CBE.fixX:CBE.absX;fixposy=!isNaN(CBE.fixY)?Top(CBE)+CBE.fixY:CBE.absY;lockX=0;lockY=0;boxMove=true;ox=CBE.offX?CBE.offX:10;oy=CBE.offY?CBE.offY:10;}}
else if(!isChild(CSE,dvHdr)&&!isChild(CSE,dvBdy)&&(boxMove)){if((!isChild(CBE,CSE))||(CSE.tagName!='TABLE')){CBE=null;if(ID!=null)
clearTimeout(ID);fadeOut();showSelects();}}
LSE=CSE;}
else if(((isChild(CSE,dvHdr)||isChild(CSE,dvBdy))&&(boxMove))){totalScrollLeft=0;totalScrollTop=0;iterElem=CSE;while(iterElem){if(!isNaN(parseInt(iterElem.scrollTop)))
totalScrollTop+=parseInt(iterElem.scrollTop);if(!isNaN(parseInt(iterElem.scrollLeft)))
totalScrollLeft+=parseInt(iterElem.scrollLeft);iterElem=iterElem.parentNode;}
if(CBE!=null){boxLeft=Left(CBE)-totalScrollLeft;boxRight=parseInt(Left(CBE)+CBE.offsetWidth)-totalScrollLeft;boxTop=Top(CBE)-totalScrollTop;boxBottom=parseInt(Top(CBE)+CBE.offsetHeight)-totalScrollTop;doCheck();}}
if(boxMove&&CBE){bodyScrollTop=document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;bodyScrollLet=document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;mouseX=evt.pageX?evt.pageX-bodyScrollLet:evt.clientX-document.body.clientLeft;mouseY=evt.pageY?evt.pageY-bodyScrollTop:evt.clientY-document.body.clientTop;if((CBE)&&(CBE.windowLock)){mouseY<-oy?lockY=-mouseY-oy:lockY=0;mouseX<-ox?lockX=-mouseX-ox:lockX=0;mouseY>(SHW()[1]-oDv.offsetHeight-oy)?lockY=-mouseY+SHW()[1]-oDv.offsetHeight-oy:lockY=lockY;mouseX>(SHW()[0]-dvBdy.offsetWidth-ox)?lockX=-mouseX-ox+SHW()[0]-dvBdy.offsetWidth:lockX=lockX;}
oDv.style.left=((fixposx)||(fixposx==0))?fixposx:bodyScrollLet+mouseX+ox+lockX+"px";oDv.style.top=((fixposy)||(fixposy==0))?fixposy:bodyScrollTop+mouseY+oy+lockY+"px";}}
function doCheck(){if((mouseX<boxLeft)||(mouseX>boxRight)||(mouseY<boxTop)||(mouseY>boxBottom)){if(!CBE.requireclick)
fadeOut();if(CBE.IEbugfix){showSelects();}
CBE=null;}}
function pauseBox(e){e?evt=e:evt=event;boxMove=false;evt.cancelBubble=true;}
function showHideBox(e){oDv.style.visibility=(oDv.style.visibility!='visible')?'visible':'hidden';}
function hideBox(e){oDv.style.visibility='hidden';}
var COL=0;var stopfade=false;function fadeIn(fs){ID=null;COL=0;oDv.style.visibility='visible';fadeIn2(fs);}
function fadeIn2(fs){COL=COL+fs;COL=(COL>1)?1:COL;oDv.style.filter='alpha(opacity='+parseInt(100*COL)+')';oDv.style.opacity=COL;if(COL<1)
setTimeout("fadeIn2("+fs+")",20);}
function fadeOut(){if(isReadingEvents){diffBT(false);}
oDv.style.visibility='hidden';}
function isChild(s,d){while(s){if(s==d)
return true;s=s.parentNode;}
return false;}
var cSrc;function checkMove(e){e?evt=e:evt=event;cSrc=evt.target?evt.target:evt.srcElement;if((!boxMove)&&(!isChild(cSrc,oDv))){fadeOut();if(CBE&&CBE.IEbugfix){showSelects();}
boxMove=true;CBE=null;}}
function showSelects(){var elements=document.getElementsByTagName("select");for(i=0;i<elements.length;i++){elements[i].style.visibility='visible';}}
function hideSelects(){var elements=document.getElementsByTagName("select");for(i=0;i<elements.length;i++){elements[i].style.visibility='hidden';}}function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else{var expires="";}
document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1,c.length);}
if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);}}
return null;}
function eraseCookie(name){createCookie(name,"",-1);}
if(typeof dojo=="undefined"){var dj_global=this;var dj_currentContext=this;function dj_undef(name,object){return(typeof(object||dj_currentContext)[name]=="undefined");}
if(dj_undef("djConfig",this)){var djConfig={};}
if(dj_undef("dojo",this)){var dojo={};}
dojo.global=function(){return dj_currentContext;}
dojo.locale=djConfig.locale;dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev: 8617 $".match(/[0-9]+/)[0]),toString:function(){with(dojo.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}}
dojo.evalProp=function(name,object,create){if((!object)||(!name))return undefined;if(!dj_undef(name,object))return object[name];return(create?(object[name]={}):undefined);}
dojo.parseObjPath=function(path,context,create){var object=(context||dojo.global());var names=path.split('.');var prop=names.pop();for(var i=0,l=names.length;i<l&&object;i++){object=dojo.evalProp(names[i],object,create);}
return{obj:object,prop:prop};}
dojo.evalObjPath=function(path,create){if(typeof path!="string"){return dojo.global();}
if(path.indexOf('.')==-1){return dojo.evalProp(path,dojo.global(),create);}
var ref=dojo.parseObjPath(path,dojo.global(),create);if(ref){return dojo.evalProp(ref.prop,ref.obj,create);}
return null;}
dojo.errorToString=function(exception){if(!dj_undef("message",exception)){return exception.message;}else if(!dj_undef("description",exception)){return exception.description;}else{return exception;}}
dojo.raise=function(message,exception){if(exception){message=message+": "+dojo.errorToString(exception);}else{message=dojo.errorToString(message);}
try{if(djConfig.isDebug){dojo.hostenv.println("FATAL exception raised: "+message);}}catch(e){}
throw exception||Error(message);}
dojo.debug=function(){};dojo.debugShallow=function(obj){};dojo.profile={start:function(){},end:function(){},stop:function(){},dump:function(){}};function dj_eval(scriptFragment){return dj_global.eval?dj_global.eval(scriptFragment):eval(scriptFragment);}
dojo.unimplemented=function(funcname,extra){var message="'"+funcname+"' not implemented";if(extra!=null){message+=" "+extra;}
dojo.raise(message);}
dojo.deprecated=function(behaviour,extra,removal){var message="DEPRECATED: "+behaviour;if(extra){message+=" "+extra;}
if(removal){message+=" -- will be removed in version: "+removal;}
dojo.debug(message);}
dojo.render=(function(){function vscaffold(prefs,names){var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:prefs};for(var i=0;i<names.length;i++){tmp[names[i]]=false;}
return tmp;}
return{name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};})();dojo.hostenv=(function(){var config={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,delayMozLoadingFix:false,searchIds:[],parseWidgets:true};if(typeof djConfig=="undefined"){djConfig=config;}
else{for(var option in config){if(typeof djConfig[option]=="undefined"){djConfig[option]=config[option];}}}
return{name_:'(unset)',version_:'(unset)',getName:function(){return this.name_;},getVersion:function(){return this.version_;},getText:function(uri){dojo.unimplemented('getText',"uri="+uri);}};})();dojo.hostenv.getBaseScriptUri=function(){if(djConfig.baseScriptUri.length){return djConfig.baseScriptUri;}
var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);if(!uri){dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);}
var lastslash=uri.lastIndexOf('/');djConfig.baseScriptUri=djConfig.baseRelativePath;return djConfig.baseScriptUri;};(function(){var _addHostEnv={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(module,prefix){this.modulePrefixes_[module]={name:module,value:prefix};},moduleHasPrefix:function(module){var mp=this.modulePrefixes_;return Boolean(mp[module]&&mp[module].value);},getModulePrefix:function(module){if(this.moduleHasPrefix(module)){return this.modulePrefixes_[module].value;}
return module;},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};for(var param in _addHostEnv){dojo.hostenv[param]=_addHostEnv[param];}})();dojo.hostenv.loadPath=function(relpath,module,cb){var uri;if(relpath.charAt(0)=='/'||relpath.match(/^\w+:/)){uri=relpath;}else{uri=this.getBaseScriptUri()+relpath;}
if(djConfig.cacheBust&&dojo.render.html.capable){uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");}
try{return!module?this.loadUri(uri,cb):this.loadUriAndCheck(uri,module,cb);}catch(e){dojo.debug(e);return false;}}
dojo.hostenv.loadUri=function(uri,cb){if(this.loadedUris[uri]){return true;}
var contents=this.getText(uri,null,true);if(!contents){return false;}
this.loadedUris[uri]=true;if(cb){contents='('+contents+')';}
var value=dj_eval(contents);if(cb){cb(value);}
return true;}
dojo.hostenv.loadUriAndCheck=function(uri,moduleName,cb){var ok=true;try{ok=this.loadUri(uri,cb);}catch(e){dojo.debug("failed loading ",uri," with error: ",e);}
return Boolean(ok&&this.findModule(moduleName,false));}
dojo.loaded=function(){}
dojo.unloaded=function(){}
dojo.hostenv.loaded=function(){this.loadNotifying=true;this.post_load_=true;var mll=this.modulesLoadedListeners;for(var x=0;x<mll.length;x++){mll[x]();}
this.modulesLoadedListeners=[];this.loadNotifying=false;dojo.loaded();}
dojo.hostenv.unloaded=function(){var mll=this.unloadListeners;while(mll.length){(mll.pop())();}
dojo.unloaded();}
dojo.addOnLoad=function(obj,functionName){var dh=dojo.hostenv;if(arguments.length==1){dh.modulesLoadedListeners.push(obj);}else if(arguments.length>1){dh.modulesLoadedListeners.push(function(){obj[functionName]();});}
if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){dh.callLoaded();}}
dojo.addOnUnload=function(obj,functionName){var dh=dojo.hostenv;if(arguments.length==1){dh.unloadListeners.push(obj);}else if(arguments.length>1){dh.unloadListeners.push(function(){obj[functionName]();});}}
dojo.hostenv.modulesLoaded=function(){if(this.post_load_){return;}
if(this.loadUriStack.length==0&&this.getTextStack.length==0){if(this.inFlightCount>0){dojo.debug("files still in flight!");return;}
dojo.hostenv.callLoaded();}}
dojo.hostenv.callLoaded=function(){if(typeof setTimeout=="object"||(djConfig["useXDomain"]&&dojo.render.html.opera)){setTimeout("dojo.hostenv.loaded();",0);}else{dojo.hostenv.loaded();}}
dojo.hostenv.getModuleSymbols=function(modulename){var syms=modulename.split(".");for(var i=syms.length;i>0;i--){var parentModule=syms.slice(0,i).join(".");if((i==1)&&!this.moduleHasPrefix(parentModule)){syms[0]="../"+syms[0];}else{var parentModulePath=this.getModulePrefix(parentModule);if(parentModulePath!=parentModule){syms.splice(0,i,parentModulePath);break;}}}
return syms;}
dojo.hostenv._global_omit_module_check=false;dojo.hostenv.loadModule=function(moduleName,exactOnly,omitModuleCheck){if(!moduleName){return;}
omitModuleCheck=this._global_omit_module_check||omitModuleCheck;var module=this.findModule(moduleName,false);if(module){return module;}
if(dj_undef(moduleName,this.loading_modules_)){this.addedToLoadingCount.push(moduleName);}
this.loading_modules_[moduleName]=1;var relpath=moduleName.replace(/\./g,'/')+'.js';var nsyms=moduleName.split(".");var syms=this.getModuleSymbols(moduleName);var startedRelative=((syms[0].charAt(0)!='/')&&!syms[0].match(/^\w+:/));var last=syms[syms.length-1];var ok;if(last=="*"){moduleName=nsyms.slice(0,-1).join('.');while(syms.length){syms.pop();syms.push(this.pkgFileName);relpath=syms.join("/")+'.js';if(startedRelative&&relpath.charAt(0)=="/"){relpath=relpath.slice(1);}
ok=this.loadPath(relpath,!omitModuleCheck?moduleName:null);if(ok){break;}
syms.pop();}}else{relpath=syms.join("/")+'.js';moduleName=nsyms.join('.');var modArg=!omitModuleCheck?moduleName:null;ok=this.loadPath(relpath,modArg);if(!ok&&!exactOnly){syms.pop();while(syms.length){relpath=syms.join('/')+'.js';ok=this.loadPath(relpath,modArg);if(ok){break;}
syms.pop();relpath=syms.join('/')+'/'+this.pkgFileName+'.js';if(startedRelative&&relpath.charAt(0)=="/"){relpath=relpath.slice(1);}
ok=this.loadPath(relpath,modArg);if(ok){break;}}}
if(!ok&&!omitModuleCheck){dojo.raise("Could not load '"+moduleName+"'; last tried '"+relpath+"'");}}
if(!omitModuleCheck&&!this["isXDomain"]){module=this.findModule(moduleName,false);if(!module){dojo.raise("symbol '"+moduleName+"' is not defined after loading '"+relpath+"'");}}
return module;}
dojo.hostenv.startPackage=function(packageName){var fullPkgName=String(packageName);var strippedPkgName=fullPkgName;var syms=packageName.split(/\./);if(syms[syms.length-1]=="*"){syms.pop();strippedPkgName=syms.join(".");}
var evaledPkg=dojo.evalObjPath(strippedPkgName,true);this.loaded_modules_[fullPkgName]=evaledPkg;this.loaded_modules_[strippedPkgName]=evaledPkg;return evaledPkg;}
dojo.hostenv.findModule=function(moduleName,mustExist){var lmn=String(moduleName);if(this.loaded_modules_[lmn]){return this.loaded_modules_[lmn];}
if(mustExist){dojo.raise("no loaded module named '"+moduleName+"'");}
return null;}
dojo.kwCompoundRequire=function(modMap){var common=modMap["common"]||[];var result=modMap[dojo.hostenv.name_]?common.concat(modMap[dojo.hostenv.name_]||[]):common.concat(modMap["default"]||[]);for(var x=0;x<result.length;x++){var curr=result[x];if(curr.constructor==Array){dojo.hostenv.loadModule.apply(dojo.hostenv,curr);}else{dojo.hostenv.loadModule(curr);}}}
dojo.require=function(resourceName){dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);}
dojo.requireIf=function(condition,resourceName){var arg0=arguments[0];if((arg0===true)||(arg0=="common")||(arg0&&dojo.render[arg0].capable)){var args=[];for(var i=1;i<arguments.length;i++){args.push(arguments[i]);}
dojo.require.apply(dojo,args);}}
dojo.requireAfterIf=dojo.requireIf;dojo.provide=function(resourceName){return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);}
dojo.registerModulePath=function(module,prefix){return dojo.hostenv.setModulePrefix(module,prefix);}
if(djConfig["modulePaths"]){for(var param in djConfig["modulePaths"]){dojo.registerModulePath(param,djConfig["modulePaths"][param]);}}
dojo.setModulePrefix=function(module,prefix){dojo.deprecated('dojo.setModulePrefix("'+module+'", "'+prefix+'")',"replaced by dojo.registerModulePath","0.5");return dojo.registerModulePath(module,prefix);}
dojo.exists=function(obj,name){var p=name.split(".");for(var i=0;i<p.length;i++){if(!obj[p[i]]){return false;}
obj=obj[p[i]];}
return true;}
dojo.hostenv.normalizeLocale=function(locale){var result=locale?locale.toLowerCase():dojo.locale;if(result=="root"){result="ROOT";}
return result;};dojo.hostenv.searchLocalePath=function(locale,down,searchFunc){locale=dojo.hostenv.normalizeLocale(locale);var elements=locale.split('-');var searchlist=[];for(var i=elements.length;i>0;i--){searchlist.push(elements.slice(0,i).join('-'));}
searchlist.push(false);if(down){searchlist.reverse();}
for(var j=searchlist.length-1;j>=0;j--){var loc=searchlist[j]||"ROOT";var stop=searchFunc(loc);if(stop){break;}}}
dojo.hostenv.localesGenerated;dojo.hostenv.registerNlsPrefix=function(){dojo.registerModulePath("nls","nls");}
dojo.hostenv.preloadLocalizations=function(){if(dojo.hostenv.localesGenerated){dojo.hostenv.registerNlsPrefix();function preload(locale){locale=dojo.hostenv.normalizeLocale(locale);dojo.hostenv.searchLocalePath(locale,true,function(loc){for(var i=0;i<dojo.hostenv.localesGenerated.length;i++){if(dojo.hostenv.localesGenerated[i]==loc){dojo["require"]("nls.dojo_"+loc);return true;}}
return false;});}
preload();var extra=djConfig.extraLocale||[];for(var i=0;i<extra.length;i++){preload(extra[i]);}}
dojo.hostenv.preloadLocalizations=function(){};}
dojo.requireLocalization=function(moduleName,bundleName,locale,availableFlatLocales){dojo.hostenv.preloadLocalizations();var targetLocale=dojo.hostenv.normalizeLocale(locale);var bundlePackage=[moduleName,"nls",bundleName].join(".");var bestLocale="";if(availableFlatLocales){var flatLocales=availableFlatLocales.split(",");for(var i=0;i<flatLocales.length;i++){if(targetLocale.indexOf(flatLocales[i])==0){if(flatLocales[i].length>bestLocale.length){bestLocale=flatLocales[i];}}}
if(!bestLocale){bestLocale="ROOT";}}
var tempLocale=availableFlatLocales?bestLocale:targetLocale;var bundle=dojo.hostenv.findModule(bundlePackage);var localizedBundle=null;if(bundle){if(djConfig.localizationComplete&&bundle._built){return;}
var jsLoc=tempLocale.replace('-','_');var translationPackage=bundlePackage+"."+jsLoc;localizedBundle=dojo.hostenv.findModule(translationPackage);}
if(!localizedBundle){bundle=dojo.hostenv.startPackage(bundlePackage);var syms=dojo.hostenv.getModuleSymbols(moduleName);var modpath=syms.concat("nls").join("/");var parent;dojo.hostenv.searchLocalePath(tempLocale,availableFlatLocales,function(loc){var jsLoc=loc.replace('-','_');var translationPackage=bundlePackage+"."+jsLoc;var loaded=false;if(!dojo.hostenv.findModule(translationPackage)){dojo.hostenv.startPackage(translationPackage);var module=[modpath];if(loc!="ROOT"){module.push(loc);}
module.push(bundleName);var filespec=module.join("/")+'.js';loaded=dojo.hostenv.loadPath(filespec,null,function(hash){var clazz=function(){};clazz.prototype=parent;bundle[jsLoc]=new clazz();for(var j in hash){bundle[jsLoc][j]=hash[j];}});}else{loaded=true;}
if(loaded&&bundle[jsLoc]){parent=bundle[jsLoc];}else{bundle[jsLoc]=parent;}
if(availableFlatLocales){return true;}});}
if(availableFlatLocales&&targetLocale!=bestLocale){bundle[targetLocale.replace('-','_')]=bundle[bestLocale.replace('-','_')];}};(function(){var extra=djConfig.extraLocale;if(extra){if(!extra instanceof Array){extra=[extra];}
var req=dojo.requireLocalization;dojo.requireLocalization=function(m,b,locale,availableFlatLocales){req(m,b,locale,availableFlatLocales);if(locale){return;}
for(var i=0;i<extra.length;i++){req(m,b,extra[i],availableFlatLocales);}};}})();};if(typeof window!='undefined'){(function(){if(djConfig.allowQueryConfig){var baseUrl=document.location.toString();var params=baseUrl.split("?",2);if(params.length>1){var paramStr=params[1];var pairs=paramStr.split("&");for(var x in pairs){var sp=pairs[x].split("=");if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){var opt=sp[0].substr(9);try{djConfig[opt]=eval(sp[1]);}catch(e){djConfig[opt]=sp[1];}}}}}
if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){var scripts=document.getElementsByTagName("script");var rePkg=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute("src");if(!src){continue;}
var m=src.match(rePkg);if(m){var root=src.substring(0,m.index);if(src.indexOf("bootstrap1")>-1){root+="../";}
if(!this["djConfig"]){djConfig={};}
if(djConfig["baseScriptUri"]==""){djConfig["baseScriptUri"]=root;}
if(djConfig["baseRelativePath"]==""){djConfig["baseRelativePath"]=root;}
break;}}}
var dr=dojo.render;var drh=dojo.render.html;var drs=dojo.render.svg;var dua=(drh.UA=navigator.userAgent);var dav=(drh.AV=navigator.appVersion);var t=true;var f=false;drh.capable=t;drh.support.builtin=t;dr.ver=parseFloat(drh.AV);dr.os.mac=dav.indexOf("Macintosh")>=0;dr.os.win=dav.indexOf("Windows")>=0;dr.os.linux=dav.indexOf("X11")>=0;drh.opera=dua.indexOf("Opera")>=0;drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);drh.safari=dav.indexOf("Safari")>=0;var geckoPos=dua.indexOf("Gecko");drh.mozilla=drh.moz=(geckoPos>=0)&&(!drh.khtml);if(drh.mozilla){drh.geckoVersion=dua.substring(geckoPos+6,geckoPos+14);}
drh.ie=(document.all)&&(!drh.opera);drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;var cm=document["compatMode"];drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();dr.vml.capable=drh.ie;drs.capable=f;drs.support.plugin=f;drs.support.builtin=f;var tdoc=window["document"];var tdi=tdoc["implementation"];if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){drs.capable=t;drs.support.builtin=t;drs.support.plugin=f;}
if(drh.safari){var tmp=dua.split("AppleWebKit/")[1];var ver=parseFloat(tmp.split(" ")[0]);if(ver>=420){drs.capable=t;drs.support.builtin=t;drs.support.plugin=f;}}else{}})();dojo.hostenv.startPackage("dojo.hostenv");dojo.render.name=dojo.hostenv.name_='browser';dojo.hostenv.searchIds=[];dojo.hostenv._XMLHTTP_PROGIDS=['Msxml2.XMLHTTP','Microsoft.XMLHTTP','Msxml2.XMLHTTP.4.0'];dojo.hostenv.getXmlhttpObject=function(){var http=null;var last_e=null;try{http=new XMLHttpRequest();}catch(e){}
if(!http){for(var i=0;i<3;++i){var progid=dojo.hostenv._XMLHTTP_PROGIDS[i];try{http=new ActiveXObject(progid);}catch(e){last_e=e;}
if(http){dojo.hostenv._XMLHTTP_PROGIDS=[progid];break;}}}
if(!http){return dojo.raise("XMLHTTP not available",last_e);}
return http;}
dojo.hostenv._blockAsync=false;dojo.hostenv.getText=function(uri,async_cb,fail_ok){if(!async_cb){this._blockAsync=true;}
var http=this.getXmlhttpObject();function isDocumentOk(http){var stat=http["status"];return Boolean((!stat)||((200<=stat)&&(300>stat))||(stat==304));}
if(async_cb){var _this=this,timer=null,gbl=dojo.global();var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport");http.onreadystatechange=function(){if(timer){gbl.clearTimeout(timer);timer=null;}
if(_this._blockAsync||(xhr&&xhr._blockAsync)){timer=gbl.setTimeout(function(){http.onreadystatechange.apply(this);},10);}else{if(4==http.readyState){if(isDocumentOk(http)){async_cb(http.responseText);}}}}}
http.open('GET',uri,async_cb?true:false);try{http.send(null);if(async_cb){return null;}
if(!isDocumentOk(http)){var err=Error("Unable to load "+uri+" status:"+http.status);err.status=http.status;err.responseText=http.responseText;throw err;}}catch(e){this._blockAsync=false;if((fail_ok)&&(!async_cb)){return null;}else{throw e;}}
this._blockAsync=false;return http.responseText;}
dojo.hostenv.defaultDebugContainerId='dojoDebug';dojo.hostenv._println_buffer=[];dojo.hostenv._println_safe=false;dojo.hostenv.println=function(line){if(!dojo.hostenv._println_safe){dojo.hostenv._println_buffer.push(line);}else{try{var console=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);if(!console){console=dojo.body();}
var div=document.createElement("div");div.appendChild(document.createTextNode(line));console.appendChild(div);}catch(e){try{document.write("<div>"+line+"</div>");}catch(e2){window.status=line;}}}}
dojo.addOnLoad(function(){dojo.hostenv._println_safe=true;while(dojo.hostenv._println_buffer.length>0){dojo.hostenv.println(dojo.hostenv._println_buffer.shift());}});function dj_addNodeEvtHdlr(node,evtName,fp){var oldHandler=node["on"+evtName]||function(){};node["on"+evtName]=function(){fp.apply(node,arguments);oldHandler.apply(node,arguments);}
return true;}
dojo.hostenv._djInitFired=false;function dj_load_init(e){dojo.hostenv._djInitFired=true;var type=(e&&e.type)?e.type.toLowerCase():"load";if(arguments.callee.initialized||(type!="domcontentloaded"&&type!="load")){return;}
arguments.callee.initialized=true;if(typeof(_timer)!='undefined'){clearInterval(_timer);delete _timer;}
var initFunc=function(){if(dojo.render.html.ie){dojo.hostenv.makeWidgets();}};if(dojo.hostenv.inFlightCount==0){initFunc();dojo.hostenv.modulesLoaded();}else{dojo.hostenv.modulesLoadedListeners.unshift(initFunc);}}
if(document.addEventListener){if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){document.addEventListener("DOMContentLoaded",dj_load_init,null);}
window.addEventListener("load",dj_load_init,null);}
if(dojo.render.html.ie&&dojo.render.os.win){document.attachEvent("onreadystatechange",function(e){if(document.readyState=="complete"){dj_load_init();}});}
if(/(WebKit|khtml)/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){dj_load_init();}},10);}
if(dojo.render.html.ie){dj_addNodeEvtHdlr(window,"beforeunload",function(){dojo.hostenv._unloading=true;window.setTimeout(function(){dojo.hostenv._unloading=false;},0);});}
dj_addNodeEvtHdlr(window,"unload",function(){dojo.hostenv.unloaded();if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){dojo.hostenv.unloaded();}});dojo.hostenv.makeWidgets=function(){var sids=[];if(djConfig.searchIds&&djConfig.searchIds.length>0){sids=sids.concat(djConfig.searchIds);}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){sids=sids.concat(dojo.hostenv.searchIds);}
if((djConfig.parseWidgets)||(sids.length>0)){if(dojo.evalObjPath("dojo.widget.Parse")){var parser=new dojo.xml.Parse();if(sids.length>0){for(var x=0;x<sids.length;x++){var tmpNode=document.getElementById(sids[x]);if(!tmpNode){continue;}
var frag=parser.parseElement(tmpNode,null,true);dojo.widget.getParser().createComponents(frag);}}else if(djConfig.parseWidgets){var frag=parser.parseElement(dojo.body(),null,true);dojo.widget.getParser().createComponents(frag);}}}}
dojo.addOnLoad(function(){if(!dojo.render.html.ie){dojo.hostenv.makeWidgets();}});try{if(dojo.render.html.ie){document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");}}catch(e){}
dojo.hostenv.writeIncludes=function(){}
if(!dj_undef("document",this)){dj_currentDocument=this.document;}
dojo.doc=function(){return dj_currentDocument;}
dojo.body=function(){return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0];}
dojo.byId=function(id,doc){if((id)&&((typeof id=="string")||(id instanceof String))){if(!doc){doc=dj_currentDocument;}
var ele=doc.getElementById(id);if(ele&&(ele.id!=id)&&doc.all){ele=null;eles=doc.all[id];if(eles){if(eles.length){for(var i=0;i<eles.length;i++){if(eles[i].id==id){ele=eles[i];break;}}}else{ele=eles;}}}
return ele;}
return id;}
dojo.setContext=function(globalObject,globalDocument){dj_currentContext=globalObject;dj_currentDocument=globalDocument;};dojo._fireCallback=function(callback,context,cbArguments){if((context)&&((typeof callback=="string")||(callback instanceof String))){callback=context[callback];}
return(context?callback.apply(context,cbArguments||[]):callback());}
dojo.withGlobal=function(globalObject,callback,thisObject,cbArguments){var rval;var oldGlob=dj_currentContext;var oldDoc=dj_currentDocument;try{dojo.setContext(globalObject,globalObject.document);rval=dojo._fireCallback(callback,thisObject,cbArguments);}finally{dojo.setContext(oldGlob,oldDoc);}
return rval;}
dojo.withDoc=function(documentObject,callback,thisObject,cbArguments){var rval;var oldDoc=dj_currentDocument;try{dj_currentDocument=documentObject;rval=dojo._fireCallback(callback,thisObject,cbArguments);}finally{dj_currentDocument=oldDoc;}
return rval;}}
dojo.requireIf((djConfig["isDebug"]||djConfig["debugAtAllCosts"]),"dojo.debug");dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&!djConfig["useXDomain"],"dojo.browser_debug");dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&djConfig["useXDomain"],"dojo.browser_debug_xd");dojo.provide("dojo.lang.common");dojo.lang.inherits=function(subclass,superclass){if(!dojo.lang.isFunction(superclass)){dojo.raise("dojo.inherits: superclass argument ["+superclass+"] must be a function (subclass: ["+subclass+"']");}
subclass.prototype=new superclass();subclass.prototype.constructor=subclass;subclass.superclass=superclass.prototype;subclass['super']=superclass.prototype;}
dojo.lang._mixin=function(obj,props){var tobj={};for(var x in props){if((typeof tobj[x]=="undefined")||(tobj[x]!=props[x])){obj[x]=props[x];}}
if(dojo.render.html.ie&&(typeof(props["toString"])=="function")&&(props["toString"]!=obj["toString"])&&(props["toString"]!=tobj["toString"]))
{obj.toString=props.toString;}
return obj;}
dojo.lang.mixin=function(obj,props){for(var i=1,l=arguments.length;i<l;i++){dojo.lang._mixin(obj,arguments[i]);}
return obj;}
dojo.lang.extend=function(constructor,props){for(var i=1,l=arguments.length;i<l;i++){dojo.lang._mixin(constructor.prototype,arguments[i]);}
return constructor;}
dojo.inherits=dojo.lang.inherits;dojo.mixin=dojo.lang.mixin;dojo.extend=dojo.lang.extend;dojo.lang.find=function(array,value,identity,findLast){if(!dojo.lang.isArrayLike(array)&&dojo.lang.isArrayLike(value)){dojo.deprecated('dojo.lang.find(value, array)','use dojo.lang.find(array, value) instead',"0.5");var temp=array;array=value;value=temp;}
var isString=dojo.lang.isString(array);if(isString){array=array.split("");}
if(findLast){var step=-1;var i=array.length-1;var end=-1;}else{var step=1;var i=0;var end=array.length;}
if(identity){while(i!=end){if(array[i]===value){return i;}
i+=step;}}else{while(i!=end){if(array[i]==value){return i;}
i+=step;}}
return-1;}
dojo.lang.indexOf=dojo.lang.find;dojo.lang.findLast=function(array,value,identity){return dojo.lang.find(array,value,identity,true);}
dojo.lang.lastIndexOf=dojo.lang.findLast;dojo.lang.inArray=function(array,value){return dojo.lang.find(array,value)>-1;}
dojo.lang.isObject=function(it){if(typeof it=="undefined"){return false;}
return(typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it));}
dojo.lang.isArray=function(it){return(it&&it instanceof Array||typeof it=="array");}
dojo.lang.isArrayLike=function(it){if((!it)||(dojo.lang.isUndefined(it))){return false;}
if(dojo.lang.isString(it)){return false;}
if(dojo.lang.isFunction(it)){return false;}
if(dojo.lang.isArray(it)){return true;}
if((it.tagName)&&(it.tagName.toLowerCase()=='form')){return false;}
if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){return true;}
return false;}
dojo.lang.isFunction=function(it){return(it instanceof Function||typeof it=="function");};(function(){if((dojo.render.html.capable)&&(dojo.render.html["safari"])){dojo.lang.isFunction=function(it){if((typeof(it)=="function")&&(it=="[object NodeList]")){return false;}
return(it instanceof Function||typeof it=="function");}}})();dojo.lang.isString=function(it){return(typeof it=="string"||it instanceof String);}
dojo.lang.isAlien=function(it){if(!it){return false;}
return!dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));}
dojo.lang.isBoolean=function(it){return(it instanceof Boolean||typeof it=="boolean");}
dojo.lang.isNumber=function(it){return(it instanceof Number||typeof it=="number");}
dojo.lang.isUndefined=function(it){return((typeof(it)=="undefined")&&(it==undefined));}
dojo.provide("dojo.lang.array");dojo.lang.mixin(dojo.lang,{has:function(obj,name){try{return typeof obj[name]!="undefined";}catch(e){return false;}},isEmpty:function(obj){if(dojo.lang.isObject(obj)){var tmp={};var count=0;for(var x in obj){if(obj[x]&&(!tmp[x])){count++;break;}}
return count==0;}else if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){return obj.length==0;}},map:function(arr,obj,unary_func){var isString=dojo.lang.isString(arr);if(isString){arr=arr.split("");}
if(dojo.lang.isFunction(obj)&&(!unary_func)){unary_func=obj;obj=dj_global;}else if(dojo.lang.isFunction(obj)&&unary_func){var tmpObj=obj;obj=unary_func;unary_func=tmpObj;}
if(Array.map){var outArr=Array.map(arr,unary_func,obj);}else{var outArr=[];for(var i=0;i<arr.length;++i){outArr.push(unary_func.call(obj,arr[i]));}}
if(isString){return outArr.join("");}else{return outArr;}},reduce:function(arr,initialValue,obj,binary_func){var reducedValue=initialValue;if(arguments.length==2){binary_func=initialValue;reducedValue=arr[0];arr=arr.slice(1);}else if(arguments.length==3){if(dojo.lang.isFunction(obj)){binary_func=obj;obj=null;}}else{if(dojo.lang.isFunction(obj)){var tmp=binary_func;binary_func=obj;obj=tmp;}}
var ob=obj||dj_global;dojo.lang.map(arr,function(val){reducedValue=binary_func.call(ob,reducedValue,val);});return reducedValue;},forEach:function(anArray,callback,thisObject){if(dojo.lang.isString(anArray)){anArray=anArray.split("");}
if(Array.forEach){Array.forEach(anArray,callback,thisObject);}else{if(!thisObject){thisObject=dj_global;}
for(var i=0,l=anArray.length;i<l;i++){callback.call(thisObject,anArray[i],i,anArray);}}},_everyOrSome:function(every,arr,callback,thisObject){if(dojo.lang.isString(arr)){arr=arr.split("");}
if(Array.every){return Array[every?"every":"some"](arr,callback,thisObject);}else{if(!thisObject){thisObject=dj_global;}
for(var i=0,l=arr.length;i<l;i++){var result=callback.call(thisObject,arr[i],i,arr);if(every&&!result){return false;}else if((!every)&&(result)){return true;}}
return Boolean(every);}},every:function(arr,callback,thisObject){return this._everyOrSome(true,arr,callback,thisObject);},some:function(arr,callback,thisObject){return this._everyOrSome(false,arr,callback,thisObject);},filter:function(arr,callback,thisObject){var isString=dojo.lang.isString(arr);if(isString){arr=arr.split("");}
var outArr;if(Array.filter){outArr=Array.filter(arr,callback,thisObject);}else{if(!thisObject){if(arguments.length>=3){dojo.raise("thisObject doesn't exist!");}
thisObject=dj_global;}
outArr=[];for(var i=0;i<arr.length;i++){if(callback.call(thisObject,arr[i],i,arr)){outArr.push(arr[i]);}}}
if(isString){return outArr.join("");}else{return outArr;}},unnest:function(){var out=[];for(var i=0;i<arguments.length;i++){if(dojo.lang.isArrayLike(arguments[i])){var add=dojo.lang.unnest.apply(this,arguments[i]);out=out.concat(add);}else{out.push(arguments[i]);}}
return out;},toArray:function(arrayLike,startOffset){var array=[];for(var i=startOffset||0;i<arrayLike.length;i++){array.push(arrayLike[i]);}
return array;}});dojo.provide("dojo.lang.extras");dojo.lang.setTimeout=function(func,delay){var context=window,argsStart=2;if(!dojo.lang.isFunction(func)){context=func;func=delay;delay=arguments[2];argsStart++;}
if(dojo.lang.isString(func)){func=context[func];}
var args=[];for(var i=argsStart;i<arguments.length;i++){args.push(arguments[i]);}
return dojo.global().setTimeout(function(){func.apply(context,args);},delay);}
dojo.lang.clearTimeout=function(timer){dojo.global().clearTimeout(timer);}
dojo.lang.getNameInObj=function(ns,item){if(!ns){ns=dj_global;}
for(var x in ns){if(ns[x]===item){return new String(x);}}
return null;}
dojo.lang.shallowCopy=function(obj,deep){var i,ret;if(obj===null){return null;}
if(dojo.lang.isObject(obj)){ret=new obj.constructor();for(i in obj){if(dojo.lang.isUndefined(ret[i])){ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];}}}else if(dojo.lang.isArray(obj)){ret=[];for(i=0;i<obj.length;i++){ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];}}else{ret=obj;}
return ret;}
dojo.lang.firstValued=function(){for(var i=0;i<arguments.length;i++){if(typeof arguments[i]!="undefined"){return arguments[i];}}
return undefined;}
dojo.lang.getObjPathValue=function(objpath,context,create){with(dojo.parseObjPath(objpath,context,create)){return dojo.evalProp(prop,obj,create);}}
dojo.lang.setObjPathValue=function(objpath,value,context,create){dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");if(arguments.length<4){create=true;}
with(dojo.parseObjPath(objpath,context,create)){if(obj&&(create||(prop in obj))){obj[prop]=value;}}}
dojo.provide("dojo.lang.func");dojo.lang.hitch=function(thisObject,method){var args=[];for(var x=2;x<arguments.length;x++){args.push(arguments[x]);}
var fcn=(dojo.lang.isString(method)?thisObject[method]:method)||function(){};return function(){var ta=args.concat([]);for(var x=0;x<arguments.length;x++){ta.push(arguments[x]);}
return fcn.apply(thisObject,ta);};}
dojo.lang.anonCtr=0;dojo.lang.anon={};dojo.lang.nameAnonFunc=function(anonFuncPtr,thisObj,searchForNames){var nso=(thisObj||dojo.lang.anon);if((searchForNames)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){for(var x in nso){try{if(nso[x]===anonFuncPtr){return x;}}catch(e){}}}
var ret="__"+dojo.lang.anonCtr++;while(typeof nso[ret]!="undefined"){ret="__"+dojo.lang.anonCtr++;}
nso[ret]=anonFuncPtr;return ret;}
dojo.lang.forward=function(funcName){return function(){return this[funcName].apply(this,arguments);};}
dojo.lang.curry=function(thisObj,func){var outerArgs=[];thisObj=thisObj||dj_global;if(dojo.lang.isString(func)){func=thisObj[func];}
for(var x=2;x<arguments.length;x++){outerArgs.push(arguments[x]);}
var ecount=(func["__preJoinArity"]||func.length)-outerArgs.length;function gather(nextArgs,innerArgs,expected){var texpected=expected;var totalArgs=innerArgs.slice(0);for(var x=0;x<nextArgs.length;x++){totalArgs.push(nextArgs[x]);}
expected=expected-nextArgs.length;if(expected<=0){var res=func.apply(thisObj,totalArgs);expected=texpected;return res;}else{return function(){return gather(arguments,totalArgs,expected);};}}
return gather([],outerArgs,ecount);}
dojo.lang.curryArguments=function(thisObj,func,args,offset){var targs=[];var x=offset||0;for(x=offset;x<args.length;x++){targs.push(args[x]);}
return dojo.lang.curry.apply(dojo.lang,[thisObj,func].concat(targs));}
dojo.lang.tryThese=function(){for(var x=0;x<arguments.length;x++){try{if(typeof arguments[x]=="function"){var ret=(arguments[x]());if(ret){return ret;}}}catch(e){dojo.debug(e);}}}
dojo.lang.delayThese=function(farr,cb,delay,onend){if(!farr.length){if(typeof onend=="function"){onend();}
return;}
if((typeof delay=="undefined")&&(typeof cb=="number")){delay=cb;cb=function(){};}else if(!cb){cb=function(){};if(!delay){delay=0;}}
setTimeout(function(){(farr.shift())();cb();dojo.lang.delayThese(farr,cb,delay,onend);},delay);}
dojo.provide("dojo.event.common");dojo.event=new function(){this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);function interpolateArgs(args,searchForNames){var dl=dojo.lang;var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1};switch(args.length){case 0:return;case 1:return;case 2:ao.srcFunc=args[0];ao.adviceFunc=args[1];break;case 3:if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){ao.adviceType="after";ao.srcObj=args[0];ao.srcFunc=args[1];ao.adviceFunc=args[2];}else if((dl.isString(args[1]))&&(dl.isString(args[2]))){ao.srcFunc=args[1];ao.adviceFunc=args[2];}else if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){ao.adviceType="after";ao.srcObj=args[0];ao.srcFunc=args[1];var tmpName=dl.nameAnonFunc(args[2],ao.adviceObj,searchForNames);ao.adviceFunc=tmpName;}else if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){ao.adviceType="after";ao.srcObj=dj_global;var tmpName=dl.nameAnonFunc(args[0],ao.srcObj,searchForNames);ao.srcFunc=tmpName;ao.adviceObj=args[1];ao.adviceFunc=args[2];}
break;case 4:if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){ao.adviceType="after";ao.srcObj=args[0];ao.srcFunc=args[1];ao.adviceObj=args[2];ao.adviceFunc=args[3];}else if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){ao.adviceType=args[0];ao.srcObj=dj_global;ao.srcFunc=args[1];ao.adviceObj=args[2];ao.adviceFunc=args[3];}else if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){ao.adviceType=args[0];ao.srcObj=dj_global;var tmpName=dl.nameAnonFunc(args[1],dj_global,searchForNames);ao.srcFunc=tmpName;ao.adviceObj=args[2];ao.adviceFunc=args[3];}else if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){ao.srcObj=args[1];ao.srcFunc=args[2];var tmpName=dl.nameAnonFunc(args[3],dj_global,searchForNames);ao.adviceObj=dj_global;ao.adviceFunc=tmpName;}else if(dl.isObject(args[1])){ao.srcObj=args[1];ao.srcFunc=args[2];ao.adviceObj=dj_global;ao.adviceFunc=args[3];}else if(dl.isObject(args[2])){ao.srcObj=dj_global;ao.srcFunc=args[1];ao.adviceObj=args[2];ao.adviceFunc=args[3];}else{ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;ao.srcFunc=args[1];ao.adviceFunc=args[2];ao.aroundFunc=args[3];}
break;case 6:ao.srcObj=args[1];ao.srcFunc=args[2];ao.adviceObj=args[3]
ao.adviceFunc=args[4];ao.aroundFunc=args[5];ao.aroundObj=dj_global;break;default:ao.srcObj=args[1];ao.srcFunc=args[2];ao.adviceObj=args[3]
ao.adviceFunc=args[4];ao.aroundObj=args[5];ao.aroundFunc=args[6];ao.once=args[7];ao.delay=args[8];ao.rate=args[9];ao.adviceMsg=args[10];ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1;break;}
if(dl.isFunction(ao.aroundFunc)){var tmpName=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,searchForNames);ao.aroundFunc=tmpName;}
if(dl.isFunction(ao.srcFunc)){ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);}
if(dl.isFunction(ao.adviceFunc)){ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);}
if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);}
if(!ao.srcObj){dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);}
if(!ao.adviceObj){dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);}
if(!ao.adviceFunc){dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);dojo.debugShallow(ao);}
return ao;}
this.connect=function(){if(arguments.length==1){var ao=arguments[0];}else{var ao=interpolateArgs(arguments,true);}
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){if(dojo.render.html.ie){ao.srcFunc="onkeydown";this.connect(ao);}
ao.srcFunc="onkeypress";}
if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){var tmpAO={};for(var x in ao){tmpAO[x]=ao[x];}
var mjps=[];dojo.lang.forEach(ao.srcObj,function(src){if((dojo.render.html.capable)&&(dojo.lang.isString(src))){src=dojo.byId(src);}
tmpAO.srcObj=src;mjps.push(dojo.event.connect.call(dojo.event,tmpAO));});return mjps;}
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);if(ao.adviceFunc){var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc);}
mjp.kwAddAdvice(ao);return mjp;}
this.log=function(a1,a2){var kwArgs;if((arguments.length==1)&&(typeof a1=="object")){kwArgs=a1;}else{kwArgs={srcObj:a1,srcFunc:a2};}
kwArgs.adviceFunc=function(){var argsStr=[];for(var x=0;x<arguments.length;x++){argsStr.push(arguments[x]);}
dojo.debug("("+kwArgs.srcObj+")."+kwArgs.srcFunc,":",argsStr.join(", "));};this.kwConnect(kwArgs);}
this.connectBefore=function(){var args=["before"];for(var i=0;i<arguments.length;i++){args.push(arguments[i]);}
return this.connect.apply(this,args);}
this.connectAround=function(){var args=["around"];for(var i=0;i<arguments.length;i++){args.push(arguments[i]);}
return this.connect.apply(this,args);}
this.connectOnce=function(){var ao=interpolateArgs(arguments,true);ao.once=true;return this.connect(ao);}
this.connectRunOnce=function(){var ao=interpolateArgs(arguments,true);ao.maxCalls=1;return this.connect(ao);}
this._kwConnectImpl=function(kwArgs,disconnect){var fn=(disconnect)?"disconnect":"connect";if(typeof kwArgs["srcFunc"]=="function"){kwArgs.srcObj=kwArgs["srcObj"]||dj_global;var tmpName=dojo.lang.nameAnonFunc(kwArgs.srcFunc,kwArgs.srcObj,true);kwArgs.srcFunc=tmpName;}
if(typeof kwArgs["adviceFunc"]=="function"){kwArgs.adviceObj=kwArgs["adviceObj"]||dj_global;var tmpName=dojo.lang.nameAnonFunc(kwArgs.adviceFunc,kwArgs.adviceObj,true);kwArgs.adviceFunc=tmpName;}
kwArgs.srcObj=kwArgs["srcObj"]||dj_global;kwArgs.adviceObj=kwArgs["adviceObj"]||kwArgs["targetObj"]||dj_global;kwArgs.adviceFunc=kwArgs["adviceFunc"]||kwArgs["targetFunc"];return dojo.event[fn](kwArgs);}
this.kwConnect=function(kwArgs){return this._kwConnectImpl(kwArgs,false);}
this.disconnect=function(){if(arguments.length==1){var ao=arguments[0];}else{var ao=interpolateArgs(arguments,true);}
if(!ao.adviceFunc){return;}
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){if(dojo.render.html.ie){ao.srcFunc="onkeydown";this.disconnect(ao);}
ao.srcFunc="onkeypress";}
if(!ao.srcObj[ao.srcFunc]){return null;}
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc,true);mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);return mjp;}
this.kwDisconnect=function(kwArgs){return this._kwConnectImpl(kwArgs,true);}}
dojo.event.MethodInvocation=function(join_point,obj,args){this.jp_=join_point;this.object=obj;this.args=[];for(var x=0;x<args.length;x++){this.args[x]=args[x];}
this.around_index=-1;}
dojo.event.MethodInvocation.prototype.proceed=function(){this.around_index++;if(this.around_index>=this.jp_.around.length){return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args);}else{var ti=this.jp_.around[this.around_index];var mobj=ti[0]||dj_global;var meth=ti[1];return mobj[meth].call(mobj,this);}}
dojo.event.MethodJoinPoint=function(obj,funcName){this.object=obj||dj_global;this.methodname=funcName;this.methodfunc=this.object[funcName];this.squelch=false;}
dojo.event.MethodJoinPoint.getForMethod=function(obj,funcName){if(!obj){obj=dj_global;}
var ofn=obj[funcName];if(!ofn){ofn=obj[funcName]=function(){};if(!obj[funcName]){dojo.raise("Cannot set do-nothing method on that object "+funcName);}}else if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){return null;}
var jpname=funcName+"$joinpoint";var jpfuncname=funcName+"$joinpoint$method";var joinpoint=obj[jpname];if(!joinpoint){var isNode=false;if(dojo.event["browser"]){if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){isNode=true;dojo.event.browser.addClobberNodeAttrs(obj,[jpname,jpfuncname,funcName]);}}
var origArity=ofn.length;obj[jpfuncname]=ofn;joinpoint=obj[jpname]=new dojo.event.MethodJoinPoint(obj,jpfuncname);if(!isNode){obj[funcName]=function(){return joinpoint.run.apply(joinpoint,arguments);}}else{obj[funcName]=function(){var args=[];if(!arguments.length){var evt=null;try{if(obj.ownerDocument){evt=obj.ownerDocument.parentWindow.event;}else if(obj.documentElement){evt=obj.documentElement.ownerDocument.parentWindow.event;}else if(obj.event){evt=obj.event;}else{evt=window.event;}}catch(e){evt=window.event;}
if(evt){args.push(dojo.event.browser.fixEvent(evt,this));}}else{for(var x=0;x<arguments.length;x++){if((x==0)&&(dojo.event.browser.isEvent(arguments[x]))){args.push(dojo.event.browser.fixEvent(arguments[x],this));}else{args.push(arguments[x]);}}}
return joinpoint.run.apply(joinpoint,args);}}
obj[funcName].__preJoinArity=origArity;}
return joinpoint;}
dojo.lang.extend(dojo.event.MethodJoinPoint,{squelch:false,unintercept:function(){this.object[this.methodname]=this.methodfunc;this.before=[];this.after=[];this.around=[];},disconnect:dojo.lang.forward("unintercept"),run:function(){var obj=this.object||dj_global;var args=arguments;var aargs=[];for(var x=0;x<args.length;x++){aargs[x]=args[x];}
var unrollAdvice=function(marr){if(!marr){dojo.debug("Null argument to unrollAdvice()");return;}
var callObj=marr[0]||dj_global;var callFunc=marr[1];if(!callObj[callFunc]){dojo.raise("function \""+callFunc+"\" does not exist on \""+callObj+"\"");}
var aroundObj=marr[2]||dj_global;var aroundFunc=marr[3];var msg=marr[6];var maxCount=marr[7];if(maxCount>-1){if(maxCount==0){return;}
marr[7]--;}
var undef;var to={args:[],jp_:this,object:obj,proceed:function(){return callObj[callFunc].apply(callObj,to.args);}};to.args=aargs;var delay=parseInt(marr[4]);var hasDelay=((!isNaN(delay))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));if(marr[5]){var rate=parseInt(marr[5]);var cur=new Date();var timerSet=false;if((marr["last"])&&((cur-marr.last)<=rate)){if(dojo.event._canTimeout){if(marr["delayTimer"]){clearTimeout(marr.delayTimer);}
var tod=parseInt(rate*2);var mcpy=dojo.lang.shallowCopy(marr);marr.delayTimer=setTimeout(function(){mcpy[5]=0;unrollAdvice(mcpy);},tod);}
return;}else{marr.last=cur;}}
if(aroundFunc){aroundObj[aroundFunc].call(aroundObj,to);}else{if((hasDelay)&&((dojo.render.html)||(dojo.render.svg))){dj_global["setTimeout"](function(){if(msg){callObj[callFunc].call(callObj,to);}else{callObj[callFunc].apply(callObj,args);}},delay);}else{if(msg){callObj[callFunc].call(callObj,to);}else{callObj[callFunc].apply(callObj,args);}}}};var unRollSquelch=function(){if(this.squelch){try{return unrollAdvice.apply(this,arguments);}catch(e){dojo.debug(e);}}else{return unrollAdvice.apply(this,arguments);}};if((this["before"])&&(this.before.length>0)){dojo.lang.forEach(this.before.concat(new Array()),unRollSquelch);}
var result;try{if((this["around"])&&(this.around.length>0)){var mi=new dojo.event.MethodInvocation(this,obj,args);result=mi.proceed();}else if(this.methodfunc){result=this.object[this.methodname].apply(this.object,args);}}catch(e){if(!this.squelch){dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args);dojo.raise(e);}}
if((this["after"])&&(this.after.length>0)){dojo.lang.forEach(this.after.concat(new Array()),unRollSquelch);}
return(this.methodfunc)?result:null;},getArr:function(kind){var type="after";if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){type="before";}else if(kind=="around"){type="around";}
if(!this[type]){this[type]=[];}
return this[type];},kwAddAdvice:function(args){this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]);},addAdvice:function(thisAdviceObj,thisAdvice,thisAroundObj,thisAround,adviceType,precedence,once,delay,rate,asMessage,maxCalls){var arr=this.getArr(adviceType);if(!arr){dojo.raise("bad this: "+this);}
var ao=[thisAdviceObj,thisAdvice,thisAroundObj,thisAround,delay,rate,asMessage,maxCalls];if(once){if(this.hasAdvice(thisAdviceObj,thisAdvice,adviceType,arr)>=0){return;}}
if(precedence=="first"){arr.unshift(ao);}else{arr.push(ao);}},hasAdvice:function(thisAdviceObj,thisAdvice,adviceType,arr){if(!arr){arr=this.getArr(adviceType);}
var ind=-1;for(var x=0;x<arr.length;x++){var aao=(typeof thisAdvice=="object")?(new String(thisAdvice)).toString():thisAdvice;var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];if((arr[x][0]==thisAdviceObj)&&(a1o==aao)){ind=x;}}
return ind;},removeAdvice:function(thisAdviceObj,thisAdvice,adviceType,once){var arr=this.getArr(adviceType);var ind=this.hasAdvice(thisAdviceObj,thisAdvice,adviceType,arr);if(ind==-1){return false;}
while(ind!=-1){arr.splice(ind,1);if(once){break;}
ind=this.hasAdvice(thisAdviceObj,thisAdvice,adviceType,arr);}
return true;}});dojo.provide("dojo.event.topic");dojo.event.topic=new function(){this.topics={};this.getTopic=function(topic){if(!this.topics[topic]){this.topics[topic]=new this.TopicImpl(topic);}
return this.topics[topic];}
this.registerPublisher=function(topic,obj,funcName){var topic=this.getTopic(topic);topic.registerPublisher(obj,funcName);}
this.subscribe=function(topic,obj,funcName){var topic=this.getTopic(topic);topic.subscribe(obj,funcName);}
this.unsubscribe=function(topic,obj,funcName){var topic=this.getTopic(topic);topic.unsubscribe(obj,funcName);}
this.destroy=function(topic){this.getTopic(topic).destroy();delete this.topics[topic];}
this.publishApply=function(topic,args){var topic=this.getTopic(topic);topic.sendMessage.apply(topic,args);}
this.publish=function(topic,message){var topic=this.getTopic(topic);var args=[];for(var x=1;x<arguments.length;x++){args.push(arguments[x]);}
topic.sendMessage.apply(topic,args);}}
dojo.event.topic.TopicImpl=function(topicName){this.topicName=topicName;this.subscribe=function(listenerObject,listenerMethod){var tf=listenerMethod||listenerObject;var to=(!listenerMethod)?dj_global:listenerObject;return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});}
this.unsubscribe=function(listenerObject,listenerMethod){var tf=(!listenerMethod)?listenerObject:listenerMethod;var to=(!listenerMethod)?null:listenerObject;return dojo.event.kwDisconnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});}
this._getJoinPoint=function(){return dojo.event.MethodJoinPoint.getForMethod(this,"sendMessage");}
this.setSquelch=function(shouldSquelch){this._getJoinPoint().squelch=shouldSquelch;}
this.destroy=function(){this._getJoinPoint().disconnect();}
this.registerPublisher=function(publisherObject,publisherMethod){dojo.event.connect(publisherObject,publisherMethod,this,"sendMessage");}
this.sendMessage=function(message){}}
dojo.provide("dojo.event.browser");dojo._ie_clobber=new function(){this.clobberNodes=[];function nukeProp(node,prop){try{node[prop]=null;}catch(e){}
try{delete node[prop];}catch(e){}
try{node.removeAttribute(prop);}catch(e){}}
this.clobber=function(nodeRef){var na;var tna;if(nodeRef){tna=nodeRef.all||nodeRef.getElementsByTagName("*");na=[nodeRef];for(var x=0;x<tna.length;x++){if(tna[x]["__doClobber__"]){na.push(tna[x]);}}}else{try{window.onload=null;}catch(e){}
na=(this.clobberNodes.length)?this.clobberNodes:document.all;}
tna=null;var basis={};for(var i=na.length-1;i>=0;i=i-1){var el=na[i];try{if(el&&el["__clobberAttrs__"]){for(var j=0;j<el.__clobberAttrs__.length;j++){nukeProp(el,el.__clobberAttrs__[j]);}
nukeProp(el,"__clobberAttrs__");nukeProp(el,"__doClobber__");}}catch(e){};}
na=null;}}
if(dojo.render.html.ie){dojo.addOnUnload(function(){dojo._ie_clobber.clobber();try{if((dojo["widget"])&&(dojo.widget["manager"])){dojo.widget.manager.destroyAll();}}catch(e){}
if(dojo.widget){for(var name in dojo.widget._templateCache){if(dojo.widget._templateCache[name].node){dojo.dom.destroyNode(dojo.widget._templateCache[name].node);dojo.widget._templateCache[name].node=null;delete dojo.widget._templateCache[name].node;}}}
try{window.onload=null;}catch(e){}
try{window.onunload=null;}catch(e){}
dojo._ie_clobber.clobberNodes=[];});}
dojo.event.browser=new function(){var clobberIdx=0;this.normalizedEventName=function(eventName){switch(eventName){case"CheckboxStateChange":case"DOMAttrModified":case"DOMMenuItemActive":case"DOMMenuItemInactive":case"DOMMouseScroll":case"DOMNodeInserted":case"DOMNodeRemoved":case"RadioStateChange":return eventName;break;default:var lcn=eventName.toLowerCase();return(lcn.indexOf("on")==0)?lcn.substr(2):lcn;break;}}
this.clean=function(node){if(dojo.render.html.ie){dojo._ie_clobber.clobber(node);}}
this.addClobberNode=function(node){if(!dojo.render.html.ie){return;}
if(!node["__doClobber__"]){node.__doClobber__=true;dojo._ie_clobber.clobberNodes.push(node);node.__clobberAttrs__=[];}}
this.addClobberNodeAttrs=function(node,props){if(!dojo.render.html.ie){return;}
this.addClobberNode(node);for(var x=0;x<props.length;x++){node.__clobberAttrs__.push(props[x]);}}
this.removeListener=function(node,evtName,fp,capture){if(!capture){var capture=false;}
evtName=dojo.event.browser.normalizedEventName(evtName);if(evtName=="key"){if(dojo.render.html.ie){this.removeListener(node,"onkeydown",fp,capture);}
evtName="keypress";}
if(node.removeEventListener){node.removeEventListener(evtName,fp,capture);}}
this.addListener=function(node,evtName,fp,capture,dontFix){if(!node){return;}
if(!capture){var capture=false;}
evtName=dojo.event.browser.normalizedEventName(evtName);if(evtName=="key"){if(dojo.render.html.ie){this.addListener(node,"onkeydown",fp,capture,dontFix);}
evtName="keypress";}
if(!dontFix){var newfp=function(evt){if(!evt){evt=window.event;}
var ret=fp(dojo.event.browser.fixEvent(evt,this));if(capture){dojo.event.browser.stopEvent(evt);}
return ret;}}else{newfp=fp;}
if(node.addEventListener){node.addEventListener(evtName,newfp,capture);return newfp;}else{evtName="on"+evtName;if(typeof node[evtName]=="function"){var oldEvt=node[evtName];node[evtName]=function(e){oldEvt(e);return newfp(e);}}else{node[evtName]=newfp;}
if(dojo.render.html.ie){this.addClobberNodeAttrs(node,[evtName]);}
return newfp;}}
this.isEvent=function(obj){return(typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);}
this.currentEvent=null;this.callListener=function(listener,curTarget){if(typeof listener!='function'){dojo.raise("listener not a function: "+listener);}
dojo.event.browser.currentEvent.currentTarget=curTarget;return listener.call(curTarget,dojo.event.browser.currentEvent);}
this._stopPropagation=function(){dojo.event.browser.currentEvent.cancelBubble=true;}
this._preventDefault=function(){dojo.event.browser.currentEvent.returnValue=false;}
this.keys={KEY_BACKSPACE:8,KEY_TAB:9,KEY_CLEAR:12,KEY_ENTER:13,KEY_SHIFT:16,KEY_CTRL:17,KEY_ALT:18,KEY_PAUSE:19,KEY_CAPS_LOCK:20,KEY_ESCAPE:27,KEY_SPACE:32,KEY_PAGE_UP:33,KEY_PAGE_DOWN:34,KEY_END:35,KEY_HOME:36,KEY_LEFT_ARROW:37,KEY_UP_ARROW:38,KEY_RIGHT_ARROW:39,KEY_DOWN_ARROW:40,KEY_INSERT:45,KEY_DELETE:46,KEY_HELP:47,KEY_LEFT_WINDOW:91,KEY_RIGHT_WINDOW:92,KEY_SELECT:93,KEY_NUMPAD_0:96,KEY_NUMPAD_1:97,KEY_NUMPAD_2:98,KEY_NUMPAD_3:99,KEY_NUMPAD_4:100,KEY_NUMPAD_5:101,KEY_NUMPAD_6:102,KEY_NUMPAD_7:103,KEY_NUMPAD_8:104,KEY_NUMPAD_9:105,KEY_NUMPAD_MULTIPLY:106,KEY_NUMPAD_PLUS:107,KEY_NUMPAD_ENTER:108,KEY_NUMPAD_MINUS:109,KEY_NUMPAD_PERIOD:110,KEY_NUMPAD_DIVIDE:111,KEY_F1:112,KEY_F2:113,KEY_F3:114,KEY_F4:115,KEY_F5:116,KEY_F6:117,KEY_F7:118,KEY_F8:119,KEY_F9:120,KEY_F10:121,KEY_F11:122,KEY_F12:123,KEY_F13:124,KEY_F14:125,KEY_F15:126,KEY_NUM_LOCK:144,KEY_SCROLL_LOCK:145};this.revKeys=[];for(var key in this.keys){this.revKeys[this.keys[key]]=key;}
this.fixEvent=function(evt,sender){if(!evt){if(window["event"]){evt=window.event;}}
if((evt["type"])&&(evt["type"].indexOf("key")==0)){evt.keys=this.revKeys;for(var key in this.keys){evt[key]=this.keys[key];}
if(evt["type"]=="keydown"&&dojo.render.html.ie){switch(evt.keyCode){case evt.KEY_SHIFT:case evt.KEY_CTRL:case evt.KEY_ALT:case evt.KEY_CAPS_LOCK:case evt.KEY_LEFT_WINDOW:case evt.KEY_RIGHT_WINDOW:case evt.KEY_SELECT:case evt.KEY_NUM_LOCK:case evt.KEY_SCROLL_LOCK:case evt.KEY_NUMPAD_0:case evt.KEY_NUMPAD_1:case evt.KEY_NUMPAD_2:case evt.KEY_NUMPAD_3:case evt.KEY_NUMPAD_4:case evt.KEY_NUMPAD_5:case evt.KEY_NUMPAD_6:case evt.KEY_NUMPAD_7:case evt.KEY_NUMPAD_8:case evt.KEY_NUMPAD_9:case evt.KEY_NUMPAD_PERIOD:break;case evt.KEY_NUMPAD_MULTIPLY:case evt.KEY_NUMPAD_PLUS:case evt.KEY_NUMPAD_ENTER:case evt.KEY_NUMPAD_MINUS:case evt.KEY_NUMPAD_DIVIDE:break;case evt.KEY_PAUSE:case evt.KEY_TAB:case evt.KEY_BACKSPACE:case evt.KEY_ENTER:case evt.KEY_ESCAPE:case evt.KEY_PAGE_UP:case evt.KEY_PAGE_DOWN:case evt.KEY_END:case evt.KEY_HOME:case evt.KEY_LEFT_ARROW:case evt.KEY_UP_ARROW:case evt.KEY_RIGHT_ARROW:case evt.KEY_DOWN_ARROW:case evt.KEY_INSERT:case evt.KEY_DELETE:case evt.KEY_F1:case evt.KEY_F2:case evt.KEY_F3:case evt.KEY_F4:case evt.KEY_F5:case evt.KEY_F6:case evt.KEY_F7:case evt.KEY_F8:case evt.KEY_F9:case evt.KEY_F10:case evt.KEY_F11:case evt.KEY_F12:case evt.KEY_F12:case evt.KEY_F13:case evt.KEY_F14:case evt.KEY_F15:case evt.KEY_CLEAR:case evt.KEY_HELP:evt.key=evt.keyCode;break;default:if(evt.ctrlKey||evt.altKey){var unifiedCharCode=evt.keyCode;if(unifiedCharCode>=65&&unifiedCharCode<=90&&evt.shiftKey==false){unifiedCharCode+=32;}
if(unifiedCharCode>=1&&unifiedCharCode<=26&&evt.ctrlKey){unifiedCharCode+=96;}
evt.key=String.fromCharCode(unifiedCharCode);}}}else if(evt["type"]=="keypress"){if(dojo.render.html.opera){if(evt.which==0){evt.key=evt.keyCode;}else if(evt.which>0){switch(evt.which){case evt.KEY_SHIFT:case evt.KEY_CTRL:case evt.KEY_ALT:case evt.KEY_CAPS_LOCK:case evt.KEY_NUM_LOCK:case evt.KEY_SCROLL_LOCK:break;case evt.KEY_PAUSE:case evt.KEY_TAB:case evt.KEY_BACKSPACE:case evt.KEY_ENTER:case evt.KEY_ESCAPE:evt.key=evt.which;break;default:var unifiedCharCode=evt.which;if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){unifiedCharCode+=32;}
evt.key=String.fromCharCode(unifiedCharCode);}}}else if(dojo.render.html.ie){if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){evt.key=String.fromCharCode(evt.keyCode);}}else if(dojo.render.html.safari){switch(evt.keyCode){case 25:evt.key=evt.KEY_TAB;evt.shift=true;break;case 63232:evt.key=evt.KEY_UP_ARROW;break;case 63233:evt.key=evt.KEY_DOWN_ARROW;break;case 63234:evt.key=evt.KEY_LEFT_ARROW;break;case 63235:evt.key=evt.KEY_RIGHT_ARROW;break;case 63236:evt.key=evt.KEY_F1;break;case 63237:evt.key=evt.KEY_F2;break;case 63238:evt.key=evt.KEY_F3;break;case 63239:evt.key=evt.KEY_F4;break;case 63240:evt.key=evt.KEY_F5;break;case 63241:evt.key=evt.KEY_F6;break;case 63242:evt.key=evt.KEY_F7;break;case 63243:evt.key=evt.KEY_F8;break;case 63244:evt.key=evt.KEY_F9;break;case 63245:evt.key=evt.KEY_F10;break;case 63246:evt.key=evt.KEY_F11;break;case 63247:evt.key=evt.KEY_F12;break;case 63250:evt.key=evt.KEY_PAUSE;break;case 63272:evt.key=evt.KEY_DELETE;break;case 63273:evt.key=evt.KEY_HOME;break;case 63275:evt.key=evt.KEY_END;break;case 63276:evt.key=evt.KEY_PAGE_UP;break;case 63277:evt.key=evt.KEY_PAGE_DOWN;break;case 63302:evt.key=evt.KEY_INSERT;break;case 63248:case 63249:case 63289:break;default:evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode;}}else{evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode;}}}
if(dojo.render.html.ie){if(!evt.target){evt.target=evt.srcElement;}
if(!evt.currentTarget){evt.currentTarget=(sender?sender:evt.srcElement);}
if(!evt.layerX){evt.layerX=evt.offsetX;}
if(!evt.layerY){evt.layerY=evt.offsetY;}
var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document;var docBody=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;if(!evt.pageX){evt.pageX=evt.clientX+(docBody.scrollLeft||0)}
if(!evt.pageY){evt.pageY=evt.clientY+(docBody.scrollTop||0)}
if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}
if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}
this.currentEvent=evt;evt.callListener=this.callListener;evt.stopPropagation=this._stopPropagation;evt.preventDefault=this._preventDefault;}
return evt;}
this.stopEvent=function(evt){if(window.event){evt.cancelBubble=true;evt.returnValue=false;}else{evt.preventDefault();evt.stopPropagation();}}}
dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]});dojo.provide("dojo.event.*");dojo.provide("dojo.string.common");dojo.string.trim=function(str,wh){if(!str.replace){return str;}
if(!str.length){return str;}
var re=(wh>0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g);return str.replace(re,"");}
dojo.string.trimStart=function(str){return dojo.string.trim(str,1);}
dojo.string.trimEnd=function(str){return dojo.string.trim(str,-1);}
dojo.string.repeat=function(str,count,separator){var out="";for(var i=0;i<count;i++){out+=str;if(separator&&i<count-1){out+=separator;}}
return out;}
dojo.string.pad=function(str,len,c,dir){var out=String(str);if(!c){c='0';}
if(!dir){dir=1;}
while(out.length<len){if(dir>0){out=c+out;}else{out+=c;}}
return out;}
dojo.string.padLeft=function(str,len,c){return dojo.string.pad(str,len,c,1);}
dojo.string.padRight=function(str,len,c){return dojo.string.pad(str,len,c,-1);}
dojo.provide("dojo.string");dojo.provide("dojo.string.extras");dojo.string.substituteParams=function(template,hash){var map=(typeof hash=='object')?hash:dojo.lang.toArray(arguments,1);return template.replace(/\%\{(\w+)\}/g,function(match,key){if(typeof(map[key])!="undefined"&&map[key]!=null){return map[key];}
dojo.raise("Substitution not found: "+key);});};dojo.string.capitalize=function(str){if(!dojo.lang.isString(str)){return"";}
if(arguments.length==0){str=this;}
var words=str.split(' ');for(var i=0;i<words.length;i++){words[i]=words[i].charAt(0).toUpperCase()+words[i].substring(1);}
return words.join(" ");}
dojo.string.isBlank=function(str){if(!dojo.lang.isString(str)){return true;}
return(dojo.string.trim(str).length==0);}
dojo.string.encodeAscii=function(str){if(!dojo.lang.isString(str)){return str;}
var ret="";var value=escape(str);var match,re=/%u([0-9A-F]{4})/i;while((match=value.match(re))){var num=Number("0x"+match[1]);var newVal=escape("&#"+num+";");ret+=value.substring(0,match.index)+newVal;value=value.substring(match.index+match[0].length);}
ret+=value.replace(/\+/g,"%2B");return ret;}
dojo.string.escape=function(type,str){var args=dojo.lang.toArray(arguments,1);switch(type.toLowerCase()){case"xml":case"html":case"xhtml":return dojo.string.escapeXml.apply(this,args);case"sql":return dojo.string.escapeSql.apply(this,args);case"regexp":case"regex":return dojo.string.escapeRegExp.apply(this,args);case"javascript":case"jscript":case"js":return dojo.string.escapeJavaScript.apply(this,args);case"ascii":return dojo.string.encodeAscii.apply(this,args);default:return str;}}
dojo.string.escapeXml=function(str,noSingleQuotes){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!noSingleQuotes){str=str.replace(/'/gm,"&#39;");}
return str;}
dojo.string.escapeSql=function(str){return str.replace(/'/gm,"''");}
dojo.string.escapeRegExp=function(str){return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");}
dojo.string.escapeJavaScript=function(str){return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1");}
dojo.string.escapeString=function(str){return('"'+str.replace(/(["\\])/g,'\\$1')+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");}
dojo.string.summary=function(str,len){if(!len||str.length<=len){return str;}
return str.substring(0,len).replace(/\.+$/,"")+"...";}
dojo.string.endsWith=function(str,end,ignoreCase){if(ignoreCase){str=str.toLowerCase();end=end.toLowerCase();}
if((str.length-end.length)<0){return false;}
return str.lastIndexOf(end)==str.length-end.length;}
dojo.string.endsWithAny=function(str){for(var i=1;i<arguments.length;i++){if(dojo.string.endsWith(str,arguments[i])){return true;}}
return false;}
dojo.string.startsWith=function(str,start,ignoreCase){if(ignoreCase){str=str.toLowerCase();start=start.toLowerCase();}
return str.indexOf(start)==0;}
dojo.string.startsWithAny=function(str){for(var i=1;i<arguments.length;i++){if(dojo.string.startsWith(str,arguments[i])){return true;}}
return false;}
dojo.string.has=function(str){for(var i=1;i<arguments.length;i++){if(str.indexOf(arguments[i])>-1){return true;}}
return false;}
dojo.string.normalizeNewlines=function(text,newlineChar){if(newlineChar=="\n"){text=text.replace(/\r\n/g,"\n");text=text.replace(/\r/g,"\n");}else if(newlineChar=="\r"){text=text.replace(/\r\n/g,"\r");text=text.replace(/\n/g,"\r");}else{text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1");}
return text;}
dojo.string.splitEscaped=function(str,charac){var components=[];for(var i=0,prevcomma=0;i<str.length;i++){if(str.charAt(i)=='\\'){i++;continue;}
if(str.charAt(i)==charac){components.push(str.substring(prevcomma,i));prevcomma=i+1;}}
components.push(str.substr(prevcomma));return components;}
dojo.provide("dojo.string.Builder");dojo.string.Builder=function(str){this.arrConcat=(dojo.render.html.capable&&dojo.render.html["ie"]);var a=[];var b="";var length=this.length=b.length;if(this.arrConcat){if(b.length>0){a.push(b);}
b="";}
this.toString=this.valueOf=function(){return(this.arrConcat)?a.join(""):b;};this.append=function(){for(var x=0;x<arguments.length;x++){var s=arguments[x];if(dojo.lang.isArrayLike(s)){this.append.apply(this,s);}else{if(this.arrConcat){a.push(s);}else{b+=s;}
length+=s.length;this.length=length;}}
return this;};this.clear=function(){a=[];b="";length=this.length=0;return this;};this.remove=function(f,l){var s="";if(this.arrConcat){b=a.join("");}
a=[];if(f>0){s=b.substring(0,(f-1));}
b=s+b.substring(f+l);length=this.length=b.length;if(this.arrConcat){a.push(b);b="";}
return this;};this.replace=function(o,n){if(this.arrConcat){b=a.join("");}
a=[];b=b.replace(o,n);length=this.length=b.length;if(this.arrConcat){a.push(b);b="";}
return this;};this.insert=function(idx,s){if(this.arrConcat){b=a.join("");}
a=[];if(idx==0){b=s+b;}else{var t=b.split("");t.splice(idx,0,s);b=t.join("")}
length=this.length=b.length;if(this.arrConcat){a.push(b);b="";}
return this;};this.append.apply(this,arguments);};dojo.kwCompoundRequire({common:["dojo.string","dojo.string.common","dojo.string.extras","dojo.string.Builder"]});dojo.provide("dojo.string.*");dojo.provide("dojo.uri.Uri");dojo.uri=new function(){this.dojoUri=function(uri){return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),uri);}
this.moduleUri=function(module,uri){var loc=dojo.hostenv.getModuleSymbols(module).join('/');if(!loc){return null;}
if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}
var colonIndex=loc.indexOf(":");var slashIndex=loc.indexOf("/");if(loc.charAt(0)!="/"&&(colonIndex==-1||colonIndex>slashIndex)){loc=dojo.hostenv.getBaseScriptUri()+loc;}
return new dojo.uri.Uri(loc,uri);}
this.Uri=function(){var uri=arguments[0];for(var i=1;i<arguments.length;i++){if(!arguments[i]){continue;}
var relobj=new dojo.uri.Uri(arguments[i].toString());var uriobj=new dojo.uri.Uri(uri.toString());if((relobj.path=="")&&(relobj.scheme==null)&&(relobj.authority==null)&&(relobj.query==null)){if(relobj.fragment!=null){uriobj.fragment=relobj.fragment;}
relobj=uriobj;}else if(relobj.scheme==null){relobj.scheme=uriobj.scheme;if(relobj.authority==null){relobj.authority=uriobj.authority;if(relobj.path.charAt(0)!="/"){var path=uriobj.path.substring(0,uriobj.path.lastIndexOf("/")+1)+relobj.path;var segs=path.split("/");for(var j=0;j<segs.length;j++){if(segs[j]=="."){if(j==segs.length-1){segs[j]="";}
else{segs.splice(j,1);j--;}}else if(j>0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){if(j==segs.length-1){segs.splice(j,1);segs[j-1]="";}
else{segs.splice(j-1,2);j-=2;}}}
relobj.path=segs.join("/");}}}
uri="";if(relobj.scheme!=null){uri+=relobj.scheme+":";}
if(relobj.authority!=null){uri+="//"+relobj.authority;}
uri+=relobj.path;if(relobj.query!=null){uri+="?"+relobj.query;}
if(relobj.fragment!=null){uri+="#"+relobj.fragment;}}
this.uri=uri.toString();var regexp="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";var r=this.uri.match(new RegExp(regexp));this.scheme=r[2]||(r[1]?"":null);this.authority=r[4]||(r[3]?"":null);this.path=r[5];this.query=r[7]||(r[6]?"":null);this.fragment=r[9]||(r[8]?"":null);if(this.authority!=null){regexp="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";r=this.authority.match(new RegExp(regexp));this.user=r[3]||null;this.password=r[4]||null;this.host=r[5];this.port=r[7]||null;}
this.toString=function(){return this.uri;}}};dojo.kwCompoundRequire({common:[["dojo.uri.Uri",false,false]]});dojo.provide("dojo.uri.*");dojo.provide("dojo.dom");dojo.dom.ELEMENT_NODE=1;dojo.dom.ATTRIBUTE_NODE=2;dojo.dom.TEXT_NODE=3;dojo.dom.CDATA_SECTION_NODE=4;dojo.dom.ENTITY_REFERENCE_NODE=5;dojo.dom.ENTITY_NODE=6;dojo.dom.PROCESSING_INSTRUCTION_NODE=7;dojo.dom.COMMENT_NODE=8;dojo.dom.DOCUMENT_NODE=9;dojo.dom.DOCUMENT_TYPE_NODE=10;dojo.dom.DOCUMENT_FRAGMENT_NODE=11;dojo.dom.NOTATION_NODE=12;dojo.dom.dojoml="http://www.dojotoolkit.org/2004/dojoml";dojo.dom.xmlns={svg:"http://www.w3.org/2000/svg",smil:"http://www.w3.org/2001/SMIL20/",mml:"http://www.w3.org/1998/Math/MathML",cml:"http://www.xml-cml.org",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",xul:"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",xbl:"http://www.mozilla.org/xbl",fo:"http://www.w3.org/1999/XSL/Format",xsl:"http://www.w3.org/1999/XSL/Transform",xslt:"http://www.w3.org/1999/XSL/Transform",xi:"http://www.w3.org/2001/XInclude",xforms:"http://www.w3.org/2002/01/xforms",saxon:"http://icl.com/saxon",xalan:"http://xml.apache.org/xslt",xsd:"http://www.w3.org/2001/XMLSchema",dt:"http://www.w3.org/2001/XMLSchema-datatypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",dc:"http://purl.org/dc/elements/1.1/",dcq:"http://purl.org/dc/qualifiers/1.0","soap-env":"http://schemas.xmlsoap.org/soap/envelope/",wsdl:"http://schemas.xmlsoap.org/wsdl/",AdobeExtensions:"http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"};dojo.dom.isNode=function(wh){if(typeof Element=="function"){try{return wh instanceof Element;}catch(e){}}else{return wh&&!isNaN(wh.nodeType);}}
dojo.dom.getUniqueId=function(){var _document=dojo.doc();do{var id="dj_unique_"+(++arguments.callee._idIncrement);}while(_document.getElementById(id));return id;}
dojo.dom.getUniqueId._idIncrement=0;dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(parentNode,tagName){var node=parentNode.firstChild;while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){node=node.nextSibling;}
if(tagName&&node&&node.tagName&&node.tagName.toLowerCase()!=tagName.toLowerCase()){node=dojo.dom.nextElement(node,tagName);}
return node;}
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(parentNode,tagName){var node=parentNode.lastChild;while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){node=node.previousSibling;}
if(tagName&&node&&node.tagName&&node.tagName.toLowerCase()!=tagName.toLowerCase()){node=dojo.dom.prevElement(node,tagName);}
return node;}
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,tagName){if(!node){return null;}
do{node=node.nextSibling;}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);if(node&&tagName&&tagName.toLowerCase()!=node.tagName.toLowerCase()){return dojo.dom.nextElement(node,tagName);}
return node;}
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,tagName){if(!node){return null;}
if(tagName){tagName=tagName.toLowerCase();}
do{node=node.previousSibling;}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);if(node&&tagName&&tagName.toLowerCase()!=node.tagName.toLowerCase()){return dojo.dom.prevElement(node,tagName);}
return node;}
dojo.dom.moveChildren=function(srcNode,destNode,trim){var count=0;if(trim){while(srcNode.hasChildNodes()&&srcNode.firstChild.nodeType==dojo.dom.TEXT_NODE){srcNode.removeChild(srcNode.firstChild);}
while(srcNode.hasChildNodes()&&srcNode.lastChild.nodeType==dojo.dom.TEXT_NODE){srcNode.removeChild(srcNode.lastChild);}}
while(srcNode.hasChildNodes()){destNode.appendChild(srcNode.firstChild);count++;}
return count;}
dojo.dom.copyChildren=function(srcNode,destNode,trim){var clonedNode=srcNode.cloneNode(true);return this.moveChildren(clonedNode,destNode,trim);}
dojo.dom.replaceChildren=function(node,newChild){var nodes=[];if(dojo.render.html.ie){for(var i=0;i<node.childNodes.length;i++){nodes.push(node.childNodes[i]);}}
dojo.dom.removeChildren(node);node.appendChild(newChild);for(var i=0;i<nodes.length;i++){dojo.dom.destroyNode(nodes[i]);}}
dojo.dom.removeChildren=function(node){var count=node.childNodes.length;while(node.hasChildNodes()){dojo.dom.removeNode(node.firstChild);}
return count;}
dojo.dom.replaceNode=function(node,newNode){return node.parentNode.replaceChild(newNode,node);}
dojo.dom.destroyNode=function(node){if(node.parentNode){node=dojo.dom.removeNode(node);}
if(node.nodeType!=3){if(dojo.evalObjPath("dojo.event.browser.clean",false)){dojo.event.browser.clean(node);}
if(dojo.render.html.ie){node.outerHTML='';}}}
dojo.dom.removeNode=function(node){if(node&&node.parentNode){return node.parentNode.removeChild(node);}}
dojo.dom.getAncestors=function(node,filterFunction,returnFirstHit){var ancestors=[];var isFunction=(filterFunction&&(filterFunction instanceof Function||typeof filterFunction=="function"));while(node){if(!isFunction||filterFunction(node)){ancestors.push(node);}
if(returnFirstHit&&ancestors.length>0){return ancestors[0];}
node=node.parentNode;}
if(returnFirstHit){return null;}
return ancestors;}
dojo.dom.getAncestorsByTag=function(node,tag,returnFirstHit){tag=tag.toLowerCase();return dojo.dom.getAncestors(node,function(el){return((el.tagName)&&(el.tagName.toLowerCase()==tag));},returnFirstHit);}
dojo.dom.getFirstAncestorByTag=function(node,tag){return dojo.dom.getAncestorsByTag(node,tag,true);}
dojo.dom.isDescendantOf=function(node,ancestor,guaranteeDescendant){if(guaranteeDescendant&&node){node=node.parentNode;}
while(node){if(node==ancestor){return true;}
node=node.parentNode;}
return false;}
dojo.dom.innerXML=function(node){if(node.innerXML){return node.innerXML;}else if(node.xml){return node.xml;}else if(typeof XMLSerializer!="undefined"){return(new XMLSerializer()).serializeToString(node);}}
dojo.dom.createDocument=function(){var doc=null;var _document=dojo.doc();if(!dj_undef("ActiveXObject")){var prefixes=["MSXML2","Microsoft","MSXML","MSXML3"];for(var i=0;i<prefixes.length;i++){try{doc=new ActiveXObject(prefixes[i]+".XMLDOM");}catch(e){};if(doc){break;}}}else if((_document.implementation)&&(_document.implementation.createDocument)){doc=_document.implementation.createDocument("","",null);}
return doc;}
dojo.dom.createDocumentFromText=function(str,mimetype){if(!mimetype){mimetype="text/xml";}
if(!dj_undef("DOMParser")){var parser=new DOMParser();return parser.parseFromString(str,mimetype);}else if(!dj_undef("ActiveXObject")){var domDoc=dojo.dom.createDocument();if(domDoc){domDoc.async=false;domDoc.loadXML(str);return domDoc;}else{dojo.debug("toXml didn't work?");}}else{var _document=dojo.doc();if(_document.createElement){var tmp=_document.createElement("xml");tmp.innerHTML=str;if(_document.implementation&&_document.implementation.createDocument){var xmlDoc=_document.implementation.createDocument("foo","",null);for(var i=0;i<tmp.childNodes.length;i++){xmlDoc.importNode(tmp.childNodes.item(i),true);}
return xmlDoc;}
return((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));}}
return null;}
dojo.dom.prependChild=function(node,parent){if(parent.firstChild){parent.insertBefore(node,parent.firstChild);}else{parent.appendChild(node);}
return true;}
dojo.dom.insertBefore=function(node,ref,force){if((force!=true)&&(node===ref||node.nextSibling===ref)){return false;}
var parent=ref.parentNode;parent.insertBefore(node,ref);return true;}
dojo.dom.insertAfter=function(node,ref,force){var pn=ref.parentNode;if(ref==pn.lastChild){if((force!=true)&&(node===ref)){return false;}
pn.appendChild(node);}else{return this.insertBefore(node,ref.nextSibling,force);}
return true;}
dojo.dom.insertAtPosition=function(node,ref,position){if((!node)||(!ref)||(!position)){return false;}
switch(position.toLowerCase()){case"before":return dojo.dom.insertBefore(node,ref);case"after":return dojo.dom.insertAfter(node,ref);case"first":if(ref.firstChild){return dojo.dom.insertBefore(node,ref.firstChild);}else{ref.appendChild(node);return true;}
break;default:ref.appendChild(node);return true;}}
dojo.dom.insertAtIndex=function(node,containingNode,insertionIndex){var siblingNodes=containingNode.childNodes;if(!siblingNodes.length||siblingNodes.length==insertionIndex){containingNode.appendChild(node);return true;}
if(insertionIndex==0){return dojo.dom.prependChild(node,containingNode);}
return dojo.dom.insertAfter(node,siblingNodes[insertionIndex-1]);}
dojo.dom.textContent=function(node,text){if(arguments.length>1){var _document=dojo.doc();dojo.dom.replaceChildren(node,_document.createTextNode(text));return text;}else{if(node.textContent!=undefined){return node.textContent;}
var _result="";if(node==null){return _result;}
for(var i=0;i<node.childNodes.length;i++){switch(node.childNodes[i].nodeType){case 1:case 5:_result+=dojo.dom.textContent(node.childNodes[i]);break;case 3:case 2:case 4:_result+=node.childNodes[i].nodeValue;break;default:break;}}
return _result;}}
dojo.dom.hasParent=function(node){return Boolean(node&&node.parentNode&&dojo.dom.isNode(node.parentNode));}
dojo.dom.isTag=function(node){if(node&&node.tagName){for(var i=1;i<arguments.length;i++){if(node.tagName==String(arguments[i])){return String(arguments[i]);}}}
return"";}
dojo.dom.setAttributeNS=function(elem,namespaceURI,attrName,attrValue){if(elem==null||((elem==undefined)&&(typeof elem=="undefined"))){dojo.raise("No element given to dojo.dom.setAttributeNS");}
if(!((elem.setAttributeNS==undefined)&&(typeof elem.setAttributeNS=="undefined"))){elem.setAttributeNS(namespaceURI,attrName,attrValue);}else{var ownerDoc=elem.ownerDocument;var attribute=ownerDoc.createNode(2,attrName,namespaceURI);attribute.nodeValue=attrValue;elem.setAttributeNode(attribute);}}
dojo.provide("dojo.html.common");dojo.lang.mixin(dojo.html,dojo.dom);dojo.html.body=function(){dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5");return dojo.body();}
dojo.html.getEventTarget=function(evt){if(!evt){evt=dojo.global().event||{}};var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));while((t)&&(t.nodeType!=1)){t=t.parentNode;}
return t;}
dojo.html.getViewport=function(){var _window=dojo.global();var _document=dojo.doc();var w=0;var h=0;if(dojo.render.html.mozilla){w=_document.documentElement.clientWidth;h=_window.innerHeight;}else if(!dojo.render.html.opera&&_window.innerWidth){w=_window.innerWidth;h=_window.innerHeight;}else if(!dojo.render.html.opera&&dojo.exists(_document,"documentElement.clientWidth")){var w2=_document.documentElement.clientWidth;if(!w||w2&&w2<w){w=w2;}
h=_document.documentElement.clientHeight;}else if(dojo.body().clientWidth){w=dojo.body().clientWidth;h=dojo.body().clientHeight;}
return{width:w,height:h};}
dojo.html.getScroll=function(){var _window=dojo.global();var _document=dojo.doc();var top=_window.pageYOffset||_document.documentElement.scrollTop||dojo.body().scrollTop||0;var left=_window.pageXOffset||_document.documentElement.scrollLeft||dojo.body().scrollLeft||0;return{top:top,left:left,offset:{x:left,y:top}};}
dojo.html.getParentByType=function(node,type){var _document=dojo.doc();var parent=dojo.byId(node);type=type.toLowerCase();while((parent)&&(parent.nodeName.toLowerCase()!=type)){if(parent==(_document["body"]||_document["documentElement"])){return null;}
parent=parent.parentNode;}
return parent;}
dojo.html.getAttribute=function(node,attr){node=dojo.byId(node);if((!node)||(!node.getAttribute)){return null;}
var ta=typeof attr=='string'?attr:new String(attr);var v=node.getAttribute(ta.toUpperCase());if((v)&&(typeof v=='string')&&(v!="")){return v;}
if(v&&v.value){return v.value;}
if((node.getAttributeNode)&&(node.getAttributeNode(ta))){return(node.getAttributeNode(ta)).value;}else if(node.getAttribute(ta)){return node.getAttribute(ta);}else if(node.getAttribute(ta.toLowerCase())){return node.getAttribute(ta.toLowerCase());}
return null;}
dojo.html.hasAttribute=function(node,attr){return dojo.html.getAttribute(dojo.byId(node),attr)?true:false;}
dojo.html.getCursorPosition=function(e){e=e||dojo.global().event;var cursor={x:0,y:0};if(e.pageX||e.pageY){cursor.x=e.pageX;cursor.y=e.pageY;}else{var de=dojo.doc().documentElement;var db=dojo.body();cursor.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);cursor.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);}
return cursor;}
dojo.html.isTag=function(node){node=dojo.byId(node);if(node&&node.tagName){for(var i=1;i<arguments.length;i++){if(node.tagName.toLowerCase()==String(arguments[i]).toLowerCase()){return String(arguments[i]).toLowerCase();}}}
return"";}
if(dojo.render.html.ie&&!dojo.render.html.ie70){if(window.location.href.substr(0,6).toLowerCase()!="https:"){(function(){var xscript=dojo.doc().createElement('script');xscript.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";dojo.doc().getElementsByTagName("head")[0].appendChild(xscript);})();}}else{dojo.html.createExternalElement=function(doc,tag){return doc.createElement(tag);}}
dojo.html._callDeprecated=function(inFunc,replFunc,args,argName,retValue){dojo.deprecated("dojo.html."+inFunc,"replaced by dojo.html."+replFunc+"("+(argName?"node, {"+argName+": "+argName+"}":"")+")"+(retValue?"."+retValue:""),"0.5");var newArgs=[];if(argName){var argsIn={};argsIn[argName]=args[1];newArgs.push(args[0]);newArgs.push(argsIn);}
else{newArgs=args}
var ret=dojo.html[replFunc].apply(dojo.html,args);if(retValue){return ret[retValue];}
else{return ret;}}
dojo.html.getViewportWidth=function(){return dojo.html._callDeprecated("getViewportWidth","getViewport",arguments,null,"width");}
dojo.html.getViewportHeight=function(){return dojo.html._callDeprecated("getViewportHeight","getViewport",arguments,null,"height");}
dojo.html.getViewportSize=function(){return dojo.html._callDeprecated("getViewportSize","getViewport",arguments);}
dojo.html.getScrollTop=function(){return dojo.html._callDeprecated("getScrollTop","getScroll",arguments,null,"top");}
dojo.html.getScrollLeft=function(){return dojo.html._callDeprecated("getScrollLeft","getScroll",arguments,null,"left");}
dojo.html.getScrollOffset=function(){return dojo.html._callDeprecated("getScrollOffset","getScroll",arguments,null,"offset");}
dojo.provide("dojo.flash");dojo.flash=function(){}
dojo.flash={flash6_version:null,flash8_version:null,ready:false,_visible:true,_loadedListeners:new Array(),_installingListeners:new Array(),setSwf:function(fileInfo){if(fileInfo==null||dojo.lang.isUndefined(fileInfo)){return;}
if(fileInfo.flash6!=null&&!dojo.lang.isUndefined(fileInfo.flash6)){this.flash6_version=fileInfo.flash6;}
if(fileInfo.flash8!=null&&!dojo.lang.isUndefined(fileInfo.flash8)){this.flash8_version=fileInfo.flash8;}
if(!dojo.lang.isUndefined(fileInfo.visible)){this._visible=fileInfo.visible;}
this._initialize();},useFlash6:function(){if(this.flash6_version==null){return false;}else if(this.flash6_version!=null&&dojo.flash.info.commVersion==6){return true;}else{return false;}},useFlash8:function(){if(this.flash8_version==null){return false;}else if(this.flash8_version!=null&&dojo.flash.info.commVersion==8){return true;}else{return false;}},addLoadedListener:function(listener){this._loadedListeners.push(listener);},addInstallingListener:function(listener){this._installingListeners.push(listener);},loaded:function(){dojo.flash.ready=true;if(dojo.flash._loadedListeners.length>0){for(var i=0;i<dojo.flash._loadedListeners.length;i++){dojo.flash._loadedListeners[i].call(null);}}},installing:function(){if(dojo.flash._installingListeners.length>0){for(var i=0;i<dojo.flash._installingListeners.length;i++){dojo.flash._installingListeners[i].call(null);}}},_initialize:function(){var installer=new dojo.flash.Install();dojo.flash.installer=installer;if(installer.needed()==true){installer.install();}else{dojo.flash.obj=new dojo.flash.Embed(this._visible);dojo.flash.obj.write(dojo.flash.info.commVersion);dojo.flash.comm=new dojo.flash.Communicator();}}};dojo.flash.Info=function(){if(dojo.render.html.ie){document.writeln('<script language="VBScript" type="text/vbscript"\>');document.writeln('Function VBGetSwfVer(i)');document.writeln('  on error resume next');document.writeln('  Dim swControl, swVersion');document.writeln('  swVersion = 0');document.writeln('  set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))');document.writeln('  if (IsObject(swControl)) then');document.writeln('    swVersion = swControl.GetVariable("$version")');document.writeln('  end if');document.writeln('  VBGetSwfVer = swVersion');document.writeln('End Function');document.writeln('</script\>');}
this._detectVersion();this._detectCommunicationVersion();}
dojo.flash.Info.prototype={version:-1,versionMajor:-1,versionMinor:-1,versionRevision:-1,capable:false,commVersion:6,installing:false,isVersionOrAbove:function(reqMajorVer,reqMinorVer,reqVer){reqVer=parseFloat("."+reqVer);if(this.versionMajor>=reqMajorVer&&this.versionMinor>=reqMinorVer&&this.versionRevision>=reqVer){return true;}else{return false;}},_detectVersion:function(){var versionStr;for(var testVersion=25;testVersion>0;testVersion--){if(dojo.render.html.ie){versionStr=VBGetSwfVer(testVersion);}else{versionStr=this._JSFlashInfo(testVersion);}
if(versionStr==-1){this.capable=false;return;}else if(versionStr!=0){var versionArray;if(dojo.render.html.ie){var tempArray=versionStr.split(" ");var tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}
this.versionMajor=versionArray[0];this.versionMinor=versionArray[1];this.versionRevision=versionArray[2];var versionString=this.versionMajor+"."+this.versionRevision;this.version=parseFloat(versionString);this.capable=true;break;}}},_JSFlashInfo:function(testVersion){if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];if(descArray[3]!=""){var tempArrayMinor=descArray[3].split("r");}else{var tempArrayMinor=descArray[4].split("r");}
var versionRevision=tempArrayMinor[1]>0?tempArrayMinor[1]:0;var version=versionMajor+"."+versionMinor+"."
+versionRevision;return version;}}
return-1;},_detectCommunicationVersion:function(){if(this.capable==false){this.commVersion=null;return;}
if(typeof djConfig["forceFlashComm"]!="undefined"&&typeof djConfig["forceFlashComm"]!=null){this.commVersion=djConfig["forceFlashComm"];return;}
if(dojo.render.html.safari==true||dojo.render.html.opera==true){this.commVersion=8;}else{this.commVersion=6;}}};dojo.flash.Embed=function(visible){this._visible=visible;}
dojo.flash.Embed.prototype={width:215,height:138,id:"flashObject",_visible:true,protocol:function(){switch(window.location.protocol){case"https:":return"https";break;default:return"http";break;}},write:function(flashVer,doExpressInstall){if(dojo.lang.isUndefined(doExpressInstall)){doExpressInstall=false;}
var containerStyle=new dojo.string.Builder();containerStyle.append("width: "+this.width+"px; ");containerStyle.append("height: "+this.height+"px; ");if(this._visible==false){containerStyle.append("position: absolute; ");containerStyle.append("z-index: 10000; ");containerStyle.append("top: -1000px; ");containerStyle.append("left: -1000px; ");}
containerStyle=containerStyle.toString();var objectHTML;var swfloc;if(flashVer==6){swfloc=dojo.flash.flash6_version;var dojoPath=djConfig.baseRelativePath;swfloc=swfloc+"?baseRelativePath="+escape(dojoPath);objectHTML='<embed id="'+this.id+'" src="'+swfloc+'" '
+'    quality="high" bgcolor="#ffffff" '
+'    width="'+this.width+'" height="'+this.height+'" '
+'    name="'+this.id+'" '
+'    align="middle" allowScriptAccess="sameDomain" '
+'    type="application/x-shockwave-flash" swLiveConnect="true" '
+'    pluginspage="'
+this.protocol()
+'://www.macromedia.com/go/getflashplayer">';}else{swfloc=dojo.flash.flash8_version;var swflocObject=swfloc;var swflocEmbed=swfloc;var dojoPath=djConfig.baseRelativePath;if(doExpressInstall){var redirectURL=escape(window.location);document.title=document.title.slice(0,47)+" - Flash Player Installation";var docTitle=escape(document.title);swflocObject+="?MMredirectURL="+redirectURL
+"&MMplayerType=ActiveX"
+"&MMdoctitle="+docTitle
+"&baseRelativePath="+escape(dojoPath);swflocEmbed+="?MMredirectURL="+redirectURL
+"&MMplayerType=PlugIn"
+"&baseRelativePath="+escape(dojoPath);}
if(swflocEmbed.indexOf("?")==-1){swflocEmbed+="?baseRelativePath="+escape(dojoPath)+"' ";}
objectHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
+'codebase="'
+this.protocol()
+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/'
+'swflash.cab#version=8,0,0,0" '
+'width="'+this.width+'" '
+'height="'+this.height+'" '
+'id="'+this.id+'" '
+'align="middle"> '
+'<param name="allowScriptAccess" value="sameDomain" /> '
+'<param name="movie" value="'+swflocObject+'" /> '
+'<param name="quality" value="high" /> '
+'<param name="bgcolor" value="#ffffff" /> '
+'<embed src="'+swflocEmbed+"' "
+'quality="high" '
+'bgcolor="#ffffff" '
+'width="'+this.width+'" '
+'height="'+this.height+'" '
+'id="'+this.id+'" '
+'name="'+this.id+'" '
+'swLiveConnect="true" '
+'align="middle" '
+'allowScriptAccess="sameDomain" '
+'type="application/x-shockwave-flash" '
+'pluginspage="'
+this.protocol()
+'://www.macromedia.com/go/getflashplayer" />'
+'</object>';}
objectHTML='<div id="'+this.id+'Container" style="'+containerStyle+'"> '
+objectHTML
+'</div>';document.writeln(objectHTML);},get:function(){return document.getElementById(this.id);},setVisible:function(visible){var container=dojo.byId(this.id+"Container");if(visible==true){container.style.visibility="visible";}else{container.style.position="absolute";container.style.x="-1000px";container.style.y="-1000px";container.style.visibility="hidden";}},center:function(){var elementWidth=this.width;var elementHeight=this.height;var scroll_offset=dojo.html.getScroll().offset;var viewport_size=dojo.html.getViewport();var x=scroll_offset.x+(viewport_size.width-elementWidth)/2;var y=scroll_offset.y+(viewport_size.height-elementHeight)/2;var container=dojo.byId(this.id+"Container");container.style.top=y+"px";container.style.left=x+"px";}};dojo.flash.Communicator=function(){if(dojo.flash.useFlash6()){this._writeFlash6();}else if(dojo.flash.useFlash8()){this._writeFlash8();}}
dojo.flash.Communicator.prototype={_writeFlash6:function(){var id=dojo.flash.obj.id;document.writeln('<script language="JavaScript">');document.writeln('  function '+id+'_DoFSCommand(command, args){ ');document.writeln('    dojo.flash.comm._handleFSCommand(command, args); ');document.writeln('}');document.writeln('</script>');if(dojo.render.html.ie){document.writeln('<SCRIPT LANGUAGE=VBScript\> ');document.writeln('on error resume next ');document.writeln('Sub '+id+'_FSCommand(ByVal command, ByVal args)');document.writeln(' call '+id+'_DoFSCommand(command, args)');document.writeln('end sub');document.writeln('</SCRIPT\> ');}},_writeFlash8:function(){},_handleFSCommand:function(command,args){if(command!=null&&!dojo.lang.isUndefined(command)&&/^FSCommand:(.*)/.test(command)==true){command=command.match(/^FSCommand:(.*)/)[1];}
if(command=="addCallback"){this._fscommandAddCallback(command,args);}else if(command=="call"){this._fscommandCall(command,args);}else if(command=="fscommandReady"){this._fscommandReady();}},_fscommandAddCallback:function(command,args){var functionName=args;var callFunc=function(){return dojo.flash.comm._call(functionName,arguments);};dojo.flash.comm[functionName]=callFunc;dojo.flash.obj.get().SetVariable("_succeeded",true);},_fscommandCall:function(command,args){var plugin=dojo.flash.obj.get();var functionName=args;var numArgs=parseInt(plugin.GetVariable("_numArgs"));var flashArgs=new Array();for(var i=0;i<numArgs;i++){var currentArg=plugin.GetVariable("_"+i);flashArgs.push(currentArg);}
var runMe;if(functionName.indexOf(".")==-1){runMe=window[functionName];}else{runMe=eval(functionName);}
var results=null;if(!dojo.lang.isUndefined(runMe)&&runMe!=null){results=runMe.apply(null,flashArgs);}
plugin.SetVariable("_returnResult",results);},_fscommandReady:function(){var plugin=dojo.flash.obj.get();plugin.SetVariable("fscommandReady","true");},_call:function(functionName,args){var plugin=dojo.flash.obj.get();plugin.SetVariable("_functionName",functionName);plugin.SetVariable("_numArgs",args.length);for(var i=0;i<args.length;i++){var value=args[i];value=value.replace(/\0/g,"\\0");plugin.SetVariable("_"+i,value);}
plugin.TCallLabel("/_flashRunner","execute");var results=plugin.GetVariable("_returnResult");results=results.replace(/\\0/g,"\0");return results;},_addExternalInterfaceCallback:function(methodName){var wrapperCall=function(){var methodArgs=new Array(arguments.length);for(var i=0;i<arguments.length;i++){methodArgs[i]=arguments[i];}
return dojo.flash.comm._execFlash(methodName,methodArgs);};dojo.flash.comm[methodName]=wrapperCall;},_encodeData:function(data){var entityRE=/\&([^;]*)\;/g;data=data.replace(entityRE,"&amp;$1;");data=data.replace(/</g,"&lt;");data=data.replace(/>/g,"&gt;");data=data.replace("\\","&custom_backslash;&custom_backslash;");data=data.replace(/\n/g,"\\n");data=data.replace(/\r/g,"\\r");data=data.replace(/\f/g,"\\f");data=data.replace(/\0/g,"\\0");data=data.replace(/\'/g,"\\\'");data=data.replace(/\"/g,'\\\"');return data;},_decodeData:function(data){if(data==null||typeof data=="undefined"){return data;}
data=data.replace(/\&custom_lt\;/g,"<");data=data.replace(/\&custom_gt\;/g,">");data=eval('"'+data+'"');return data;},_chunkArgumentData:function(value,argIndex){var plugin=dojo.flash.obj.get();var numSegments=Math.ceil(value.length/1024);for(var i=0;i<numSegments;i++){var startCut=i*1024;var endCut=i*1024+1024;if(i==(numSegments-1)){endCut=i*1024+value.length;}
var piece=value.substring(startCut,endCut);piece=this._encodeData(piece);plugin.CallFunction('<invoke name="chunkArgumentData" '
+'returntype="javascript">'
+'<arguments>'
+'<string>'+piece+'</string>'
+'<number>'+argIndex+'</number>'
+'</arguments>'
+'</invoke>');}},_chunkReturnData:function(){var plugin=dojo.flash.obj.get();var numSegments=plugin.getReturnLength();var resultsArray=new Array();for(var i=0;i<numSegments;i++){var piece=plugin.CallFunction('<invoke name="chunkReturnData" '
+'returntype="javascript">'
+'<arguments>'
+'<number>'+i+'</number>'
+'</arguments>'
+'</invoke>');if(piece=='""'||piece=="''"){piece="";}else{piece=piece.substring(1,piece.length-1);}
resultsArray.push(piece);}
var results=resultsArray.join("");return results;},_execFlash:function(methodName,methodArgs){var plugin=dojo.flash.obj.get();plugin.startExec();plugin.setNumberArguments(methodArgs.length);for(var i=0;i<methodArgs.length;i++){this._chunkArgumentData(methodArgs[i],i);}
plugin.exec(methodName);var results=this._chunkReturnData();results=this._decodeData(results);plugin.endExec();return results;}}
dojo.flash.Install=function(){}
dojo.flash.Install.prototype={needed:function(){if(dojo.flash.info.capable==false){return true;}
if(dojo.render.os.mac==true&&!dojo.flash.info.isVersionOrAbove(8,0,0)){return true;}
if(!dojo.flash.info.isVersionOrAbove(6,0,0)){return true;}
return false;},install:function(){dojo.flash.info.installing=true;dojo.flash.installing();if(dojo.flash.info.capable==false){var installObj=new dojo.flash.Embed(false);installObj.write(8);}else if(dojo.flash.info.isVersionOrAbove(6,0,65)){var installObj=new dojo.flash.Embed(false);installObj.write(8,true);installObj.setVisible(true);installObj.center();}else{alert("This content requires a more recent version of the Macromedia "
+" Flash Player.");window.location.href=+dojo.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";}},_onInstallStatus:function(msg){if(msg=="Download.Complete"){dojo.flash._initialize();}else if(msg=="Download.Cancelled"){alert("This content requires a more recent version of the Macromedia "
+" Flash Player.");window.location.href=dojo.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";}else if(msg=="Download.Failed"){alert("There was an error downloading the Flash Player update. "
+"Please try again later, or visit macromedia.com to download "
+"the latest version of the Flash plugin.");}}}
dojo.flash.info=new dojo.flash.Info();dojo.provide("dojo.lang.type");dojo.lang.whatAmI=function(value){dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5");return dojo.lang.getType(value);}
dojo.lang.whatAmI.custom={};dojo.lang.getType=function(value){try{if(dojo.lang.isArray(value)){return"array";}
if(dojo.lang.isFunction(value)){return"function";}
if(dojo.lang.isString(value)){return"string";}
if(dojo.lang.isNumber(value)){return"number";}
if(dojo.lang.isBoolean(value)){return"boolean";}
if(dojo.lang.isAlien(value)){return"alien";}
if(dojo.lang.isUndefined(value)){return"undefined";}
for(var name in dojo.lang.whatAmI.custom){if(dojo.lang.whatAmI.custom[name](value)){return name;}}
if(dojo.lang.isObject(value)){return"object";}}catch(e){}
return"unknown";}
dojo.lang.isNumeric=function(value){return(!isNaN(value)&&isFinite(value)&&(value!=null)&&!dojo.lang.isBoolean(value)&&!dojo.lang.isArray(value)&&!/^\s*$/.test(value));}
dojo.lang.isBuiltIn=function(value){return(dojo.lang.isArray(value)||dojo.lang.isFunction(value)||dojo.lang.isString(value)||dojo.lang.isNumber(value)||dojo.lang.isBoolean(value)||(value==null)||(value instanceof Error)||(typeof value=="error"));}
dojo.lang.isPureObject=function(value){return((value!=null)&&dojo.lang.isObject(value)&&value.constructor==Object);}
dojo.lang.isOfType=function(value,type,keywordParameters){var optional=false;if(keywordParameters){optional=keywordParameters["optional"];}
if(optional&&((value===null)||dojo.lang.isUndefined(value))){return true;}
if(dojo.lang.isArray(type)){var arrayOfTypes=type;for(var i in arrayOfTypes){var aType=arrayOfTypes[i];if(dojo.lang.isOfType(value,aType)){return true;}}
return false;}else{if(dojo.lang.isString(type)){type=type.toLowerCase();}
switch(type){case Array:case"array":return dojo.lang.isArray(value);case Function:case"function":return dojo.lang.isFunction(value);case String:case"string":return dojo.lang.isString(value);case Number:case"number":return dojo.lang.isNumber(value);case"numeric":return dojo.lang.isNumeric(value);case Boolean:case"boolean":return dojo.lang.isBoolean(value);case Object:case"object":return dojo.lang.isObject(value);case"pureobject":return dojo.lang.isPureObject(value);case"builtin":return dojo.lang.isBuiltIn(value);case"alien":return dojo.lang.isAlien(value);case"undefined":return dojo.lang.isUndefined(value);case null:case"null":return(value===null);case"optional":dojo.deprecated('dojo.lang.isOfType(value, [type, "optional"])','use dojo.lang.isOfType(value, type, {optional: true} ) instead',"0.5");return((value===null)||dojo.lang.isUndefined(value));default:if(dojo.lang.isFunction(type)){return(value instanceof type);}else{dojo.raise("dojo.lang.isOfType() was passed an invalid type");}}}
dojo.raise("If we get here, it means a bug was introduced above.");}
dojo.lang.getObject=function(str){var parts=str.split("."),i=0,obj=dj_global;do{obj=obj[parts[i++]];}while(i<parts.length&&obj);return(obj!=dj_global)?obj:null;}
dojo.lang.doesObjectExist=function(str){var parts=str.split("."),i=0,obj=dj_global;do{obj=obj[parts[i++]];}while(i<parts.length&&obj);return(obj&&obj!=dj_global);}
dojo.provide("dojo.lang.assert");dojo.lang.assert=function(booleanValue,message){if(!booleanValue){var errorMessage="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n";if(message){errorMessage+="Here's the assert message:\n"+message+"\n";}
throw new Error(errorMessage);}}
dojo.lang.assertType=function(value,type,keywordParameters){if(dojo.lang.isString(keywordParameters)){dojo.deprecated('dojo.lang.assertType(value, type, "message")','use dojo.lang.assertType(value, type) instead',"0.5");}
if(!dojo.lang.isOfType(value,type,keywordParameters)){if(!dojo.lang.assertType._errorMessage){dojo.lang.assertType._errorMessage="Type mismatch: dojo.lang.assertType() failed.";}
dojo.lang.assert(false,dojo.lang.assertType._errorMessage);}}
dojo.lang.assertValidKeywords=function(object,expectedProperties,message){var key;if(!message){if(!dojo.lang.assertValidKeywords._errorMessage){dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:";}
message=dojo.lang.assertValidKeywords._errorMessage;}
if(dojo.lang.isArray(expectedProperties)){for(key in object){if(!dojo.lang.inArray(expectedProperties,key)){dojo.lang.assert(false,message+" "+key);}}}else{for(key in object){if(!(key in expectedProperties)){dojo.lang.assert(false,message+" "+key);}}}}
dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(returnWrappers){this.pairs=[];this.returnWrappers=returnWrappers||false;}
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,check,wrap,directReturn,override){var type=(override)?"unshift":"push";this.pairs[type]([name,check,wrap,directReturn]);},match:function(){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[1].apply(this,arguments)){if((pair[3])||(this.returnWrappers)){return pair[2];}else{return pair[2].apply(this,arguments);}}}
throw new Error("No match found");},unregister:function(name){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[0]==name){this.pairs.splice(i,1);return true;}}
return false;}});dojo.provide("dojo.lang.repr");dojo.lang.reprRegistry=new dojo.AdapterRegistry();dojo.lang.registerRepr=function(name,check,wrap,override){dojo.lang.reprRegistry.register(name,check,wrap,override);};dojo.lang.repr=function(obj){if(typeof(obj)=="undefined"){return"undefined";}else if(obj===null){return"null";}
try{if(typeof(obj["__repr__"])=='function'){return obj["__repr__"]();}else if((typeof(obj["repr"])=='function')&&(obj.repr!=arguments.callee)){return obj["repr"]();}
return dojo.lang.reprRegistry.match(obj);}catch(e){if(typeof(obj.NAME)=='string'&&(obj.toString==Function.prototype.toString||obj.toString==Object.prototype.toString)){return obj.NAME;}}
if(typeof(obj)=="function"){obj=(obj+"").replace(/^\s+/,"");var idx=obj.indexOf("{");if(idx!=-1){obj=obj.substr(0,idx)+"{...}";}}
return obj+"";}
dojo.lang.reprArrayLike=function(arr){try{var na=dojo.lang.map(arr,dojo.lang.repr);return"["+na.join(", ")+"]";}catch(e){}};(function(){var m=dojo.lang;m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike);m.registerRepr("string",m.isString,m.reprString);m.registerRepr("numbers",m.isNumber,m.reprNumber);m.registerRepr("boolean",m.isBoolean,m.reprNumber);})();dojo.provide("dojo.lang.declare");dojo.lang.declare=function(className,superclass,init,props){if((dojo.lang.isFunction(props))||((!props)&&(!dojo.lang.isFunction(init)))){var temp=props;props=init;init=temp;}
var mixins=[];if(dojo.lang.isArray(superclass)){mixins=superclass;superclass=mixins.shift();}
if(!init){init=dojo.evalObjPath(className,false);if((init)&&(!dojo.lang.isFunction(init))){init=null};}
var ctor=dojo.lang.declare._makeConstructor();var scp=(superclass?superclass.prototype:null);if(scp){scp.prototyping=true;ctor.prototype=new superclass();scp.prototyping=false;}
ctor.superclass=scp;ctor.mixins=mixins;for(var i=0,l=mixins.length;i<l;i++){dojo.lang.extend(ctor,mixins[i].prototype);}
ctor.prototype.initializer=null;ctor.prototype.declaredClass=className;if(dojo.lang.isArray(props)){dojo.lang.extend.apply(dojo.lang,[ctor].concat(props));}else{dojo.lang.extend(ctor,(props)||{});}
dojo.lang.extend(ctor,dojo.lang.declare._common);ctor.prototype.constructor=ctor;ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){});var created=dojo.parseObjPath(className,null,true);created.obj[created.prop]=ctor;return ctor;}
dojo.lang.declare._makeConstructor=function(){return function(){var self=this._getPropContext();var s=self.constructor.superclass;if((s)&&(s.constructor)){if(s.constructor==arguments.callee){this._inherited("constructor",arguments);}else{this._contextMethod(s,"constructor",arguments);}}
var ms=(self.constructor.mixins)||([]);for(var i=0,m;(m=ms[i]);i++){(((m.prototype)&&(m.prototype.initializer))||(m)).apply(this,arguments);}
if((!this.prototyping)&&(self.initializer)){self.initializer.apply(this,arguments);}}}
dojo.lang.declare._common={_getPropContext:function(){return(this.___proto||this);},_contextMethod:function(ptype,method,args){var result,stack=this.___proto;this.___proto=ptype;try{result=ptype[method].apply(this,(args||[]));}
catch(e){throw e;}
finally{this.___proto=stack;}
return result;},_inherited:function(prop,args){var p=this._getPropContext();do{if((!p.constructor)||(!p.constructor.superclass)){return;}
p=p.constructor.superclass;}while(!(prop in p));return(dojo.lang.isFunction(p[prop])?this._contextMethod(p,prop,args):p[prop]);},inherited:function(prop,args){dojo.deprecated("'inherited' method is dangerous, do not up-call! 'inherited' is slated for removal in 0.5; name your super class (or use superclass property) instead.","0.5");this._inherited(prop,args);}}
dojo.declare=dojo.lang.declare;dojo.kwCompoundRequire({common:["dojo.lang.common","dojo.lang.assert","dojo.lang.array","dojo.lang.type","dojo.lang.func","dojo.lang.extras","dojo.lang.repr","dojo.lang.declare"]});dojo.provide("dojo.lang.*");dojo.provide("dojo.storage");dojo.storage=new function(){}
dojo.declare("dojo.storage",null,{SUCCESS:"success",FAILED:"failed",PENDING:"pending",SIZE_NOT_AVAILABLE:"Size not available",SIZE_NO_LIMIT:"No size limit",namespace:"default",onHideSettingsUI:null,initialize:function(){dojo.unimplemented("dojo.storage.initialize");},isAvailable:function(){dojo.unimplemented("dojo.storage.isAvailable");},put:function(key,value,resultsHandler){dojo.unimplemented("dojo.storage.put");},get:function(key){dojo.unimplemented("dojo.storage.get");},hasKey:function(key){return(this.get(key)!=null);},getKeys:function(){dojo.unimplemented("dojo.storage.getKeys");},clear:function(){dojo.unimplemented("dojo.storage.clear");},remove:function(key){dojo.unimplemented("dojo.storage.remove");},isPermanent:function(){dojo.unimplemented("dojo.storage.isPermanent");},getMaximumSize:function(){dojo.unimplemented("dojo.storage.getMaximumSize");},hasSettingsUI:function(){return false;},showSettingsUI:function(){dojo.unimplemented("dojo.storage.showSettingsUI");},hideSettingsUI:function(){dojo.unimplemented("dojo.storage.hideSettingsUI");},getType:function(){dojo.unimplemented("dojo.storage.getType");},isValidKey:function(keyName){if((keyName==null)||(typeof keyName=="undefined")){return false;}
return/^[0-9A-Za-z_]*$/.test(keyName);}});dojo.storage.manager=new function(){this.currentProvider=null;this.available=false;this._initialized=false;this._providers=[];this.namespace="default";this.initialize=function(){this.autodetect();};this.register=function(name,instance){this._providers[this._providers.length]=instance;this._providers[name]=instance;};this.setProvider=function(storageClass){};this.autodetect=function(){if(this._initialized==true){return;}
var providerToUse=null;for(var i=0;i<this._providers.length;i++){providerToUse=this._providers[i];if(dojo.lang.isUndefined(djConfig["forceStorageProvider"])==false&&providerToUse.getType()==djConfig["forceStorageProvider"]){providerToUse.isAvailable();break;}else if(dojo.lang.isUndefined(djConfig["forceStorageProvider"])==true&&providerToUse.isAvailable()){break;}}
if(providerToUse==null){this._initialized=true;this.available=false;this.currentProvider=null;dojo.raise("No storage provider found for this platform");}
this.currentProvider=providerToUse;for(var i in providerToUse){dojo.storage[i]=providerToUse[i];}
dojo.storage.manager=this;dojo.storage.initialize();this._initialized=true;this.available=true;};this.isAvailable=function(){return this.available;};this.isInitialized=function(){if(this.currentProvider.getType()=="dojo.storage.browser.FlashStorageProvider"&&dojo.flash.ready==false){return false;}else{return this._initialized;}};this.supportsProvider=function(storageClass){try{var provider=eval("new "+storageClass+"()");var results=provider.isAvailable();if(results==null||typeof results=="undefined")
return false;return results;}catch(exception){return false;}};this.getProvider=function(){return this.currentProvider;};this.loaded=function(){};};dojo.provide("dojo.json");dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,check,wrap,override){dojo.json.jsonRegistry.register(name,check,wrap,override);},evalJson:function(json){try{return eval("("+json+")");}catch(e){dojo.debug(e);return json;}},serialize:function(o){var objtype=typeof(o);if(objtype=="undefined"){return"undefined";}else if((objtype=="number")||(objtype=="boolean")){return o+"";}else if(o===null){return"null";}
if(objtype=="string"){return dojo.string.escapeString(o);}
var me=arguments.callee;var newObj;if(typeof(o.__json__)=="function"){newObj=o.__json__();if(o!==newObj){return me(newObj);}}
if(typeof(o.json)=="function"){newObj=o.json();if(o!==newObj){return me(newObj);}}
if(objtype!="function"&&typeof(o.length)=="number"){var res=[];for(var i=0;i<o.length;i++){var val=me(o[i]);if(typeof(val)!="string"){val="undefined";}
res.push(val);}
return"["+res.join(",")+"]";}
try{window.o=o;newObj=dojo.json.jsonRegistry.match(o);return me(newObj);}catch(e){}
if(objtype=="function"){return null;}
res=[];for(var k in o){var useKey;if(typeof(k)=="number"){useKey='"'+k+'"';}else if(typeof(k)=="string"){useKey=dojo.string.escapeString(k);}else{continue;}
val=me(o[k]);if(typeof(val)!="string"){continue;}
res.push(useKey+":"+val);}
return"{"+res.join(",")+"}";}};dojo.provide("dojo.storage.browser");dojo.storage.browser.FileStorageProvider=function(){}
dojo.inherits(dojo.storage.browser.FileStorageProvider,dojo.storage);dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME="__dojoAllKeys";dojo.storage.browser.FileStorageProvider._APPLET_ID="__dojoFileJavaObj";dojo.lang.extend(dojo.storage.browser.FileStorageProvider,{namespace:"default",initialized:false,_available:null,_statusHandler:null,_keyIndex:new Array(),initialize:function(){if(djConfig["disableFileStorage"]==true){return;}
this._loadKeyIndex();this.initialized=true;dojo.storage.manager.loaded();},isAvailable:function(){this._available=false;var protocol=window.location.protocol;if(protocol.indexOf("file")!=-1||protocol.indexOf("chrome")!=-1){this._available=this._isAvailableXPCOM();if(this._available==false){this._available=this._isAvailableActiveX();}}
return this._available;},put:function(key,value,resultsHandler){if(this.isValidKey(key)==false){dojo.raise("Invalid key given: "+key);}
this._statusHandler=resultsHandler;try{this._save(key,value);resultsHandler.call(null,dojo.storage.SUCCESS,key);}catch(e){this._statusHandler.call(null,dojo.storage.FAILED,key,e.toString());}},get:function(key){if(this.isValidKey(key)==false){dojo.raise("Invalid key given: "+key);}
var results=this._load(key);return results;},getKeys:function(){return this._keyIndex;},hasKey:function(key){if(this.isValidKey(key)==false){dojo.raise("Invalid key given: "+key);}
this._loadKeyIndex();var exists=false;for(var i=0;i<this._keyIndex.length;i++){if(this._keyIndex[i]==key){exists=true;}}
return exists;},clear:function(){this._loadKeyIndex();var keyIndex=new Array();for(var i=0;i<this._keyIndex.length;i++){keyIndex[keyIndex.length]=new String(this._keyIndex[i]);}
for(var i=0;i<keyIndex.length;i++){this.remove(keyIndex[i]);}},remove:function(key){if(this.isValidKey(key)==false){dojo.raise("Invalid key given: "+key);}
this._loadKeyIndex();for(var i=0;i<this._keyIndex.length;i++){if(this._keyIndex[i]==key){this._keyIndex.splice(i,1);break;}}
this._save(dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME,this._keyIndex,false);var fullPath=this._getPagePath()+key+".txt";if(this._isAvailableXPCOM()){this._removeXPCOM(fullPath);}else if(this._isAvailableActiveX()){this._removeActiveX(fullPath);}},isPermanent:function(){return true;},getMaximumSize:function(){return dojo.storage.SIZE_NO_LIMIT;},hasSettingsUI:function(){return false;},showSettingsUI:function(){dojo.raise(this.getType()+" does not support a storage settings user-interface");},hideSettingsUI:function(){dojo.raise(this.getType()+" does not support a storage settings user-interface");},getType:function(){return"dojo.storage.browser.FileStorageProvider";},_save:function(key,value,updateKeyIndex){if(typeof updateKeyIndex=="undefined"){updateKeyIndex=true;}
if(dojo.lang.isString(value)==false){value=dojo.json.serialize(value);value="/* JavaScript */\n"+value+"\n\n";}
var fullPath=this._getPagePath()+key+".txt";if(this._isAvailableXPCOM()){this._saveFileXPCOM(fullPath,value);}else if(this._isAvailableActiveX()){this._saveFileActiveX(fullPath,value);}
if(updateKeyIndex){this._updateKeyIndex(key);}},_load:function(key){var fullPath=this._getPagePath()+key+".txt";var results=null;if(this._isAvailableXPCOM()){results=this._loadFileXPCOM(fullPath);}else if(this._isAvailableActiveX()){results=this._loadFileActiveX(fullPath);}else if(this._isAvailableJava()){results=this._loadFileJava(fullPath);}
if(results==null){return null;}
if(!dojo.lang.isUndefined(results)&&results!=null&&/^\/\* JavaScript \*\//.test(results)){results=dojo.json.evalJson(results);}
return results;},_updateKeyIndex:function(key){this._loadKeyIndex();var alreadyAdded=false;for(var i=0;i<this._keyIndex.length;i++){if(this._keyIndex[i]==key){alreadyAdded=true;break;}}
if(alreadyAdded==false){this._keyIndex[this._keyIndex.length]=key;}
this._save(dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME,this._keyIndex,false);},_loadKeyIndex:function(){var indexContents=this._load(dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME);if(indexContents==null){this._keyIndex=new Array();}else{this._keyIndex=indexContents;}},_saveFileXPCOM:function(filename,value){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var f=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);f.initWithPath(filename);var ouputStream=Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);ouputStream.init(f,0x20|0x04|0x08,00400+00200,null);ouputStream.write(value,value.length);ouputStream.close();}catch(e){var msg=e.toString();if(e.name&&e.message){msg=e.name+": "+e.message;}
dojo.raise("dojo.storage.browser.FileStorageProvider._saveFileXPCOM(): "+msg);}},_loadFileXPCOM:function(filename){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var f=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);f.initWithPath(filename);if(f.exists()==false){return null;}
var inp=Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);inp.init(f,0x01,00004,null);var inputStream=Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);inputStream.init(inp);var results=inputStream.read(inputStream.available());return results;}catch(e){var msg=e.toString();if(e.name&&e.message){msg=e.name+": "+e.message;}
dojo.raise("dojo.storage.browser.FileStorageProvider._loadFileXPCOM(): "+msg);}
return null;},_saveFileActiveX:function(filename,value){try{var fileSystem=new ActiveXObject("Scripting.FileSystemObject");var f=fileSystem.OpenTextFile(filename,2,true);f.Write(value);f.Close();}catch(e){var msg=e.toString();if(e.name&&e.message){msg=e.name+": "+e.message;}
dojo.raise("dojo.storage.browser.FileStorageProvider._saveFileActiveX(): "+msg);}},_loadFileActiveX:function(filename){try{var fileSystem=new ActiveXObject("Scripting.FileSystemObject");if(fileSystem.FileExists(filename)==false){return null;}
var f=fileSystem.OpenTextFile(filename,1);var results=f.ReadAll();f.Close();return results;}catch(e){var msg=e.toString();if(e.name&&e.message){msg=e.name+": "+e.message;}
dojo.raise("dojo.storage.browser.FileStorageProvider._loadFileActiveX(): "+msg);}},_saveFileJava:function(filename,value){try{var applet=dojo.byId(dojo.storage.browser.FileStorageProvider._APPLET_ID);applet.save(filename,value);}catch(e){var msg=e.toString();if(e.name&&e.message){msg=e.name+": "+e.message;}
dojo.raise("dojo.storage.browser.FileStorageProvider._saveFileJava(): "+msg);}},_loadFileJava:function(filename){try{var applet=dojo.byId(dojo.storage.browser.FileStorageProvider._APPLET_ID);var results=applet.load(filename);return results;}catch(e){var msg=e.toString();if(e.name&&e.message){msg=e.name+": "+e.message;}
dojo.raise("dojo.storage.browser.FileStorageProvider._loadFileJava(): "+msg);}},_isAvailableActiveX:function(){try{if(window.ActiveXObject){var fileSystem=new window.ActiveXObject("Scripting.FileSystemObject");return true;}}catch(e){dojo.debug(e);}
return false;},_isAvailableXPCOM:function(){try{if(window.Components){netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);return true;}}catch(e){dojo.debug(e);}
return false;},_isAvailableJava:function(){try{if(dojo.render.html.safari==true||dojo.render.html.opera==true()){if(navigator.javaEnabled()==true){return true;}}}catch(e){dojo.debug(e);}
return false;},_getPagePath:function(){var path=window.location.pathname;if(/\.html?$/i.test(path)){path=path.replace(/(?:\/|\\)?[^\.\/\\]*\.html?$/,"");}
if(/^\/?[a-z]+\:/i.test(path)){path=path.replace(/^\/?/,"");path=path.replace(/\//g,"\\");}else if(/^[\/\\]{2,3}[^\/]/.test(path)){path=path.replace(/^[\/\\]{2,3}/,"");path=path.replace(/\//g,"\\");path="\\\\"+path;}
if(/\/$/.test(path)==false&&/\\$/.test(path)==false){if(/\//.test(path)){path+="/";}else{path+="\\";}}
path=unescape(path);return path;},_removeXPCOM:function(filename){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var f=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);f.initWithPath(filename);if(f.exists()==false||f.isDirectory()){return;}
if(f.isFile()){f.remove(false);}}catch(e){dojo.raise("dojo.storage.browser.FileStorageProvider.remove(): "+e.toString());}},_removeActiveX:function(filename){try{var fileSystem=new ActiveXObject("Scripting.FileSystemObject");fileSystem.DeleteFile(filename);}catch(e){dojo.raise("dojo.storage.browser.FileStorageProvider.remove(): "+e.toString());}},_removeJava:function(filename){try{var applet=dojo.byId(dojo.storage.browser.FileStorageProvider._APPLET_ID);applet.remove(filename);}catch(e){var msg=e.toString();if(e.name&&e.message){msg=e.name+": "+e.message;}
dojo.raise("dojo.storage.browser.FileStorageProvider._removeJava(): "+msg);}},_writeApplet:function(){var archive=dojo.uri.moduleUri("dojo","../DojoFileStorageProvider.jar").toString();var tag="<applet "
+"id='"+dojo.storage.browser.FileStorageProvider._APPLET_ID+"' "
+"style='position: absolute; top: -500px; left: -500px; width: 1px; height: 1px;' "
+"code='DojoFileStorageProvider.class' "
+"archive='"+archive+"' "
+"width='1' "
+"height='1' "
+">"
+"</applet>";document.writeln(tag);}});dojo.storage.browser.WhatWGStorageProvider=function(){}
dojo.inherits(dojo.storage.browser.WhatWGStorageProvider,dojo.storage);dojo.lang.extend(dojo.storage.browser.WhatWGStorageProvider,{namespace:"default",initialized:false,_domain:null,_available:null,_statusHandler:null,initialize:function(){if(djConfig["disableWhatWGStorage"]==true){return;}
this._domain=location.hostname;this.initialized=true;dojo.storage.manager.loaded();},isAvailable:function(){try{var myStorage=globalStorage[location.hostname];}catch(e){this._available=false;return this._available;}
this._available=true;return this._available;},put:function(key,value,resultsHandler){if(this.isValidKey(key)==false){dojo.raise("Invalid key given: "+key);}
this._statusHandler=resultsHandler;if(dojo.lang.isString(value)){value="string:"+value;}else{value=dojo.json.serialize(value);}
window.addEventListener("storage",function(evt){resultsHandler.call(null,dojo.storage.SUCCESS,key);},false);try{var myStorage=globalStorage[this._domain];myStorage.setItem(key,value);}catch(e){this._statusHandler.call(null,dojo.storage.FAILED,key,e.toString());}},get:function(key){if(this.isValidKey(key)==false){dojo.raise("Invalid key given: "+key);}
var myStorage=globalStorage[this._domain];var results=myStorage.getItem(key);if(results==null){return null;}
results=results.value;if(!dojo.lang.isUndefined(results)&&results!=null&&/^string:/.test(results)){results=results.substring("string:".length);}else{results=dojo.json.evalJson(results);}
return results;},getKeys:function(){var myStorage=globalStorage[this._domain];var keysArray=new Array();for(i=0;i<myStorage.length;i++){keysArray[i]=myStorage.key(i);}
return keysArray;},clear:function(){var myStorage=globalStorage[this._domain];var keys=new Array();for(var i=0;i<myStorage.length;i++){keys[keys.length]=myStorage.key(i);}
for(var i=0;i<keys.length;i++){myStorage.removeItem(keys[i]);}},remove:function(key){var myStorage=globalStorage[this._domain];myStorage.removeItem(key);},isPermanent:function(){return true;},getMaximumSize:function(){return dojo.storage.SIZE_NO_LIMIT;},hasSettingsUI:function(){return false;},showSettingsUI:function(){dojo.raise(this.getType()+" does not support a storage settings user-interface");},hideSettingsUI:function(){dojo.raise(this.getType()+" does not support a storage settings user-interface");},getType:function(){return"dojo.storage.browser.WhatWGProvider";}});dojo.storage.browser.FlashStorageProvider=function(){}
dojo.inherits(dojo.storage.browser.FlashStorageProvider,dojo.storage);dojo.lang.extend(dojo.storage.browser.FlashStorageProvider,{namespace:"default",initialized:false,_available:null,_statusHandler:null,initialize:function(){if(djConfig["disableFlashStorage"]==true){return;}
var loadedListener=function(){dojo.storage._flashLoaded();}
dojo.flash.addLoadedListener(loadedListener);var swfloc6=dojo.uri.moduleUri("dojo","../Storage_version6.swf").toString();var swfloc8=dojo.uri.moduleUri("dojo","../Storage_version8.swf").toString();dojo.flash.setSwf({flash6:swfloc6,flash8:swfloc8,visible:false});},isAvailable:function(){if(djConfig["disableFlashStorage"]==true){this._available=false;}else{this._available=true;}
return this._available;},put:function(key,value,resultsHandler){if(this.isValidKey(key)==false){dojo.raise("Invalid key given: "+key);}
this._statusHandler=resultsHandler;if(dojo.lang.isString(value)){value="string:"+value;}else{value=dojo.json.serialize(value);}
dojo.flash.comm.put(key,value,this.namespace);},get:function(key){if(this.isValidKey(key)==false){dojo.raise("Invalid key given: "+key);}
var results=dojo.flash.comm.get(key,this.namespace);if(results==""){return null;}
if(!dojo.lang.isUndefined(results)&&results!=null&&/^string:/.test(results)){results=results.substring("string:".length);}else{results=dojo.json.evalJson(results);}
return results;},getKeys:function(){var results=dojo.flash.comm.getKeys(this.namespace);if(results==""){return[];}
return results.split(",");},clear:function(){dojo.flash.comm.clear(this.namespace);},remove:function(key){dojo.unimplemented("dojo.storage.browser.FlashStorageProvider.remove");},isPermanent:function(){return true;},getMaximumSize:function(){return dojo.storage.SIZE_NO_LIMIT;},hasSettingsUI:function(){return true;},showSettingsUI:function(){dojo.flash.comm.showSettings();dojo.flash.obj.setVisible(true);dojo.flash.obj.center();},hideSettingsUI:function(){dojo.flash.obj.setVisible(false);if(dojo.storage.onHideSettingsUI!=null&&!dojo.lang.isUndefined(dojo.storage.onHideSettingsUI)){dojo.storage.onHideSettingsUI.call(null);}},getType:function(){return"dojo.storage.browser.FlashStorageProvider";},_flashLoaded:function(){this._initialized=true;dojo.storage.manager.loaded();},_onStatus:function(statusResult,key){var ds=dojo.storage;var dfo=dojo.flash.obj;if(statusResult==ds.PENDING){dfo.center();dfo.setVisible(true);}else{dfo.setVisible(false);}
if((!dj_undef("_statusHandler",ds))&&(ds._statusHandler!=null)){ds._statusHandler.call(null,statusResult,key);}}});dojo.storage.manager.register("dojo.storage.browser.FileStorageProvider",new dojo.storage.browser.FileStorageProvider());dojo.storage.manager.register("dojo.storage.browser.WhatWGStorageProvider",new dojo.storage.browser.WhatWGStorageProvider());dojo.storage.manager.register("dojo.storage.browser.FlashStorageProvider",new dojo.storage.browser.FlashStorageProvider());dojo.storage.manager.initialize();dojo.kwCompoundRequire({common:["dojo.storage"],browser:["dojo.storage.browser"]});dojo.provide("dojo.storage.*");var TridentFix=new Class({tridentFix:function(item){item.addEvents({'mouseover':function(){this.addClass('iehover');},'mouseout':function(){this.removeClass('iehover');}});}});var DropMenu=new Class({Implements:[Options,TridentFix],options:{mode:'horizontal'},menu:null,initialize:function(menu,options){if(options)this.setOptions(options);this.menu=$(menu);var children=this.menu.getChildren();children.each(function(item,index){var fChild,list;fChild=item.getFirst();list=fChild.getNext('ul');if(Browser.Engine.trident)this.tridentFix(item);if(list){item.mel=list;list.pel=item;new SubMenu(list);}},this);}});var SubMenu=new Class({Implements:[Options,TridentFix],options:{mode:'vertical'},menu:null,depth:0,initialize:function(el,depth,options){if(options)this.setOptions(options);if(depth)this.depth=depth;this.menu=el;if(this.depth==0)this.menu.addClass('submenu');if(this.depth>=1)this.menu.addClass('sub_submenu');this.menu.fade('hide');this.menu.pel.addEvents(this.parentEvents);var children=this.menu.getChildren();children.each(function(item,index){var fChild,list;fChild=item.getFirst();list=fChild.getNext('ul');if(Browser.Engine.trident)this.tridentFix(item);if(list){var count=new Element('span').set('html','\&raquo;').addClass('counter');item.adopt(count);count.fade('hide');item.mel=list;item.count=count;list.pel=item;new SubMenu(list,this.depth+1);}},this);},parentEvents:{'mouseover':function(){if(this.count)this.count.fade('in');this.mel.fade('in');},'mouseout':function(){if(this.count)this.count.fade('out');this.mel.fade('out');}}});var DumpIt=function(){var theDump=sortIt.serialize();$('debug').set('html',JSON.encode(theDump));};var prepareFactoryForm=function(){if(currentOpenId!=null){saveOptions(currentOpenId);}
var theDump=sortIt.serialize();$('chain').value=JSON.encode(theDump);$('options').value=JSON.encode(optionsForm);};var postForm=function(e){new Event(e).stop();prepareFactoryForm();$('submitFactory').setProperty('disabled','disabled');$('submitFactory').setProperty('value','Processing...');$('factoryForm').submit();};var GetItForm=function(){$('debug').set('html',"getItForm"+$('chain').value+" ---- "+$('options').value);};var InsertIt=function(){var li=new Element('li').setProperty('id',$('id').value).appendText($('text').value).injectInside($('example'));};var LockIt=function(){sortIt.options.lock=($('locking').value.length==0)?null:$('locking').value;};var sortIt;var openedId=[];var currentOpenId=null;var showOptions=function(moduleId,id){if(currentOpenId!=null){saveOptions(currentOpenId);$('mark_'+currentOpenId).className='';}
currentOpenId=id;$('mark_'+currentOpenId).className='chainMarker';if(openedId[id]){openedId[id]=false;$('opt').innerHTML=optionsHtml[moduleId];if(populateOldData&&id<=oldDataLength){addSavedOptions(id);}else{addInitialOptionsRow(id,moduleId);}}else{$('opt').innerHTML=options[id].options;var f=$('ze_form');for(var i=0;i<f.elements.length;i++){objTemp=f.elements[i];if(objTemp.name=='field[]'){var target=objTemp.getNext();$('debug').set('html',target.value);if(target.value.length>0){objTemp.setProperty('value',target.value);}}
if(objTemp.name=='truncate'){var target=objTemp.getNext();$('debug').set('html',target.value);if(target.value.length>0){objTemp.setProperty('value',target.value);}}}}};var saveOptions=function(id){optionsForm[id].options=$('ze_form').toQueryString();options[id].options=$('opt').innerHTML;$('debug').set('html',"saveOptions: "+options[id].options);};var highestId=1;var addModule=function(moduleId){openedId[highestId]=true;var id=highestId
highestId++;options[id]={moduleId:moduleId,options:''};optionsForm[id]={moduleId:moduleId};var text="<span id=\"mark_"+id+"\">"+moduleMap[moduleId]+" <a href=\"#\" onclick=\"showOptions('"+moduleId+"','"+id+"'); return false;\">options</a></span>";var li=new Element('li').setProperty('id','e_'+id).set('html',text).injectInside($('example'));};var loadRowHtml=function(moduleIndex,id){var html=optionsRowHtml[moduleIndex];if(moduleIndex=='1'){html=sprintf(html,'','');}
if(moduleIndex=='2'){html=sprintf(html,'10');}
if(moduleIndex=='3'){html=sprintf(html,'',id,'',id,'0');}
return html;}
var optionsRowHtml={'1':'<a href="#" onclick="deleteMe(this); return false;">[x]</a> <input type="text" name="field[]" value="%s" onkeyup="setValue(this); return false;" /><input type="hidden" name="realvalue[]" value="%s"/>','2':'<select name="truncate" onchange="setSelect(this,selectedIndex); return false;"><option value="5">5</option><option value="10">10</option><option value="25">25</option><option value="50">50</option></select><input type="hidden" name="realvalue[0]" value="%s"/>','3':'<a href="#" onclick="deleteMe(this); return false;">[x]</a> <input type="text" name="field[]" value="%s" onkeyup="setValue(this); return false;" /><input type="hidden" name="realvalue[%s][sort]" value="%s"/> in <select name="truncate" onchange="setSelect(this,selectedIndex); return false;"><option value="0">ascending</option><option value="1">descending</option></select><input type="hidden" name="realvalue[%s][truncate]" value="%s" /> order'};var addOptionsRow=function(el,id,module){var target=el.getNext();var row=el.getPrevious();var nextIndex=row.value++;$('debug').set('html',"loading module: "+module+"nextIndex: "+nextIndex);var text=loadRowHtml(module,nextIndex);var li=new Element('div').setProperty('id','e_'+id).set('html',text).injectInside(target);};var addInitialOptionsRow=function(id,module){var target=$('options_rows');var row=target.getPrevious().getPrevious();var nextIndex=row.value++;$('debug').set('html',"loading module: "+module+"nextIndex: "+nextIndex);var text=loadRowHtml(module,nextIndex);var li=new Element('div').setProperty('id','e_'+id).set('html',text).injectInside(target);};var addSavedOptions=function(id,module){var target=$('options_rows');var moduleIndex=optionsDb[id]['moduleId'];var moduleOptions=optionsDb[id]['options'];for(var j=0;j<moduleOptions.length;j++){var row=target.getPrevious().getPrevious();var id=row.value++;var html=optionsRowHtml[moduleIndex];if(moduleIndex=='1'){var value=moduleOptions[j];html=sprintf(html,value,value);}
if(moduleIndex=='2'){var value=moduleOptions[j];html=sprintf(html,value);}
if(moduleIndex=='3'){var sort=moduleOptions[j]['sort'];var truncate=moduleOptions[j]['truncate'];html=sprintf(html,sort,id,sort,id,truncate);}
var text=html;var li=new Element('div').set('html',text).injectInside(target);if(moduleIndex=='2'){var el=li.getChildren()[0];setSelect(el,value,true);}
if(moduleIndex=='3'){var el=li.getChildren()[3];setSelect(el,truncate);}}};var recordNewItem=function(id){options[id]={moduleId:id,options:''};optionsForm[id]={moduleId:id};}
var recordNewItemWithData=function(id){options[id]={moduleId:id,options:''};}
var getHighestId=function(){id=highestId;highestId++;return id;}
var setupOldTree=function(tree){var counter=0;var prevDepth=0;var curEl=$('example');var maxDepth=0;for(var i=0;i<oldTree.length;i++){var depth=oldTree[i][0];if(depth>maxDepth){maxDepth=depth;}}
for(var i=0;i<oldTree.length;i++){openedId[highestId]=true;var depth=oldTree[i][0];var id=getHighestId();if(counter>0){var tmpId=id-1;curEl=$('e_'+tmpId);}
var moduleId=oldTree[i][1];recordNewItemWithData(id);var tmpId=depth;if(counter>0&&depth>prevDepth){curEl=new Element('ol').setProperty('id','d_'+tmpId).injectInside(curEl);}
var text="<span id=\"mark_"+id+"\">"+moduleMap[moduleId]+" <a href=\"#\" onclick=\"showOptions('"+moduleId+"','"+id+"'); return false;\">options</a></span>";if(counter>0&&prevDepth==depth){curEl=new Element('li').setProperty('id','e_'+id).set('html',text).injectAfter(curEl);}else{if(depth<prevDepth){var tmpId=depth;if(counter>0&&depth!=0){curEl=$('d_'+tmpId);}else{curEl=$('example');}}
curEl=new Element('li').setProperty('id','e_'+id).set('html',text).injectInside(curEl);}
prevDepth=depth;counter++;}};var setupOldPage=function(start,_tree,type){var prevDepth=0;var curEl=$(start);var maxDepth=0;var prefix='e_';var counter=0;for(var i=0;i<_tree.length;i++){var depth=_tree[i][0];if(depth>maxDepth){maxDepth=depth;}}
for(var i=0;i<_tree.length;i++){openedId[highestId]=true;var depth=_tree[i][0];var page_id=_tree[i][1];var page_title=_tree[i][2];var page_id=_tree[i][1];var id=getHighestId();if(type=='create'){var text="<span id=\"mark_"+page_id+"\">"+page_title;+"</span>";}
if(type=='user'){var text="<a href=\"/page/"+page_id+"\">"+page_title;+"</a>";}
if(counter>0){curEl=$(prefix+_tree[i-1][1]);if(depth>prevDepth){curEl=new Element('ol').setProperty('id',prefix+depth).injectInside(curEl);}}
if(counter>0&&prevDepth==depth){curEl=new Element('li').setProperty('id',prefix+page_id).set('html',text).injectAfter(curEl);}else{if(depth<prevDepth){if(counter>0&&depth!=0){curEl=$(prefix+prevPage);curEl=new Element('li').setProperty('id',prefix+page_id).set('html',text).injectAfter(curEl);}else{curEl=$(start);curEl=new Element('li').setProperty('id',prefix+page_id).set('html',text).injectInside(curEl);}}
curEl=new Element('li').setProperty('id',prefix+page_id).set('html',text).injectInside(curEl);}
prevDepth=depth;prevPage=page_id;counter++;}};var deleteMe=function(el){var parent=el.getParent();el.dispose();parent.dispose();};var selectStatus=function(){alert($('opt').innerHTML);};var truncateMap={'5':'0','10':'1','25':'2','50':'3'};var setSelect=function(el,index,lookup){if(lookup==true){index=truncateMap[index];}
for(var i=0;i<el.options.length;i++){el.options[i].removeProperty('selected');}
el.options[index].setProperty('selected',true);var realInput=el.getNext();$('debug').set('html',"setSelect() index: "+index+" value: "+el.options[index].value);realInput.value=el.options[index].value;};var setValue=function(el){var target=el.getNext();target.setProperty('value',el.value);};function sprintf()
{if(!arguments||arguments.length<1||!RegExp)
{return;}
var str=arguments[0];var re=/([^%]*)%('.|0|\x20)?(-)?(\d+)?(\.\d+)?(%|b|c|d|u|f|o|s|x|X)(.*)/;var a=b=[],numSubstitutions=0,numMatches=0;while(a=re.exec(str))
{var leftpart=a[1],pPad=a[2],pJustify=a[3],pMinLength=a[4];var pPrecision=a[5],pType=a[6],rightPart=a[7];numMatches++;if(pType=='%')
{subst='%';}
else
{numSubstitutions++;if(numSubstitutions>=arguments.length)
{alert('Error! Not enough function arguments ('+(arguments.length-1)+', excluding the string)\nfor the number of substitution parameters in string ('+numSubstitutions+' so far).');}
var param=arguments[numSubstitutions];var pad='';if(pPad&&pPad.substr(0,1)=="'")pad=leftpart.substr(1,1);else if(pPad)pad=pPad;var justifyRight=true;if(pJustify&&pJustify==="-")justifyRight=false;var minLength=-1;if(pMinLength)minLength=parseInt(pMinLength);var precision=-1;if(pPrecision&&pType=='f')precision=parseInt(pPrecision.substring(1));var subst=param;if(pType=='b')subst=parseInt(param).toString(2);else if(pType=='c')subst=String.fromCharCode(parseInt(param));else if(pType=='d')subst=parseInt(param)?parseInt(param):0;else if(pType=='u')subst=Math.abs(param);else if(pType=='f')subst=(precision>-1)?Math.round(parseFloat(param)*Math.pow(10,precision))/Math.pow(10,precision):parseFloat(param);else if(pType=='o')subst=parseInt(param).toString(8);else if(pType=='s')subst=param;else if(pType=='x')subst=(''+parseInt(param).toString(16)).toLowerCase();else if(pType=='X')subst=(''+parseInt(param).toString(16)).toUpperCase();}
str=leftpart+subst+rightPart;}
return str;}
var MooSelectors={version:'1.1-jussi-updated-for-mootools-1.2-conflicts-with-dojo',start:function(rules){this.assign(rules);},assign:function(rules,filter){var cache={};$each(rules,function(rule,key){key.clean().split(',').each(function(selector){var pair=selector.split('::');var sel=pair[0];var type=pair[1]||false;if(!cache[sel])cache[sel]=document.getElements(sel,filter);if(!cache[sel].length)return;if(type=='*'){rule(cache[sel]);}else{cache[sel].each(function(element){if(!type){rule(element);}else{var evt=function(event,element){return rule(element,event);}
element.addEvent(type,evt.bindWithEvent(element,[element]));}});}});});}}
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 x=6(){7 1D="2.0.2";7 C=/\\s*,\\s*/;7 x=6(s,A){33{7 m=[];7 u=1z.32.2c&&!A;7 b=(A)?(A.31==22)?A:[A]:[1g];7 1E=18(s).1l(C),i;9(i=0;i<1E.y;i++){s=1y(1E[i]);8(U&&s.Z(0,3).2b("")==" *#"){s=s.Z(2);A=24([],b,s[1])}1A A=b;7 j=0,t,f,a,c="";H(j<s.y){t=s[j++];f=s[j++];c+=t+f;a="";8(s[j]=="("){H(s[j++]!=")")a+=s[j];a=a.Z(0,-1);c+="("+a+")"}A=(u&&V[c])?V[c]:21(A,t,f,a);8(u)V[c]=A}m=m.30(A)}2a x.2d;5 m}2Z(e){x.2d=e;5[]}};x.1Z=6(){5"6 x() {\\n  [1D "+1D+"]\\n}"};7 V={};x.2c=L;x.2Y=6(s){8(s){s=1y(s).2b("");2a V[s]}1A V={}};7 29={};7 19=L;x.15=6(n,s){8(19)1i("s="+1U(s));29[n]=12 s()};x.2X=6(c){5 c?1i(c):o};7 D={};7 h={};7 q={P:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};7 T=[];D[" "]=6(r,f,t,n){7 e,i,j;9(i=0;i<f.y;i++){7 s=X(f[i],t,n);9(j=0;(e=s[j]);j++){8(M(e)&&14(e,n))r.z(e)}}};D["#"]=6(r,f,i){7 e,j;9(j=0;(e=f[j]);j++)8(e.B==i)r.z(e)};D["."]=6(r,f,c){c=12 1t("(^|\\\\s)"+c+"(\\\\s|$)");7 e,i;9(i=0;(e=f[i]);i++)8(c.l(e.1V))r.z(e)};D[":"]=6(r,f,p,a){7 t=h[p],e,i;8(t)9(i=0;(e=f[i]);i++)8(t(e,a))r.z(e)};h["2W"]=6(e){7 d=Q(e);8(d.1C)9(7 i=0;i<d.1C.y;i++){8(d.1C[i]==e)5 K}};h["2V"]=6(e){};7 M=6(e){5(e&&e.1c==1&&e.1f!="!")?e:23};7 16=6(e){H(e&&(e=e.2U)&&!M(e))28;5 e};7 G=6(e){H(e&&(e=e.2T)&&!M(e))28;5 e};7 1r=6(e){5 M(e.27)||G(e.27)};7 1P=6(e){5 M(e.26)||16(e.26)};7 1o=6(e){7 c=[];e=1r(e);H(e){c.z(e);e=G(e)}5 c};7 U=K;7 1h=6(e){7 d=Q(e);5(2S d.25=="2R")?/\\.1J$/i.l(d.2Q):2P(d.25=="2O 2N")};7 Q=6(e){5 e.2M||e.1g};7 X=6(e,t){5(t=="*"&&e.1B)?e.1B:e.X(t)};7 17=6(e,t,n){8(t=="*")5 M(e);8(!14(e,n))5 L;8(!1h(e))t=t.2L();5 e.1f==t};7 14=6(e,n){5!n||(n=="*")||(e.2K==n)};7 1e=6(e){5 e.1G};6 24(r,f,B){7 m,i,j;9(i=0;i<f.y;i++){8(m=f[i].1B.2J(B)){8(m.B==B)r.z(m);1A 8(m.y!=23){9(j=0;j<m.y;j++){8(m[j].B==B)r.z(m[j])}}}}5 r};8(![].z)22.2I.z=6(){9(7 i=0;i<1z.y;i++){o[o.y]=1z[i]}5 o.y};7 N=/\\|/;6 21(A,t,f,a){8(N.l(f)){f=f.1l(N);a=f[0];f=f[1]}7 r=[];8(D[t]){D[t](r,A,f,a)}5 r};7 S=/^[^\\s>+~]/;7 20=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;6 1y(s){8(S.l(s))s=" "+s;5 s.P(20)||[]};7 W=/\\s*([\\s>+~(),]|^|$)\\s*/g;7 I=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;7 18=6(s){5 s.O(W,"$1").O(I,"$1*$2")};7 1u={1Z:6(){5"\'"},P:/^(\'[^\']*\')|("[^"]*")$/,l:6(s){5 o.P.l(s)},1S:6(s){5 o.l(s)?s:o+s+o},1Y:6(s){5 o.l(s)?s.Z(1,-1):s}};7 1s=6(t){5 1u.1Y(t)};7 E=/([\\/()[\\]?{}|*+-])/g;6 R(s){5 s.O(E,"\\\\$1")};x.15("1j-2H",6(){D[">"]=6(r,f,t,n){7 e,i,j;9(i=0;i<f.y;i++){7 s=1o(f[i]);9(j=0;(e=s[j]);j++)8(17(e,t,n))r.z(e)}};D["+"]=6(r,f,t,n){9(7 i=0;i<f.y;i++){7 e=G(f[i]);8(e&&17(e,t,n))r.z(e)}};D["@"]=6(r,f,a){7 t=T[a].l;7 e,i;9(i=0;(e=f[i]);i++)8(t(e))r.z(e)};h["2G-10"]=6(e){5!16(e)};h["1x"]=6(e,c){c=12 1t("^"+c,"i");H(e&&!e.13("1x"))e=e.1n;5 e&&c.l(e.13("1x"))};q.1X=/\\\\:/g;q.1w="@";q.J={};q.O=6(m,a,n,c,v){7 k=o.1w+m;8(!T[k]){a=o.1W(a,c||"",v||"");T[k]=a;T.z(a)}5 T[k].B};q.1Q=6(s){s=s.O(o.1X,"|");7 m;H(m=s.P(o.P)){7 r=o.O(m[0],m[1],m[2],m[3],m[4]);s=s.O(o.P,r)}5 s};q.1W=6(p,t,v){7 a={};a.B=o.1w+T.y;a.2F=p;t=o.J[t];t=t?t(o.13(p),1s(v)):L;a.l=12 2E("e","5 "+t);5 a};q.13=6(n){1d(n.2D()){F"B":5"e.B";F"2C":5"e.1V";F"9":5"e.2B";F"1T":8(U){5"1U((e.2A.P(/1T=\\\\1v?([^\\\\s\\\\1v]*)\\\\1v?/)||[])[1]||\'\')"}}5"e.13(\'"+n.O(N,":")+"\')"};q.J[""]=6(a){5 a};q.J["="]=6(a,v){5 a+"=="+1u.1S(v)};q.J["~="]=6(a,v){5"/(^| )"+R(v)+"( |$)/.l("+a+")"};q.J["|="]=6(a,v){5"/^"+R(v)+"(-|$)/.l("+a+")"};7 1R=18;18=6(s){5 1R(q.1Q(s))}});x.15("1j-2z",6(){D["~"]=6(r,f,t,n){7 e,i;9(i=0;(e=f[i]);i++){H(e=G(e)){8(17(e,t,n))r.z(e)}}};h["2y"]=6(e,t){t=12 1t(R(1s(t)));5 t.l(1e(e))};h["2x"]=6(e){5 e==Q(e).1H};h["2w"]=6(e){7 n,i;9(i=0;(n=e.1F[i]);i++){8(M(n)||n.1c==3)5 L}5 K};h["1N-10"]=6(e){5!G(e)};h["2v-10"]=6(e){e=e.1n;5 1r(e)==1P(e)};h["2u"]=6(e,s){7 n=x(s,Q(e));9(7 i=0;i<n.y;i++){8(n[i]==e)5 L}5 K};h["1O-10"]=6(e,a){5 1p(e,a,16)};h["1O-1N-10"]=6(e,a){5 1p(e,a,G)};h["2t"]=6(e){5 e.B==2s.2r.Z(1)};h["1M"]=6(e){5 e.1M};h["2q"]=6(e){5 e.1q===L};h["1q"]=6(e){5 e.1q};h["1L"]=6(e){5 e.1L};q.J["^="]=6(a,v){5"/^"+R(v)+"/.l("+a+")"};q.J["$="]=6(a,v){5"/"+R(v)+"$/.l("+a+")"};q.J["*="]=6(a,v){5"/"+R(v)+"/.l("+a+")"};6 1p(e,a,t){1d(a){F"n":5 K;F"2p":a="2n";1a;F"2o":a="2n+1"}7 1m=1o(e.1n);6 1k(i){7 i=(t==G)?1m.y-i:i-1;5 1m[i]==e};8(!Y(a))5 1k(a);a=a.1l("n");7 m=1K(a[0]);7 s=1K(a[1]);8((Y(m)||m==1)&&s==0)5 K;8(m==0&&!Y(s))5 1k(s);8(Y(s))s=0;7 c=1;H(e=t(e))c++;8(Y(m)||m==1)5(t==G)?(c<=s):(s>=c);5(c%m)==s}});x.15("1j-2m",6(){U=1i("L;/*@2l@8(@\\2k)U=K@2j@*/");8(!U){X=6(e,t,n){5 n?e.2i("*",t):e.X(t)};14=6(e,n){5!n||(n=="*")||(e.2h==n)};1h=1g.1I?6(e){5/1J/i.l(Q(e).1I)}:6(e){5 Q(e).1H.1f!="2g"};1e=6(e){5 e.2f||e.1G||1b(e)};6 1b(e){7 t="",n,i;9(i=0;(n=e.1F[i]);i++){1d(n.1c){F 11:F 1:t+=1b(n);1a;F 3:t+=n.2e;1a}}5 t}}});19=K;5 x}();',62,190,'|||||return|function|var|if|for||||||||pseudoClasses||||test|||this||AttributeSelector|||||||cssQuery|length|push|fr|id||selectors||case|nextElementSibling|while||tests|true|false|thisElement||replace|match|getDocument|regEscape||attributeSelectors|isMSIE|cache||getElementsByTagName|isNaN|slice|child||new|getAttribute|compareNamespace|addModule|previousElementSibling|compareTagName|parseSelector|loaded|break|_0|nodeType|switch|getTextContent|tagName|document|isXML|eval|css|_1|split|ch|parentNode|childElements|nthChild|disabled|firstElementChild|getText|RegExp|Quote|x22|PREFIX|lang|_2|arguments|else|all|links|version|se|childNodes|innerText|documentElement|contentType|xml|parseInt|indeterminate|checked|last|nth|lastElementChild|parse|_3|add|href|String|className|create|NS_IE|remove|toString|ST|select|Array|null|_4|mimeType|lastChild|firstChild|continue|modules|delete|join|caching|error|nodeValue|textContent|HTML|prefix|getElementsByTagNameNS|end|x5fwin32|cc_on|standard||odd|even|enabled|hash|location|target|not|only|empty|root|contains|level3|outerHTML|htmlFor|class|toLowerCase|Function|name|first|level2|prototype|item|scopeName|toUpperCase|ownerDocument|Document|XML|Boolean|URL|unknown|typeof|nextSibling|previousSibling|visited|link|valueOf|clearCache|catch|concat|constructor|callee|try'.split('|'),0,{}))
var isReadingEvents=false;function embed_odeo(link){document.writeln('<embed src="http://odeo.com/flash/audio_player_fullsize.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" quality="high" width="440" height="80" wmode="transparent" allowScriptAccess="any" flashvars="valid_sample_rate=true&external_url='+link+'"></embed>');}
function embed_quicktime(type,bgcolor,width,height,link,placeholder,loop){if(placeholder!=''){document.writeln('<embed type="'+type+'" style="cursor:hand; cursor:pointer;" href="'+link+'" src="'+placeholder+'" width="'+width+'" height="'+height+'" autoplay="false" target="myself" controller="false" loop="'+loop+'" scale="aspect" bgcolor="'+bgcolor+'" pluginspage="http://www.apple.com/quicktime/download/"></embed>');}
else{document.writeln('<embed type="'+type+'" style="cursor:hand; cursor:pointer;" src="'+link+'" width="'+width+'" height="'+height+'" autoplay="false" target="myself" controller="true" loop="'+loop+'" scale="aspect" bgcolor="'+bgcolor+'" pluginspage="http://www.apple.com/quicktime/download/"></embed>');}}
function embed_flash(bgcolor,width,height,link,loop,type){document.writeln('<embed src="'+link+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="'+type+'" quality="high" width="'+width+'" height="'+height+'" bgcolor="'+bgcolor+'" loop="'+loop+'"></embed>');}
function embed_flv(width,height,link,placeholder,loop,player){document.writeln('<embed src="'+player+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" quality="high" width="'+width+'" height="'+height+'" wmode="transparent" flashvars="file='+link+'&autostart=false&repeat='+loop+'&showdigits=true&showfsbutton=false"></embed>');}
function embed_wmedia(width,height,link){document.writeln('<embed type="application/x-mplayer2" src="'+link+'" autosize="1" width="'+width+'" height="'+height+'" showcontrols="1" showstatusbar="0" showdisplay="0" autostart="0"></embed>');}
function removeElement(p,c){var d=document.getElementById(p);var olddiv=document.getElementById(c);d.removeChild(olddiv);}
function checkEnter(e){var characterCode;if(e&&e.which){e=e;characterCode=e.which;}else{e=event;characterCode=e.keyCode;}
if(characterCode==13){launchS($('search_type').value);return false;}else{return true;}}
function setupJS(){if(isGoodBrowser()){isReadingEvents=true;}}
var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";setupJS();},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(dataProp)
return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.vendor,subString:"KHTML",identity:"Firefox"},{string:navigator.vendor,subString:"KDE",identity:"Firefox"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Iceape",identity:"Firefox"},{string:navigator.userAgent,subString:"Iceweasel",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();function MultiSelector(list_target,max){this.list_target=list_target;this.count=0;this.id=0;if(max){this.max=max}else{this.max=-1};this.addElement=function(element){if(element.tagName=='INPUT'&&element.type=='text'){element.name='Feed'+this.id++;element.multi_selector=this;element.onchange=function(){if(!element.block){element.block=true;var new_element=document.createElement('input');new_element.type='text';new_element.style.width='450px';this.parentNode.insertBefore(new_element,this);this.multi_selector.addElement(new_element);this.multi_selector.addListRow(this);document.getElementById('files_list').style.display='block';this.style.position='absolute';this.style.left='-1000px'}};if(this.max!=-1&&this.count>=this.max){element.disabled=true};this.count++;this.current_element=element}else{alert('Error: not a file input element')}};this.addListRow=function(element){var new_row=document.createElement('div');var new_row_button=document.createElement('input');new_row_button.type='button';new_row_button.value=str_remove_file;new_row_button.style.border='none';new_row_button.style.color='red';new_row_button.style.fontSize='11px';new_row_button.style.background='transparent';new_row.element=element;new_row_button.onclick=function(){this.parentNode.element.parentNode.removeChild(this.parentNode.element);this.parentNode.parentNode.removeChild(this.parentNode);this.parentNode.element.multi_selector.count--;this.parentNode.element.multi_selector.current_element.disabled=false;return false};new_row.innerHTML=element.value;new_row.appendChild(new_row_button);this.list_target.appendChild(new_row)}};var onloads=new Array();function bodyOnLoad(){for(var i=0;i<onloads.length;i++)
onloads[i]();}
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}
function delete_cookie(cookie_name){var cookie_date=new Date();cookie_date.setTime(cookie_date.getTime()-1);document.cookie=cookie_name+="=; expires="+cookie_date.toGMTString();}
function set_cookie(name,value,exp_y,exp_m,exp_d,path,domain,secure){var cookie_string=name+"="+escape(value);if(exp_y){var expires=new Date(exp_y,exp_m,exp_d);cookie_string+="; expires="+expires.toGMTString();}
if(path)
cookie_string+="; path="+escape(path);if(domain)
cookie_string+="; domain="+escape(domain);if(secure)
cookie_string+="; secure";document.cookie=cookie_string;}
function reset_pages_cookie(){set_cookie("pages","",2003,1,1,"/","."+server_domain);removeElement('zone','anon_user');}
function isGoodBrowser(){var browser=BrowserDetect.browser;if(browser=='Safari'||browser=='Firefox'||browser=='MSIE'||browser=='Explorer'||browser=='Chrome'||browser=='Mozilla')
return true;else
return false;}
function flickrFeed(json){var photos=document.getElementById('photos');photos.innerHTML='';var items=json.items;var limit=n=items.length;if(photo_result_limit){limit=photo_result_limit;}
for(var i=0;i<limit;++i){var item=items[i];if(!item){continue;}
var div=document.createElement('div');div.innerHTML=['<div style="margin:4px; float:left">','<a href="',item.link,'" title="',item.title,'">','<img src="',item.media.m.replace('_m.jpg','_s.jpg'),'" border="0" />','</a>','</div>'].join('');photos.appendChild(div);}}
function loadJson(url){var script=document.createElement('script');script.type='text/javascript';script.src=url;document.getElementsByTagName('head')[0].appendChild(script);}
dojo.require("dojo.event.*");dojo.require("dojo.storage.*");var djConfig={isDebug:false};var read_items_left=0;var FRS={initialize:function(){colorWorld();},configure:function(evt){evt.preventDefault();evt.stopPropagation();if(dojo.storage.hasSettingsUI()){dojo.storage.showSettingsUI();}},clearState:function(){var self=this;try{dojo.storage.clear();}catch(exp){alert(exp);}
availableKeys=dojo.storage.getKeys();},syncState:function(){c=0;for(var key in read_items){if(c<500){FRS._save(key,read_items[key]);c++;}
else FRS.clearState();}
read_items_total=read_items_left=availableKeys=dojo.storage.getKeys();$('saving').innerHTML='';},_save:function(key,value){var self=this;var saveHandler=function(status,keyName){if(status==dojo.storage.PENDING){return;}
if(status==dojo.storage.FAILED){alert("You do not have permission to store data for this web site. "
+"Press the Configure button to grant permission.");}else if(status==dojo.storage.SUCCESS){}};try{dojo.storage.put(key,value,saveHandler);}catch(exp){alert(exp);}
values=key+'='+value+',';self._submit(urlencode(values));var saved_items=dojo.storage.get('saved_items');if(saved_items>500){var keep=50;var keep_items=new Array();for(var j=0;j<keep;j++){keep_items[j]=availableKeys[j];}
try{dojo.storage.clear();}catch(exp){alert(exp);}
for(var k=0;k<keep;k++)dojo.storage.put(keep_items[k],'ro',saveHandler);saved_items=keep;}},_submit:function(values){var pars=hash_cookie_name+'='+mcookie+'&values='+values;var url=reader_url;new Request({url:url,method:'post',data:pars}).send();}};function implode(glue,pieces){return((pieces instanceof Array)?pieces.join(glue):pieces);}
function urlencode(str){var histogram={},tmp_arr=[];var ret=str.toString();var replacer=function(search,replace,str){var tmp_arr=[];tmp_arr=str.split(search);return tmp_arr.join(replace);};histogram["'"]='%27';histogram['(']='%28';histogram[')']='%29';histogram['*']='%2A';histogram['~']='%7E';histogram['!']='%21';histogram['%20']='+';ret=encodeURIComponent(ret);for(search in histogram){replace=histogram[search];ret=replacer(search,replace,ret)}
return ret.replace(/(\%([a-z0-9]{2}))/g,function(full,m1,m2){return"%"+m2.toUpperCase();});return ret;}
function getElementsByClass(searchClass,node,tag){var classElements=new Array();if(node==null)
node=document;if(tag==null)
tag='*';var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp('(^|\\s)'+searchClass+'(\\s|$)');for(i=0,j=0;i<elsLen;i++){if(pattern.test(els[i].className)){classElements[j]=els[i];j++;}}
return classElements;}
colorWorld=function(){var styles=new Array();styles[0]='';test(styles[0],0);function test(style,s){var selector='.f-i li';var elements=cssQuery(selector);for(var i=s;i<elements.length;i++){var key=elements[i].id;var data=dojo.storage.get(key);if(data=='r'||data=='ro'){var curr_class=elements[i].className;if(curr_class==null){elements[i].className="bv";}else{elements[i].className=curr_class+" bv";}}
if(i%75==0&&i!=0){if(i!=s){window.setTimeout(function(){test(styles[0],i);},1000);break;}}}};};var displayBoxTime=0;var gameOn=false;var lohi;function diffBT(stat){var now=new Date();var diff=now-displayBoxTime;if(diff>450&&gameOn){if(dojo.storage.manager.isInitialized()){var old_item_data=dojo.storage.get(lohi);if(old_item_data==null){$(lohi).className='bv';FRS._save(lohi,'r');}}}
gameOn=stat;}
var spinner='<img src="/modpub/gfx/spinner.gif" style="border: none; padding-right: 5px; vertical-align: middle;" alt="processing" id="spinner"/>';function doSaveState(uid){if(uid>0){$('saving').className='saving_state';$('saving').innerHTML=saving_state_on_exit;if(dojo.storage.manager.isInitialized()){FRS.saveState(uid);}else{window.setTimeout(function(){doSaveState(uid);},250);}}}
function doClearState(){if(isGoodBrowser()){if(dojo.storage.manager.isInitialized()){FRS.clearState();}else{window.setTimeout('doClearState()',250);}}}
function checkState(){if(isGoodBrowser()){if(dojo.storage.manager.isInitialized()){var availableKeys=dojo.storage.getKeys();if(availableKeys.length>1000){FRS.clearState();}}}}
function doSyncState(){if(read_items_left==0){read_items_left=read_items_total;}
if(isGoodBrowser()){if(dojo.storage.manager.isInitialized()){var availableKeys=dojo.storage.getKeys();if(read_items_total>availableKeys.length||read_items_left>500){new Insertion.Bottom('saving','<span style="font-size: 17px; font-weight: bold;">Synchronizing</span><span style="font-size: 12px;"> read feed items. Just a moment...</span>');FRS.syncState();}}else{window.setTimeout('doSyncState()',250);}}}
if(dojo.storage.manager.isInitialized()==false){dojo.event.connect(dojo.storage.manager,"loaded",FRS,FRS.initialize);}else{dojo.event.connect(dojo,"loaded",FRS,FRS.initialize);}