
var MooTools={version:"1.2.5",build:"008d8f0f2fcc2044e54fdd3635341aaab274e757"};var Native=function(l){l=l||{};var a=l.name;var j=l.legacy;var b=l.protect;var c=l.implement;var i=l.generics;var g=l.initialize;var h=l.afterImplement||function(){};var d=g||j;i=i!==false;d.constructor=Native;d.$family={name:"native"};if(j&&g){d.prototype=j.prototype;}d.prototype.constructor=d;if(a){var f=a.toLowerCase();d.prototype.$family={name:f};Native.typize(d,f);}var k=function(o,m,p,n){if(!b||n||!o.prototype[m]){o.prototype[m]=p;}if(i){Native.genericize(o,m,b);}h.call(o,m,p);return o;};d.alias=function(o,m,q){if(typeof o=="string"){var p=this.prototype[o];if((o=p)){return k(this,m,o,q);}}for(var n in o){this.alias(n,o[n],m);}return this;};d.implement=function(n,m,q){if(typeof n=="string"){return k(this,n,m,q);}for(var o in n){k(this,o,n[o],m);}return this;};if(c){d.implement(c);}return d;};Native.genericize=function(b,c,a){if((!a||!b[c])&&typeof b.prototype[c]=="function"){b[c]=function(){var d=Array.prototype.slice.call(arguments);return b.prototype[c].apply(d.shift(),d);};}};Native.implement=function(d,c){for(var b=0,a=d.length;b<a;b++){d[b].implement(c);}};Native.typize=function(a,b){if(!a.type){a.type=function(c){return($type(c)===b);};}};(function(){var a={Array:Array,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String};for(var j in a){new Native({name:j,initialize:a[j],protect:true});}var d={"boolean":Boolean,"native":Native,object:Object};for(var c in d){Native.typize(d[c],c);}var h={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 f in h){for(var b=h[f].length;b--;){Native.genericize(a[f],h[f][b],true);}}})();var Hash=new Native({name:"Hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getClean());}for(var b in a){this[b]=a[b];}return this;}});Hash.implement({forEach:function(b,c){for(var a in this){if(this.hasOwnProperty(a)){b.call(c,this[a],a,this);}}},getClean:function(){var b={};for(var a in this){if(this.hasOwnProperty(a)){b[a]=this[a];}}return b;},getLength:function(){var b=0;for(var a in this){if(this.hasOwnProperty(a)){b++;}}return b;}});Hash.alias("forEach","each");Array.implement({forEach:function(c,d){for(var b=0,a=this.length;b<a;b++){c.call(d,this[b],b,this);}}});Array.alias("forEach","each");function $A(b){if(b.item){var a=b.length,c=new Array(a);while(a--){c[a]=b[a];}return c;}return Array.prototype.slice.call(b);}function $arguments(a){return function(){return arguments[a];};}function $chk(a){return !!(a||a===0);}function $clear(a){clearTimeout(a);clearInterval(a);return null;}function $defined(a){return(a!=undefined);}function $each(c,b,d){var a=$type(c);((a=="arguments"||a=="collection"||a=="array")?Array:Hash).each(c,b,d);}function $empty(){}function $extend(c,a){for(var b in (a||{})){c[b]=a[b];}return c;}function $H(a){return new Hash(a);}function $lambda(a){return($type(a)=="function")?a:function(){return a;};}function $merge(){var a=Array.slice(arguments);a.unshift({});return $mixin.apply(null,a);}function $mixin(f){for(var d=1,a=arguments.length;d<a;d++){var b=arguments[d];if($type(b)!="object"){continue;}for(var c in b){var h=b[c],g=f[c];f[c]=(g&&$type(h)=="object"&&$type(g)=="object")?$mixin(g,h):$unlink(h);}}return f;}function $pick(){for(var b=0,a=arguments.length;b<a;b++){if(arguments[b]!=undefined){return arguments[b];}}return null;}function $random(b,a){return Math.floor(Math.random()*(a-b+1)+b);}function $splat(b){var a=$type(b);return(a)?((a!="array"&&a!="arguments")?[b]:b):[];}var $time=Date.now||function(){return +new Date;};function $try(){for(var b=0,a=arguments.length;b<a;b++){try{return arguments[b]();}catch(c){}}return null;}function $type(a){if(a==undefined){return false;}if(a.$family){return(a.$family.name=="number"&&!isFinite(a))?false:a.$family.name;}if(a.nodeName){switch(a.nodeType){case 1:return"element";case 3:return(/\S/).test(a.nodeValue)?"textnode":"whitespace";}}else{if(typeof a.length=="number"){if(a.callee){return"arguments";}else{if(a.item){return"collection";}}}}return typeof a;}function $unlink(c){var b;switch($type(c)){case"object":b={};for(var f in c){b[f]=$unlink(c[f]);}break;case"hash":b=new Hash(c);break;case"array":b=[];for(var d=0,a=c.length;d<a;d++){b[d]=$unlink(c[d]);}break;default:return c;}return b;}Array.implement({every:function(c,d){for(var b=0,a=this.length;b<a;b++){if(!c.call(d,this[b],b,this)){return false;}}return true;},filter:function(d,f){var c=[];for(var b=0,a=this.length;b<a;b++){if(d.call(f,this[b],b,this)){c.push(this[b]);}}return c;},clean:function(){return this.filter($defined);},indexOf:function(c,d){var a=this.length;for(var b=(d<0)?Math.max(0,a+d):d||0;b<a;b++){if(this[b]===c){return b;}}return -1;},map:function(d,f){var c=[];for(var b=0,a=this.length;b<a;b++){c[b]=d.call(f,this[b],b,this);}return c;},some:function(c,d){for(var b=0,a=this.length;b<a;b++){if(c.call(d,this[b],b,this)){return true;}}return false;},associate:function(c){var d={},b=Math.min(this.length,c.length);for(var a=0;a<b;a++){d[c[a]]=this[a];}return d;},link:function(c){var a={};for(var f=0,b=this.length;f<b;f++){for(var d in c){if(c[d](this[f])){a[d]=this[f];delete c[d];break;}}}return a;},contains:function(a,b){return this.indexOf(a,b)!=-1;},extend:function(c){for(var b=0,a=c.length;b<a;b++){this.push(c[b]);}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(a){if(!this.contains(a)){this.push(a);}return this;},combine:function(c){for(var b=0,a=c.length;b<a;b++){this.include(c[b]);}return this;},erase:function(b){for(var a=this.length;a--;a){if(this[a]===b){this.splice(a,1);}}return this;},empty:function(){this.length=0;return this;},flatten:function(){var d=[];for(var b=0,a=this.length;b<a;b++){var c=$type(this[b]);if(!c){continue;}d=d.concat((c=="array"||c=="collection"||c=="arguments")?Array.flatten(this[b]):this[b]);}return d;},hexToRgb:function(b){if(this.length!=3){return null;}var a=this.map(function(c){if(c.length==1){c+=c;}return c.toInt(16);});return(b)?a:"rgb("+a+")";},rgbToHex:function(d){if(this.length<3){return null;}if(this.length==4&&this[3]==0&&!d){return"transparent";}var b=[];for(var a=0;a<3;a++){var c=(this[a]-0).toString(16);b.push((c.length==1)?"0"+c:c);}return(d)?b:"#"+b.join("");}});String.implement({test:function(a,b){return((typeof a=="string")?new RegExp(a,b):a).test(this);},contains:function(a,b){return(b)?(b+this+b).indexOf(b+a+b)>-1:this.indexOf(a)>-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(a){return a.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase());});},capitalize:function(){return this.replace(/\b[a-z]/g,function(a){return a.toUpperCase();});},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1");},toInt:function(a){return parseInt(this,a||10);},toFloat:function(){return parseFloat(this);},hexToRgb:function(b){var a=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(a)?a.slice(1).hexToRgb(b):null;},rgbToHex:function(b){var a=this.match(/\d{1,3}/g);return(a)?a.rgbToHex(b):null;},stripScripts:function(b){var a="";var c=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(){a+=arguments[1]+"\n";return"";});if(b===true){$exec(a);}else{if($type(b)=="function"){b(a,c);}}return c;},substitute:function(a,b){return this.replace(b||(/\\?\{([^{}]+)\}/g),function(d,c){if(d.charAt(0)=="\\"){return d.slice(1);}return(a[c]!=undefined)?a[c]:"";});}});try{delete Function.prototype.bind;}catch(e){}Function.implement({extend:function(a){for(var b in a){this[b]=a[b];}return this;},create:function(b){var a=this;b=b||{};return function(d){var c=b.arguments;c=(c!=undefined)?$splat(c):Array.slice(arguments,(b.event)?1:0);if(b.event){c=[d||window.event].extend(c);}var f=function(){return a.apply(b.bind||null,c);};if(b.delay){return setTimeout(f,b.delay);}if(b.periodical){return setInterval(f,b.periodical);}if(b.attempt){return $try(f);}return f();};},run:function(a,b){return this.apply(b,$splat(a));},pass:function(a,b){return this.create({bind:b,arguments:a});},bind:function(b,a){return this.create({bind:b,arguments:a});},bindWithEvent:function(b,a){return this.create({bind:b,arguments:a,event:true});},attempt:function(a,b){return this.create({bind:b,arguments:a,attempt:true})();},delay:function(b,c,a){return this.create({bind:c,arguments:a,delay:b})();},periodical:function(c,b,a){return this.create({bind:b,arguments:a,periodical:c})();}});Number.implement({limit:function(b,a){return Math.min(a,Math.max(b,this));},round:function(a){a=Math.pow(10,a||0);return Math.round(this*a)/a;},times:function(b,c){for(var a=0;a<this;a++){b.call(c,a,this);}},toFloat:function(){return parseFloat(this);},toInt:function(a){return parseInt(this,a||10);}});Number.alias("times","each");(function(b){var a={};b.each(function(c){if(!Number[c]){a[c]=function(){return Math[c].apply(null,[this].concat($A(arguments)));};}});Number.implement(a);})(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(b){for(var a in this){if(this.hasOwnProperty(a)&&this[a]===b){return a;}}return null;},hasValue:function(a){return(Hash.keyOf(this,a)!==null);},extend:function(a){Hash.each(a||{},function(c,b){Hash.set(this,b,c);},this);return this;},combine:function(a){Hash.each(a||{},function(c,b){Hash.include(this,b,c);},this);return this;},erase:function(a){if(this.hasOwnProperty(a)){delete this[a];}return this;},get:function(a){return(this.hasOwnProperty(a))?this[a]:null;},set:function(a,b){if(!this[a]||this.hasOwnProperty(a)){this[a]=b;}return this;},empty:function(){Hash.each(this,function(b,a){delete this[a];},this);return this;},include:function(a,b){if(this[a]==undefined){this[a]=b;}return this;},map:function(b,c){var a=new Hash;Hash.each(this,function(f,d){a.set(d,b.call(c,f,d,this));},this);return a;},filter:function(b,c){var a=new Hash;Hash.each(this,function(f,d){if(b.call(c,f,d,this)){a.set(d,f);}},this);return a;},every:function(b,c){for(var a in this){if(this.hasOwnProperty(a)&&!b.call(c,this[a],a)){return false;}}return true;},some:function(b,c){for(var a in this){if(this.hasOwnProperty(a)&&b.call(c,this[a],a)){return true;}}return false;},getKeys:function(){var a=[];Hash.each(this,function(c,b){a.push(b);});return a;},getValues:function(){var a=[];Hash.each(this,function(b){a.push(b);});return a;},toQueryString:function(a){var b=[];Hash.each(this,function(g,f){if(a){f=a+"["+f+"]";}var d;switch($type(g)){case"object":d=Hash.toQueryString(g,f);break;case"array":var c={};g.each(function(j,h){c[h]=j;});d=Hash.toQueryString(c,f);break;default:d=f+"="+encodeURIComponent(g);}if(g!=undefined){b.push(d);}});return b.join("&");}});Hash.alias({keyOf:"indexOf",hasValue:"contains"});function Class(b){if(b instanceof Function){b={initialize:b};}var a=function(){Object.reset(this);if(a._prototyping){return this;}this._current=$empty;var c=(this.initialize)?this.initialize.apply(this,arguments):this;delete this._current;delete this.caller;return c;}.extend(this);a.implement(b);a.constructor=Class;a.prototype.constructor=a;return a;}Function.prototype.protect=function(){this._protected=true;return this;};Object.reset=function(a,c){if(c==null){for(var f in a){Object.reset(a,f);}return a;}delete a[c];switch($type(a[c])){case"object":var d=function(){};d.prototype=a[c];var b=new d;a[c]=Object.reset(b);break;case"array":a[c]=$unlink(a[c]);break;}return a;};new Native({name:"Class",initialize:Class}).extend({instantiate:function(b){b._prototyping=true;var a=new b;delete b._prototyping;return a;},wrap:function(a,b,c){if(c._origin){c=c._origin;}return function(){if(c._protected&&this._current==null){throw new Error('The method "'+b+'" cannot be called.');}var f=this.caller,g=this._current;this.caller=g;this._current=arguments.callee;var d=c.apply(this,arguments);this._current=g;this.caller=f;return d;}.extend({_owner:a,_origin:c,_name:b});}});Class.implement({implement:function(a,d){if($type(a)=="object"){for(var f in a){this.implement(f,a[f]);}return this;}var g=Class.Mutators[a];if(g){d=g.call(this,d);if(d==null){return this;}}var c=this.prototype;switch($type(d)){case"function":if(d._hidden){return this;}c[a]=Class.wrap(this,a,d);break;case"object":var b=c[a];if($type(b)=="object"){$mixin(b,d);}else{c[a]=$unlink(d);}break;case"array":c[a]=$unlink(d);break;default:c[a]=d;}return this;}});Class.Mutators={Extends:function(a){this.parent=a;this.prototype=Class.instantiate(a);this.implement("parent",function(){var b=this.caller._name,c=this.caller._owner.parent.prototype[b];if(!c){throw new Error('The method "'+b+'" has no parent.');}return c.apply(this,arguments);}.protect());},Implements:function(a){$splat(a).each(function(b){if(b instanceof Function){b=Class.instantiate(b);}this.implement(b);},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(c,b,a){c=Events.removeOn(c);if(b!=$empty){this.$events[c]=this.$events[c]||[];this.$events[c].include(b);if(a){b.internal=true;}}return this;},addEvents:function(a){for(var b in a){this.addEvent(b,a[b]);}return this;},fireEvent:function(c,b,a){c=Events.removeOn(c);if(!this.$events||!this.$events[c]){return this;}this.$events[c].each(function(d){d.create({bind:this,delay:a,"arguments":b})();},this);return this;},removeEvent:function(b,a){b=Events.removeOn(b);if(!this.$events[b]){return this;}if(!a.internal){this.$events[b].erase(a);}return this;},removeEvents:function(c){var d;if($type(c)=="object"){for(d in c){this.removeEvent(d,c[d]);}return this;}if(c){c=Events.removeOn(c);}for(d in this.$events){if(c&&c!=d){continue;}var b=this.$events[d];for(var a=b.length;a--;a){this.removeEvent(d,b[a]);}}return this;}});Events.removeOn=function(a){return a.replace(/^on([A-Z])/,function(b,c){return c.toLowerCase();});};var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent){return this;}for(var a in this.options){if($type(this.options[a])!="function"||!(/^on[A-Z]/).test(a)){continue;}this.addEvent(a,this.options[a]);delete this.options[a];}return this;}});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)?((document.querySelectorAll)?6:5):4);},webkit:function(){return(navigator.taintEnabled)?false:((Browser.Features.xpath)?((Browser.Features.query)?525:420):419);},gecko:function(){return(!document.getBoxObjectFor&&window.mozInnerScreenX==null)?false:((document.getElementsByClassName)?19:18);}}},Browser||{});Browser.Platform[Browser.Platform.name]=true;Browser.detect=function(){for(var b in this.Engines){var a=this.Engines[b]();if(a){this.Engine={name:b,version:a};this.Engine[b]=this.Engine[b+a]=true;break;}}return{name:b,version:a};};Browser.detect();Browser.Request=function(){return $try(function(){return new XMLHttpRequest();},function(){return new ActiveXObject("MSXML2.XMLHTTP");},function(){return new ActiveXObject("Microsoft.XMLHTTP");});};Browser.Features.xhr=!!(Browser.Request());Browser.Plugins.Flash=(function(){var a=($try(function(){return navigator.plugins["Shockwave Flash"].description;},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version");})||"0 r0").match(/\d+/g);return{version:parseInt(a[0]||0+"."+a[1],10)||0,build:parseInt(a[2],10)||0};})();function $exec(b){if(!b){return b;}if(window.execScript){window.execScript(b);}else{var a=document.createElement("script");a.setAttribute("type","text/javascript");a[(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerText":"text"]=b;document.head.appendChild(a);document.head.removeChild(a);}return b;}Native.UID=1;var $uid=(Browser.Engine.trident)?function(a){return(a.uid||(a.uid=[Native.UID++]))[0];}:function(a){return a.uid||(a.uid=Native.UID++);};var Window=new Native({name:"Window",legacy:(Browser.Engine.trident)?null:window.Window,initialize:function(a){$uid(a);if(!a.Element){a.Element=$empty;if(Browser.Engine.webkit){a.document.createElement("iframe");}a.Element.prototype=(Browser.Engine.webkit)?window["[[DOMElement.prototype]]"]:{};}a.document.window=a;return $extend(a,Window.Prototype);},afterImplement:function(b,a){window[b]=Window.Prototype[b]=a;}});Window.Prototype={$family:{name:"window"}};new Window(window);var Document=new Native({name:"Document",legacy:(Browser.Engine.trident)?null:window.Document,initialize:function(a){$uid(a);a.head=a.getElementsByTagName("head")[0];a.html=a.getElementsByTagName("html")[0];if(Browser.Engine.trident&&Browser.Engine.version<=4){$try(function(){a.execCommand("BackgroundImageCache",false,true);});}if(Browser.Engine.trident){a.window.attachEvent("onunload",function(){a.window.detachEvent("onunload",arguments.callee);a.head=a.html=a.window=null;});}return $extend(a,Document.Prototype);},afterImplement:function(b,a){document[b]=Document.Prototype[b]=a;}});Document.Prototype={$family:{name:"document"}};new Document(document);var Element=new Native({name:"Element",legacy:window.Element,initialize:function(a,b){var c=Element.Constructors.get(a);if(c){return c(b);}if(typeof a=="string"){return document.newElement(a,b);}return document.id(a).set(b);},afterImplement:function(a,b){Element.Prototype[a]=b;if(Array[a]){return;}Elements.implement(a,function(){var c=[],h=true;for(var f=0,d=this.length;f<d;f++){var g=this[f][a].apply(this[f],arguments);c.push(g);if(h){h=($type(g)=="element");}}return(h)?new Elements(c):c;});}});Element.Prototype={$family:{name:"element"}};Element.Constructors=new Hash;var IFrame=new Native({name:"IFrame",generics:false,initialize:function(){var g=Array.link(arguments,{properties:Object.type,iframe:$defined});var d=g.properties||{};var c=document.id(g.iframe);var f=d.onload||$empty;delete d.onload;d.id=d.name=$pick(d.id,d.name,c?(c.id||c.name):"IFrame_"+$time());c=new Element(c||"iframe",d);var b=function(){var h=$try(function(){return c.contentWindow.location.host;});if(!h||h==window.location.host){var i=new Window(c.contentWindow);new Document(c.contentWindow.document);$extend(i.Element.prototype,Element.Prototype);}f.call(c.contentWindow,c.contentWindow.document);};var a=$try(function(){return c.contentWindow;});((a&&a.document.body)||window.frames[d.id])?b():c.addListener("load",b);return c;}});var Elements=new Native({initialize:function(g,b){b=$extend({ddup:true,cash:true},b);g=g||[];if(b.ddup||b.cash){var h={},f=[];for(var c=0,a=g.length;c<a;c++){var d=document.id(g[c],!b.cash);if(b.ddup){if(h[d.uid]){continue;}h[d.uid]=true;}if(d){f.push(d);}}g=f;}return(b.cash)?$extend(g,this):g;}});Elements.implement({filter:function(a,b){if(!a){return this;}return new Elements(Array.filter(this,(typeof a=="string")?function(c){return c.match(a);}:a,b));}});(function(){var d;try{var a=document.createElement("<input name=x>");d=(a.name=="x");}catch(b){}var c=function(f){return(""+f).replace(/&/g,"&amp;").replace(/"/g,"&quot;");};Document.implement({newElement:function(f,g){if(g&&g.checked!=null){g.defaultChecked=g.checked;}if(d&&g){f="<"+f;if(g.name){f+=' name="'+c(g.name)+'"';}if(g.type){f+=' type="'+c(g.type)+'"';}f+=">";delete g.name;delete g.type;}return this.id(this.createElement(f)).set(g);},newTextNode:function(f){return this.createTextNode(f);},getDocument:function(){return this;},getWindow:function(){return this.window;},id:(function(){var f={string:function(i,h,g){i=g.getElementById(i);return(i)?f.element(i,h):null;},element:function(g,j){$uid(g);if(!j&&!g.$family&&!(/^object|embed$/i).test(g.tagName)){var h=Element.Prototype;for(var i in h){g[i]=h[i];}}return g;},object:function(h,i,g){if(h.toElement){return f.element(h.toElement(g),i);}return null;}};f.textnode=f.whitespace=f.window=f.document=$arguments(0);return function(h,j,i){if(h&&h.$family&&h.uid){return h;}var g=$type(h);return(f[g])?f[g](h,j,i||document):null;};})()});})();if(window.$==null){Window.implement({$:function(a,b){return document.id(a,b,this.document);}});}Window.implement({$$:function(a){if(arguments.length==1&&typeof a=="string"){return this.document.getElements(a);}var g=[];var c=Array.flatten(arguments);for(var d=0,b=c.length;d<b;d++){var f=c[d];switch($type(f)){case"element":g.push(f);break;case"string":g.extend(this.document.getElements(f,true));}}return new Elements(g);},getDocument:function(){return this.document;},getWindow:function(){return this;}});Native.implement([Element,Document],{getElement:function(a,b){return document.id(this.getElements(a,true)[0]||null,b);},getElements:function(a,d){a=a.split(",");var c=[];var b=(a.length>1);a.each(function(f){var g=this.getElementsByTagName(f.trim());(b)?c.extend(g):c=g;},this);return new Elements(c,{ddup:b,cash:!d});}});(function(){var i={},g={};var j={input:"checked",option:"selected",textarea:(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerHTML":"value"};var c=function(m){return(g[m]||(g[m]={}));};var h=function(o,m){if(!o){return;}var n=o.uid;if(m!==true){m=false;}if(Browser.Engine.trident){if(o.clearAttributes){var r=m&&o.cloneNode(false);o.clearAttributes();if(r){o.mergeAttributes(r);}}else{if(o.removeEvents){o.removeEvents();}}if((/object/i).test(o.tagName)){for(var q in o){if(typeof o[q]=="function"){o[q]=$empty;}}Element.dispose(o);}}if(!n){return;}i[n]=g[n]=null;};var d=function(){Hash.each(i,h);if(Browser.Engine.trident){$A(document.getElementsByTagName("object")).each(h);}if(window.CollectGarbage){CollectGarbage();}i=g=null;};var k=function(o,m,t,n,q,s){var p=o[t||m];var r=[];while(p){if(p.nodeType==1&&(!n||Element.match(p,n))){if(!q){return document.id(p,s);}r.push(p);}p=p[m];}return(q)?new Elements(r,{ddup:false,cash:!s}):null;};var f={html:"innerHTML","class":"className","for":"htmlFor",defaultValue:"defaultValue",text:(Browser.Engine.trident||(Browser.Engine.webkit&&Browser.Engine.version<420))?"innerText":"textContent"};var b=["compact","nowrap","ismap","declare","noshade","checked","disabled","readonly","multiple","selected","noresize","defer"];var l=["value","type","defaultValue","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","maxLength","readOnly","rowSpan","tabIndex","useMap"];b=b.associate(b);Hash.extend(f,b);Hash.extend(f,l.associate(l.map(String.toLowerCase)));var a={before:function(n,m){if(m.parentNode){m.parentNode.insertBefore(n,m);}},after:function(n,m){if(!m.parentNode){return;}var o=m.nextSibling;(o)?m.parentNode.insertBefore(n,o):m.parentNode.appendChild(n);},bottom:function(n,m){m.appendChild(n);},top:function(n,m){var o=m.firstChild;(o)?m.insertBefore(n,o):m.appendChild(n);}};a.inside=a.bottom;Hash.each(a,function(m,n){n=n.capitalize();Element.implement("inject"+n,function(o){m(this,document.id(o,true));return this;});Element.implement("grab"+n,function(o){m(document.id(o,true),this);return this;});});Element.implement({set:function(q,n){switch($type(q)){case"object":for(var o in q){this.set(o,q[o]);}break;case"string":var m=Element.Properties.get(q);(m&&m.set)?m.set.apply(this,Array.slice(arguments,1)):this.setProperty(q,n);}return this;},get:function(n){var m=Element.Properties.get(n);return(m&&m.get)?m.get.apply(this,Array.slice(arguments,1)):this.getProperty(n);},erase:function(n){var m=Element.Properties.get(n);(m&&m.erase)?m.erase.apply(this):this.removeProperty(n);return this;},setProperty:function(n,o){var m=f[n];if(o==undefined){return this.removeProperty(n);}if(m&&b[n]){o=!!o;}(m)?this[m]=o:this.setAttribute(n,""+o);return this;},setProperties:function(m){for(var n in m){this.setProperty(n,m[n]);}return this;},getProperty:function(n){var m=f[n];var o=(m)?this[m]:this.getAttribute(n,2);return(b[n])?!!o:(m)?o:o||null;},getProperties:function(){var m=$A(arguments);return m.map(this.getProperty,this).associate(m);},removeProperty:function(n){var m=f[n];(m)?this[m]=(m&&b[n])?false:"":this.removeAttribute(n);return this;},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this;},hasClass:function(m){return this.className.contains(m," ");},addClass:function(m){if(!this.hasClass(m)){this.className=(this.className+" "+m).clean();}return this;},removeClass:function(m){this.className=this.className.replace(new RegExp("(^|\\s)"+m+"(?:\\s|$)"),"$1");return this;},toggleClass:function(m){return this.hasClass(m)?this.removeClass(m):this.addClass(m);},adopt:function(){Array.flatten(arguments).each(function(m){m=document.id(m,true);if(m){this.appendChild(m);}},this);return this;},appendText:function(n,m){return this.grab(this.getDocument().newTextNode(n),m);},grab:function(n,m){a[m||"bottom"](document.id(n,true),this);return this;},inject:function(n,m){a[m||"bottom"](this,document.id(n,true));return this;},replaces:function(m){m=document.id(m,true);m.parentNode.replaceChild(this,m);return this;},wraps:function(n,m){n=document.id(n,true);return this.replaces(n).grab(n,m);},getPrevious:function(m,n){return k(this,"previousSibling",null,m,false,n);},getAllPrevious:function(m,n){return k(this,"previousSibling",null,m,true,n);},getNext:function(m,n){return k(this,"nextSibling",null,m,false,n);},getAllNext:function(m,n){return k(this,"nextSibling",null,m,true,n);},getFirst:function(m,n){return k(this,"nextSibling","firstChild",m,false,n);},getLast:function(m,n){return k(this,"previousSibling","lastChild",m,false,n);},getParent:function(m,n){return k(this,"parentNode",null,m,false,n);},getParents:function(m,n){return k(this,"parentNode",null,m,true,n);},getSiblings:function(m,n){return this.getParent().getChildren(m,n).erase(this);},getChildren:function(m,n){return k(this,"nextSibling","firstChild",m,true,n);},getWindow:function(){return this.ownerDocument.window;},getDocument:function(){return this.ownerDocument;},getElementById:function(p,o){var n=this.ownerDocument.getElementById(p);if(!n){return null;}for(var m=n.parentNode;m!=this;m=m.parentNode){if(!m){return null;}}return document.id(n,o);},getSelected:function(){return new Elements($A(this.options).filter(function(m){return m.selected;}));},getComputedStyle:function(n){if(this.currentStyle){return this.currentStyle[n.camelCase()];}var m=this.getDocument().defaultView.getComputedStyle(this,null);return(m)?m.getPropertyValue([n.hyphenate()]):null;},toQueryString:function(){var m=[];this.getElements("input, select, textarea",true).each(function(n){if(!n.name||n.disabled||n.type=="submit"||n.type=="reset"||n.type=="file"){return;}var o=(n.tagName.toLowerCase()=="select")?Element.getSelected(n).map(function(p){return p.value;}):((n.type=="radio"||n.type=="checkbox")&&!n.checked)?null:n.value;$splat(o).each(function(p){if(typeof p!="undefined"){m.push(n.name+"="+encodeURIComponent(p));}});});return m.join("&");},clone:function(p,m){p=p!==false;var s=this.cloneNode(p);var o=function(w,v){if(!m){w.removeAttribute("id");}if(Browser.Engine.trident){w.clearAttributes();w.mergeAttributes(v);w.removeAttribute("uid");if(w.options){var x=w.options,t=v.options;for(var u=x.length;u--;){x[u].selected=t[u].selected;}}}var y=j[v.tagName.toLowerCase()];if(y&&v[y]){w[y]=v[y];}};if(p){var q=s.getElementsByTagName("*"),r=this.getElementsByTagName("*");for(var n=q.length;n--;){o(q[n],r[n]);}}o(s,this);return document.id(s);},destroy:function(){Element.empty(this);Element.dispose(this);h(this,true);return null;},empty:function(){$A(this.childNodes).each(function(m){Element.destroy(m);});return this;},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this;},hasChild:function(m){m=document.id(m,true);if(!m){return false;}if(Browser.Engine.webkit&&Browser.Engine.version<420){return $A(this.getElementsByTagName(m.tagName)).contains(m);}return(this.contains)?(this!=m&&this.contains(m)):!!(this.compareDocumentPosition(m)&16);},match:function(m){return(!m||(m==this)||(Element.get(this,"tag")==m));}});Native.implement([Element,Window,Document],{addListener:function(p,o){if(p=="unload"){var m=o,n=this;o=function(){n.removeListener("unload",o);m();};}else{i[this.uid]=this;}if(this.addEventListener){this.addEventListener(p,o,false);}else{this.attachEvent("on"+p,o);}return this;},removeListener:function(n,m){if(this.removeEventListener){this.removeEventListener(n,m,false);}else{this.detachEvent("on"+n,m);}return this;},retrieve:function(n,m){var p=c(this.uid),o=p[n];if(m!=undefined&&o==undefined){o=p[n]=m;}return $pick(o);},store:function(n,m){var o=c(this.uid);o[n]=m;return this;},eliminate:function(m){var n=c(this.uid);delete n[m];return this;}});window.addListener("unload",d);})();Element.Properties=new Hash;Element.Properties.style={set:function(a){this.style.cssText=a;},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 c=document.createElement("div");var a={table:[1,"<table>","</table>"],select:[1,"<select>","</select>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"]};a.thead=a.tfoot=a.tbody;var b={set:function(){var f=Array.flatten(arguments).join("");var g=Browser.Engine.trident&&a[this.get("tag")];if(g){var h=c;h.innerHTML=g[1]+f+g[2];for(var d=g[0];d--;){h=h.firstChild;}this.empty().adopt(h.childNodes);}else{this.innerHTML=f;}}};b.erase=b.set;return b;})();if(Browser.Engine.webkit&&Browser.Engine.version<420){Element.Properties.text={get:function(){if(this.innerText){return this.innerText;}var a=this.ownerDocument.newElement("div",{html:this.innerHTML}).inject(this.ownerDocument.body);var b=a.innerText;a.destroy();return b;}};}(function(){Element.implement({scrollTo:function(i,j){if(b(this)){this.getWindow().scrollTo(i,j);}else{this.scrollLeft=i;this.scrollTop=j;}return this;},getSize:function(){if(b(this)){return this.getWindow().getSize();}return{x:this.offsetWidth,y:this.offsetHeight};},getScrollSize:function(){if(b(this)){return this.getWindow().getScrollSize();}return{x:this.scrollWidth,y:this.scrollHeight};},getScroll:function(){if(b(this)){return this.getWindow().getScroll();}return{x:this.scrollLeft,y:this.scrollTop};},getScrolls:function(){var j=this,i={x:0,y:0};while(j&&!b(j)){i.x+=j.scrollLeft;i.y+=j.scrollTop;j=j.parentNode;}return i;},getOffsetParent:function(){var i=this;if(b(i)){return null;}if(!Browser.Engine.trident){return i.offsetParent;}while((i=i.parentNode)&&!b(i)){if(d(i,"position")!="static"){return i;}}return null;},getOffsets:function(){if(this.getBoundingClientRect){var k=this.getBoundingClientRect(),n=document.id(this.getDocument().documentElement),q=n.getScroll(),l=this.getScrolls(),j=this.getScroll(),i=(d(this,"position")=="fixed");return{x:k.left.toInt()+l.x-j.x+((i)?0:q.x)-n.clientLeft,y:k.top.toInt()+l.y-j.y+((i)?0:q.y)-n.clientTop};}var m=this,o={x:0,y:0};if(b(this)){return o;}while(m&&!b(m)){o.x+=m.offsetLeft;o.y+=m.offsetTop;if(Browser.Engine.gecko){if(!g(m)){o.x+=c(m);o.y+=h(m);}var p=m.parentNode;if(p&&d(p,"overflow")!="visible"){o.x+=c(p);o.y+=h(p);}}else{if(m!=this&&Browser.Engine.webkit){o.x+=c(m);o.y+=h(m);}}m=m.offsetParent;}if(Browser.Engine.gecko&&!g(this)){o.x-=c(this);o.y-=h(this);}return o;},getPosition:function(l){if(b(this)){return{x:0,y:0};}var m=this.getOffsets(),j=this.getScrolls();var i={x:m.x-j.x,y:m.y-j.y};var k=(l&&(l=document.id(l)))?l.getPosition():{x:0,y:0};return{x:i.x-k.x,y:i.y-k.y};},getCoordinates:function(k){if(b(this)){return this.getWindow().getCoordinates();}var i=this.getPosition(k),j=this.getSize();var l={left:i.x,top:i.y,width:j.x,height:j.y};l.right=l.left+l.width;l.bottom=l.top+l.height;return l;},computePosition:function(i){return{left:i.x-f(this,"margin-left"),top:i.y-f(this,"margin-top")};},setPosition:function(i){return this.setStyles(this.computePosition(i));}});Native.implement([Document,Window],{getSize:function(){if(Browser.Engine.presto||Browser.Engine.webkit){var j=this.getWindow();return{x:j.innerWidth,y:j.innerHeight};}var i=a(this);return{x:i.clientWidth,y:i.clientHeight};},getScroll:function(){var j=this.getWindow(),i=a(this);return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop};},getScrollSize:function(){var j=a(this),i=this.getSize();return{x:Math.max(j.scrollWidth,i.x),y:Math.max(j.scrollHeight,i.y)};},getPosition:function(){return{x:0,y:0};},getCoordinates:function(){var i=this.getSize();return{top:0,left:0,bottom:i.y,right:i.x,height:i.y,width:i.x};}});var d=Element.getComputedStyle;function f(i,j){return d(i,j).toInt()||0;}function g(i){return d(i,"-moz-box-sizing")=="border-box";}function h(i){return f(i,"border-top-width");}function c(i){return f(i,"border-left-width");}function b(i){return(/^(?:body|html)$/i).test(i.tagName);}function a(i){var j=i.getDocument();return(!j.compatMode||j.compatMode=="CSS1Compat")?j.html:j.body;}})();Element.alias("setPosition","position");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;}});var Event=new Native({name:"Event",initialize:function(a,g){g=g||window;var l=g.document;a=a||g.event;if(a.$extended){return a;}this.$extended=true;var k=a.type;var h=a.target||a.srcElement;while(h&&h.nodeType==3){h=h.parentNode;}if(k.test(/key/)){var b=a.which||a.keyCode;var n=Event.Keys.keyOf(b);if(k=="keydown"){var d=b-111;if(d>0&&d<13){n="f"+d;}}n=n||String.fromCharCode(b).toLowerCase();}else{if(k.match(/(click|mouse|menu)/i)){l=(!l.compatMode||l.compatMode=="CSS1Compat")?l.html:l.body;var j={x:a.pageX||a.clientX+l.scrollLeft,y:a.pageY||a.clientY+l.scrollTop};var c={x:(a.pageX)?a.pageX-g.pageXOffset:a.clientX,y:(a.pageY)?a.pageY-g.pageYOffset:a.clientY};if(k.match(/DOMMouseScroll|mousewheel/)){var i=(a.wheelDelta)?a.wheelDelta/120:-(a.detail||0)/3;}var f=(a.which==3)||(a.button==2);var m=null;if(k.match(/over|out/)){switch(k){case"mouseover":m=a.relatedTarget||a.fromElement;break;case"mouseout":m=a.relatedTarget||a.toElement;}if(!(function(){while(m&&m.nodeType==3){m=m.parentNode;}return true;}).create({attempt:Browser.Engine.gecko})()){m=false;}}}}return $extend(this,{event:a,type:k,page:j,client:c,rightClick:f,wheel:i,relatedTarget:m,target:h,code:b,key:n,shift:a.shiftKey,control:a.ctrlKey,alt:a.altKey,meta:a.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;}});Element.Properties.events={set:function(a){this.addEvents(a);}};Native.implement([Element,Window,Document],{addEvent:function(f,h){var i=this.retrieve("events",{});i[f]=i[f]||{keys:[],values:[]};if(i[f].keys.contains(h)){return this;}i[f].keys.push(h);var g=f,a=Element.Events.get(f),c=h,j=this;if(a){if(a.onAdd){a.onAdd.call(this,h);}if(a.condition){c=function(k){if(a.condition.call(this,k)){return h.call(this,k);}return true;};}g=a.base||g;}var d=function(){return h.call(j);};var b=Element.NativeEvents[g];if(b){if(b==2){d=function(k){k=new Event(k,j.getWindow());if(c.call(j,k)===false){k.stop();}};}this.addListener(g,d);}i[f].values.push(d);return this;},removeEvent:function(c,b){var a=this.retrieve("events");if(!a||!a[c]){return this;}var g=a[c].keys.indexOf(b);if(g==-1){return this;}a[c].keys.splice(g,1);var f=a[c].values.splice(g,1)[0];var d=Element.Events.get(c);if(d){if(d.onRemove){d.onRemove.call(this,b);}c=d.base||c;}return(Element.NativeEvents[c])?this.removeListener(c,f):this;},addEvents:function(a){for(var b in a){this.addEvent(b,a[b]);}return this;},removeEvents:function(a){var c;if($type(a)=="object"){for(c in a){this.removeEvent(c,a[c]);}return this;}var b=this.retrieve("events");if(!b){return this;}if(!a){for(c in b){this.removeEvents(c);}this.eliminate("events");}else{if(b[a]){while(b[a].keys[0]){this.removeEvent(a,b[a].keys[0]);}b[a]=null;}}return this;},fireEvent:function(d,b,a){var c=this.retrieve("events");if(!c||!c[d]){return this;}c[d].keys.each(function(f){f.create({bind:this,delay:a,"arguments":b})();},this);return this;},cloneEvents:function(d,a){d=document.id(d);var c=d.retrieve("events");if(!c){return this;}if(!a){for(var b in c){this.cloneEvents(d,b);}}else{if(c[a]){c[a].keys.each(function(f){this.addEvent(a,f);},this);}}return this;}});try{if(typeof HTMLElement!="undefined"){HTMLElement.prototype.fireEvent=Element.prototype.fireEvent;}}catch(e){}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 a=function(b){var c=b.relatedTarget;if(c==undefined){return true;}if(c===false){return false;}return($type(this)!="document"&&c!=this&&c.prefix!="xul"&&!this.hasChild(c));};Element.Events=new Hash({mouseenter:{base:"mouseover",condition:a},mouseleave:{base:"mouseout",condition:a},mousewheel:{base:(Browser.Engine.gecko)?"DOMMouseScroll":"mousewheel"}});})();Element.Properties.styles={set:function(a){this.setStyles(a);}};Element.Properties.opacity={set:function(a,b){if(!b){if(a==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=(a==1)?"":"alpha(opacity="+a*100+")";}this.style.opacity=a;this.store("opacity",a);},get:function(){return this.retrieve("opacity",1);}};Element.implement({setOpacity:function(a){return this.set("opacity",a,true);},getOpacity:function(){return this.get("opacity");},setStyle:function(b,a){switch(b){case"opacity":return this.set("opacity",parseFloat(a));case"float":b=(Browser.Engine.trident)?"styleFloat":"cssFloat";}b=b.camelCase();if($type(a)!="string"){var c=(Element.Styles.get(b)||"@").split(" ");a=$splat(a).map(function(f,d){if(!c[d]){return"";}return($type(f)=="number")?c[d].replace("@",Math.round(f)):f;}).join(" ");}else{if(a==String(Number(a))){a=Math.round(a);}}this.style[b]=a;return this;},getStyle:function(h){switch(h){case"opacity":return this.get("opacity");case"float":h=(Browser.Engine.trident)?"styleFloat":"cssFloat";}h=h.camelCase();var a=this.style[h];if(!$chk(a)){a=[];for(var g in Element.ShortStyles){if(h!=g){continue;}for(var f in Element.ShortStyles[g]){a.push(this.getStyle(f));}return a.join(" ");}a=this.getComputedStyle(h);}if(a){a=String(a);var c=a.match(/rgba?\([\d\s,]+\)/);if(c){a=a.replace(c[0],c[0].rgbToHex());}}if(Browser.Engine.presto||(Browser.Engine.trident&&!$chk(parseInt(a,10)))){if(h.test(/^(height|width)$/)){var b=(h=="width")?["left","right"]:["top","bottom"],d=0;b.each(function(i){d+=this.getStyle("border-"+i+"-width").toInt()+this.getStyle("padding-"+i).toInt();},this);return this["offset"+h.capitalize()]-d+"px";}if((Browser.Engine.presto)&&String(a).test("px")){return a;}if(h.test(/(border(.+)Width|margin|padding)/)){return"0px";}}return a;},setStyles:function(b){for(var a in b){this.setStyle(a,b[a]);}return this;},getStyles:function(){var a={};Array.flatten(arguments).each(function(b){a[b]=this.getStyle(b);},this);return a;}});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(h){var g=Element.ShortStyles;var b=Element.Styles;["margin","padding"].each(function(i){var j=i+h;g[i][j]=b[j]="@px";});var f="border"+h;g.border[f]=b[f]="@px @ rgb(@, @, @)";var d=f+"Width",a=f+"Style",c=f+"Color";g[f]={};g.borderWidth[d]=g[f][d]=b[d]="@px";g.borderStyle[a]=g[f][a]=b[a]="@";g.borderColor[c]=g[f][c]=b[c]="rgb(@, @, @)";});var Fx=new Class({Implements:[Chain,Events,Options],options:{fps:50,unit:false,duration:500,link:"ignore"},initialize:function(a){this.subject=this.subject||this;this.setOptions(a);this.options.duration=Fx.Durations[this.options.duration]||this.options.duration.toInt();var b=this.options.wait;if(b===false){this.options.link="cancel";}},getTransition:function(){return function(a){return -(Math.cos(Math.PI*a)-1)/2;};},step:function(){var a=$time();if(a<this.time+this.options.duration){var b=this.transition((a-this.time)/this.options.duration);this.set(this.compute(this.from,this.to,b));}else{this.set(this.compute(this.from,this.to,1));this.complete();}},set:function(a){return a;},compute:function(c,b,a){return Fx.compute(c,b,a);},check:function(){if(!this.timer){return true;}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.bind(this,arguments));return false;}return false;},start:function(b,a){if(!this.check(b,a)){return this;}this.from=b;this.to=a;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(c,b,a){return(b-c)*a+c;};Fx.Durations={"short":250,normal:500,"long":1000};Fx.CSS=new Class({Extends:Fx,prepare:function(d,f,b){b=$splat(b);var c=b[1];if(!$chk(c)){b[1]=b[0];b[0]=d.getStyle(f);}var a=b.map(this.parse);return{from:a[0],to:a[1]};},parse:function(a){a=$lambda(a)();a=(typeof a=="string")?a.split(" "):$splat(a);return a.map(function(c){c=String(c);var b=false;Fx.CSS.Parsers.each(function(g,f){if(b){return;}var d=g.parse(c);if($chk(d)){b={value:d,parser:g};}});b=b||{value:c,parser:Fx.CSS.Parsers.String};return b;});},compute:function(d,c,b){var a=[];(Math.min(d.length,c.length)).times(function(f){a.push({value:d[f].parser.compute(d[f].value,c[f].value,b),parser:d[f].parser});});a.$family={name:"fx:css:value"};return a;},serve:function(c,b){if($type(c)!="fx:css:value"){c=this.parse(c);}var a=[];c.each(function(d){a=a.concat(d.parser.serve(d.value,b));});return a;},render:function(a,d,c,b){a.setStyle(d,this.serve(c,b));},search:function(a){if(Fx.CSS.Cache[a]){return Fx.CSS.Cache[a];}var b={};Array.each(document.styleSheets,function(f,d){var c=f.href;if(c&&c.contains("://")&&!c.contains(document.domain)){return;}var g=f.rules||f.cssRules;Array.each(g,function(k,h){if(!k.style){return;}var j=(k.selectorText)?k.selectorText.replace(/^\w+/,function(i){return i.toLowerCase();}):null;if(!j||!j.test("^"+a+"$")){return;}Element.Styles.each(function(l,i){if(!k.style[i]||Element.ShortStyles[i]){return;}l=String(k.style[i]);b[i]=(l.test(/^rgb/))?l.rgbToHex():l;});});});return Fx.CSS.Cache[a]=b;}});Fx.CSS.Cache={};Fx.CSS.Parsers=new Hash({Color:{parse:function(a){if(a.match(/^#[0-9a-f]{3,6}$/i)){return a.hexToRgb(true);}return((a=a.match(/(\d+),\s*(\d+),\s*(\d+)/)))?[a[1],a[2],a[3]]:false;},compute:function(c,b,a){return c.map(function(f,d){return Math.round(Fx.compute(c[d],b[d],a));});},serve:function(a){return a.map(Number);}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(b,a){return(a)?b+a:b;}},String:{parse:$lambda(false),compute:$arguments(1),serve:$arguments(0)}});Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(b,a){this.element=this.subject=document.id(b);this.parent(a);},set:function(a){if(typeof a=="string"){a=this.search(a);}for(var b in a){this.render(this.element,b,a[b],this.options.unit);}return this;},compute:function(f,d,c){var a={};for(var b in f){a[b]=this.parent(f[b],d[b],c);}return a;},start:function(b){if(!this.check(b)){return this;}if(typeof b=="string"){b=this.search(b);}var f={},d={};for(var c in b){var a=this.prepare(this.element,c,b[c]);f[c]=a.from;d[c]=a.to;}return this.parent(f,d);}});Element.Properties.morph={set:function(a){var b=this.retrieve("morph");if(b){b.cancel();}return this.eliminate("morph").store("morph:options",$extend({link:"cancel"},a));},get:function(a){if(a||!this.retrieve("morph")){if(a||!this.retrieve("morph:options")){this.set("morph",a);}this.store("morph",new Fx.Morph(this,this.retrieve("morph:options")));}return this.retrieve("morph");}};Element.implement({morph:function(a){this.get("morph").start(a);return this;}});Fx.implement({getTransition:function(){var a=this.options.transition||Fx.Transitions.Sine.easeInOut;if(typeof a=="string"){var b=a.split(":");a=Fx.Transitions;a=a[b[0]]||a[b[0].capitalize()];if(b[1]){a=a["ease"+b[1].capitalize()+(b[2]?b[2].capitalize():"")];}}return a;}});Fx.Transition=function(b,a){a=$splat(a);return $extend(b,{easeIn:function(c){return b(c,a);},easeOut:function(c){return 1-b(1-c,a);},easeInOut:function(c){return(c<=0.5)?b(2*c,a)/2:(2-b(2*(1-c),a))/2;}});};Fx.Transitions=new Hash({linear:$arguments(0)});Fx.Transitions.extend=function(a){for(var b in a){Fx.Transitions[b]=new Fx.Transition(a[b]);}};Fx.Transitions.extend({Pow:function(b,a){return Math.pow(b,a[0]||6);},Expo:function(a){return Math.pow(2,8*(a-1));},Circ:function(a){return 1-Math.sin(Math.acos(a));},Sine:function(a){return 1-Math.sin((1-a)*Math.PI/2);},Back:function(b,a){a=a[0]||1.618;return Math.pow(b,2)*((a+1)*b-a);},Bounce:function(g){var f;for(var d=0,c=1;1;d+=c,c/=2){if(g>=(7-4*d)/11){f=c*c-Math.pow((11-6*d-11*g)/4,2);break;}}return f;},Elastic:function(b,a){return Math.pow(2,10*--b)*Math.cos(20*b*Math.PI*(a[0]||1)/3);}});["Quad","Cubic","Quart","Quint"].each(function(b,a){Fx.Transitions[b]=new Fx.Transition(function(c){return Math.pow(c,[a+2]);});});Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(b,a){this.element=this.subject=document.id(b);this.parent(a);},set:function(b,a){if(arguments.length==1){a=b;b=this.property||this.options.property;}this.render(this.element,b,a,this.options.unit);return this;},start:function(c,f,d){if(!this.check(c,f,d)){return this;}var b=Array.flatten(arguments);this.property=this.options.property||b.shift();var a=this.prepare(this.element,this.property,b);return this.parent(a.from,a.to);}});Element.Properties.tween={set:function(a){var b=this.retrieve("tween");if(b){b.cancel();}return this.eliminate("tween").store("tween:options",$extend({link:"cancel"},a));},get:function(a){if(a||!this.retrieve("tween")){if(a||!this.retrieve("tween:options")){this.set("tween",a);}this.store("tween",new Fx.Tween(this,this.retrieve("tween:options")));}return this.retrieve("tween");}};Element.implement({tween:function(a,c,b){this.get("tween").start(arguments);return this;},fade:function(c){var f=this.get("tween"),d="opacity",a;c=$pick(c,"toggle");switch(c){case"in":f.start(d,1);break;case"out":f.start(d,0);break;case"show":f.set(d,1);break;case"hide":f.set(d,0);break;case"toggle":var b=this.retrieve("fade:flag",this.get("opacity")==1);f.start(d,(b)?0:1);this.store("fade:flag",!b);a=true;break;default:f.start(d,arguments);}if(!a){this.eliminate("fade:flag");}return this;},highlight:function(c,a){if(!a){a=this.retrieve("highlight:original",this.getStyle("background-color"));a=(a=="transparent")?"#fff":a;}var b=this.get("tween");b.start("background-color",c||"#ffff88",a).chain(function(){this.setStyle("background-color",this.retrieve("highlight:original"));b.callChain();}.bind(this));return this;}});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,noCache:false},initialize:function(a){this.xhr=new Browser.Request();this.setOptions(a);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));this.xhr.onreadystatechange=$empty;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();}},isSuccess:function(){return((this.status>=200)&&(this.status<300));},processScripts:function(a){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return $exec(a);}return a.stripScripts(this.options.evalScripts);},success:function(b,a){this.onSuccess(this.processScripts(b),a);},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(a,b){this.headers.set(a,b);return this;},getHeader:function(a){return $try(function(){return this.xhr.getResponseHeader(a);}.bind(this));},check:function(){if(!this.running){return true;}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.bind(this,arguments));return false;}return false;},send:function(l){if(!this.check(l)){return this;}this.running=true;var j=$type(l);if(j=="string"||j=="element"){l={data:l};}var d=this.options;l=$extend({data:d.data,url:d.url,method:d.method},l);var h=l.data,b=String(l.url),a=l.method.toLowerCase();switch($type(h)){case"element":h=document.id(h).toQueryString();break;case"object":case"hash":h=Hash.toQueryString(h);}if(this.options.format){var k="format="+this.options.format;h=(h)?k+"&"+h:k;}if(this.options.emulation&&!["get","post"].contains(a)){var i="_method="+a;h=(h)?i+"&"+h:i;a="post";}if(this.options.urlEncoded&&a=="post"){var c=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+c);}if(this.options.noCache){var g="noCache="+new Date().getTime();h=(h)?g+"&"+h:g;}var f=b.lastIndexOf("/");if(f>-1&&(f=b.indexOf("#"))>-1){b=b.substr(0,f);}if(h&&a=="get"){b=b+(b.contains("?")?"&":"?")+h;h=null;}this.xhr.open(a.toUpperCase(),b,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(n,m){try{this.xhr.setRequestHeader(m,n);}catch(o){this.fireEvent("exception",[m,n]);}},this);this.fireEvent("request");this.xhr.send(h);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 a={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(b){a[b]=function(){var c=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(c,{method:b}));};});Request.implement(a);})();Element.Properties.send={set:function(a){var b=this.retrieve("send");if(b){b.cancel();}return this.eliminate("send").store("send:options",$extend({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")},a));},get:function(a){if(a||!this.retrieve("send")){if(a||!this.retrieve("send:options")){this.set("send",a);}this.store("send",new Request(this.retrieve("send:options")));}return this.retrieve("send");}};Element.implement({send:function(a){var b=this.get("send");b.send({data:this,url:a||b.options.url});return this;}});Request.HTML=new Class({Extends:Request,options:{update:false,append:false,evalScripts:true,filter:false},processHTML:function(c){var b=c.match(/<body[^>]*>([\s\S]*?)<\/body>/i);c=(b)?b[1]:c;var a=new Element("div");return $try(function(){var d="<root>"+c+"</root>",h;if(Browser.Engine.trident){h=new ActiveXObject("Microsoft.XMLDOM");h.async=false;h.loadXML(d);}else{h=new DOMParser().parseFromString(d,"text/xml");}d=h.getElementsByTagName("root")[0];if(!d){return null;}for(var g=0,f=d.childNodes.length;g<f;g++){var j=Element.clone(d.childNodes[g],true,true);if(j){a.grab(j);}}return a;})||a.set("html",c);},success:function(d){var c=this.options,b=this.response;b.html=d.stripScripts(function(f){b.javascript=f;});var a=this.processHTML(b.html);b.tree=a.childNodes;b.elements=a.getElements("*");if(c.filter){b.tree=b.elements.filter(c.filter);}if(c.update){document.id(c.update).empty().set("html",b.html);}else{if(c.append){document.id(c.append).adopt(a.getChildren());}}if(c.evalScripts){$exec(b.javascript);}this.onSuccess(b.tree,b.elements,b.html,b.javascript);}});Element.Properties.load={set:function(a){var b=this.retrieve("load");if(b){b.cancel();}return this.eliminate("load").store("load:options",$extend({data:this,link:"cancel",update:this,method:"get"},a));},get:function(a){if(a||!this.retrieve("load")){if(a||!this.retrieve("load:options")){this.set("load",a);}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;}});var JSON=new Hash(this.JSON&&{stringify:JSON.stringify,parse:JSON.parse}).extend({$specialChars:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},$replaceChars:function(a){return JSON.$specialChars[a]||"\\u00"+Math.floor(a.charCodeAt()/16).toString(16)+(a.charCodeAt()%16).toString(16);},encode:function(b){switch($type(b)){case"string":return'"'+b.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case"array":return"["+String(b.map(JSON.encode).clean())+"]";case"object":case"hash":var a=[];Hash.each(b,function(f,d){var c=JSON.encode(f);if(c){a.push(JSON.encode(d)+":"+c);}});return"{"+a+"}";case"number":case"boolean":return String(b);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+")");}});Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(a){this.parent(a);this.headers.extend({Accept:"application/json","X-Request":"JSON"});},success:function(a){this.response.json=JSON.decode(a,this.options.secure);this.onSuccess(this.response.json,a);}});var Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(b,a){this.key=b;this.setOptions(a);},write:function(b){b=encodeURIComponent(b);if(this.options.domain){b+="; domain="+this.options.domain;}if(this.options.path){b+="; path="+this.options.path;}if(this.options.duration){var a=new Date();a.setTime(a.getTime()+this.options.duration*24*60*60*1000);b+="; expires="+a.toGMTString();}if(this.options.secure){b+="; secure";}this.options.document.cookie=this.key+"="+b;return this;},read:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");return(a)?decodeURIComponent(a[1]):null;},dispose:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write("");return this;}});Cookie.write=function(b,c,a){return new Cookie(b,a).write(c);};Cookie.read=function(a){return new Cookie(a).read();};Cookie.dispose=function(b,a){return new Cookie(b,a).dispose();};Element.Events.domready={onAdd:function(a){if(Browser.loaded){a.call(this);}}};(function(){var b=function(){if(Browser.loaded){return;}Browser.loaded=true;window.fireEvent("domready");document.fireEvent("domready");};window.addEvent("load",b);if(Browser.Engine.trident){var a=document.createElement("div");(function(){($try(function(){a.doScroll();return document.id(a).inject(document.body).set("html","temp").dispose();}))?b():arguments.callee.delay(50);})();}else{if(Browser.Engine.webkit&&Browser.Engine.version<525){(function(){(["loaded","complete"].contains(document.readyState))?b():arguments.callee.delay(50);})();}else{document.addEvent("DOMContentLoaded",b);}}})();Native.implement([Document,Element],{getElements:function(j,h){j=j.split(",");var c,f={};for(var d=0,b=j.length;d<b;d++){var a=j[d],g=Selectors.Utils.search(this,a,f);if(d!=0&&g.item){g=$A(g);}c=(d==0)?g:(c.item)?$A(c).concat(g):c.concat(g);}return new Elements(c,{ddup:(j.length>1),cash:!h});}});Element.implement({match:function(b){if(!b||(b==this)){return true;}var d=Selectors.Utils.parseTagAndID(b);var a=d[0],f=d[1];if(!Selectors.Filters.byID(this,f)||!Selectors.Filters.byTag(this,a)){return false;}var c=Selectors.Utils.parseSelector(b);return(c)?Selectors.Utils.filter(this,c,{}):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(b,c){if(!c){return true;}var a=$uid(b);if(!c[a]){return c[a]=true;}return false;},parseNthArgument:function(i){if(Selectors.Cache.nth[i]){return Selectors.Cache.nth[i];}var f=i.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!f){return false;}var h=parseInt(f[1],10);var d=(h||h===0)?h:1;var g=f[2]||false;var c=parseInt(f[3],10)||0;if(d!=0){c--;while(c<1){c+=d;}while(c>=d){c-=d;}}else{d=c;g="index";}switch(g){case"n":f={a:d,b:c,special:"n"};break;case"odd":f={a:2,b:0,special:"n"};break;case"even":f={a:2,b:1,special:"n"};break;case"first":f={a:0,special:"index"};break;case"last":f={special:"last-child"};break;case"only":f={special:"only-child"};break;default:f={a:(d-1),special:"index"};}return Selectors.Cache.nth[i]=f;},parseSelector:function(f){if(Selectors.Cache.parsed[f]){return Selectors.Cache.parsed[f];}var d,i={classes:[],pseudos:[],attributes:[]};while((d=Selectors.RegExps.combined.exec(f))){var j=d[1],h=d[2],g=d[3],b=d[5],c=d[6],k=d[7];if(j){i.classes.push(j);}else{if(c){var a=Selectors.Pseudo.get(c);if(a){i.pseudos.push({parser:a,argument:k});}else{i.attributes.push({name:c,operator:"=",value:k});}}else{if(h){i.attributes.push({name:h,operator:g,value:b});}}}}if(!i.classes.length){delete i.classes;}if(!i.attributes.length){delete i.attributes;}if(!i.pseudos.length){delete i.pseudos;}if(!i.classes&&!i.attributes&&!i.pseudos){i=null;}return Selectors.Cache.parsed[f]=i;},parseTagAndID:function(b){var a=b.match(Selectors.RegExps.tag);var c=b.match(Selectors.RegExps.id);return[(a)?a[1]:"*",(c)?c[1]:false];},filter:function(g,c,f){var d;if(c.classes){for(d=c.classes.length;d--;d){var h=c.classes[d];if(!Selectors.Filters.byClass(g,h)){return false;}}}if(c.attributes){for(d=c.attributes.length;d--;d){var b=c.attributes[d];if(!Selectors.Filters.byAttribute(g,b.name,b.operator,b.value)){return false;}}}if(c.pseudos){for(d=c.pseudos.length;d--;d){var a=c.pseudos[d];if(!Selectors.Filters.byPseudo(g,a.parser,a.argument,f)){return false;}}}return true;},getByTagAndID:function(b,a,d){if(d){var c=(b.getElementById)?b.getElementById(d,true):Element.getElementById(b,d,true);return(c&&Selectors.Filters.byTag(c,a))?[c]:[];}else{return b.getElementsByTagName(a);}},search:function(p,o,u){var b=[];var c=o.trim().replace(Selectors.RegExps.splitter,function(k,j,i){b.push(j);return":)"+i;}).split(":)");var q,f,B;for(var A=0,w=c.length;A<w;A++){var z=c[A];if(A==0&&Selectors.RegExps.quick.test(z)){q=p.getElementsByTagName(z);continue;}var a=b[A-1];var r=Selectors.Utils.parseTagAndID(z);var C=r[0],s=r[1];if(A==0){q=Selectors.Utils.getByTagAndID(p,C,s);}else{var d={},h=[];for(var y=0,x=q.length;y<x;y++){h=Selectors.Getters[a](h,q[y],C,s,d);}q=h;}var g=Selectors.Utils.parseSelector(z);if(g){f=[];for(var v=0,t=q.length;v<t;v++){B=q[v];if(Selectors.Utils.filter(B,g,u)){f.push(B);}}q=f;}}return q;}};Selectors.Getters={" ":function(j,h,k,a,f){var d=Selectors.Utils.getByTagAndID(h,k,a);for(var c=0,b=d.length;c<b;c++){var g=d[c];if(Selectors.Utils.chk(g,f)){j.push(g);}}return j;},">":function(j,h,k,a,g){var c=Selectors.Utils.getByTagAndID(h,k,a);for(var f=0,d=c.length;f<d;f++){var b=c[f];if(b.parentNode==h&&Selectors.Utils.chk(b,g)){j.push(b);}}return j;},"+":function(c,b,a,f,d){while((b=b.nextSibling)){if(b.nodeType==1){if(Selectors.Utils.chk(b,d)&&Selectors.Filters.byTag(b,a)&&Selectors.Filters.byID(b,f)){c.push(b);}break;}}return c;},"~":function(c,b,a,f,d){while((b=b.nextSibling)){if(b.nodeType==1){if(!Selectors.Utils.chk(b,d)){break;}if(Selectors.Filters.byTag(b,a)&&Selectors.Filters.byID(b,f)){c.push(b);}}}return c;}};Selectors.Filters={byTag:function(b,a){return(a=="*"||(b.tagName&&b.tagName.toLowerCase()==a));},byID:function(a,b){return(!b||(a.id&&a.id==b));},byClass:function(b,a){return(b.className&&b.className.contains&&b.className.contains(a," "));},byPseudo:function(a,d,c,b){return d.call(a,c,b);},byAttribute:function(c,d,b,f){var a=Element.prototype.getProperty.call(c,d);if(!a){return(b=="!=");}if(!b||f==undefined){return true;}switch(b){case"=":return(a==f);case"*=":return(a.contains(f));case"^=":return(a.substr(0,f.length)==f);case"$=":return(a.substr(a.length-f.length)==f);case"!=":return(a!=f);case"~=":return a.contains(f," ");case"|=":return a.contains(f,"-");}return false;}};Selectors.Pseudo=new Hash({checked:function(){return this.checked;},empty:function(){return !(this.innerText||this.textContent||"").length;},not:function(a){return !Element.match(this,a);},contains:function(a){return(this.innerText||this.textContent||"").contains(a);},"first-child":function(){return Selectors.Pseudo.index.call(this,0);},"last-child":function(){var a=this;while((a=a.nextSibling)){if(a.nodeType==1){return false;}}return true;},"only-child":function(){var b=this;while((b=b.previousSibling)){if(b.nodeType==1){return false;}}var a=this;while((a=a.nextSibling)){if(a.nodeType==1){return false;}}return true;},"nth-child":function(h,f){h=(h==undefined)?"n":h;var c=Selectors.Utils.parseNthArgument(h);if(c.special!="n"){return Selectors.Pseudo[c.special].call(this,c.a,f);}var g=0;f.positions=f.positions||{};var d=$uid(this);if(!f.positions[d]){var b=this;while((b=b.previousSibling)){if(b.nodeType!=1){continue;}g++;var a=f.positions[$uid(b)];if(a!=undefined){g=a+g;break;}}f.positions[d]=g;}return(f.positions[d]%c.a==c.b);},index:function(a){var b=this,c=0;while((b=b.previousSibling)){if(b.nodeType==1&&++c>a){return false;}}return(c==a);},even:function(b,a){return Selectors.Pseudo["nth-child"].call(this,"2n+1",a);},odd:function(b,a){return Selectors.Pseudo["nth-child"].call(this,"2n",a);},selected:function(){return this.selected;},enabled:function(){return(this.disabled===false);}});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(m,n){this.instance="Swiff_"+$time();this.setOptions(n);n=this.options;var b=this.id=n.id||this.instance;var a=document.id(n.container);Swiff.CallBacks[this.instance]={};var f=n.params,h=n.vars,g=n.callBacks;var i=$extend({height:n.height,width:n.width},n.properties);var l=this;for(var d in g){Swiff.CallBacks[this.instance][d]=(function(o){return function(){return o.apply(l.object,arguments);};})(g[d]);h[d]="Swiff.CallBacks."+this.instance+"."+d;}f.flashVars=Hash.toQueryString(h);if(Browser.Engine.trident){i.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";f.movie=m;}else{i.type="application/x-shockwave-flash";i.data=m;}var k='<object id="'+b+'"';for(var j in i){k+=" "+j+'="'+i[j]+'"';}k+=">";for(var c in f){if(f[c]){k+='<param name="'+c+'" value="'+f[c]+'" />';}}k+="</object>";this.object=((a)?a.empty():new Element("div")).set("html",k).firstChild;},replaces:function(a){a=document.id(a,true);a.parentNode.replaceChild(this.toElement(),a);return this;},inject:function(a){document.id(a,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);};
MooTools.More={version:"1.2.5.1",build:"254884f2b83651bf95260eed5c6cceb838e22d8e"};(function(){var a={language:"en-US",languages:{"en-US":{}},cascades:["en-US"]};
var b;MooTools.lang=new Events();$extend(MooTools.lang,{setLanguage:function(c){if(!a.languages[c]){return this;}a.language=c;this.load();this.fireEvent("langChange",c);
return this;},load:function(){var c=this.cascade(this.getCurrentLanguage());b={};$each(c,function(f,d){b[d]=this.lambda(f);},this);},getCurrentLanguage:function(){return a.language;
},addLanguage:function(c){a.languages[c]=a.languages[c]||{};return this;},cascade:function(f){var c=(a.languages[f]||{}).cascades||[];c.combine(a.cascades);
c.erase(f).push(f);var d=c.map(function(g){return a.languages[g];},this);return $merge.apply(this,d);},lambda:function(c){(c||{}).get=function(f,d){return $lambda(c[f]).apply(this,$splat(d));
};return c;},get:function(f,d,c){if(b&&b[f]){return(d?b[f].get(d,c):b[f]);}},set:function(d,f,c){this.addLanguage(d);langData=a.languages[d];if(!langData[f]){langData[f]={};
}$extend(langData[f],c);if(d==this.getCurrentLanguage()){this.load();this.fireEvent("langChange",d);}return this;},list:function(){return Hash.getKeys(a.languages);
}});})();(function(){var c=this;var b=function(){if(c.console&&console.log){try{console.log.apply(console,arguments);}catch(d){console.log(Array.slice(arguments));
}}else{Log.logged.push(arguments);}return this;};var a=function(){this.logged.push(arguments);return this;};this.Log=new Class({logged:[],log:a,resetLog:function(){this.logged.empty();
return this;},enableLog:function(){this.log=b;this.logged.each(function(d){this.log.apply(this,d);},this);return this.resetLog();},disableLog:function(){this.log=a;
return this;}});Log.extend(new Log).enableLog();Log.logger=function(){return this.log.apply(this,arguments);};})();Class.refactor=function(b,a){$each(a,function(f,d){var c=b.prototype[d];
if(c&&(c=c._origin?c._origin:c)&&typeof f=="function"){b.implement(d,function(){var g=this.previous;this.previous=c;var h=f.apply(this,arguments);this.previous=g;
return h;});}else{b.implement(d,f);}});return b;};Class.Mutators.Binds=function(a){return a;};Class.Mutators.initialize=function(a){return function(){$splat(this.Binds).each(function(b){var c=this[b];
if(c){this[b]=c.bind(this);}},this);return a.apply(this,arguments);};};Class.Occlude=new Class({occlude:function(c,b){b=document.id(b||this.element);var a=b.retrieve(c||this.property);
if(a&&!$defined(this.occluded)){return this.occluded=a;}this.occluded=false;b.store(c||this.property,this);return this.occluded;}});(function(){var a={wait:function(b){return this.chain(function(){this.callChain.delay($pick(b,500),this);
}.bind(this));}};Chain.implement(a);if(window.Fx){Fx.implement(a);["Css","Tween","Elements"].each(function(b){if(Fx[b]){Fx[b].implement(a);}});}Element.implement({chains:function(b){$splat($pick(b,["tween","morph","reveal"])).each(function(c){c=this.get(c);
if(!c){return;}c.setOptions({link:"chain"});},this);return this;},pauseFx:function(c,b){this.chains(b).get($pick(b,"tween")).wait(c);return this;}});})();
Array.implement({min:function(){return Math.min.apply(null,this);},max:function(){return Math.max.apply(null,this);},average:function(){return this.length?this.sum()/this.length:0;
},sum:function(){var a=0,b=this.length;if(b){do{a+=this[--b];}while(b);}return a;},unique:function(){return[].combine(this);},shuffle:function(){for(var b=this.length;
b&&--b;){var a=this[b],c=Math.floor(Math.random()*(b+1));this[b]=this[c];this[c]=a;}return this;}});(function(){var j=this.Date;if(!j.now){j.now=$time;
}j.Methods={ms:"Milliseconds",year:"FullYear",min:"Minutes",mo:"Month",sec:"Seconds",hr:"Hours"};["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds","Time","TimezoneOffset","Week","Timezone","GMTOffset","DayOfYear","LastMonth","LastDayOfMonth","UTCDate","UTCDay","UTCFullYear","AMPM","Ordinal","UTCHours","UTCMilliseconds","UTCMinutes","UTCMonth","UTCSeconds","UTCMilliseconds"].each(function(q){j.Methods[q.toLowerCase()]=q;
});var d=function(r,q){return new Array(q-String(r).length+1).join("0")+r;};j.implement({set:function(t,r){switch($type(t)){case"object":for(var s in t){this.set(s,t[s]);
}break;case"string":t=t.toLowerCase();var q=j.Methods;if(q[t]){this["set"+q[t]](r);}}return this;},get:function(r){r=r.toLowerCase();var q=j.Methods;if(q[r]){return this["get"+q[r]]();
}return null;},clone:function(){return new j(this.get("time"));},increment:function(q,s){q=q||"day";s=$pick(s,1);switch(q){case"year":return this.increment("month",s*12);
case"month":var r=this.get("date");this.set("date",1).set("mo",this.get("mo")+s);return this.set("date",r.min(this.get("lastdayofmonth")));case"week":return this.increment("day",s*7);
case"day":return this.set("date",this.get("date")+s);}if(!j.units[q]){throw new Error(q+" is not a supported interval");}return this.set("time",this.get("time")+s*j.units[q]());
},decrement:function(q,r){return this.increment(q,-1*$pick(r,1));},isLeapYear:function(){return j.isLeapYear(this.get("year"));},clearTime:function(){return this.set({hr:0,min:0,sec:0,ms:0});
},diff:function(r,q){if($type(r)=="string"){r=j.parse(r);}return((r-this)/j.units[q||"day"](3,3)).round();},getLastDayOfMonth:function(){return j.daysInMonth(this.get("mo"),this.get("year"));
},getDayOfYear:function(){return(j.UTC(this.get("year"),this.get("mo"),this.get("date")+1)-j.UTC(this.get("year"),0,1))/j.units.day();},getWeek:function(){return(this.get("dayofyear")/7).ceil();
},getOrdinal:function(q){return j.getMsg("ordinal",q||this.get("date"));},getTimezone:function(){return this.toString().replace(/^.*? ([A-Z]{3}).[0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");
},getGMTOffset:function(){var q=this.get("timezoneOffset");return((q>0)?"-":"+")+d((q.abs()/60).floor(),2)+d(q%60,2);},setAMPM:function(q){q=q.toUpperCase();
var r=this.get("hr");if(r>11&&q=="AM"){return this.decrement("hour",12);}else{if(r<12&&q=="PM"){return this.increment("hour",12);}}return this;},getAMPM:function(){return(this.get("hr")<12)?"AM":"PM";
},parse:function(q){this.set("time",j.parse(q));return this;},isValid:function(q){return !isNaN((q||this).valueOf());},format:function(q){if(!this.isValid()){return"invalid date";
}q=q||"%x %X";q=l[q.toLowerCase()]||q;var r=this;return q.replace(/%([a-z%])/gi,function(t,s){switch(s){case"a":return j.getMsg("days")[r.get("day")].substr(0,3);
case"A":return j.getMsg("days")[r.get("day")];case"b":return j.getMsg("months")[r.get("month")].substr(0,3);case"B":return j.getMsg("months")[r.get("month")];
case"c":return r.toString();case"d":return d(r.get("date"),2);case"D":return r.get("date");case"e":return r.get("date");case"H":return d(r.get("hr"),2);
case"I":return((r.get("hr")%12)||12);case"j":return d(r.get("dayofyear"),3);case"m":return d((r.get("mo")+1),2);case"M":return d(r.get("min"),2);case"o":return r.get("ordinal");
case"p":return j.getMsg(r.get("ampm"));case"s":return Math.round(r/1000);case"S":return d(r.get("seconds"),2);case"U":return d(r.get("week"),2);case"w":return r.get("day");
case"x":return r.format(j.getMsg("shortDate"));case"X":return r.format(j.getMsg("shortTime"));case"y":return r.get("year").toString().substr(2);case"Y":return r.get("year");
case"T":return r.get("GMTOffset");case"Z":return r.get("Timezone");case"z":return d(r.get("ms"),3);}return s;});},toISOString:function(){return this.format("iso8601");
}});j.alias("toISOString","toJSON");j.alias("diff","compare");j.alias("format","strftime");var l={db:"%Y-%m-%d %H:%M:%S",compact:"%Y%m%dT%H%M%S",iso8601:"%Y-%m-%dT%H:%M:%S%T",rfc822:"%a, %d %b %Y %H:%M:%S %Z","short":"%d %b %H:%M","long":"%B %d, %Y %H:%M"};
var h=[];var f=j.parse;var o=function(t,v,s){var r=-1;var u=j.getMsg(t+"s");switch($type(v)){case"object":r=u[v.get(t)];break;case"number":r=u[v];if(!r){throw new Error("Invalid "+t+" index: "+v);
}break;case"string":var q=u.filter(function(w){return this.test(w);},new RegExp("^"+v,"i"));if(!q.length){throw new Error("Invalid "+t+" string");}if(q.length>1){throw new Error("Ambiguous "+t);
}r=q[0];}return(s)?u.indexOf(r):r;};j.extend({getMsg:function(r,q){return MooTools.lang.get("Date",r,q);},units:{ms:$lambda(1),second:$lambda(1000),minute:$lambda(60000),hour:$lambda(3600000),day:$lambda(86400000),week:$lambda(608400000),month:function(r,q){var s=new j;
return j.daysInMonth($pick(r,s.get("mo")),$pick(q,s.get("year")))*86400000;},year:function(q){q=q||new j().get("year");return j.isLeapYear(q)?31622400000:31536000000;
}},daysInMonth:function(r,q){return[31,j.isLeapYear(q)?29:28,31,30,31,30,31,31,30,31,30,31][r];},isLeapYear:function(q){return((q%4===0)&&(q%100!==0))||(q%400===0);
},parse:function(s){var r=$type(s);if(r=="number"){return new j(s);}if(r!="string"){return s;}s=s.clean();if(!s.length){return null;}var q;h.some(function(u){var t=u.re.exec(s);
return(t)?(q=u.handler(t)):false;});return q||new j(f(s));},parseDay:function(q,r){return o("day",q,r);},parseMonth:function(r,q){return o("month",r,q);
},parseUTC:function(r){var q=new j(r);var s=j.UTC(q.get("year"),q.get("mo"),q.get("date"),q.get("hr"),q.get("min"),q.get("sec"),q.get("ms"));return new j(s);
},orderIndex:function(q){return j.getMsg("dateOrder").indexOf(q)+1;},defineFormat:function(q,r){l[q]=r;},defineFormats:function(q){for(var r in q){j.defineFormat(r,q[r]);
}},parsePatterns:h,defineParser:function(q){h.push((q.re&&q.handler)?q:m(q));},defineParsers:function(){Array.flatten(arguments).each(j.defineParser);},define2DigitYearStart:function(q){i=q%100;
n=q-i;}});var n=1900;var i=70;var k=function(q){return new RegExp("(?:"+j.getMsg(q).map(function(r){return r.substr(0,3);}).join("|")+")[a-z]*");};var a=function(q){switch(q){case"x":return((j.orderIndex("month")==1)?"%m[-./]%d":"%d[-./]%m")+"([-./]%y)?";
case"X":return"%H([.:]%M)?([.:]%S([.:]%s)?)? ?%p? ?%T?";}return null;};var p={d:/[0-2]?[0-9]|3[01]/,H:/[01]?[0-9]|2[0-3]/,I:/0?[1-9]|1[0-2]/,M:/[0-5]?\d/,s:/\d+/,o:/[a-z]*/,p:/[ap]\.?m\.?/,y:/\d{2}|\d{4}/,Y:/\d{4}/,T:/Z|[+-]\d{2}(?::?\d{2})?/};
p.m=p.I;p.S=p.M;var c;var b=function(q){c=q;p.a=p.A=k("days");p.b=p.B=k("months");h.each(function(s,r){if(s.format){h[r]=m(s.format);}});};var m=function(s){if(!c){return{format:s};
}var q=[];var r=(s.source||s).replace(/%([a-z])/gi,function(u,t){return a(t)||u;}).replace(/\((?!\?)/g,"(?:").replace(/ (?!\?|\*)/g,",? ").replace(/%([a-z%])/gi,function(u,t){var v=p[t];
if(!v){return t;}q.push(t);return"("+v.source+")";}).replace(/\[a-z\]/gi,"[a-z\\u00c0-\\uffff]");return{format:s,re:new RegExp("^"+r+"$","i"),handler:function(w){w=w.slice(1).associate(q);
var t=new j().clearTime(),v=w.y||w.Y;if(v!=null){g.call(t,"y",v);}if("d" in w){g.call(t,"d",1);}if("m" in w||"b" in w||"B" in w){g.call(t,"m",1);}for(var u in w){g.call(t,u,w[u]);
}return t;}};};var g=function(q,r){if(!r){return this;}switch(q){case"a":case"A":return this.set("day",j.parseDay(r,true));case"b":case"B":return this.set("mo",j.parseMonth(r,true));
case"d":return this.set("date",r);case"H":case"I":return this.set("hr",r);case"m":return this.set("mo",r-1);case"M":return this.set("min",r);case"p":return this.set("ampm",r.replace(/\./g,""));
case"S":return this.set("sec",r);case"s":return this.set("ms",("0."+r)*1000);case"w":return this.set("day",r);case"Y":return this.set("year",r);case"y":r=+r;
if(r<100){r+=n+(r<i?100:0);}return this.set("year",r);case"T":if(r=="Z"){r="+00";}var s=r.match(/([+-])(\d{2}):?(\d{2})?/);s=(s[1]+"1")*(s[2]*60+(+s[3]||0))+this.getTimezoneOffset();
return this.set("time",this-s*60000);}return this;};j.defineParsers("%Y([-./]%m([-./]%d((T| )%X)?)?)?","%Y%m%d(T%H(%M%S?)?)?","%x( %X)?","%d%o( %b( %Y)?)?( %X)?","%b( %d%o)?( %Y)?( %X)?","%Y %b( %d%o( %X)?)?","%o %b %d %X %T %Y");
MooTools.lang.addEvent("langChange",function(q){if(MooTools.lang.get("Date")){b(q);}}).fireEvent("langChange",MooTools.lang.getCurrentLanguage());})();
Date.implement({timeDiffInWords:function(a){return Date.distanceOfTimeInWords(this,a||new Date);},timeDiff:function(h,b){if(h==null){h=new Date;}var g=((h-this)/1000).toInt();
if(!g){return"0s";}var a={s:60,m:60,h:24,d:365,y:0};var f,d=[];for(var c in a){if(!g){break;}if((f=a[c])){d.unshift((g%f)+c);g=(g/f).toInt();}else{d.unshift(g+c);
}}return d.join(b||":");}});Date.alias("timeDiffInWords","timeAgoInWords");Date.extend({distanceOfTimeInWords:function(b,a){return Date.getTimePhrase(((a-b)/1000).toInt());
},getTimePhrase:function(g){var d=(g<0)?"Until":"Ago";if(g<0){g*=-1;}var b={minute:60,hour:60,day:24,week:7,month:52/12,year:12,eon:Infinity};var f="lessThanMinute";
for(var c in b){var a=b[c];if(g<1.5*a){if(g>0.75*a){f=c;}break;}g/=a;f=c+"s";}return Date.getMsg(f+d,g).substitute({delta:g.round()});}});Date.defineParsers({re:/^(?:tod|tom|yes)/i,handler:function(a){var b=new Date().clearTime();
switch(a[0]){case"tom":return b.increment();case"yes":return b.decrement();default:return b;}}},{re:/^(next|last) ([a-z]+)$/i,handler:function(f){var g=new Date().clearTime();
var b=g.getDay();var c=Date.parseDay(f[2],true);var a=c-b;if(c<=b){a+=7;}if(f[1]=="last"){a-=7;}return g.set("date",g.getDate()+a);}});Hash.implement({getFromPath:function(a){var b=this.getClean();
a.replace(/\[([^\]]+)\]|\.([^.[]+)|[^[.]+/g,function(c){if(!b){return null;}var d=arguments[2]||arguments[1]||arguments[0];b=(d in b)?b[d]:null;return c;
});return b;},cleanValues:function(a){a=a||$defined;this.each(function(c,b){if(!a(c)){this.erase(b);}},this);return this;},run:function(){var a=arguments;
this.each(function(c,b){if($type(c)=="function"){c.run(a);}});}});(function(){var c={a:"[àáâãäåăą]",A:"[ÀÁÂÃÄÅĂĄ]",c:"[ćčç]",C:"[ĆČÇ]",d:"[ďđ]",D:"[ĎÐ]",e:"[èéêëěę]",E:"[ÈÉÊËĚĘ]",g:"[ğ]",G:"[Ğ]",i:"[ìíîï]",I:"[ÌÍÎÏ]",l:"[ĺľł]",L:"[ĹĽŁ]",n:"[ñňń]",N:"[ÑŇŃ]",o:"[òóôõöøő]",O:"[ÒÓÔÕÖØ]",r:"[řŕ]",R:"[ŘŔ]",s:"[ššş]",S:"[ŠŞŚ]",t:"[ťţ]",T:"[ŤŢ]",ue:"[ü]",UE:"[Ü]",u:"[ùúûůµ]",U:"[ÙÚÛŮ]",y:"[ÿý]",Y:"[ŸÝ]",z:"[žźż]",Z:"[ŽŹŻ]",th:"[þ]",TH:"[Þ]",dh:"[ð]",DH:"[Ð]",ss:"[ß]",oe:"[œ]",OE:"[Œ]",ae:"[æ]",AE:"[Æ]"},b={" ":"[\xa0\u2002\u2003\u2009]","*":"[\xb7]","'":"[\u2018\u2019]",'"':"[\u201c\u201d]","...":"[\u2026]","-":"[\u2013]","--":"[\u2014]","&raquo;":"[\uFFFD]"};
function a(g,h){var f=g;for(key in h){f=f.replace(new RegExp(h[key],"g"),key);}return f;}function d(f,g){f=f||"";var h=g?"<"+f+"(?!\\w)[^>]*>([\\s\\S]*?)</"+f+"(?!\\w)>":"</?"+f+"([^>]+)?>";
reg=new RegExp(h,"gi");return reg;}String.implement({standardize:function(){return a(this,c);},repeat:function(f){return new Array(f+1).join(this);},pad:function(g,i,f){if(this.length>=g){return this;
}var h=(i==null?" ":""+i).repeat(g-this.length).substr(0,g-this.length);if(!f||f=="right"){return this+h;}if(f=="left"){return h+this;}return h.substr(0,(h.length/2).floor())+this+h.substr(0,(h.length/2).ceil());
},getTags:function(f,g){return this.match(d(f,g))||[];},stripTags:function(f,g){return this.replace(d(f,g),"");},tidy:function(){return a(this,b);}});})();
String.implement({parseQueryString:function(d,a){if(d==null){d=true;}if(a==null){a=true;}var c=this.split(/[&;]/),b={};if(c.length){c.each(function(j){var f=j.indexOf("="),g=f<0?[""]:j.substr(0,f).match(/([^\]\[]+|(\B)(?=\]))/g),h=a?decodeURIComponent(j.substr(f+1)):j.substr(f+1),i=b;
g.each(function(l,k){if(d){l=decodeURIComponent(l);}var m=i[l];if(k<g.length-1){i=i[l]=m||{};}else{if($type(m)=="array"){m.push(h);}else{i[l]=$defined(m)?[m,h]:h;
}}});});}return b;},cleanQueryString:function(a){return this.split("&").filter(function(f){var b=f.indexOf("="),c=b<0?"":f.substr(0,b),d=f.substr(b+1);
return a?a.run([c,d]):$chk(d);}).join("&");}});var URI=new Class({Implements:Options,options:{},regex:/^(?:(\w+):)?(?:\/\/(?:(?:([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)?(\.\.?$|(?:[^?#\/]*\/)*)([^?#]*)(?:\?([^#]*))?(?:#(.*))?/,parts:["scheme","user","password","host","port","directory","file","query","fragment"],schemes:{http:80,https:443,ftp:21,rtsp:554,mms:1755,file:0},initialize:function(b,a){this.setOptions(a);
var c=this.options.base||URI.base;if(!b){b=c;}if(b&&b.parsed){this.parsed=$unlink(b.parsed);}else{this.set("value",b.href||b.toString(),c?new URI(c):false);
}},parse:function(c,b){var a=c.match(this.regex);if(!a){return false;}a.shift();return this.merge(a.associate(this.parts),b);},merge:function(b,a){if((!b||!b.scheme)&&(!a||!a.scheme)){return false;
}if(a){this.parts.every(function(c){if(b[c]){return false;}b[c]=a[c]||"";return true;});}b.port=b.port||this.schemes[b.scheme.toLowerCase()];b.directory=b.directory?this.parseDirectory(b.directory,a?a.directory:""):"/";
return b;},parseDirectory:function(b,c){b=(b.substr(0,1)=="/"?"":(c||"/"))+b;if(!b.test(URI.regs.directoryDot)){return b;}var a=[];b.replace(URI.regs.endSlash,"").split("/").each(function(d){if(d==".."&&a.length>0){a.pop();
}else{if(d!="."){a.push(d);}}});return a.join("/")+"/";},combine:function(a){return a.value||a.scheme+"://"+(a.user?a.user+(a.password?":"+a.password:"")+"@":"")+(a.host||"")+(a.port&&a.port!=this.schemes[a.scheme]?":"+a.port:"")+(a.directory||"/")+(a.file||"")+(a.query?"?"+a.query:"")+(a.fragment?"#"+a.fragment:"");
},set:function(b,d,c){if(b=="value"){var a=d.match(URI.regs.scheme);if(a){a=a[1];}if(a&&!$defined(this.schemes[a.toLowerCase()])){this.parsed={scheme:a,value:d};
}else{this.parsed=this.parse(d,(c||this).parsed)||(a?{scheme:a,value:d}:{value:d});}}else{if(b=="data"){this.setData(d);}else{this.parsed[b]=d;}}return this;
},get:function(a,b){switch(a){case"value":return this.combine(this.parsed,b?b.parsed:false);case"data":return this.getData();}return this.parsed[a]||"";
},go:function(){document.location.href=this.toString();},toURI:function(){return this;},getData:function(c,b){var a=this.get(b||"query");if(!$chk(a)){return c?null:{};
}var d=a.parseQueryString();return c?d[c]:d;},setData:function(a,c,b){if(typeof a=="string"){data=this.getData();data[arguments[0]]=arguments[1];a=data;
}else{if(c){a=$merge(this.getData(),a);}}return this.set(b||"query",Hash.toQueryString(a));},clearData:function(a){return this.set(a||"query","");}});URI.prototype.toString=URI.prototype.valueOf=function(){return this.get("value");
};URI.regs={endSlash:/\/$/,scheme:/^(\w+):/,directoryDot:/\.\/|\.$/};URI.base=new URI(document.getElements("base[href]",true).getLast(),{base:document.location});
String.implement({toURI:function(a){return new URI(this,a);}});URI=Class.refactor(URI,{combine:function(g,f){if(!f||g.scheme!=f.scheme||g.host!=f.host||g.port!=f.port){return this.previous.apply(this,arguments);
}var a=g.file+(g.query?"?"+g.query:"")+(g.fragment?"#"+g.fragment:"");if(!f.directory){return(g.directory||(g.file?"":"./"))+a;}var d=f.directory.split("/"),c=g.directory.split("/"),h="",j;
var b=0;for(j=0;j<d.length&&j<c.length&&d[j]==c[j];j++){}for(b=0;b<d.length-j-1;b++){h+="../";}for(b=j;b<c.length-1;b++){h+=c[b]+"/";}return(h||(g.file?"":"./"))+a;
},toAbsolute:function(a){a=new URI(a);if(a){a.set("directory","").set("file","");}return this.toRelative(a);},toRelative:function(a){return this.get("value",new URI(a));
}});Element.implement({tidy:function(){this.set("value",this.get("value").tidy());},getTextInRange:function(b,a){return this.get("value").substring(b,a);
},getSelectedText:function(){if(this.setSelectionRange){return this.getTextInRange(this.getSelectionStart(),this.getSelectionEnd());}return document.selection.createRange().text;
},getSelectedRange:function(){if($defined(this.selectionStart)){return{start:this.selectionStart,end:this.selectionEnd};}var f={start:0,end:0};var a=this.getDocument().selection.createRange();
if(!a||a.parentElement()!=this){return f;}var c=a.duplicate();if(this.type=="text"){f.start=0-c.moveStart("character",-100000);f.end=f.start+a.text.length;
}else{var b=this.get("value");var d=b.length;c.moveToElementText(this);c.setEndPoint("StartToEnd",a);if(c.text.length){d-=b.match(/[\n\r]*$/)[0].length;
}f.end=d-c.text.length;c.setEndPoint("StartToStart",a);f.start=d-c.text.length;}return f;},getSelectionStart:function(){return this.getSelectedRange().start;
},getSelectionEnd:function(){return this.getSelectedRange().end;},setCaretPosition:function(a){if(a=="end"){a=this.get("value").length;}this.selectRange(a,a);
return this;},getCaretPosition:function(){return this.getSelectedRange().start;},selectRange:function(f,a){if(this.setSelectionRange){this.focus();this.setSelectionRange(f,a);
}else{var c=this.get("value");var d=c.substr(f,a-f).replace(/\r/g,"").length;f=c.substr(0,f).replace(/\r/g,"").length;var b=this.createTextRange();b.collapse(true);
b.moveEnd("character",f+d);b.moveStart("character",f);b.select();}return this;},insertAtCursor:function(b,a){var d=this.getSelectedRange();var c=this.get("value");
this.set("value",c.substring(0,d.start)+b+c.substring(d.end,c.length));if($pick(a,true)){this.selectRange(d.start,d.start+b.length);}else{this.setCaretPosition(d.start+b.length);
}return this;},insertAroundCursor:function(b,a){b=$extend({before:"",defaultMiddle:"",after:""},b);var c=this.getSelectedText()||b.defaultMiddle;var h=this.getSelectedRange();
var g=this.get("value");if(h.start==h.end){this.set("value",g.substring(0,h.start)+b.before+c+b.after+g.substring(h.end,g.length));this.selectRange(h.start+b.before.length,h.end+b.before.length+c.length);
}else{var d=g.substring(h.start,h.end);this.set("value",g.substring(0,h.start)+b.before+d+b.after+g.substring(h.end,g.length));var f=h.start+b.before.length;
if($pick(a,true)){this.selectRange(f,f+d.length);}else{this.setCaretPosition(f+g.length);}}return this;}});Elements.from=function(f,d){if($pick(d,true)){f=f.stripScripts();
}var b,c=f.match(/^\s*<(t[dhr]|tbody|tfoot|thead)/i);if(c){b=new Element("table");var a=c[1].toLowerCase();if(["td","th","tr"].contains(a)){b=new Element("tbody").inject(b);
if(a!="tr"){b=new Element("tr").inject(b);}}}return(b||new Element("div")).set("html",f).getChildren();};(function(d,f){var c=/(.*?):relay\(((?:\(.*?\)|.)+)\)$/,b=/[+>~\s]/,g=function(h){var i=h.match(c);
return !i?{event:h}:{event:i[1],selector:i[2]};},a=function(n,h){var l=n.target;if(b.test(h=h.trim())){var k=this.getElements(h);for(var j=k.length;j--;
){var m=k[j];if(l==m||m.hasChild(l)){return m;}}}else{for(;l&&l!=this;l=l.parentNode){if(Element.match(l,h)){return document.id(l);}}}return null;};Element.implement({addEvent:function(l,k){var j=g(l);
if(j.selector){var i=this.retrieve("delegation:_delegateMonitors",{});if(!i[l]){var h=function(n){var m=a.call(this,n,j.selector);if(m){this.fireEvent(l,[n,m],0,m);
}}.bind(this);i[l]=h;d.call(this,j.event,h);}}return d.apply(this,arguments);},removeEvent:function(l,k){var j=g(l);if(j.selector){var i=this.retrieve("events");
if(!i||!i[l]||(k&&!i[l].keys.contains(k))){return this;}if(k){f.apply(this,[l,k]);}else{f.apply(this,l);}i=this.retrieve("events");if(i&&i[l]&&i[l].keys.length==0){var h=this.retrieve("delegation:_delegateMonitors",{});
f.apply(this,[j.event,h[l]]);delete h[l];}return this;}return f.apply(this,arguments);},fireEvent:function(l,i,h,n){var j=this.retrieve("events");var m,k;
if(i){m=i[0];k=i[1];}if(!j||!j[l]){return this;}j[l].keys.each(function(o){o.create({bind:n||this,delay:h,arguments:i})();},this);return this;}});})(Element.prototype.addEvent,Element.prototype.removeEvent);
try{if(typeof HTMLElement!="undefined"){HTMLElement.prototype.fireEvent=Element.prototype.fireEvent;}}catch(e){}Element.implement({measure:function(f){var h=function(i){return !!(!i||i.offsetHeight||i.offsetWidth);
};if(h(this)){return f.apply(this);}var d=this.getParent(),g=[],b=[];while(!h(d)&&d!=document.body){b.push(d.expose());d=d.getParent();}var c=this.expose();
var a=f.apply(this);c();b.each(function(i){i();});return a;},expose:function(){if(this.getStyle("display")!="none"){return $empty;}var a=this.style.cssText;
this.setStyles({display:"block",position:"absolute",visibility:"hidden"});return function(){this.style.cssText=a;}.bind(this);},getDimensions:function(a){a=$merge({computeSize:false},a);
var f={};var d=function(h,g){return(g.computeSize)?h.getComputedSize(g):h.getSize();};var b=this.getParent("body");if(b&&this.getStyle("display")=="none"){f=this.measure(function(){return d(this,a);
});}else{if(b){try{f=d(this,a);}catch(c){}}else{f={x:0,y:0};}}return $chk(f.x)?$extend(f,{width:f.x,height:f.y}):$extend(f,{x:f.width,y:f.height});},getComputedSize:function(a){if(a&&a.plains){a.planes=a.plains;
}a=$merge({styles:["padding","border"],planes:{height:["top","bottom"],width:["left","right"]},mode:"both"},a);var c={width:0,height:0};switch(a.mode){case"vertical":delete c.width;
delete a.planes.width;break;case"horizontal":delete c.height;delete a.planes.height;break;}var b=[];$each(a.planes,function(g,h){g.each(function(i){a.styles.each(function(j){b.push((j=="border")?j+"-"+i+"-width":j+"-"+i);
});});});var f={};b.each(function(g){f[g]=this.getComputedStyle(g);},this);var d=[];$each(a.planes,function(g,h){var i=h.capitalize();c["total"+i]=c["computed"+i]=0;
g.each(function(j){c["computed"+j.capitalize()]=0;b.each(function(l,k){if(l.test(j)){f[l]=f[l].toInt()||0;c["total"+i]=c["total"+i]+f[l];c["computed"+j.capitalize()]=c["computed"+j.capitalize()]+f[l];
}if(l.test(j)&&h!=l&&(l.test("border")||l.test("padding"))&&!d.contains(l)){d.push(l);c["computed"+i]=c["computed"+i]-f[l];}});});});["Width","Height"].each(function(h){var g=h.toLowerCase();
if(!$chk(c[g])){return;}c[g]=c[g]+this["offset"+h]+c["computed"+h];c["total"+h]=c[g]+c["total"+h];delete c["computed"+h];},this);return $extend(f,c);}});
(function(){var a=false,b=false;var c=function(){var d=new Element("div").setStyles({position:"fixed",top:0,right:0}).inject(document.body);a=(d.offsetTop===0);
d.dispose();b=true;};Element.implement({pin:function(i,g){if(!b){c();}if(this.getStyle("display")=="none"){return this;}var k,l=window.getScroll();if(i!==false){k=this.getPosition(a?document.body:this.getOffsetParent());
if(!this.retrieve("pin:_pinned")){var h={top:k.y-l.y,left:k.x-l.x};if(a&&!g){this.setStyle("position","fixed").setStyles(h);}else{var m=this.getOffsetParent(),j=this.getPosition(m),n=this.getStyles("left","top");
if(m&&n.left=="auto"||n.top=="auto"){this.setPosition(j);}if(this.getStyle("position")=="static"){this.setStyle("position","absolute");}j={x:n.left.toInt()-l.x,y:n.top.toInt()-l.y};
var f=function(){if(!this.retrieve("pin:_pinned")){return;}var o=window.getScroll();this.setStyles({left:j.x+o.x,top:j.y+o.y});}.bind(this);this.store("pin:_scrollFixer",f);
window.addEvent("scroll",f);}this.store("pin:_pinned",true);}}else{if(!this.retrieve("pin:_pinned")){return this;}var m=this.getParent(),d=(m.getComputedStyle("position")!="static"?m:m.getOffsetParent());
k=this.getPosition(d);this.store("pin:_pinned",false);var f=this.retrieve("pin:_scrollFixer");if(!f){this.setStyles({position:"absolute",top:k.y+l.y,left:k.x+l.x});
}else{this.store("pin:_scrollFixer",null);window.removeEvent("scroll",f);}this.removeClass("isPinned");}return this;},unpin:function(){return this.pin(false);
},togglepin:function(){return this.pin(!this.retrieve("pin:_pinned"));}});})();(function(){var a=Element.prototype.position;Element.implement({position:function(h){if(h&&($defined(h.x)||$defined(h.y))){return a?a.apply(this,arguments):this;
}$each(h||{},function(w,u){if(!$defined(w)){delete h[u];}});h=$merge({relativeTo:document.body,position:{x:"center",y:"center"},edge:false,offset:{x:0,y:0},returnPos:false,relFixedPosition:false,ignoreMargins:false,ignoreScroll:false,allowNegative:false},h);
var s={x:0,y:0},f=false;var c=this.measure(function(){return document.id(this.getOffsetParent());});if(c&&c!=this.getDocument().body){s=c.measure(function(){return this.getPosition();
});f=c!=document.id(h.relativeTo);h.offset.x=h.offset.x-s.x;h.offset.y=h.offset.y-s.y;}var t=function(u){if($type(u)!="string"){return u;}u=u.toLowerCase();
var v={};if(u.test("left")){v.x="left";}else{if(u.test("right")){v.x="right";}else{v.x="center";}}if(u.test("upper")||u.test("top")){v.y="top";}else{if(u.test("bottom")){v.y="bottom";
}else{v.y="center";}}return v;};h.edge=t(h.edge);h.position=t(h.position);if(!h.edge){if(h.position.x=="center"&&h.position.y=="center"){h.edge={x:"center",y:"center"};
}else{h.edge={x:"left",y:"top"};}}this.setStyle("position","absolute");var g=document.id(h.relativeTo)||document.body,d=g==document.body?window.getScroll():g.getPosition(),m=d.y,i=d.x;
var o=this.getDimensions({computeSize:true,styles:["padding","border","margin"]});var k={},p=h.offset.y,r=h.offset.x,l=window.getSize();switch(h.position.x){case"left":k.x=i+r;
break;case"right":k.x=i+r+g.offsetWidth;break;default:k.x=i+((g==document.body?l.x:g.offsetWidth)/2)+r;break;}switch(h.position.y){case"top":k.y=m+p;break;
case"bottom":k.y=m+p+g.offsetHeight;break;default:k.y=m+((g==document.body?l.y:g.offsetHeight)/2)+p;break;}if(h.edge){var b={};switch(h.edge.x){case"left":b.x=0;
break;case"right":b.x=-o.x-o.computedRight-o.computedLeft;break;default:b.x=-(o.totalWidth/2);break;}switch(h.edge.y){case"top":b.y=0;break;case"bottom":b.y=-o.y-o.computedTop-o.computedBottom;
break;default:b.y=-(o.totalHeight/2);break;}k.x+=b.x;k.y+=b.y;}k={left:((k.x>=0||f||h.allowNegative)?k.x:0).toInt(),top:((k.y>=0||f||h.allowNegative)?k.y:0).toInt()};
var j={left:"x",top:"y"};["minimum","maximum"].each(function(u){["left","top"].each(function(v){var w=h[u]?h[u][j[v]]:null;if(w!=null&&((u=="minimum")?k[v]<w:k[v]>w)){k[v]=w;
}});});if(g.getStyle("position")=="fixed"||h.relFixedPosition){var n=window.getScroll();k.top+=n.y;k.left+=n.x;}var q=g.getScroll();if(h.ignoreScroll){k.top-=q.y;
k.left-=q.x;}else{k.top+=q.y;k.left+=q.x;}if(h.ignoreMargins){k.left+=(h.edge.x=="right"?o["margin-right"]:h.edge.x=="center"?-o["margin-left"]+((o["margin-right"]+o["margin-left"])/2):-o["margin-left"]);
k.top+=(h.edge.y=="bottom"?o["margin-bottom"]:h.edge.y=="center"?-o["margin-top"]+((o["margin-bottom"]+o["margin-top"])/2):-o["margin-top"]);}k.left=Math.ceil(k.left);
k.top=Math.ceil(k.top);if(h.returnPos){return k;}else{this.setStyles(k);}return this;}});})();Element.implement({isDisplayed:function(){return this.getStyle("display")!="none";
},isVisible:function(){var a=this.offsetWidth,b=this.offsetHeight;return(a==0&&b==0)?false:(a>0&&b>0)?true:this.style.display!="none";},toggle:function(){return this[this.isDisplayed()?"hide":"show"]();
},hide:function(){var b;try{b=this.getStyle("display");}catch(a){}if(b=="none"){return this;}return this.store("element:_originalDisplay",b||"").setStyle("display","none");
},show:function(a){if(!a&&this.isDisplayed()){return this;}a=a||this.retrieve("element:_originalDisplay")||"block";return this.setStyle("display",(a=="none")?"block":a);
},swapClass:function(a,b){return this.removeClass(a).addClass(b);}});Document.implement({clearSelection:function(){if(document.selection&&document.selection.empty){document.selection.empty();
}else{if(window.getSelection){var a=window.getSelection();if(a&&a.removeAllRanges){a.removeAllRanges();}}}}});Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(b,a){this.elements=this.subject=$$(b);
this.parent(a);},compute:function(h,j,k){var c={};for(var d in h){var a=h[d],f=j[d],g=c[d]={};for(var b in a){g[b]=this.parent(a[b],f[b],k);}}return c;
},set:function(b){for(var c in b){if(!this.elements[c]){continue;}var a=b[c];for(var d in a){this.render(this.elements[c],d,a[d],this.options.unit);}}return this;
},start:function(c){if(!this.check(c)){return this;}var j={},k={};for(var d in c){if(!this.elements[d]){continue;}var g=c[d],a=j[d]={},h=k[d]={};for(var b in g){var f=this.prepare(this.elements[d],b,g[b]);
a[b]=f.from;h[b]=f.to;}}return this.parent(j,k);}});Fx.Accordion=new Class({Extends:Fx.Elements,options:{fixedHeight:false,fixedWidth:false,display:0,show:false,height:true,width:false,opacity:true,alwaysHide:false,trigger:"click",initialDisplayFx:true,returnHeightToAuto:true},initialize:function(){var c=Array.link(arguments,{container:Element.type,options:Object.type,togglers:$defined,elements:$defined});
this.parent(c.elements,c.options);this.togglers=$$(c.togglers);this.previous=-1;this.internalChain=new Chain();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 b=0,a=this.togglers.length;b<a;b++){this.addSection(this.togglers[b],this.elements[b]);
}this.elements.each(function(f,d){if(this.options.show===d){this.fireEvent("active",[this.togglers[d],f]);}else{for(var g in this.effects){f.setStyle(g,0);
}}},this);if($chk(this.options.display)||this.options.initialDisplayFx===false){this.display(this.options.display,this.options.initialDisplayFx);}if(this.options.fixedHeight!==false){this.options.returnHeightToAuto=false;
}this.addEvent("complete",this.internalChain.callChain.bind(this.internalChain));},addSection:function(f,c){f=document.id(f);c=document.id(c);var g=this.togglers.contains(f);
this.togglers.include(f);this.elements.include(c);var a=this.togglers.indexOf(f);var b=this.display.bind(this,a);f.store("accordion:display",b);f.addEvent(this.options.trigger,b);
if(this.options.height){c.setStyles({"padding-top":0,"border-top":"none","padding-bottom":0,"border-bottom":"none"});}if(this.options.width){c.setStyles({"padding-left":0,"border-left":"none","padding-right":0,"border-right":"none"});
}c.fullOpacity=1;if(this.options.fixedWidth){c.fullWidth=this.options.fixedWidth;}if(this.options.fixedHeight){c.fullHeight=this.options.fixedHeight;}c.setStyle("overflow","hidden");
if(!g){for(var d in this.effects){c.setStyle(d,0);}}return this;},removeSection:function(f,b){var a=this.togglers.indexOf(f);var c=this.elements[a];var d=function(){this.togglers.erase(f);
this.elements.erase(c);this.detach(f);}.bind(this);if(this.now==a||b!=undefined){this.display($pick(b,a-1>=0?a-1:0)).chain(d);}else{d();}return this;},detach:function(b){var a=function(c){c.removeEvent(this.options.trigger,c.retrieve("accordion:display"));
}.bind(this);if(!b){this.togglers.each(a);}else{a(b);}return this;},display:function(a,b){if(!this.check(a,b)){return this;}b=$pick(b,true);a=($type(a)=="element")?this.elements.indexOf(a):a;
if(a==this.previous&&!this.options.alwaysHide){return this;}if(this.options.returnHeightToAuto){var d=this.elements[this.previous];if(d&&!this.selfHidden){for(var c in this.effects){d.setStyle(c,d[this.effects[c]]);
}}}if((this.timer&&this.options.wait)||(a===this.previous&&!this.options.alwaysHide)){return this;}this.previous=a;var f={};this.elements.each(function(j,h){f[h]={};
var g;if(h!=a){g=true;}else{if(this.options.alwaysHide&&((j.offsetHeight>0&&this.options.height)||j.offsetWidth>0&&this.options.width)){g=true;this.selfHidden=true;
}}this.fireEvent(g?"background":"active",[this.togglers[h],j]);for(var k in this.effects){f[h][k]=g?0:j[this.effects[k]];}},this);this.internalChain.clearChain();
this.internalChain.chain(function(){if(this.options.returnHeightToAuto&&!this.selfHidden){var g=this.elements[a];if(g){g.setStyle("height","auto");}}}.bind(this));
return b?this.start(f):this.set(f);}});var Accordion=new Class({Extends:Fx.Accordion,initialize:function(){this.parent.apply(this,arguments);var a=Array.link(arguments,{container:Element.type});
this.container=a.container;},addSection:function(c,b,f){c=document.id(c);b=document.id(b);var d=this.togglers.contains(c);var a=this.togglers.length;if(a&&(!d||f)){f=$pick(f,a-1);
c.inject(this.togglers[f],"before");b.inject(c,"after");}else{if(this.container&&!d){c.inject(this.container);b.inject(this.container);}}return this.parent.apply(this,arguments);
}});Fx.Move=new Class({Extends:Fx.Morph,options:{relativeTo:document.body,position:"center",edge:false,offset:{x:0,y:0}},start:function(a){var b=this.element,c=b.getStyles("top","left");
if(c.top=="auto"||c.left=="auto"){b.setPosition(b.getPosition(b.getOffsetParent()));}return this.parent(b.position($merge(this.options,a,{returnPos:true})));
}});Element.Properties.move={set:function(a){var b=this.retrieve("move");if(b){b.cancel();}return this.eliminate("move").store("move:options",$extend({link:"cancel"},a));
},get:function(a){if(a||!this.retrieve("move")){if(a||!this.retrieve("move:options")){this.set("move",a);}this.store("move",new Fx.Move(this,this.retrieve("move:options")));
}return this.retrieve("move");}};Element.implement({move:function(a){this.get("move").start(a);return this;}});Fx.Reveal=new Class({Extends:Fx.Morph,options:{link:"cancel",styles:["padding","border","margin"],transitionOpacity:!Browser.Engine.trident4,mode:"vertical",display:function(){return this.element.get("tag")!="tr"?"block":"table-row";
},hideInputs:Browser.Engine.trident?"select, input, textarea, object, embed":false,opacity:1},dissolve:function(){try{if(!this.hiding&&!this.showing){if(this.element.getStyle("display")!="none"){this.hiding=true;
this.showing=false;this.hidden=true;this.cssText=this.element.style.cssText;var d=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});
this.element.setStyle("display",$lambda(this.options.display).apply(this));if(this.options.transitionOpacity){d.opacity=this.options.opacity;}var b={};
$each(d,function(g,f){b[f]=[g,0];},this);this.element.setStyle("overflow","hidden");var a=this.options.hideInputs?this.element.getElements(this.options.hideInputs):null;
this.$chain.unshift(function(){if(this.hidden){this.hiding=false;$each(d,function(g,f){d[f]=g;},this);this.element.style.cssText=this.cssText;this.element.setStyle("display","none");
if(a){a.setStyle("visibility","visible");}}this.fireEvent("hide",this.element);this.callChain();}.bind(this));if(a){a.setStyle("visibility","hidden");}this.start(b);
}else{this.callChain.delay(10,this);this.fireEvent("complete",this.element);this.fireEvent("hide",this.element);}}else{if(this.options.link=="chain"){this.chain(this.dissolve.bind(this));
}else{if(this.options.link=="cancel"&&!this.hiding){this.cancel();this.dissolve();}}}}catch(c){this.hiding=false;this.element.setStyle("display","none");
this.callChain.delay(10,this);this.fireEvent("complete",this.element);this.fireEvent("hide",this.element);}return this;},reveal:function(){try{if(!this.showing&&!this.hiding){if(this.element.getStyle("display")=="none"){this.showing=true;
this.hiding=this.hidden=false;var d;this.cssText=this.element.style.cssText;this.element.measure(function(){d=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});
}.bind(this));$each(d,function(g,f){d[f]=g;});if($chk(this.options.heightOverride)){d.height=this.options.heightOverride.toInt();}if($chk(this.options.widthOverride)){d.width=this.options.widthOverride.toInt();
}if(this.options.transitionOpacity){this.element.setStyle("opacity",0);d.opacity=this.options.opacity;}var b={height:0,display:$lambda(this.options.display).apply(this)};
$each(d,function(g,f){b[f]=0;});this.element.setStyles($merge(b,{overflow:"hidden"}));var a=this.options.hideInputs?this.element.getElements(this.options.hideInputs):null;
if(a){a.setStyle("visibility","hidden");}this.start(d);this.$chain.unshift(function(){this.element.style.cssText=this.cssText;this.element.setStyle("display",$lambda(this.options.display).apply(this));
if(!this.hidden){this.showing=false;}if(a){a.setStyle("visibility","visible");}this.callChain();this.fireEvent("show",this.element);}.bind(this));}else{this.callChain();
this.fireEvent("complete",this.element);this.fireEvent("show",this.element);}}else{if(this.options.link=="chain"){this.chain(this.reveal.bind(this));}else{if(this.options.link=="cancel"&&!this.showing){this.cancel();
this.reveal();}}}}catch(c){this.element.setStyles({display:$lambda(this.options.display).apply(this),visiblity:"visible",opacity:this.options.opacity});
this.showing=false;this.callChain.delay(10,this);this.fireEvent("complete",this.element);this.fireEvent("show",this.element);}return this;},toggle:function(){if(this.element.getStyle("display")=="none"){this.reveal();
}else{this.dissolve();}return this;},cancel:function(){this.parent.apply(this,arguments);this.element.style.cssText=this.cssText;this.hiding=false;this.showing=false;
return this;}});Element.Properties.reveal={set:function(a){var b=this.retrieve("reveal");if(b){b.cancel();}return this.eliminate("reveal").store("reveal:options",a);
},get:function(a){if(a||!this.retrieve("reveal")){if(a||!this.retrieve("reveal:options")){this.set("reveal",a);}this.store("reveal",new Fx.Reveal(this,this.retrieve("reveal:options")));
}return this.retrieve("reveal");}};Element.Properties.dissolve=Element.Properties.reveal;Element.implement({reveal:function(a){this.get("reveal",a).reveal();
return this;},dissolve:function(a){this.get("reveal",a).dissolve();return this;},nix:function(){var a=Array.link(arguments,{destroy:Boolean.type,options:Object.type});
this.get("reveal",a.options).dissolve().chain(function(){this[a.destroy?"destroy":"dispose"]();}.bind(this));return this;},wink:function(){var b=Array.link(arguments,{duration:Number.type,options:Object.type});
var a=this.get("reveal",b.options);a.reveal().chain(function(){(function(){a.dissolve();}).delay(b.duration||2000);});}});Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(b,a){this.element=this.subject=document.id(b);
this.parent(a);var d=this.cancel.bind(this,false);if($type(this.element)!="element"){this.element=document.id(this.element.getDocument().body);}var c=this.element;
if(this.options.wheelStops){this.addEvent("start",function(){c.addEvent("mousewheel",d);},true);this.addEvent("complete",function(){c.removeEvent("mousewheel",d);
},true);}},set:function(){var a=Array.flatten(arguments);if(Browser.Engine.gecko){a=[Math.round(a[0]),Math.round(a[1])];}this.element.scrollTo(a[0]+this.options.offset.x,a[1]+this.options.offset.y);
},compute:function(c,b,a){return[0,1].map(function(d){return Fx.compute(c[d],b[d],a);});},start:function(c,h){if(!this.check(c,h)){return this;}var f=this.element.getScrollSize(),b=this.element.getScroll(),d={x:c,y:h};
for(var g in d){var a=f[g];if($chk(d[g])){d[g]=($type(d[g])=="number")?d[g]:a;}else{d[g]=b[g];}d[g]+=this.options.offset[g];}return this.parent([b.x,b.y],[d.x,d.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(b){var a=document.id(b).getPosition(this.element);return this.start(a.x,a.y);},scrollIntoView:function(c,f,d){f=f?$splat(f):["x","y"];
var i={};c=document.id(c);var g=c.getPosition(this.element);var j=c.getSize();var h=this.element.getScroll();var a=this.element.getSize();var b={x:g.x+j.x,y:g.y+j.y};
["x","y"].each(function(k){if(f.contains(k)){if(b[k]>h[k]+a[k]){i[k]=b[k]-a[k];}if(g[k]<h[k]){i[k]=g[k];}}if(i[k]==null){i[k]=h[k];}if(d&&d[k]){i[k]=i[k]+d[k];
}},this);if(i.x!=h.x||i.y!=h.y){this.start(i.x,i.y);}return this;},scrollToCenter:function(c,f,d){f=f?$splat(f):["x","y"];c=$(c);var i={},g=c.getPosition(this.element),j=c.getSize(),h=this.element.getScroll(),a=this.element.getSize(),b={x:g.x+j.x,y:g.y+j.y};
["x","y"].each(function(k){if(f.contains(k)){i[k]=g[k]-(a[k]-j[k])/2;}if(i[k]==null){i[k]=h[k];}if(d&&d[k]){i[k]=i[k]+d[k];}},this);if(i.x!=h.x||i.y!=h.y){this.start(i.x,i.y);
}return this;}});Fx.Slide=new Class({Extends:Fx,options:{mode:"vertical",wrapper:false,hideOverflow:true,resetHeight:false},initialize:function(b,a){this.addEvent("complete",function(){this.open=(this.wrapper["offset"+this.layout.capitalize()]!=0);
if(this.open&&this.options.resetHeight){this.wrapper.setStyle("height","");}if(this.open&&Browser.Engine.webkit419){this.element.dispose().inject(this.wrapper);
}},true);this.element=this.subject=document.id(b);this.parent(a);var d=this.element.retrieve("wrapper");var c=this.element.getStyles("margin","position","overflow");
if(this.options.hideOverflow){c=$extend(c,{overflow:"hidden"});}if(this.options.wrapper){d=document.id(this.options.wrapper).setStyles(c);}this.wrapper=d||new Element("div",{styles:c}).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(a){this.element.setStyle(this.margin,a[0]);
this.wrapper.setStyle(this.layout,a[1]);return this;},compute:function(c,b,a){return[0,1].map(function(d){return Fx.compute(c[d],b[d],a);});},start:function(b,f){if(!this.check(b,f)){return this;
}this[f||this.options.mode]();var d=this.element.getStyle(this.margin).toInt();var c=this.wrapper.getStyle(this.layout).toInt();var a=[[d,c],[0,this.offset]];
var h=[[d,c],[-this.offset,0]];var g;switch(b){case"in":g=a;break;case"out":g=h;break;case"toggle":g=(c==0)?a:h;}return this.parent(g[0],g[1]);},slideIn:function(a){return this.start("in",a);
},slideOut:function(a){return this.start("out",a);},hide:function(a){this[a||this.options.mode]();this.open=false;return this.set([-this.offset,0]);},show:function(a){this[a||this.options.mode]();
this.open=true;return this.set([0,this.offset]);},toggle:function(a){return this.start("toggle",a);}});Element.Properties.slide={set:function(b){var a=this.retrieve("slide");
if(a){a.cancel();}return this.eliminate("slide").store("slide:options",$extend({link:"cancel"},b));},get:function(a){if(a||!this.retrieve("slide")){if(a||!this.retrieve("slide:options")){this.set("slide",a);
}this.store("slide",new Fx.Slide(this,this.retrieve("slide:options")));}return this.retrieve("slide");}};Element.implement({slide:function(d,f){d=d||"toggle";
var b=this.get("slide"),a;switch(d){case"hide":b.hide(f);break;case"show":b.show(f);break;case"toggle":var c=this.retrieve("slide:flag",b.open);b[c?"slideOut":"slideIn"](f);
this.store("slide:flag",!c);a=true;break;default:b.start(d,f);}if(!a){this.eliminate("slide:flag");}return this;}});var SmoothScroll=Fx.SmoothScroll=new Class({Extends:Fx.Scroll,initialize:function(b,c){c=c||document;
this.doc=c.getDocument();var d=c.getWindow();this.parent(this.doc,b);this.links=$$(this.options.links||this.doc.links);var a=d.location.href.match(/^[^#]*/)[0]+"#";
this.links.each(function(g){if(g.href.indexOf(a)!=0){return;}var f=g.href.substr(a.length);if(f){this.useLink(g,f);}},this);if(!Browser.Engine.webkit419){this.addEvent("complete",function(){d.location.hash=this.anchor;
},true);}},useLink:function(c,a){var b;c.addEvent("click",function(d){if(b!==false&&!b){b=document.id(a)||this.doc.getElement("a[name="+a+"]");}if(b){d.preventDefault();
this.anchor=a;this.toElement(b).chain(function(){this.fireEvent("scrolledTo",[c,b]);}.bind(this));c.blur();}}.bind(this));}});Fx.Sort=new Class({Extends:Fx.Elements,options:{mode:"vertical"},initialize:function(b,a){this.parent(b,a);
this.elements.each(function(c){if(c.getStyle("position")=="static"){c.setStyle("position","relative");}});this.setDefaultOrder();},setDefaultOrder:function(){this.currentOrder=this.elements.map(function(b,a){return a;
});},sort:function(f){if($type(f)!="array"){return false;}var j=0,a=0,c={},i={},d=this.options.mode=="vertical";var g=this.elements.map(function(n,l){var m=n.getComputedSize({styles:["border","padding","margin"]});
var o;if(d){o={top:j,margin:m["margin-top"],height:m.totalHeight};j+=o.height-m["margin-top"];}else{o={left:a,margin:m["margin-left"],width:m.totalWidth};
a+=o.width;}var k=d?"top":"left";i[l]={};var p=n.getStyle(k).toInt();i[l][k]=p||0;return o;},this);this.set(i);f=f.map(function(k){return k.toInt();});
if(f.length!=this.elements.length){this.currentOrder.each(function(k){if(!f.contains(k)){f.push(k);}});if(f.length>this.elements.length){f.splice(this.elements.length-1,f.length-this.elements.length);
}}var b=j=a=0;f.each(function(m,k){var l={};if(d){l.top=j-g[m].top-b;j+=g[m].height;}else{l.left=a-g[m].left;a+=g[m].width;}b=b+g[m].margin;c[m]=l;},this);
var h={};$A(f).sort().each(function(k){h[k]=c[k];});this.start(h);this.currentOrder=f;return this;},rearrangeDOM:function(a){a=a||this.currentOrder;var b=this.elements[0].getParent();
var c=[];this.elements.setStyle("opacity",0);a.each(function(d){c.push(this.elements[d].inject(b).setStyles({top:0,left:0}));},this);this.elements.setStyle("opacity",1);
this.elements=$$(c);this.setDefaultOrder();return this;},getDefaultOrder:function(){return this.elements.map(function(b,a){return a;});},forward:function(){return this.sort(this.getDefaultOrder());
},backward:function(){return this.sort(this.getDefaultOrder().reverse());},reverse:function(){return this.sort(this.currentOrder.reverse());},sortByElements:function(a){return this.sort(a.map(function(b){return this.elements.indexOf(b);
},this));},swap:function(c,b){if($type(c)=="element"){c=this.elements.indexOf(c);}if($type(b)=="element"){b=this.elements.indexOf(b);}var a=$A(this.currentOrder);
a[this.currentOrder.indexOf(c)]=b;a[this.currentOrder.indexOf(b)]=c;return this.sort(a);}});var Drag=new Class({Implements:[Events,Options],options:{snap:6,unit:"px",grid:false,style:true,limit:false,handle:false,invert:false,preventDefault:false,stopPropagation:false,modifiers:{x:"left",y:"top"}},initialize:function(){var b=Array.link(arguments,{options:Object.type,element:$defined});
this.element=document.id(b.element);this.document=this.element.getDocument();this.setOptions(b.options||{});var a=$type(this.options.handle);this.handles=((a=="array"||a=="collection")?$$(this.options.handle):document.id(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(f){if(f.rightClick){return;}if(this.options.preventDefault){f.preventDefault();}if(this.options.stopPropagation){f.stopPropagation();
}this.mouse.start=f.page;this.fireEvent("beforeStart",this.element);var a=this.options.limit;this.limit={x:[],y:[]};var d=this.element.getStyles("left","right","top","bottom");
this._invert={x:this.options.modifiers.x=="left"&&d.left=="auto"&&!isNaN(d.right.toInt())&&(this.options.modifiers.x="right"),y:this.options.modifiers.y=="top"&&d.top=="auto"&&!isNaN(d.bottom.toInt())&&(this.options.modifiers.y="bottom")};
var h,g;for(h in this.options.modifiers){if(!this.options.modifiers[h]){continue;}var c=this.element.getStyle(this.options.modifiers[h]);if(c&&!c.match(/px$/)){if(!g){g=this.element.getCoordinates(this.element.getOffsetParent());
}c=g[this.options.modifiers[h]];}if(this.options.style){this.value.now[h]=(c||0).toInt();}else{this.value.now[h]=this.element[this.options.modifiers[h]];
}if(this.options.invert){this.value.now[h]*=-1;}if(this._invert[h]){this.value.now[h]*=-1;}this.mouse.pos[h]=f.page[h]-this.value.now[h];if(a&&a[h]){for(var b=2;
b--;b){if($chk(a[h][b])){this.limit[h][b]=$lambda(a[h][b])();}}}}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(a){if(this.options.preventDefault){a.preventDefault();
}var b=Math.round(Math.sqrt(Math.pow(a.page.x-this.mouse.start.x,2)+Math.pow(a.page.y-this.mouse.start.y,2)));if(b>this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});
this.fireEvent("start",[this.element,a]).fireEvent("snap",this.element);}},drag:function(a){if(this.options.preventDefault){a.preventDefault();}this.mouse.now=a.page;
for(var b in this.options.modifiers){if(!this.options.modifiers[b]){continue;}this.value.now[b]=this.mouse.now[b]-this.mouse.pos[b];if(this.options.invert){this.value.now[b]*=-1;
}if(this._invert[b]){this.value.now[b]*=-1;}if(this.options.limit&&this.limit[b]){if($chk(this.limit[b][1])&&(this.value.now[b]>this.limit[b][1])){this.value.now[b]=this.limit[b][1];
}else{if($chk(this.limit[b][0])&&(this.value.now[b]<this.limit[b][0])){this.value.now[b]=this.limit[b][0];}}}if(this.options.grid[b]){this.value.now[b]-=((this.value.now[b]-(this.limit[b][0]||0))%this.options.grid[b]);
}if(this.options.style){this.element.setStyle(this.options.modifiers[b],this.value.now[b]+this.options.unit);}else{this.element[this.options.modifiers[b]]=this.value.now[b];
}}this.fireEvent("drag",[this.element,a]);},cancel:function(a){this.document.removeEvent("mousemove",this.bound.check);this.document.removeEvent("mouseup",this.bound.cancel);
if(a){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent("cancel",this.element);}},stop:function(a){this.document.removeEvent(this.selection,this.bound.eventStop);
this.document.removeEvent("mousemove",this.bound.drag);this.document.removeEvent("mouseup",this.bound.stop);if(a){this.fireEvent("complete",[this.element,a]);
}}});Element.implement({makeResizable:function(a){var b=new Drag(this,$merge({modifiers:{x:"width",y:"height"}},a));this.store("resizer",b);return b.addEvent("drag",function(){this.fireEvent("resize",b);
}.bind(this));}});Drag.Move=new Class({Extends:Drag,options:{droppables:[],container:false,precalculate:false,includeMargins:true,checkDroppables:true},initialize:function(b,a){this.parent(b,a);
b=this.element;this.droppables=$$(this.options.droppables);this.container=document.id(this.options.container);if(this.container&&$type(this.container)!="element"){this.container=document.id(this.container.getDocument().body);
}if(this.options.style){if(this.options.modifiers.x=="left"&&this.options.modifiers.y=="top"){var g,c=document.id(b.getOffsetParent());if(c){g=c.getStyles("border-top-width","border-left-width");
}var d=b.getStyles("left","top");if(c&&(d.left=="auto"||d.top=="auto")){var f=b.getPosition(c);f.x=f.x-(g["border-left-width"]?g["border-left-width"].toInt():0);
f.y=f.y-(g["border-top-width"]?g["border-top-width"].toInt():0);b.setPosition(f);}}if(b.getStyle("position")=="static"){b.setStyle("position","absolute");
}}this.addEvent("start",this.checkDroppables,true);this.overed=null;},start:function(a){if(this.container){this.options.limit=this.calculateLimit();}if(this.options.precalculate){this.positions=this.droppables.map(function(b){return b.getCoordinates();
});}this.parent(a);},calculateLimit:function(){var d=document.id(this.element.getOffsetParent())||document.body,i=this.container.getCoordinates(d),h={},c={},b={},k={},g={},m={};
["top","right","bottom","left"].each(function(q){h[q]=this.container.getStyle("border-"+q).toInt();b[q]=this.element.getStyle("border-"+q).toInt();c[q]=this.element.getStyle("margin-"+q).toInt();
k[q]=this.container.getStyle("margin-"+q).toInt();m[q]=d.getStyle("padding-"+q).toInt();g[q]=d.getStyle("border-"+q).toInt();},this);var f=this.element.offsetWidth+c.left+c.right,p=this.element.offsetHeight+c.top+c.bottom,j=0,l=0,o=i.right-h.right-f,a=i.bottom-h.bottom-p;
if(this.options.includeMargins){j+=c.left;l+=c.top;}else{o+=c.right;a+=c.bottom;}if(this.element.getStyle("position")=="relative"){var n=this.element.getCoordinates(d);
n.left-=this.element.getStyle("left").toInt();n.top-=this.element.getStyle("top").toInt();j+=h.left-n.left;l+=h.top-n.top;o+=c.left-n.left;a+=c.top-n.top;
if(this.container!=d){j+=k.left+m.left;l+=(Browser.Engine.trident4?0:k.top)+m.top;}}else{j-=c.left;l-=c.top;if(this.container==d){o-=h.left;a-=h.top;}else{j+=i.left+h.left-g.left;
l+=i.top+h.top-g.top;o-=g.left;a-=g.top;}}return{x:[j,o],y:[l,a]};},checkAgainst:function(c,b){c=(this.positions)?this.positions[b]:c.getCoordinates();
var a=this.mouse.now;return(a.x>c.left&&a.x<c.right&&a.y<c.bottom&&a.y>c.top);},checkDroppables:function(){var a=this.droppables.filter(this.checkAgainst,this).getLast();
if(this.overed!=a){if(this.overed){this.fireEvent("leave",[this.element,this.overed]);}if(a){this.fireEvent("enter",[this.element,a]);}this.overed=a;}},drag:function(a){this.parent(a);
if(this.options.checkDroppables&&this.droppables.length){this.checkDroppables();}},stop:function(a){this.checkDroppables();this.fireEvent("drop",[this.element,this.overed,a]);
this.overed=null;return this.parent(a);}});Element.implement({makeDraggable:function(a){var b=new Drag.Move(this,a);this.store("dragger",b);return b;}});
var Slider=new Class({Implements:[Events,Options],Binds:["clickedElement","draggedKnob","scrolledElement"],options:{onTick:function(a){if(this.options.snap){a=this.toPosition(this.step);
}this.knob.setStyle(this.property,a);},initialStep:0,snap:false,offset:0,range:false,wheel:false,steps:100,mode:"horizontal"},initialize:function(g,a,f){this.setOptions(f);
this.element=document.id(g);this.knob=document.id(a);this.previousChange=this.previousEnd=this.step=-1;var h,b={},d={x:false,y:false};switch(this.options.mode){case"vertical":this.axis="y";
this.property="top";h="offsetHeight";break;case"horizontal":this.axis="x";this.property="left";h="offsetWidth";}this.full=this.element.measure(function(){this.half=this.knob[h]/2;
return this.element[h]-this.knob[h]+(this.options.offset*2);}.bind(this));this.setRange(this.options.range);this.knob.setStyle("position","relative").setStyle(this.property,-this.options.offset);
d[this.axis]=this.property;b[this.axis]=[-this.options.offset,this.full-this.options.offset];var c={snap:0,limit:b,modifiers:d,onDrag:this.draggedKnob,onStart:this.draggedKnob,onBeforeStart:(function(){this.isDragging=true;
}).bind(this),onCancel:function(){this.isDragging=false;}.bind(this),onComplete:function(){this.isDragging=false;this.draggedKnob();this.end();}.bind(this)};
if(this.options.snap){c.grid=Math.ceil(this.stepWidth);c.limit[this.axis][1]=this.full;}this.drag=new Drag(this.knob,c);this.attach();if(this.options.initialStep!=null){this.set(this.options.initialStep);
}},attach:function(){this.element.addEvent("mousedown",this.clickedElement);if(this.options.wheel){this.element.addEvent("mousewheel",this.scrolledElement);
}this.drag.attach();return this;},detach:function(){this.element.removeEvent("mousedown",this.clickedElement);this.element.removeEvent("mousewheel",this.scrolledElement);
this.drag.detach();return this;},set:function(a){if(!((this.range>0)^(a<this.min))){a=this.min;}if(!((this.range>0)^(a>this.max))){a=this.max;}this.step=Math.round(a);
this.checkStep();this.fireEvent("tick",this.toPosition(this.step));this.end();return this;},setRange:function(a,b){this.min=$pick(a[0],0);this.max=$pick(a[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.set($pick(b,this.step).floor(this.min).max(this.max));return this;},clickedElement:function(c){if(this.isDragging||c.target==this.knob){return;}var b=this.range<0?-1:1;
var a=c.page[this.axis]-this.element.getPosition()[this.axis]-this.half;a=a.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+b*this.toStep(a));
this.checkStep();this.fireEvent("tick",a);this.end();},scrolledElement:function(a){var b=(this.options.mode=="horizontal")?(a.wheel<0):(a.wheel>0);this.set(b?this.step-this.stepSize:this.step+this.stepSize);
a.stop();},draggedKnob:function(){var b=this.range<0?-1:1;var a=this.drag.value.now[this.axis];a=a.limit(-this.options.offset,this.full-this.options.offset);
this.step=Math.round(this.min+b*this.toStep(a));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(a){var b=(a+this.options.offset)*this.stepSize/this.full*this.steps;return this.options.steps?Math.round(b-=b%this.stepSize):b;},toPosition:function(a){return(this.full*Math.abs(this.min-a))/(this.steps*this.stepSize)-this.options.offset;
}});var Sortables=new Class({Implements:[Events,Options],options:{snap:4,opacity:1,clone:false,revert:false,handle:false,constrain:false,preventDefault:false},initialize:function(a,b){this.setOptions(b);
this.elements=[];this.lists=[];this.idle=true;this.addLists($$(document.id(a)||a));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(a){this.elements.push(a);
var b=a.retrieve("sortables:start",this.start.bindWithEvent(this,a));(this.options.handle?a.getElement(this.options.handle)||a:a).addEvent("mousedown",b);
},this);return this;},addLists:function(){Array.flatten(arguments).each(function(a){this.lists.push(a);this.addItems(a.getChildren());},this);return this;
},removeItems:function(){return $$(Array.flatten(arguments).map(function(a){this.elements.erase(a);var b=a.retrieve("sortables:start");(this.options.handle?a.getElement(this.options.handle)||a:a).removeEvent("mousedown",b);
return a;},this));},removeLists:function(){return $$(Array.flatten(arguments).map(function(a){this.lists.erase(a);this.removeItems(a.getChildren());return a;
},this));},getClone:function(b,a){if(!this.options.clone){return new Element(a.tagName).inject(document.body);}if($type(this.options.clone)=="function"){return this.options.clone.call(this,b,a,this.list);
}var c=a.clone(true).setStyles({margin:"0px",position:"absolute",visibility:"hidden",width:a.getStyle("width")});if(c.get("html").test("radio")){c.getElements("input[type=radio]").each(function(d,f){d.set("name","clone_"+f);
if(d.get("checked")){a.getElements("input[type=radio]")[f].set("checked",true);}});}return c.inject(this.list).setPosition(a.getPosition(a.getOffsetParent()));
},getDroppables:function(){var a=this.list.getChildren();if(!this.options.constrain){a=this.lists.concat(a).erase(this.list);}return a.erase(this.clone).erase(this.element);
},insert:function(c,b){var a="inside";if(this.lists.contains(b)){this.list=b;this.drag.droppables=this.getDroppables();}else{a=this.element.getAllPrevious().contains(b)?"before":"after";
}this.element.inject(b,a);this.fireEvent("sort",[this.element,this.clone]);},start:function(b,a){if(!this.idle||b.rightClick||["button","input"].contains(document.id(b.target).get("tag"))){return;
}this.idle=false;this.element=a;this.opacity=a.get("opacity");this.list=a.getParent();this.clone=this.getClone(b,a);this.drag=new Drag.Move(this.clone,{preventDefault:this.options.preventDefault,snap:this.options.snap,container:this.options.constrain&&this.element.getParent(),droppables:this.getDroppables(),onSnap:function(){b.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(b);},end:function(){this.drag.detach();this.element.set("opacity",this.opacity);if(this.effect){var a=this.element.getStyles("width","height");
var b=this.clone.computePosition(this.element.getPosition(this.clone.getOffsetParent()));this.effect.element=this.clone;this.effect.start({top:b.top,left:b.left,width:a.width,height:a.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 c=Array.link(arguments,{modifier:Function.type,index:$defined});
var b=this.lists.map(function(d){return d.getChildren().map(c.modifier||function(f){return f.get("id");},this);},this);var a=c.index;if(this.lists.length==1){a=0;
}return $chk(a)&&a>=0&&a<this.lists.length?b[a]:b;}});Request.JSONP=new Class({Implements:[Chain,Events,Options,Log],options:{url:"",data:{},retries:0,timeout:0,link:"ignore",callbackKey:"callback",injectScript:document.head},initialize:function(a){this.setOptions(a);
if(this.options.log){this.enableLog();}this.running=false;this.requests=0;this.triesRemaining=[];},check:function(){if(!this.running){return true;}switch(this.options.link){case"cancel":this.cancel();
return true;case"chain":this.chain(this.caller.bind(this,arguments));return false;}return false;},send:function(c){if(!$chk(arguments[1])&&!this.check(c)){return this;
}var f=$type(c),a=this.options,b=$chk(arguments[1])?arguments[1]:this.requests++;if(f=="string"||f=="element"){c={data:c};}c=$extend({data:a.data,url:a.url},c);
if(!$chk(this.triesRemaining[b])){this.triesRemaining[b]=this.options.retries;}var d=this.triesRemaining[b];(function(){var g=this.getScript(c);this.log("JSONP retrieving script with url: "+g.get("src"));
this.fireEvent("request",g);this.running=true;(function(){if(d){this.triesRemaining[b]=d-1;if(g){g.destroy();this.send(c,b).fireEvent("retry",this.triesRemaining[b]);
}}else{if(this.running&&g&&this.options.timeout){g.destroy();this.cancel().fireEvent("failure");}}}).delay(this.options.timeout,this);}).delay(Browser.Engine.trident?50:0,this);
return this;},cancel:function(){if(!this.running){return this;}this.running=false;this.fireEvent("cancel");return this;},getScript:function(c){var b=Request.JSONP.counter,d;
Request.JSONP.counter++;switch($type(c.data)){case"element":d=document.id(c.data).toQueryString();break;case"object":case"hash":d=Hash.toQueryString(c.data);
}var f=c.url+(c.url.test("\\?")?"&":"?")+(c.callbackKey||this.options.callbackKey)+"=Request.JSONP.request_map.request_"+b+(d?"&"+d:"");if(f.length>2083){this.log("JSONP "+f+" will fail in Internet Explorer, which enforces a 2083 bytes length limit on URIs");
}var a=new Element("script",{type:"text/javascript",src:f});Request.JSONP.request_map["request_"+b]=function(){this.success(arguments,a);}.bind(this);return a.inject(this.options.injectScript);
},success:function(b,a){if(!this.running){return false;}if(a){a.destroy();}this.running=false;this.log("JSONP successfully retrieved: ",b);this.fireEvent("complete",b).fireEvent("success",b).callChain();
}});Request.JSONP.counter=0;Request.JSONP.request_map={};Request.Queue=new Class({Implements:[Options,Events],Binds:["attach","request","complete","cancel","success","failure","exception"],options:{stopOnFailure:true,autoAdvance:true,concurrent:1,requests:{}},initialize:function(a){if(a){var b=a.requests;
delete a.requests;}this.setOptions(a);this.requests=new Hash;this.queue=[];this.reqBinders={};if(b){this.addRequests(b);}},addRequest:function(a,b){this.requests.set(a,b);
this.attach(a,b);return this;},addRequests:function(a){$each(a,function(c,b){this.addRequest(b,c);},this);return this;},getName:function(a){return this.requests.keyOf(a);
},attach:function(a,b){if(b._groupSend){return this;}["request","complete","cancel","success","failure","exception"].each(function(c){if(!this.reqBinders[a]){this.reqBinders[a]={};
}this.reqBinders[a][c]=function(){this["on"+c.capitalize()].apply(this,[a,b].extend(arguments));}.bind(this);b.addEvent(c,this.reqBinders[a][c]);},this);
b._groupSend=b.send;b.send=function(c){this.send(a,c);return b;}.bind(this);return this;},removeRequest:function(b){var a=$type(b)=="object"?this.getName(b):b;
if(!a&&$type(a)!="string"){return this;}b=this.requests.get(a);if(!b){return this;}["request","complete","cancel","success","failure","exception"].each(function(c){b.removeEvent(c,this.reqBinders[a][c]);
},this);b.send=b._groupSend;delete b._groupSend;return this;},getRunning:function(){return this.requests.filter(function(a){return a.running;});},isRunning:function(){return !!(this.getRunning().getKeys().length);
},send:function(b,a){var c=function(){this.requests.get(b)._groupSend(a);this.queue.erase(c);}.bind(this);c.name=b;if(this.getRunning().getKeys().length>=this.options.concurrent||(this.error&&this.options.stopOnFailure)){this.queue.push(c);
}else{c();}return this;},hasNext:function(a){return(!a)?!!this.queue.length:!!this.queue.filter(function(b){return b.name==a;}).length;},resume:function(){this.error=false;
(this.options.concurrent-this.getRunning().getKeys().length).times(this.runNext,this);return this;},runNext:function(a){if(!this.queue.length){return this;
}if(!a){this.queue[0]();}else{var b;this.queue.each(function(c){if(!b&&c.name==a){b=true;c();}});}return this;},runAll:function(){this.queue.each(function(a){a();
});return this;},clear:function(a){if(!a){this.queue.empty();}else{this.queue=this.queue.map(function(b){if(b.name!=a){return b;}else{return false;}}).filter(function(b){return b;
});}return this;},cancel:function(a){this.requests.get(a).cancel();return this;},onRequest:function(){this.fireEvent("request",arguments);},onComplete:function(){this.fireEvent("complete",arguments);
if(!this.queue.length){this.fireEvent("end");}},onCancel:function(){if(this.options.autoAdvance&&!this.error){this.runNext();}this.fireEvent("cancel",arguments);
},onSuccess:function(){if(this.options.autoAdvance&&!this.error){this.runNext();}this.fireEvent("success",arguments);},onFailure:function(){this.error=true;
if(!this.options.stopOnFailure&&this.options.autoAdvance){this.runNext();}this.fireEvent("failure",arguments);},onException:function(){this.error=true;
if(!this.options.stopOnFailure&&this.options.autoAdvance){this.runNext();}this.fireEvent("exception",arguments);}});Request.implement({options:{initialDelay:5000,delay:5000,limit:60000},startTimer:function(b){var a=function(){if(!this.running){this.send({data:b});
}};this.timer=a.delay(this.options.initialDelay,this);this.lastDelay=this.options.initialDelay;this.completeCheck=function(c){$clear(this.timer);this.lastDelay=(c)?this.options.delay:(this.lastDelay+this.options.delay).min(this.options.limit);
this.timer=a.delay(this.lastDelay,this);};return this.addEvent("complete",this.completeCheck);},stopTimer:function(){$clear(this.timer);return this.removeEvent("complete",this.completeCheck);
}});var Asset={javascript:function(g,d){d=$extend({onload:$empty,document:document,check:$lambda(true)},d);if(d.onLoad){d.onload=d.onLoad;delete d.onLoad;
}var b=new Element("script",{src:g,type:"text/javascript"});var f=d.onload.bind(b),a=d.check,h=d.document;delete d.onload;delete d.check;delete d.document;
b.addEvents({load:f,readystatechange:function(){if(["loaded","complete"].contains(this.readyState)){f();}}}).set(d);if(Browser.Engine.webkit419){var c=(function(){if(!$try(a)){return;
}$clear(c);f();}).periodical(50);}return b.inject(h.head);},css:function(b,a){a=a||{};var c=a.onload||a.onLoad;if(c){a.events=a.events||{};a.events.load=c;
delete a.onload;delete a.onLoad;}return new Element("link",$merge({rel:"stylesheet",media:"screen",type:"text/css",href:b},a)).inject(document.head);},image:function(c,b){b=$merge({onload:$empty,onabort:$empty,onerror:$empty},b);
var d=new Image();var a=document.id(d)||new Element("img");["load","abort","error"].each(function(f){var h="on"+f;var g=f.capitalize();if(b["on"+g]){b[h]=b["on"+g];
delete b["on"+g];}var i=b[h];delete b[h];d[h]=function(){if(!d){return;}if(!a.parentNode){a.width=d.width;a.height=d.height;}d=d.onload=d.onabort=d.onerror=null;
i.delay(1,a,a);a.fireEvent(f,a,1);};});d.src=a.src=c;if(d&&d.complete){d.onload.delay(1);}return a.set(b);},images:function(d,c){c=$merge({onComplete:$empty,onProgress:$empty,onError:$empty,properties:{}},c);
d=$splat(d);var a=[];var b=0;return new Elements(d.map(function(g,f){return Asset.image(g,$extend(c.properties,{onload:function(){c.onProgress.call(this,b,f);
b++;if(b==d.length){c.onComplete();}},onerror:function(){c.onError.call(this,b,f);b++;if(b==d.length){c.onComplete();}}}));}));}};var IframeShim=new Class({Implements:[Options,Events,Class.Occlude],options:{className:"iframeShim",src:'javascript:false;document.write("");',display:false,zIndex:null,margin:0,offset:{x:0,y:0},browsers:(Browser.Engine.trident4||(Browser.Engine.gecko&&!Browser.Engine.gecko19&&Browser.Platform.mac))},property:"IframeShim",initialize:function(b,a){this.element=document.id(b);
if(this.occlude()){return this.occluded;}this.setOptions(a);this.makeShim();return this;},makeShim:function(){if(this.options.browsers){var c=this.element.getStyle("zIndex").toInt();
if(!c){c=1;var b=this.element.getStyle("position");if(b=="static"||!b){this.element.setStyle("position","relative");}this.element.setStyle("zIndex",c);
}c=($chk(this.options.zIndex)&&c>this.options.zIndex)?this.options.zIndex:c-1;if(c<0){c=1;}this.shim=new Element("iframe",{src:this.options.src,scrolling:"no",frameborder:0,styles:{zIndex:c,position:"absolute",border:"none",filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"},"class":this.options.className}).store("IframeShim",this);
var a=(function(){this.shim.inject(this.element,"after");this[this.options.display?"show":"hide"]();this.fireEvent("inject");}).bind(this);if(!IframeShim.ready){window.addEvent("load",a);
}else{a();}}else{this.position=this.hide=this.show=this.dispose=$lambda(this);}},position:function(){if(!IframeShim.ready||!this.shim){return this;}var a=this.element.measure(function(){return this.getSize();
});if(this.options.margin!=undefined){a.x=a.x-(this.options.margin*2);a.y=a.y-(this.options.margin*2);this.options.offset.x+=this.options.margin;this.options.offset.y+=this.options.margin;
}this.shim.set({width:a.x,height:a.y}).position({relativeTo:this.element,offset:this.options.offset});return this;},hide:function(){if(this.shim){this.shim.setStyle("display","none");
}return this;},show:function(){if(this.shim){this.shim.setStyle("display","block");}return this.position();},dispose:function(){if(this.shim){this.shim.dispose();
}return this;},destroy:function(){if(this.shim){this.shim.destroy();}return this;}});window.addEvent("load",function(){IframeShim.ready=true;});var Mask=new Class({Implements:[Options,Events],Binds:["position"],options:{style:{},"class":"mask",maskMargins:false,useIframeShim:true,iframeShimOptions:{}},initialize:function(b,a){this.target=document.id(b)||document.id(document.body);
this.target.store("Mask",this);this.setOptions(a);this.render();this.inject();},render:function(){this.element=new Element("div",{"class":this.options["class"],id:this.options.id||"mask-"+$time(),styles:$merge(this.options.style,{display:"none"}),events:{click:function(){this.fireEvent("click");
if(this.options.hideOnClick){this.hide();}}.bind(this)}});this.hidden=true;},toElement:function(){return this.element;},inject:function(b,a){a=a||this.options.inject?this.options.inject.where:""||this.target==document.body?"inside":"after";
b=b||this.options.inject?this.options.inject.target:""||this.target;this.element.inject(b,a);if(this.options.useIframeShim){this.shim=new IframeShim(this.element,this.options.iframeShimOptions);
this.addEvents({show:this.shim.show.bind(this.shim),hide:this.shim.hide.bind(this.shim),destroy:this.shim.destroy.bind(this.shim)});}},position:function(){this.resize(this.options.width,this.options.height);
this.element.position({relativeTo:this.target,position:"topLeft",ignoreMargins:!this.options.maskMargins,ignoreScroll:this.target==document.body});return this;
},resize:function(a,f){var b={styles:["padding","border"]};if(this.options.maskMargins){b.styles.push("margin");}var d=this.target.getComputedSize(b);if(this.target==document.body){var c=window.getScrollSize();
if(d.totalHeight<c.y){d.totalHeight=c.y;}if(d.totalWidth<c.x){d.totalWidth=c.x;}}this.element.setStyles({width:$pick(a,d.totalWidth,d.x),height:$pick(f,d.totalHeight,d.y)});
return this;},show:function(){if(!this.hidden){return this;}window.addEvent("resize",this.position);this.position();this.showMask.apply(this,arguments);
return this;},showMask:function(){this.element.setStyle("display","block");this.hidden=false;this.fireEvent("show");},hide:function(){if(this.hidden){return this;
}window.removeEvent("resize",this.position);this.hideMask.apply(this,arguments);if(this.options.destroyOnHide){return this.destroy();}return this;},hideMask:function(){this.element.setStyle("display","none");
this.hidden=true;this.fireEvent("hide");},toggle:function(){this[this.hidden?"show":"hide"]();},destroy:function(){this.hide();this.element.destroy();this.fireEvent("destroy");
this.target.eliminate("mask");}});Element.Properties.mask={set:function(b){var a=this.retrieve("mask");return this.eliminate("mask").store("mask:options",b);
},get:function(a){if(a||!this.retrieve("mask")){if(this.retrieve("mask")){this.retrieve("mask").destroy();}if(a||!this.retrieve("mask:options")){this.set("mask",a);
}this.store("mask",new Mask(this,this.retrieve("mask:options")));}return this.retrieve("mask");}};Element.implement({mask:function(a){this.get("mask",a).show();
return this;},unmask:function(){this.get("mask").hide();return this;}});var Scroller=new Class({Implements:[Events,Options],options:{area:20,velocity:1,onChange:function(a,b){this.element.scrollTo(a,b);
},fps:50},initialize:function(b,a){this.setOptions(a);this.element=document.id(b);this.docBody=document.id(this.element.getDocument().body);this.listener=($type(this.element)!="element")?this.docBody:this.element;
this.timer=null;this.bound={attach:this.attach.bind(this),detach:this.detach.bind(this),getCoords:this.getCoords.bind(this)};},start:function(){this.listener.addEvents({mouseenter:this.bound.attach,mouseleave:this.bound.detach});
},stop:function(){this.listener.removeEvents({mouseenter:this.bound.attach,mouseleave:this.bound.detach});this.detach();this.timer=$clear(this.timer);},attach:function(){this.listener.addEvent("mousemove",this.bound.getCoords);
},detach:function(){this.listener.removeEvent("mousemove",this.bound.getCoords);this.timer=$clear(this.timer);},getCoords:function(a){this.page=(this.listener.get("tag")=="body")?a.client:a.page;
if(!this.timer){this.timer=this.scroll.periodical(Math.round(1000/this.options.fps),this);}},scroll:function(){var c=this.element.getSize(),a=this.element.getScroll(),i=this.element!=this.docBody?this.element.getOffsets():{x:0,y:0},d=this.element.getScrollSize(),h={x:0,y:0},f=this.options.area.top||this.options.area,b=this.options.area.bottom||this.options.area;
for(var g in this.page){if(this.page[g]<(f+i[g])&&a[g]!=0){h[g]=(this.page[g]-f-i[g])*this.options.velocity;}else{if(this.page[g]+b>(c[g]+i[g])&&a[g]+c[g]!=d[g]){h[g]=(this.page[g]-c[g]+b-i[g])*this.options.velocity;
}}h[g]=h[g].round();}if(h.y||h.x){this.fireEvent("change",[a.x+h.x,a.y+h.y]);}}});(function(){var a=function(c,b){return(c)?($type(c)=="function"?c(b):b.get(c)):"";
};this.Tips=new Class({Implements:[Events,Options],options:{onShow:function(){this.tip.setStyle("display","block");},onHide:function(){this.tip.setStyle("display","none");
},title:"title",text:function(b){return b.get("rel")||b.get("href");},showDelay:100,hideDelay:100,className:"tip-wrap",offset:{x:16,y:16},windowPadding:{x:0,y:0},fixed:false},initialize:function(){var b=Array.link(arguments,{options:Object.type,elements:$defined});
this.setOptions(b.options);if(b.elements){this.attach(b.elements);}this.container=new Element("div",{"class":"tip"});},toElement:function(){if(this.tip){return this.tip;
}return this.tip=new Element("div",{"class":this.options.className,styles:{position:"absolute",top:0,left:0}}).adopt(new Element("div",{"class":"tip-top"}),this.container,new Element("div",{"class":"tip-bottom"}));
},attach:function(b){$$(b).each(function(d){var g=a(this.options.title,d),f=a(this.options.text,d);d.erase("title").store("tip:native",g).retrieve("tip:title",g);
d.retrieve("tip:text",f);this.fireEvent("attach",[d]);var c=["enter","leave"];if(!this.options.fixed){c.push("move");}c.each(function(i){var h=d.retrieve("tip:"+i);
if(!h){h=this["element"+i.capitalize()].bindWithEvent(this,d);}d.store("tip:"+i,h).addEvent("mouse"+i,h);},this);},this);return this;},detach:function(b){$$(b).each(function(d){["enter","leave","move"].each(function(f){d.removeEvent("mouse"+f,d.retrieve("tip:"+f)).eliminate("tip:"+f);
});this.fireEvent("detach",[d]);if(this.options.title=="title"){var c=d.retrieve("tip:native");if(c){d.set("title",c);}}},this);return this;},elementEnter:function(c,b){this.container.empty();
["title","text"].each(function(f){var d=b.retrieve("tip:"+f);if(d){this.fill(new Element("div",{"class":"tip-"+f}).inject(this.container),d);}},this);$clear(this.timer);
this.timer=(function(){this.show(b);this.position((this.options.fixed)?{page:b.getPosition()}:c);}).delay(this.options.showDelay,this);},elementLeave:function(c,b){$clear(this.timer);
this.timer=this.hide.delay(this.options.hideDelay,this,b);this.fireForParent(c,b);},fireForParent:function(c,b){b=b.getParent();if(!b||b==document.body){return;
}if(b.retrieve("tip:enter")){b.fireEvent("mouseenter",c);}else{this.fireForParent(c,b);}},elementMove:function(c,b){this.position(c);},position:function(f){if(!this.tip){document.id(this);
}var c=window.getSize(),b=window.getScroll(),g={x:this.tip.offsetWidth,y:this.tip.offsetHeight},d={x:"left",y:"top"},h={};for(var i in d){h[d[i]]=f.page[i]+this.options.offset[i];
if((h[d[i]]+g[i]-b[i])>c[i]-this.options.windowPadding[i]){h[d[i]]=f.page[i]-this.options.offset[i]-g[i];}}this.tip.setStyles(h);},fill:function(b,c){if(typeof c=="string"){b.set("html",c);
}else{b.adopt(c);}},show:function(b){if(!this.tip){document.id(this);}if(!this.tip.getParent()){this.tip.inject(document.body);}this.fireEvent("show",[this.tip,b]);
},hide:function(b){if(!this.tip){document.id(this);}this.fireEvent("hide",[this.tip,b]);}});})();var Spinner=new Class({Extends:Mask,options:{"class":"spinner",containerPosition:{},content:{"class":"spinner-content"},messageContainer:{"class":"spinner-msg"},img:{"class":"spinner-img"},fxOptions:{link:"chain"}},initialize:function(){this.parent.apply(this,arguments);
this.target.store("spinner",this);var a=function(){this.active=false;}.bind(this);this.addEvents({hide:a,show:a});},render:function(){this.parent();this.element.set("id",this.options.id||"spinner-"+$time());
this.content=document.id(this.options.content)||new Element("div",this.options.content);this.content.inject(this.element);if(this.options.message){this.msg=document.id(this.options.message)||new Element("p",this.options.messageContainer).appendText(this.options.message);
this.msg.inject(this.content);}if(this.options.img){this.img=document.id(this.options.img)||new Element("div",this.options.img);this.img.inject(this.content);
}this.element.set("tween",this.options.fxOptions);},show:function(a){if(this.active){return this.chain(this.show.bind(this));}if(!this.hidden){this.callChain.delay(20,this);
return this;}this.active=true;return this.parent(a);},showMask:function(a){var b=function(){this.content.position($merge({relativeTo:this.element},this.options.containerPosition));
}.bind(this);if(a){this.parent();b();}else{this.element.setStyles({display:"block",opacity:0}).tween("opacity",this.options.style.opacity||0.9);b();this.hidden=false;
this.fireEvent("show");this.callChain();}},hide:function(a){if(this.active){return this.chain(this.hide.bind(this));}if(this.hidden){this.callChain.delay(20,this);
return this;}this.active=true;return this.parent(a);},hideMask:function(a){if(a){return this.parent();}this.element.tween("opacity",0).get("tween").chain(function(){this.element.setStyle("display","none");
this.hidden=true;this.fireEvent("hide");this.callChain();}.bind(this));},destroy:function(){this.content.destroy();this.parent();this.target.eliminate("spinner");
}});Spinner.implement(new Chain);Request=Class.refactor(Request,{options:{useSpinner:false,spinnerOptions:{},spinnerTarget:false},initialize:function(a){this._send=this.send;
this.send=function(b){var c=this.getSpinner();if(c){c.chain(this._send.bind(this,b)).show();}else{this._send(b);}return this;};this.previous(a);},getSpinner:function(){if(!this.spinner){var a=document.id(this.options.spinnerTarget)||document.id(this.options.update);
if(this.options.useSpinner&&a){this.spinner=a.get("spinner",this.options.spinnerOptions);["onComplete","onException","onCancel"].each(function(b){this.addEvent(b,this.spinner.hide.bind(this.spinner));
},this);}}return this.spinner;}});Element.Properties.spinner={set:function(a){var b=this.retrieve("spinner");return this.eliminate("spinner").store("spinner:options",a);
},get:function(a){if(a||!this.retrieve("spinner")){if(this.retrieve("spinner")){this.retrieve("spinner").destroy();}if(a||!this.retrieve("spinner:options")){this.set("spinner",a);
}new Spinner(this,this.retrieve("spinner:options"));}return this.retrieve("spinner");}};Element.implement({spin:function(a){this.get("spinner",a).show();
return this;},unspin:function(){var a=Array.link(arguments,{options:Object.type,callback:Function.type});this.get("spinner",a.options).hide(a.callback);
return this;}});MooTools.lang.set("en-US","Date",{months:["January","February","March","April","May","June","July","August","September","October","November","December"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dateOrder:["month","date","year"],shortDate:"%m/%d/%Y",shortTime:"%I:%M%p",AM:"AM",PM:"PM",ordinal:function(a){return(a>3&&a<21)?"th":["th","st","nd","rd","th"][Math.min(a%10,4)];
},lessThanMinuteAgo:"less than a minute ago",minuteAgo:"about a minute ago",minutesAgo:"{delta} minutes ago",hourAgo:"about an hour ago",hoursAgo:"about {delta} hours ago",dayAgo:"1 day ago",daysAgo:"{delta} days ago",weekAgo:"1 week ago",weeksAgo:"{delta} weeks ago",monthAgo:"1 month ago",monthsAgo:"{delta} months ago",yearAgo:"1 year ago",yearsAgo:"{delta} years ago",lessThanMinuteUntil:"less than a minute from now",minuteUntil:"about a minute from now",minutesUntil:"{delta} minutes from now",hourUntil:"about an hour from now",hoursUntil:"about {delta} hours from now",dayUntil:"1 day from now",daysUntil:"{delta} days from now",weekUntil:"1 week from now",weeksUntil:"{delta} weeks from now",monthUntil:"1 month from now",monthsUntil:"{delta} months from now",yearUntil:"1 year from now",yearsUntil:"{delta} years from now"});
MooTools.lang.set("de-DE","Date",{months:["Januar","Februar","M&auml;rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dateOrder:["date","month","year"],shortDate:"%d.%m.%Y",shortTime:"%H:%M",AM:"vormittags",PM:"nachmittags",ordinal:".",lessThanMinuteAgo:"Vor weniger als einer Minute",minuteAgo:"Vor einer Minute",minutesAgo:"Vor {delta} Minuten",hourAgo:"Vor einer Stunde",hoursAgo:"Vor {delta} Stunden",dayAgo:"Vor einem Tag",daysAgo:"Vor {delta} Tagen",weekAgo:"Vor einer Woche",weeksAgo:"Vor {delta} Wochen",monthAgo:"Vor einem Monat",monthsAgo:"Vor {delta} Monaten",yearAgo:"Vor einem Jahr",yearsAgo:"Vor {delta} Jahren",lessThanMinuteUntil:"In weniger als einer Minute",minuteUntil:"In einer Minute",minutesUntil:"In {delta} Minuten",hourUntil:"In ca. einer Stunde",hoursUntil:"In ca. {delta} Stunden",dayUntil:"In einem Tag",daysUntil:"In {delta} Tagen",weekUntil:"In einer Woche",weeksUntil:"In {delta} Wochen",monthUntil:"In einem Monat",monthsUntil:"In {delta} Monaten",yearUntil:"In einem Jahr",yearsUntil:"In {delta} Jahren"});
var Clientcide = {
version: '%build%',
assetLocation: "http://github.com/anutron/clientcide/raw/master/Assets",
setAssetLocation: function(baseHref) {
Clientcide.assetLocation = baseHref;
if (Clientcide.preloaded) Clientcide.preLoadCss();
},
preLoadCss: function(){
if (window.StickyWin && StickyWin.ui) StickyWin.ui();
if (window.StickyWin && StickyWin.pointy) StickyWin.pointy();
Clientcide.preloaded = true;
return true;
},
preloaded: false
};
(function(){
if (!window.addEvent) return;
var preload = function(){
if (window.dbug) dbug.log('preloading clientcide css');
if (!Clientcide.preloaded) Clientcide.preLoadCss();
};
window.addEvent('domready', preload);
window.addEvent('load', preload);
})();
setCNETAssetBaseHref = Clientcide.setAssetLocation;
Class.ToElement = new Class({
toElement: function(){
return this.element;
}
});
var ToElement = Class.ToElement;
var dbug = {
logged: [],
timers: {},
firebug: false,
enabled: false,
log: function() {
dbug.logged.push(arguments);
},
nolog: function(msg) {
dbug.logged.push(arguments);
},
time: function(name){
dbug.timers[name] = new Date().getTime();
},
timeEnd: function(name){
if (dbug.timers[name]) {
var end = new Date().getTime() - dbug.timers[name];
dbug.timers[name] = false;
dbug.log('%s: %s', name, end);
} else dbug.log('no such timer: %s', name);
},
enable: function(silent) {
var con = window.firebug ? firebug.d.console.cmd : window.console;
if((!!window.console && !!window.console.warn) || window.firebug) {
try {
dbug.enabled = true;
dbug.log = function(){
try {
(con.debug || con.log).apply(con, arguments);
} catch(e) {
console.log(Array.slice(arguments));
}
};
dbug.time = function(){
con.time.apply(con, arguments);
};
dbug.timeEnd = function(){
con.timeEnd.apply(con, arguments);
};
if(!silent) dbug.log('enabling dbug');
for(var i=0;i<dbug.logged.length;i++){ dbug.log.apply(con, dbug.logged[i]); }
dbug.logged=[];
} catch(e) {
dbug.enable.delay(400);
}
}
},
disable: function(){
if(dbug.firebug) dbug.enabled = false;
dbug.log = dbug.nolog;
dbug.time = function(){};
dbug.timeEnd = function(){};
},
cookie: function(set){
var value = document.cookie.match('(?:^|;)\\s*jsdebug=([^;]*)');
var debugCookie = value ? unescape(value[1]) : false;
if((!$defined(set) && debugCookie != 'true') || ($defined(set) && set)) {
dbug.enable();
dbug.log('setting debugging cookie');
var date = new Date();
date.setTime(date.getTime()+(24*60*60*1000));
document.cookie = 'jsdebug=true;expires='+date.toGMTString()+';path=/;';
} else dbug.disableCookie();
},
disableCookie: function(){
dbug.log('disabling debugging cookie');
document.cookie = 'jsdebug=false;path=/;';
}
};
(function(){
var fb = !!window.console || !!window.firebug;
var con = window.firebug ? window.firebug.d.console.cmd : window.console;
var debugMethods = ['debug','info','warn','error','assert','dir','dirxml'];
var otherMethods = ['trace','group','groupEnd','profile','profileEnd','count'];
function set(methodList, defaultFunction) {
for(var i = 0; i < methodList.length; i++){
dbug[methodList[i]] = (fb && con[methodList[i]])?con[methodList[i]]:defaultFunction;
}
};
set(debugMethods, dbug.log);
set(otherMethods, function(){});
})();
if ((!!window.console && !!window.console.warn) || window.firebug){
dbug.firebug = true;
var value = document.cookie.match('(?:^|;)\\s*jsdebug=([^;]*)');
var debugCookie = value ? unescape(value[1]) : false;
if(window.location.href.indexOf("jsdebug=true")>0 || debugCookie=='true') dbug.enable();
if(debugCookie=='true')dbug.log('debugging cookie enabled');
if(window.location.href.indexOf("jsdebugCookie=true")>0){
dbug.cookie();
if(!dbug.enabled)dbug.enable();
}
if(window.location.href.indexOf("jsdebugCookie=false")>0)dbug.disableCookie();
}/*
Script: FixPNG.js
Extends the Browser hash object to include methods useful in managing the window location and urls.
License:
http://www.clientcide.com/wiki/cnet-libraries#license
*/
$extend(Browser, {
fixPNG: function(el) {
try {
if (Browser.Engine.trident4){
el = document.id(el);
if (!el) return el;
if (el.get('tag') == "img" && el.get('src').test(".png")) {
var vis = el.isDisplayed();
try { //safari sometimes crashes here, so catch it
dim = el.getSize();
}catch(e){}
if (!vis){
var before = {};
['visibility', 'display', 'position'].each(function(style){
before[style] = this.style[style]||'';
}, this);
this.setStyles({
visibility: 'hidden',
display: 'block',
position:'absolute'
});
dim = el.getSize(); //works now, because the display isn't none
this.setStyles(before); //put it back where it was
el.hide();
}
var replacement = new Element('span', {
id:(el.id)?el.id:'',
'class':(el.className)?el.className:'',
title:(el.title)?el.title:(el.alt)?el.alt:'',
styles: {
display: vis?'inline-block':'none',
width: dim.x,
height: dim.y,
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader (src='"
+ el.src + "', sizingMethod='scale');"
},
src: el.src
});
if (el.style.cssText) {
try {
var styles = {};
var s = el.style.cssText.split(';');
s.each(function(style){
var n = style.split(':');
styles[n[0]] = n[1];
});
replacement.setStyle(styles);
} catch(e){ dbug.log('fixPNG1: ', e)}
}
if (replacement.cloneEvents) replacement.cloneEvents(el);
replacement.replaces(el);
} else if (el.get('tag') != "img") {
var imgURL = el.getStyle('background-image');
if (imgURL.test(/\((.+)\)/)){
el.setStyles({
background: '',
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src=" + imgURL.match(/\((.+)\)/)[1] + ")"
});
};
}
}
} catch(e) {dbug.log('fixPNG2: ', e)}
},
pngTest: /\.png$/, // saves recreating the regex repeatedly
scanForPngs: function(el, className) {
className = className||'fixPNG';
if (document.getElements){ // more efficient but requires 'selectors'
el = document.id(el||document.body);
el.getElements('img[src$=.png]').addClass(className);
} else { // scan the whole page
var els = $$('img').each(function(img) {
if (Browser.pngTest(img.src)){
img.addClass(className);
}
});
}
}
});
if (Browser.Engine.trident4) window.addEvent('domready', function(){$$('img.fixPNG').each(Browser.fixPNG)});
Browser.Popup = new Class({
Implements:[Options, Events],
options: {
width: 500,
height: 300,
x: 50,
y: 50,
toolbar: 0,
location: 0,
directories: 0,
status: 0,
scrollbars: 'yes',
resizable: 1,
name: 'popup'
},
initialize: function(url, options){
this.url = url || false;
this.setOptions(options);
if (this.options.x == 'center') this.options.x = Math.floor((screen.availWidth - this.options.width)/2);
if (this.options.y == 'center') this.options.y = Math.floor((screen.availHeight - this.options.height)/2);
if (this.url) this.openWin();
},
openWin: function(url){
url = url || this.url;
var options = 'toolbar='+this.options.toolbar+
',location='+this.options.location+
',directories='+this.options.directories+
',status='+this.options.status+
',scrollbars='+this.options.scrollbars+
',resizable='+this.options.resizable+
',width='+this.options.width+
',height='+this.options.height+
',top='+this.options.y+
',left='+this.options.x;
this.window = window.open(url, this.options.name, options);
if (!this.window) {
this.window = window.open('', this.options.name, options);
this.window.location.href = url;
}
this.focus.delay(100, this);
return this;
},
focus: function(){
if (this.window) this.window.focus();
else if (this.focusTries<10) this.focus.delay(100, this); //try again
else {
this.blocked = true;
this.fireEvent('onBlock');
}
return this;
},
focusTries: 0,
blocked: null,
close: function(){
this.window.close();
return this;
}
});
Fx.Marquee = new Class({
Extends: Fx.Morph,
options: {
mode: 'horizontal', //or vertical
message: '', //the message to display
revert: true, //revert back to the previous message after a specified time
delay: 5000, //how long to wait before reverting
cssClass: 'msg', //the css class to apply to that message
showEffect: { opacity: 1 },
hideEffect: {opacity: 0},
revertEffect: { opacity: [0,1] },
currentMessage: null
},
initialize: function(container, options){
container = document.id(container);
var msg = this.options.currentMessage || (container.getChildren().length == 1)?container.getFirst():'';
var wrapper = new Element('div', {
styles: { position: 'relative' },
'class':'fxMarqueeWrapper'
}).inject(container);
this.parent(wrapper, options);
this.current = this.wrapMessage(msg);
},
wrapMessage: function(msg){
if (document.id(msg) && document.id(msg).hasClass('fxMarquee')) { //already set up
var wrapper = document.id(msg);
} else {
var wrapper = new Element('span', {
'class':'fxMarquee',
styles: {
position: 'relative'
}
});
if (document.id(msg)) wrapper.grab(document.id(msg)); //if the message is a dom element, inject it inside the wrapper
else if ($type(msg) == "string") wrapper.set('html', msg); //else set it's value as the inner html
}
return wrapper.inject(this.element); //insert it into the container
},
announce: function(options) {
this.setOptions(options).showMessage();
return this;
},
showMessage: function(reverting){
(function(){
var chain = this.$chain?$A(this.$chain):[];
this.clearChain();
this.element = document.id(this.element);
this.current = document.id(this.current);
this.message = document.id(this.message);
this.start(this.options.hideEffect).chain(function(){
if (reverting) {
this.message.hide();
if (this.current) this.current.show();
} else {
if (this.message) this.message.dispose();
this.message = this.wrapMessage(this.options.message);
if (this.current) this.current.hide();
}
this.start((reverting)?this.options.revertEffect:this.options.showEffect).chain(function(){
if (this.$chain) this.$chain.combine(chain);
else this.$chain = chain;
this.fireEvent((reverting)?'onRevert':'onMessage');
if (!reverting && this.options.revert) this.showMessage(true);
else this.callChain.delay(this.options.delay, this);
}.bind(this));
}.bind(this));
}).delay((reverting)?this.options.delay:10, this);
return this;
}
});
var Collapsible = new Class({
Extends: Fx.Reveal,
initialize: function(clicker, section, options) {
this.clicker = document.id(clicker);
this.section = document.id(section);
this.parent(this.section, options);
this.boundtoggle = this.toggle.bind(this);
this.attach();
},
attach: function(){
this.clicker.addEvent('click', this.boundtoggle);
},
detach: function(){
this.clicker.removeEvent('click', this.boundtoggle);
}
});
var Collapsable = Collapsible;var HoverGroup = new Class({
Implements: [Options, Events],
Binds: ['enter', 'leave', 'remain'],
options: {
elements: [],
delay: 300,
start: ['mouseenter'],
remain: [],
end: ['mouseleave']
},
initialize: function(options) {
this.setOptions(options);
this.attachTo(this.options.elements);
this.addEvents({
leave: function(){
this.active = false;
},
enter: function(){
this.active = true;
}
});
},
elements: [],
attachTo: function(elements, detach){
var starters = {}, remainers = {}, enders = {};
elements = $splat(document.id(elements)||$$(elements));
this.options.start.each(function(start) {
starters[start] = this.enter;
}, this);
this.options.end.each(function(end) {
enders[end] = this.leave;
}, this);
this.options.remain.each(function(remain){
remainers[remain] = this.remain;
}, this);
if (detach) {
elements.each(function(el) {
el.removeEvents(starters).removeEvents(enders).removeEvents(remainers);
this.elements.erase(el);
}, this);
} else {
elements.each(function(el){
el.addEvents(starters).addEvents(enders).addEvents(remainers);
});
this.elements.combine(elements);
}
return this;
},
detachFrom: function(elements){
this.attachTo(elements, true);
},
enter: function(e){
this.isMoused = true;
this.assert(e);
},
leave: function(e){
this.isMoused = false;
this.assert(e);
},
remain: function(e){
if (this.active) this.enter(e);
},
assert: function(e){
$clear(this.assertion);
this.assertion = (function(){
if (!this.isMoused && this.active) this.fireEvent('leave', e);
else if (this.isMoused && !this.active) this.fireEvent('enter', e);
}).delay(this.options.delay, this);
}
});
var MenuSlider = new Class({
Implements: [Options, Events],
Binds: ['slideIn', 'hide', 'slideOut'],
options: {
fxOptions: {
duration: 400,
transition: 'expo:out',
link: 'cancel'
},
outFx: false,
useIframeShim: true
},
initialize: function(menu, subMenu, options) {
this.menu = document.id(menu);
this.subMenu = document.id(subMenu);
this.setOptions(options);
this.makeSlider();
this.hoverGroup = new HoverGroup($merge(this.options.hoverGroupOptions, {
elements: [this.menu, this.subMenu],
onEnter: this.slideIn,
onLeave: this.options.outFx ? this.slideOut : this.hide
}));
},
makeSlider: function(){
this.slider = new Fx.Slide(this.subMenu, this.options.fxOptions).hide();
if (this.options.useIframeShim && window.IframeShim) this.shim = new IframeShim(this.subMenu);
},
slideIn: function(){
this.fireEvent('inStart');
this.slider.slideIn().chain(function(){
if (this.shim) this.shim.show();
this.fireEvent('in');
}.bind(this));
this.visible = true;
return this;
},
slideOut: function(useFx){
this.hoverGroup.active = true;
this.slider.slideOut().chain(this.hide);
return this;
},
hide: function(){
$clear(this.hoverGroup.assertion);
this.hoverGroup.active = false;
this.slider.cancel();
this.slider.hide();
this.fireEvent('out');
if (this.shim) this.shim.hide();
this.visible = false;
return this;
},
isVisible: function(){
return this.visible;
}
});
var TabSwapper = new Class({
Implements: [Options, Events],
options: {
selectedClass: 'tabSelected',
mouseoverClass: 'tabOver',
deselectedClass: '',
rearrangeDOM: true,
initPanel: 0,
smooth: false,
smoothSize: false,
maxSize: null,
effectOptions: {
duration: 500
},
cookieName: null,
cookieDays: 999
},
tabs: [],
sections: [],
clickers: [],
sectionFx: [],
initialize: function(options){
this.setOptions(options);
var prev = this.setup();
if (prev) return prev;
if (this.options.cookieName && this.recall()) this.show(this.recall().toInt());
else this.show(this.options.initPanel);
},
setup: function(){
var opt = this.options;
sections = $$(opt.sections);
tabs = $$(opt.tabs);
if (tabs[0] && tabs[0].retrieve('tabSwapper')) return tabs[0].retrieve('tabSwapper');
clickers = $$(opt.clickers);
tabs.each(function(tab, index){
this.addTab(tab, sections[index], clickers[index], index);
}, this);
},
addTab: function(tab, section, clicker, index){
tab = document.id(tab); clicker = document.id(clicker); section = document.id(section);
if (this.tabs.indexOf(tab) >= 0 && tab.retrieve('tabbered')
&& this.tabs.indexOf(tab) != index && this.options.rearrangeDOM) {
this.moveTab(this.tabs.indexOf(tab), index);
return this;
}
if (!$defined(index)) index = this.tabs.length;
if (index > 0 && this.tabs[index-1] && this.options.rearrangeDOM) {
tab.inject(this.tabs[index-1], 'after');
section.inject(this.tabs[index-1].retrieve('section'), 'after');
}
this.tabs.splice(index, 0, tab);
clicker = clicker || tab;
tab.addEvents({
mouseout: function(){
tab.removeClass(this.options.mouseoverClass);
}.bind(this),
mouseover: function(){
tab.addClass(this.options.mouseoverClass);
}.bind(this)
});
clicker.addEvent('click', function(e){
e.preventDefault();
this.show(index);
}.bind(this));
tab.store('tabbered', true);
tab.store('section', section);
tab.store('clicker', clicker);
this.hideSection(index);
return this;
},
removeTab: function(index){
var now = this.tabs[this.now];
if (this.now == index){
if (index > 0) this.show(index - 1);
else if (index < this.tabs.length) this.show(index + 1);
}
this.now = this.tabs.indexOf(now);
return this;
},
moveTab: function(from, to){
var tab = this.tabs[from];
var clicker = tab.retrieve('clicker');
var section = tab.retrieve('section');
var toTab = this.tabs[to];
var toClicker = toTab.retrieve('clicker');
var toSection = toTab.retrieve('section');
this.tabs.erase(tab).splice(to, 0, tab);
tab.inject(toTab, 'before');
clicker.inject(toClicker, 'before');
section.inject(toSection, 'before');
return this;
},
show: function(i){
if (!$chk(this.now)) {
this.tabs.each(function(tab, idx){
if (i != idx)
this.hideSection(idx);
}, this);
}
this.showSection(i).save(i);
return this;
},
save: function(index){
if (this.options.cookieName)
Cookie.write(this.options.cookieName, index, {duration:this.options.cookieDays});
return this;
},
recall: function(){
return (this.options.cookieName)?$pick(Cookie.read(this.options.cookieName), false): false;
},
hideSection: function(idx) {
var tab = this.tabs[idx];
if (!tab) return this;
var sect = tab.retrieve('section');
if (!sect) return this;
if (sect.getStyle('display') != 'none') {
this.lastHeight = sect.getSize().y;
sect.setStyle('display', 'none');
tab.swapClass(this.options.selectedClass, this.options.deselectedClass);
this.fireEvent('onBackground', [idx, sect, tab]);
}
return this;
},
showSection: function(idx) {
var tab = this.tabs[idx];
if (!tab) return this;
var sect = tab.retrieve('section');
if (!sect) return this;
var smoothOk = this.options.smooth && !Browser.Engine.trident4;
if (this.now != idx) {
if (!tab.retrieve('tabFx'))
tab.store('tabFx', new Fx.Morph(sect, this.options.effectOptions));
var overflow = sect.getStyle('overflow');
var start = {
display:'block',
overflow: 'hidden'
};
if (smoothOk) start.opacity = 0;
var effect = false;
if (smoothOk) {
effect = {opacity: 1};
} else if (sect.getStyle('opacity').toInt() < 1) {
sect.setStyle('opacity', 1);
if (!this.options.smoothSize) this.fireEvent('onActiveAfterFx', [idx, sect, tab]);
}
if (this.options.smoothSize) {
var size = sect.getDimensions().height;
if ($chk(this.options.maxSize) && this.options.maxSize < size)
size = this.options.maxSize;
if (!effect) effect = {};
effect.height = size;
}
if ($chk(this.now)) this.hideSection(this.now);
if (this.options.smoothSize && this.lastHeight) start.height = this.lastHeight;
sect.setStyles(start);
if (effect) {
tab.retrieve('tabFx').start(effect).chain(function(){
this.fireEvent('onActiveAfterFx', [idx, sect, tab]);
sect.setStyles({
height: this.options.maxSize == effect.height ? this.options.maxSize : "auto",
overflow: overflow
});
sect.getElements('input, textarea').setStyle('opacity', 1);
}.bind(this));
}
this.now = idx;
this.fireEvent('onActive', [idx, sect, tab]);
}
tab.swapClass(this.options.deselectedClass, this.options.selectedClass);
return this;
}
});
$extend(Browser, {
getHost: function(url) {
return new URI(url).get('host');
},
getQueryStringValue: function(key, url){
return new URI(url).getData(key);
},
getQueryStringValues: function(url){
return new URI(url).getData();
},
getPort: function(url){
return new URI(url).get('port');
},
redraw: function(element){
var n = document.createTextNode(' ');
this.adopt(n);
(function(){n.dispose()}).delay(1);
return this;
}
});
window.addEvent('domready', function(){
var count = 0;
function setQs(){
function retry(){
count++;
if (count < 20) setQs.delay(50);
};
try {
if (!Browser.getQueryStringValues()) retry();
else Browser.qs = Browser.getQueryStringValues();
} catch(e){
retry();
}
}
setQs();
});$extend(Class.prototype, {
refactor: function(props){
this.prototype = Class.refactor(this, props).prototype;
return this;
}
});
var MorphTabs = new Class({
Implements: [Options, Chain],
version: '1.4',
options: {
width: '300px',
height: '200px',
changeTransition: {
transition: 'linear',
duration: 'normal'
},
panelStartFx: 'blind:left',
panelEndFx: 'blind:right',
mouseOverClass: 'over',
activateOnLoad: 'first',
activateTabFunction: $empty,
evalScripts: false,
useAjax: false,
ajaxUrl: '',
ajaxOptions: {},
ajaxLoadingText: 'Loading...',
slideShow: false,
slideShowDelay: 3
},
initialize: function(element, options) {
this.setOptions(options);
this.el = $(element);
this.elid = element;
this.el.setStyles({
'height': this.options.height,
'width': this.options.width
});
this.titles = $$('#' + this.elid + ' ul.morphtabs_title li');
this.panelHeight = this.options.height.toInt() - (this.titles[0].getSize().y + 4);
this.panelWidth = this.el.getSize().x;
this.panel = new Element('div', {
'id': 'morphPanel',
'class': 'morphtabs_panel',
'styles': {
'width': this.panelWidth + 'px',
'height': this.panelHeight + 'px'
}
}).inject(this.el.getFirst(), 'after');
this.panelWrapBorder = this.panel.getStyle('border-width').toInt() * 2;
this.panelWrap = new Element('div', {
'id': 'morphPanelWrap',
'class': 'morphtabs_panelwrap',
'styles': {
'height': (this.panelHeight + this.panelWrapBorder) + 'px',
'width': (this.panelWidth + this.panelWrapBorder) + 'px'
}
}).wraps(this.panel);
this.panelTop = this.panelWrap.getStyle('top').toInt();
if (isNaN(this.panelTop)) this.panelTop = 0; // fix by Rob Verzera.
this.panelWrap.setStyle('top', (Browser.Engine.trident5) ? (this.panelTop + 4) + 'px' : this.panelTop + 'px'); // fix for ie7.
this.attach(this.titles);
if(this.options.activateOnLoad != 'none') {
this.firstRun = true;
if(this.options.activateOnLoad == 'first') {
this.activate(this.titles[0]);
} else {
this.activate(this.options.activateOnLoad);
}
}
if (this.options.slideShow) this.start();
},
attach: function(elements) {
$$(elements).each(function(element) {
var enter = element.retrieve('tab:enter', this.elementEnter.bindWithEvent(this, element));
var leave = element.retrieve('tab:leave', this.elementLeave.bindWithEvent(this, element));
var mouseclick = element.retrieve('tab:click', this.elementClick.bindWithEvent(this, element));
element.addEvents({
mouseenter: enter,
mouseleave: leave,
click: mouseclick
});
var el = $(element.get('title'));
element.store('panel:html', el.get('html'));
element.store('panel:id', el.id);
var elementDispose = $(element.get('title')).dispose();
}, this);
return this;
},
detach: function(elements) {
$$(elements).each(function(element){
element.removeEvent('mouseenter', element.retrieve('tab:enter') || $empty);
element.removeEvent('mouseleave', element.retrieve('tab:leave') || $empty);
element.removeEvent('mouseclick', element.retrieve('tab:click') || $empty);
element.eliminate('tab:enter').eliminate('tab:leave').eliminate('tab:click').eliminate('panel:html').eliminate('panel:id');
var elementDispose = element.dispose();
});
return this;
},
activate: function(tab) {
if($type(tab) == 'string') {
myTab = $$('#' + this.elid + ' ul li').filter('[title=' + tab + ']')[0];
tab = myTab;
}
if($type(tab) == 'element') {
var html = tab.retrieve('panel:html');
this.panel.id = tab.retrieve('panel:id');
this.titles.removeClass('active');
tab.addClass('active');
this.activeTitle = tab;
this.panel.setStyle('overflow', 'hidden');
if ($type(this.options.changeTransition) == 'object' && !this.firstRun) {
this.getPanelFx(this.options.panelStartFx).chain(function() {
this.fill(this.panel, html);
this.getPanelFx(this.options.panelEndFx).chain(function() {
this.options.activateTabFunction(this.panel.id);
this.panel.setStyle('overflow', 'auto');
this.panel.scrollTo(0,0);
}.bind(this));
}.bind(this));
} else if ($type(this.options.changeTransition) == 'object' && this.firstRun) {
this.fill(this.panel, html);
this.panel.store('flag', 'end');
this.getPanelFx(this.options.panelEndFx).chain(function() {
this.options.activateTabFunction(this.panel.id);
this.panel.setStyle('overflow', 'auto');
this.panel.scrollTo(0,0);
}.bind(this));
} else {
this.fill(this.panel, html);
this.options.activateTabFunction(this.panel.id);
this.panel.setStyle('overflow', 'auto');
this.panel.scrollTo(0,0);
}
}
},
elementEnter: function(event, element) {
if(element != this.activeTitle) {
element.addClass(this.options.mouseOverClass);
}
},
elementLeave: function(event, element) {
if(element != this.activeTitle) {
element.removeClass(this.options.mouseOverClass);
}
},
elementClick: function(event, element) {
if(element != this.activeTitle) {
element.removeClass(this.options.mouseOverClass);
this.activate(element);
}
if (this.slideShow) {
this.setOptions(this.slideShow, false);
this.clearChain();
this.stop();
this.panel.store('fxEffect:flag', 'show');
}
},
fill: function(element, contents) {
if(this.options.useAjax) {
this.getContent();
} else {
element.set('html', contents);
if (this.options.evalScripts) {
element.get('html').stripScripts(true);
}
}
},
getContent: function() {
this.panel.set('html', this.options.ajaxLoadingText);
var newOptions = {
url: this.options.ajaxUrl + '?tab=' + this.activeTitle.getProperty('title'),
update: this.panel
};
this.options.ajaxOptions = $merge(this.options.ajaxOptions, newOptions);
var tabRequest = new Request.HTML(this.options.ajaxOptions);
tabRequest.send();
},
addTab: function(title, label, content) {
var newTitle = new Element('li', {
'title': title
});
newTitle.appendText(label);
this.titles.include(newTitle);
$$('#' + this.elid + ' ul').adopt(newTitle);
var newPanel = new Element('div', {
'id': title,
'class': 'mootabs_panel'
});
if(!this.options.useAjax) {
newPanel.set('html',content);
}
this.el.adopt(newPanel);
this.attach(newTitle);
},
removeTab: function(title){
if(this.activeTitle.title == title) {
this.activate(this.titles[0]);
}
var tab = $$('#' + this.elid + ' ul li').filter('[title=' + title + ']')[0];
this.detach(tab);
},
start: function() {
this.slideShow = this.next.periodical(this.options.slideShowDelay * 1000, this);
},
stop: function() {
$clear(this.slideShow);
},
next: function() {
var nextTab = this.activeTitle.getNext();
if(!nextTab) {
nextTab = this.titles[0];
}
this.activate(nextTab);
},
previous: function() {
var previousTab = this.activeTitle.getPrevious();
if(!previousTab) {
previousTab = this.titles[this.titles.length - 1];
}
this.activate(previousTab);
},
getPanelFx: function(fx) {
this.flag = (this.firstRun) ? this.panel.retrieve('fxEffect:flag', 'show') : this.panel.retrieve('fxEffect:flag');
var styles = {
'margin-top': [0, 0],
'margin-left': [0, 0],
'width': [this.panelWidth, this.panelWidth],
'height': [this.panelHeight, this.panelHeight],
'opacity': [1, 1]
};
fxEffect = this.panel.get('morph', this.options.changeTransition);
switch(fx) {
case 'blind:up':
if (this.flag == 'hide') {
styles = fxEffect.start($merge(styles, {
'height': [this.panelHeight, 0]
}));
} else {
styles = fxEffect.start($merge(styles, {
'margin-top': [this.panelHeight, 0],
'height': [0, this.panelHeight]
}));
}
break;
case 'blind:down':
if (this.flag == 'hide') {
styles = fxEffect.start($merge(styles, {
'margin-top': [this.panelHeight],
'height': [0]
}));
} else {
styles = fxEffect.start($merge(styles, {
'height': [0, this.panelHeight]
}));
}
break;
case 'blind:left':
if (this.flag == 'hide') {
styles = fxEffect.start($merge(styles, {
'width': [this.panelWidth, 0]
}));
} else {
styles = fxEffect.start($merge(styles, {
'margin-left': [this.panelWidth, 0],
'width': [0, this.panelWidth]
}));
}
break;
case 'blind:right':
if (this.flag == 'hide') {
styles = fxEffect.start($merge(styles, {
'margin-left': [this.panelWidth],
'width': [0]
}));
} else {
styles = fxEffect.start($merge(styles, {
'width': [0, this.panelWidth]
}));
}
break;
case 'slide:up':
if (this.flag == 'hide') {
styles = fxEffect.start($merge(styles, {
'margin-top': [0, -this.panelHeight],
'width': [this.panelWidth],
'height': [this.panelHeight]
}));
} else {
styles = fxEffect.start($merge(styles, {
'margin-top': [this.panelHeight, 0]
}));
}
break;
case 'slide:down':
if (this.flag == 'hide') {
styles = fxEffect.start($merge(styles, {
'margin-top': [0, this.panelHeight],
'width': [this.panelWidth],
'height': [this.panelHeight]
}));
} else {
styles = fxEffect.start($merge(styles, {
'margin-top': [-this.panelHeight, 0]
}));
}
break;
case 'slide:left':
if (this.flag == 'hide') {
styles = fxEffect.start($merge(styles, {
'margin-left': [0, -this.panelWidth],
'width': [this.panelWidth],
'height': [this.panelHeight]
}));
} else {
styles = fxEffect.start($merge(styles, {
'margin-left': [this.panelWidth, 0]
}));
}
break;
case 'slide:right':
if (this.flag == 'hide') {
styles = fxEffect.start($merge(styles, {
'margin-left': [0, this.panelWidth],
'width': [this.panelWidth],
'height': [this.panelHeight]
}));
} else {
styles = fxEffect.start($merge(styles, {
'margin-left': [-this.panelWidth, 0]
}));
}
break;
case 'fade':
if (this.flag == 'hide') {
styles = fxEffect.start($merge(styles, {
'opacity': [1, 0]
}));
}
break;
case 'appear':
if (this.flag == 'show') {
styles = fxEffect.start($merge(styles, {
'opacity': [0, 1]
}));
}
break;
}
this.panel.store('fxEffect:flag', (this.flag == 'hide') ? 'show' : 'hide');
if (this.firstRun) this.firstRun = false;
return styles;
}
});
var selectTrans = new Class({
Implements: [Options],
options: {
transition: [
'select',
'linear',
'quad:in', 'quad:out', 'quad:in:out',
'cubic:in', 'cubic:out', 'cubic:in:out',
'quart:in', 'quart:out', 'quart:in:out',
'quint:in', 'quint:out', 'quint:in:out',
'expo:in', 'expo:out', 'expo:in:out',
'circ:in', 'circ:out', 'circ:in:out',
'sine:in', 'sine:out', 'sine:in:out',
'back:in', 'back:out', 'back:in:out',
'bounce:in', 'bounce:out', 'bounce:in:out',
'elastic:in', 'elastic:out', 'elastic:in:out'
],
duration: [
'select',
'short', 'normal', 'long'
],
commonFx: [
'select',
'blind:up', 'blind:down', 'blind:left', 'blind:right',
'slide:up', 'slide:down', 'slide:left', 'slide:right'
],
panelStartFx: ['fade'],
panelEndFx: ['appear']
},
initialize: function(element,morphTabs) {
var divs = $$('#' + element + ' div');
divs.each(function(element) {
var selectOptions = null;
var selectBox = new Element('select').inject(element);
var opt = element.id.split("_");
if (opt[0].contains('Fx')) {
this.fx = [];
this.fx = this.options.commonFx;
if (opt[0].contains('Start')) {
selectOptions = this.fx.include(this.options.panelStartFx);
} else {
selectOptions = this.fx.include(this.options.panelEndFx).erase(this.options.panelStartFx);
}
} else {
selectOptions = this.options[opt[opt.length - 1]];
}
selectOptions.each(function(selectValue) {
new Element('option', {
'value': selectValue,
'text': selectValue
}).inject(selectBox);
});
var selectChange = selectBox.retrieve('selectBox:change', this.elementChange.bindWithEvent(this, morphTabs));
selectBox.addEvents({
change: selectChange
});
},this);
},
elementChange: function(event, morphTabs) {
var event = new Event(event).stop();
var changeValue = event.target.get('value');
var opt = event.target.getParent().id.split("_");
if (opt.length == 1) {
morphTabs.options[opt[0]] = changeValue;
} else {
morphTabs.options[opt[0]][opt[1]] = changeValue;
}
}
});
function resetInput(obj, default_txt) {
if(obj.value == "") {
obj.value = default_txt;
}
}
function _System() {
String.prototype.Trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.LTrim = function() {
return this.replace(/^\s+/,"");
}
String.prototype.RTrim = function() {
return this.replace(/\s+$/,"");
}
String.prototype.Contains = function(somestring)
{
return (this.indexOf(somestring) != -1 ? true : false);
}
String.prototype.Trunc = function(len)
{
return this.substring(0, len) + (this.length > len ? "..." : "");
}
}
function _XML() {
this.selectSingleNode = function (XmlDocument, Xpath)
{
if (System.OS.Browser == BT_IE)
{
return XmlDocument.selectSingleNode(Xpath);
} else {
try
{
var XResult = XmlDocument.evaluate(Xpath, XmlDocument, null, XPathResult.ANY_TYPE, null);
var result = XResult.iterateNext();
result.text = result.textContent;
return result;
}
catch (e)
{
return null;
}
}
}
this.selectNodes = function(XmlDocument, Xpath)
{
if (System.OS.Browser == BT_IE)
{
return XmlDocument.selectNodes(Xpath);
} else {
try
{
var XResult = XmlDocument.evaluate(Xpath, XmlDocument, null, XPathResult.ANY_TYPE, null);
if (XResult != null)
{
var result = new Array();
var item = XResult.iterateNext();
while(item != null)
{
item.text = item.textContent;
result.push(item);
item = XResult.iterateNext();
}
return result;
} else return null;
}
catch (e)
{
return null;
}
}
}
this.HttpRequest = function()
{
var request = null;
if (System.OS.Browser == BT_IE)
{
request = new ActiveXObject("Microsoft.XMLHTTP");
} else {
request = new XMLHttpRequest();
}
return request;
}
this.LoadXml = function(request, filename, readystatefunc)
{
request.onreadystatechange = readystatefunc;
request.open("GET", filename, true);
request.send(null);
}
}
System = new _System();
_System.prototype.Xml = new _XML();
_System.prototype.DOM = new function()
{
this.ObjPointer = function (Obj) {
if (typeof Obj == "object")
{
return Obj;
} else return document.getElementById(Obj);
}
this.uniqueID = function(optionalBaseString) {
var base = "";
var uidcounter = 0;
if (typeof optionalBaseString != "undefined")
{
base = optionalBaseString;
} else base = "obj";
var uidcounter=0;
while (document.getElementById(base + uidcounter) != null) uidcounter++;
return (base + uidcounter);
}
this.findPosX = function(obj) {
var curleft = 0;
if (obj.offsetParent) {
while (1) {
curleft+=obj.offsetLeft;
if (!obj.offsetParent) {
break;
}
obj=obj.offsetParent;
}
} else if (obj.x) {
curleft+=obj.x;
}
return curleft;
}
this.findPosY = function(obj) {
var curtop = 0;
if (obj.offsetParent) {
while (1) {
curtop+=obj.offsetTop;
if (!obj.offsetParent) {
break;
}
obj=obj.offsetParent;
}
} else if (obj.y) {
curtop+=obj.y;
}
return curtop;
}
this.getAbsoluteDivs = function()
{
var arr = new Array();
var all_divs = document.body.getElementsByTagName("DIV");
var j = 0;
for (i = 0; i < all_divs.length; i++)
if (all_divs.item(i).style.position=='absolute')
{
arr[j] = all_divs.item(i);
j++;
}
return arr;
}
this.bringToFront = function(obj)
{
var divs = System.DOM.getAbsoluteDivs();
var max_index = 0;
var cur_index;
for (i = 0; i < divs.length; i++)
{
var item = divs[i];
if (item == obj ||
item.style.zIndex == '')
continue;
cur_index = parseInt(item.style.zIndex);
if (max_index < cur_index)
{
max_index = cur_index;
}
}
obj.style.zIndex = max_index + 1;
}
this.AddClass = function (Obj, NewClassName)
{
Obj = System.DOM.ObjPointer(Obj);
sClass = Obj.className;
if (!sClass.Contains(NewClassName))
{
sClass = sClass.RTrim() + " " + NewClassName;
Obj.className = sClass;
return true;
} else return false;
}
this.RemoveClass = function (Obj, OldClassName)
{
Obj = System.DOM.ObjPointer(Obj);
sClass = Obj.className;
if (sClass.Contains(OldClassName))
{
var regExp = new RegExp(OldClassName + "\s*", "gi");
sClass = sClass.replace(regExp, "").Trim();
Obj.className = sClass;
return true;
} else return false;
}
this.ToggleClass = function(Obj, ClassName)
{
Obj = System.DOM.ObjPointer(Obj);
sClass = Obj.className;
if (sClass.Contains(ClassName))
{
return System.DOM.RemoveClass(Obj, ClassName);
} else return System.DOM.AddClass(Obj, ClassName);
}
this.ReplaceClass = function(Obj, ClassName, NewClassName)
{
Obj = System.DOM.ObjPointer(Obj);
sClass = Obj.className;
if (sClass.Contains(ClassName))
{
if (System.DOM.RemoveClass(Obj, ClassName))
return System.DOM.AddClass(Obj, NewClassName);
} else return false;
}
this.AddStyle = function (Obj, NewStyleName)
{
Obj = System.DOM.ObjPointer(Obj);
NewStyleName = NewStyleName.toUpperCase();
sStyle = Obj.style.cssText.toUpperCase();
if (!sStyle.Contains(NewStyleName))
{
sStyle = sStyle.RTrim() + "; " + NewStyleName;
Obj.style.cssText = sStyle;
return true;
} else return false;
}
this.RemoveStyle = function (Obj, OldStyleName)
{
Obj = System.DOM.ObjPointer(Obj);
OldStyleName = OldStyleName.toUpperCase();
sStyle = Obj.style.cssText.toUpperCase();
if (sStyle.Contains(OldStyleName))
{
var regExp = new RegExp(OldStyleName + "\s*", "gi");
sStyle = sStyle.replace(regExp, "").Trim();
Obj.style.cssText = sStyle;
return true;
} else return false;
}
this.ToggleStyle = function(Obj, StyleName)
{
StyleName = StyleName.toUpperCase();
Obj = System.DOM.ObjPointer(Obj);
sStyle = Obj.style.cssText.toUpperCase();
if (sStyle.Contains(StyleName))
{
return System.DOM.RemoveStyle(Obj, StyleName);
} else return System.DOM.AddStyle(Obj, StyleName);
}
this.ReplaceStyle = function(Obj, StyleName, NewStyleName)
{
NewStyleName = NewStyleName.toUpperCase();
StyleName = StyleName.toUpperCase();
Obj = System.DOM.ObjPointer(Obj);
sStyle = Obj.style.cssText.toUpperCase();
if (sStyle.Contains(StyleName))
{
if (System.DOM.RemoveStyle(Obj, StyleName))
return System.DOM.AddStyle(Obj, NewStyleName);
} else return false;
}
}
BT_MAJOR_VERSION = 0;
BT_COMPLETE_VERSION = 1;
BT_IE = new CBrowserType("Internet Explorer");
BT_FIREFOX = new CBrowserType("Firefox");
BT_OPERA = new CBrowserType("Opera");
BT_SAFARI = new CBrowserType("Safari");
BT_OTHER = new CBrowserType("Other");
_System.prototype.OS = new function()
{
this.Browser = (new CBrowserType()).Detect();
this.Browser.Analyze(BT_COMPLETE_VERSION);
}
function CBrowserType(SID)
{
if (arguments.length == 0)
{
this.Detect = function() {
var ieVersion;
ieVersion = 0;
BT_IE.Version = ieVersion;
return (ieVersion > 0 ? BT_IE : (typeof document.all == "object" ? BT_OPERA : (document.getElementById ? (document.implementation.createDocument.prototype ? BT_FIREFOX : BT_SAFARI) : BT_OTHER)));
}
} else {
this.SID = SID;
this.toString = function() { return this.SID; };
this.Analyze = function(versionType) {
if (typeof this.Version == "undefined")
{
if (this == BT_OPERA)
{
if(window.opera) {
if(window.opera.version) {
this.Version = window.opera.version();
} else {
this.Version = navigator.userAgent.substring(navigator.userAgent.indexOf("Opera/")+6, navigator.userAgent.indexOf(" ("));
}
}
} else if (this == BT_FIREFOX)
{
this.Version = navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox/")+8);
} else if (this == BT_SAFARI)
{
this.Version = navigator.userAgent.substring(navigator.userAgent.indexOf("Version/")+8, navigator.userAgent.indexOf("Safari"));
} else this.Version = "Unknown";
if (versionType == BT_MAJOR_VERSION)
{
if (this.Version.indexOf(".") != -1 && this.Version.lastIndexOf(".") != -1)
{
if (this.Version.indexOf(".") != this.Version.lastIndexOf("."))
{
this.Version = this.Version.substring(0, this.Version.indexOf(".")+2) * 1;
}
}
}
}
}
}
}// /js/namespaces/nsmonster.js
function CMonsterComponents()
{
}
function CjsUI()
{
this.Components = new CMonsterComponents();
}
function CMonster()
{
this.jsUI = new CjsUI();
}
Monster = new CMonster();
function IContainer(Caller)
{
Caller.ContentHolder = null;
Caller.Container = null;
Caller.Skin = null;
Caller.Parameters = new Array();
Caller.AddParameter = function(TopObject)
{
return function(ParamName, ParamValue) {
TopObject.Parameters.push(new Parameter(ParamName, ParamValue));
}
} (Caller);
Caller.GetParameter = function(TopObject)
{
return function(ParamName) {
TopObject.Parameters.push(new Parameter(ParamName, ParamValue));
}
} (Caller);
}// /js/namespaces/components/combobox.js
function ComboGlobals()
{
this.MCCImagesPath = "http://media.monster.com/mm/cup/";
}
var MCCGlobals = new ComboGlobals();
function locationsVisible()
{
return this.DropDownContent.style.visibility == "hidden" ? false : true;
}
var MCC__SELECTANDGO = 0;
var MCC__SELECTANDSTOP = 1;
function CComboBox(DropDownButton, ContentDiv, ComboFaceDiv, ComboCaptionText, GETVariableName, GETVariableINPUTID, AnchorName, Behaviour)
{
this.hasEvent = false;
this.AnchorName = AnchorName;
this.DropDownBtn = document.getElementById(DropDownButton);
this.DropDownContent = document.getElementById(ContentDiv);
this.ComboFace = document.getElementById(ComboFaceDiv);
this.ComboFace.parentNode.style.position = "absolute";
this.ComboCaption = document.getElementById(ComboCaptionText);
this.VariableName = GETVariableName;
this.InputId = GETVariableINPUTID;
this.LocationsVisible = locationsVisible;
this.BtnMouseOver = function (CallerObject)
{
return function ()
{
CallerObject.DropDownBtn.src = MCCGlobals.MCCImagesPath + "xpbtn_o.gif";
CallerObject.DropDownBtn.parentNode.parentNode.className = "xpborder-focus combowidth comboline";
}
} (this);
this.BtnMouseOut = function (CallerObject)
{
return function ()
{
CallerObject.DropDownBtn.src = MCCGlobals.MCCImagesPath + "xpbtn_n.gif";
CallerObject.DropDownBtn.parentNode.parentNode.className = "xpborder combowidth comboline";
}
} (this);
this.BtnMouseDown = function (CallerObject)
{
return function ()
{
CallerObject.DropDownBtn.src = MCCGlobals.MCCImagesPath + "xpbtn_p.gif";
}
} (this);
this.BtnMouseUp = function (CallerObject)
{
return function (e)
{
CallerObject.DropDownBtn.src = MCCGlobals.MCCImagesPath + "xpbtn_o.gif";
if (System.OS.Browser == BT_IE)
{
window.event.cancelBubble = true;
if (CallerObject.hasEvent)
{
document.body.detachEvent("onclick", CallerObject.ClickHandler);
} else document.body.attachEvent("onclick", CallerObject.ClickHandler);
} else {
if (CallerObject.hasEvent)
{
document.body.removeEventListener("click", CallerObject.ClickHandler, false);
} else document.body.addEventListener("click", CallerObject.ClickHandler, false);
e.stopPropagation();
}
CallerObject.hasEvent = !CallerObject.hasEvent;
if (CallerObject.LocationsVisible())
{
CallerObject.DropDownContent.style.display = "none";
CallerObject.DropDownContent.style.visibility = "hidden";
CallerObject.DropDownContent.style.overflow = "hidden";
} else {
CallerObject.DropDownContent.style.visibility = "visible";
CallerObject.DropDownContent.style.overflow = "auto";
CallerObject.DropDownContent.style.display = "block";
}
}
} (this);
this.ClickHandler = function (CallerObject)
{
return function(mevent)
{
src = System.OS.Browser == BT_IE ? window.event.srcElement : mevent.srcElement;
if (!src) src = System.OS.Browser == BT_IE ? window.event.target : mevent.target;
inside = false;
while (src.nodeName != "BODY")
{
if (src.id.indexOf("MCC__") > -1)
{
inside = true;
break;
}
src = src.parentNode;
}
if (!inside)
{
CallerObject.MCCOpen();
}
}
} (this);
this.MCCOpen = function(CallerObject)
{
return function (e)
{
if (System.OS.Browser == BT_IE)
{
window.event.cancelBubble = true;
if (CallerObject.hasEvent)
{
document.body.detachEvent("onclick", CallerObject.ClickHandler);
} else document.body.attachEvent("onclick", CallerObject.ClickHandler);
} else {
if (CallerObject.hasEvent)
{
document.body.removeEventListener("click", CallerObject.ClickHandler, false);
} else document.body.addEventListener("click", CallerObject.ClickHandler, false);
if (e) e.stopPropagation();
}
CallerObject.hasEvent = !CallerObject.hasEvent;
if (CallerObject.LocationsVisible())
{
CallerObject.DropDownContent.style.display = "none";
CallerObject.DropDownContent.style.visibility = "hidden";
CallerObject.DropDownContent.style.overflow = "hidden";
} else {
CallerObject.DropDownContent.style.visibility = "visible";
CallerObject.DropDownContent.style.overflow = "auto";
CallerObject.DropDownContent.style.display = "block";
}
}
} (this);
this.LineMouseOver = function ()
{
if (this.style.backgroundColor != "#669999")
{
this.style.backgroundColor = "#316ac5";
this.childNodes[0].className = this.childNodes[0].className.replace("combotext", "combotexthover" )
}
}
this.LineMouseOut = function ()
{
if (this.style.backgroundColor != "#669999")
{
this.style.backgroundColor = "#ffffff";
this.childNodes[0].className = this.childNodes[0].className.replace("combotexthover", "combotext")
}
}
this.LineClick = function(CallerObject)
{
return function ()
{
Href = this.childNodes[0].href;
this.childNodes[0].href = "#" + CallerObject.AnchorName;
CallerObject.ComboCaption.innerHTML = this.innerHTML;
ttle = CallerObject.ComboCaption.childNodes[0];
ttle.onmouseover = null;
ttle.onmouseout = null;
ttle.onclick = CallerObject.MCCOpen;
ttle.style.backgroundColor = "#ffffff";
ttle.style.color = "#333333";
if (System.OS.Browser == BT_IE)
{
if (CallerObject.hasEvent)
{
document.body.detachEvent("onclick", CallerObject.ClickHandler);
} else document.body.attachEvent("onclick", CallerObject.ClickHandler);
} else {
if (CallerObject.hasEvent)
{
document.body.removeEventListener("click", CallerObject.ClickHandler, false);
} else document.body.addEventListener("click", CallerObject.ClickHandler, false);
}
CallerObject.hasEvent = !CallerObject.hasEvent;
if (CallerObject.LocationsVisible())
{
CallerObject.DropDownContent.style.display = "none";
CallerObject.DropDownContent.style.visibility = "hidden";
CallerObject.DropDownContent.style.overflow = "hidden";
} else {
CallerObject.DropDownContent.style.visibility = "visible";
CallerObject.DropDownContent.style.overflow = "auto";
CallerObject.DropDownContent.style.display = "block";
}
document.getElementById(CallerObject.InputId).value = Href;
}
} (this);
this.LineClickGo = function ()
{
Href = this.childNodes[0].href;
window.location.assign(Href);
}
this.DropDownBtn.onmouseover = this.BtnMouseOver;
this.DropDownBtn.onmouseout = this.BtnMouseOut;
this.DropDownBtn.onmousedown = this.BtnMouseDown;
this.ComboFace.onmouseover = this.BtnMouseOver;
this.ComboFace.onmouseout = this.BtnMouseOut;
this.ComboCaption.onmouseover = this.BtnMouseOver;
this.ComboCaption.onmouseout = this.BtnMouseOut;
this.ComboFace.onclick = this.MCCOpen;
this.ComboCaption.onclick = this.MCCOpen;
this.DropDownBtn.onclick = this.BtnMouseUp;
this.DropDownBtn.style.cursor = "pointer";
this.DropDownContent.style.visibility = "hidden";
this.DropDownContent.style.overflow = "hidden";
this.DropDownContent.style.display = "none";
divs = this.DropDownContent.getElementsByTagName("div");
for (i=0; i<divs.length; i++)
{
if (divs[i].className == "comboline linewidth combotext")
{
if (divs[i].childNodes[0].href.indexOf("#") == -1)
{
divs[i].style.cursor = "pointer";
divs[i].style.width = "183px";
divs[i].onmouseover = this.LineMouseOver;
divs[i].onmouseout = this.LineMouseOut;
if (Behaviour == MCC__SELECTANDGO)
{
divs[i].onclick = this.LineClickGo;
} else divs[i].onclick = this.LineClick;
divs[i].onmouseover();
divs[i].onmouseout();
} else divs[i].childNodes[0].style.cursor = "default"
}
}
input = document.createElement("INPUT");
input.setAttribute('type', 'hidden');
input.setAttribute('id', this.InputId);
input.setAttribute('name', this.VariableName);
this.DropDownContent.appendChild(input);
}
function MCCOnComboScroll()
{
var x = this.scrollTop;
var y = 17;
fpart = Math.round(((x / 17) * 10) % 10);
ipart = Math.floor(x/17);
if (fpart >= 5)
{
this.scrollTop = 17 * (ipart+1);
} else this.scrollTop = 17 * ipart;
}
var ComboBoxSkins = {
XPRoyale : {
Border: "1px solid #7f9db9",
BorderOver: "1px solid #335ea8",
ButtonOver: "http://media.monster.com/mm/homepage/qs/xpbtn_o.gif",
ButtonNormal: "http://media.monster.com/mm/homepage/qs/xpbtn_n.gif",
ButtonPressed: "http://media.monster.com/mm/homepage/qs/xpbtn_p.gif",
ssWidth: "9px",
ssHeight: "9px",
isWidth: 9,
isHeight: 9,
FaceBackgroundColor: "white",
ContentBackgroundColor: "white",
Cursor: "pointer",
FontFamily: "Verdana",
FontSize: "11px",
FontColor: "#333333"
},
AlphaChannel: "http://media.monster.com/mm/homepage/qs/spacer.png",
MaxHeight : 17,
HolderHeight: 120,
ApplyIEFilter: function (El)
{
El.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + El.src + "', sizingMethod='image')";
El.src = this.AlphaChannel;
}
}; // ComboBoxSkins class
function CjComboBox(Skin)
{
IContainer(this); // Inherit IContainer
this.Skin = Skin;
this.hasEvent = false; // Has the outside click event handler = false
this.Width = 200; //default width
this.getWidth = function() { return this.Width; }
this.setWidth = function(w) { this.Width = w; this.setContentWidth(w) }
this.ContentWidth = this.Width; //defualt to size of parent
this.ContentHeight = ComboBoxSkins.HolderHeight; //default width
this.getHeight = function() { return this.ContentHeight; }
this.setHeight = function(h) { this.ContentHeight = h; }
this.setContentWidth = function(w) { this.ContentWidth = w;}
this.Float = "left";
this.CloseBoxes = new Array();
this.closeOnOpen = function(boxes)
{
this.CloseBoxes = boxes;
}
this.setFloat = function(f)
{
this.Float = f;
}
this.Caption = "";
this.FirstCaption = "";
this.setCaption = function(newText) {
this.Caption = newText;
if (this.ComboCaption)
{
this.ComboCaption.innerHTML = this.Caption;
}
if (this.FirstCaption == "")
{
this.FirstCaption = this.Caption;
}
}
this.AttachTo = function (Container)
{
this.Container = Container;
if (typeof this.Container == "string")
{
System.DOM.ObjPointer(this.Container).appendChild(this.ComboFace);
System.DOM.ObjPointer(this.Container).appendChild(this.ContentHolder);
}
}
this.RepositionHolder = function()
{
}
this.Create = function()
{
this.ComboFace = document.createElement("div");
this.ComboFace.id = System.DOM.uniqueID("CjComboBox");
this.ComboFace.style.width = this.Width + "px";
this.ComboFace.style.height = ComboBoxSkins.MaxHeight + "px";
this.ComboFace.style.border = this.Skin.Border;
this.ComboFace.style.lineHeight = ComboBoxSkins.MaxHeight + "px";
this.ComboFace.style.backgroundColor = this.Skin.FaceBackgroundColor;
this.ComboFace.style.cursor = this.Skin.Cursor;
this.ComboFace.style.zIndex = 10000;
this.ComboFace.style.styleFloat = this.Float;
this.ComboFace.style.cssFloat = this.Float;
this.ComboCaption = document.createElement("div");
this.ComboCaption.id = System.DOM.uniqueID("jComboCaption");
this.ComboCaption.style.FontFamily = this.Skin.FontFamily;
this.ComboCaption.style.FontSize = this.Skin.FontSize;
this.ComboCaption.style.FontColor = this.Skin.FontColor;
this.ComboCaption.style.styleFloat = "left";
this.ComboCaption.style.cssFloat = "left";
this.ComboCaption.style.backgroundColor = this.Skin.FaceBackgroundColor;
this.ComboCaption.style.cursor = this.Skin.Cursor;
this.ComboCaption.style.lineHeight = ComboBoxSkins.MaxHeight + "px";
this.ComboCaption.style.paddingLeft = "2px";
this.setCaption(this.Caption);
this.ComboButtonHolder = document.createElement("div");
this.ComboButtonHolder.style.styleFloat = "right";
this.ComboButtonHolder.style.cssFloat = "right";
this.ComboButtonHolder.style.width = ComboBoxSkins.MaxHeight + "px";
this.ComboButtonHolder.style.height = ComboBoxSkins.MaxHeight + "px";
this.ComboButton = document.createElement("img");
this.ComboButton.alt = this.Caption;
this.ComboButton.id = System.DOM.uniqueID("jComboButton");
this.ComboButton.src = this.Skin.ButtonNormal;
var brclr = document.createElement("br");
brclr.style.clear = "both";
brclr.style.cssFloat = "none";
brclr.style.styleFloat = "none";
this.ContentHolder = document.createElement("div");
this.ContentHolder.style.height = this.ContentHeight + "px";
this.ContentHolder.style.width = this.ContentWidth + "px";
this.ContentHolder.style.backgroundColor = this.Skin.ContentBackgroundColor;
this.ContentHolder.style.border = this.Skin.Border;
this.ContentHolder.style.position = "absolute";
this.ContentHolder.style.overflow = "hidden";
this.ContentHolder.style.overflowX = "hidden";
this.ContentHolder.style.display = "none";
this.ContentHolder.style.zIndex = this.ComboFace.style.zIndex - 1;
this.ContentHolder.style.clear = "both";
this.ContentHolder.id = System.DOM.uniqueID("jComboContentHolder");
this.ComboFace.appendChild(this.ComboCaption);
this.ComboButtonHolder.appendChild(this.ComboButton);
this.ComboFace.appendChild(this.ComboButtonHolder);
this.ComboFace.appendChild(brclr);
document.body.appendChild(this.ComboFace);
this.RepositionHolder();
document.body.appendChild(this.ContentHolder);
System.DOM.bringToFront(this.ComboFace);
this.ComboButton.onmouseover = this.BtnMouseOver;
this.ComboButton.onmouseout = this.BtnMouseOut;
this.ComboButton.onmousedown = this.BtnMouseDown;
this.ComboButton.onclick = this.BtnMouseUp;
this.ComboFace.onmouseover = this.BtnMouseOver;
this.ComboFace.onmouseout = this.BtnMouseOut;
this.ComboFace.onclick = this.MCCOpen;
this.ComboCaption.onmouseover = this.BtnMouseOver;
this.ComboCaption.onmouseout = this.BtnMouseOut;
this.ComboCaption.onclick = this.MCCOpen;
}
this.ContentVisible = function() { return this.ContentHolder.style.display == "none" ? false : true; }
this.ShowContent = function() { this.RepositionHolder(); this.ContentHolder.style.display = "block"; }
this.HideContent = function() { this.ContentHolder.style.display = "none"; }
this.BtnMouseOver = function (CallerObject)
{
return function ()
{
CallerObject.ComboButton.src = CallerObject.Skin.ButtonOver;
CallerObject.ComboFace.style.border = CallerObject.Skin.BorderOver;
}
} (this);
this.BtnMouseOut = function (CallerObject)
{
return function ()
{
CallerObject.ComboButton.src = CallerObject.Skin.ButtonNormal;
CallerObject.ComboFace.style.border = CallerObject.Skin.Border;
}
} (this);
this.BtnMouseDown = function (CallerObject)
{
return function ()
{
CallerObject.ComboButton.src = CallerObject.Skin.ButtonPressed;
}
} (this);
this.BtnMouseUp = function (CallerObject)
{
return function (e)
{
for (i=0; i<CallerObject.CloseBoxes.length; i++)
{
if (CallerObject.CloseBoxes[i].ContentVisible()) {
CallerObject.CloseBoxes[i].MCCOpen();
}
}
CallerObject.ComboButton.src = CallerObject.Skin.ButtonOver;
if (System.OS.Browser == BT_IE)
{
window.event.cancelBubble = true;
if (CallerObject.hasEvent)
{
document.body.detachEvent("onclick", CallerObject.ClickHandler);
} else document.body.attachEvent("onclick", CallerObject.ClickHandler);
} else {
if (CallerObject.hasEvent)
{
document.body.removeEventListener("click", CallerObject.ClickHandler, false);
} else document.body.addEventListener("click", CallerObject.ClickHandler, false);
e.stopPropagation();
}
CallerObject.hasEvent = !CallerObject.hasEvent;
if (CallerObject.ContentVisible())
{
CallerObject.HideContent();
} else {
CallerObject.ShowContent();
}
}
} (this);
this.ClickHandler = function (CallerObject)
{
return function(mevent)
{
src = System.OS.Browser == BT_IE ? window.event.srcElement : mevent.srcElement;
if (!src) src = System.OS.Browser == BT_IE ? window.event.target : mevent.target;
inside = false;
while (src.nodeName != "BODY")
{
if (src.id.indexOf("jCombo") > -1 )
{
inside = true;
break;
}
src = src.parentNode;
}
if (!inside)
{
CallerObject.MCCOpen();
}
}
} (this);
this.MCCOpen = function(CallerObject)
{
return function (e)
{
for (i=0; i<CallerObject.CloseBoxes.length; i++)
{
if (CallerObject.CloseBoxes[i].ContentVisible()) {
CallerObject.CloseBoxes[i].MCCOpen();
}
}
if (System.OS.Browser == BT_IE)
{
window.event.cancelBubble = true;
if (CallerObject.hasEvent)
{
document.body.detachEvent("onclick", CallerObject.ClickHandler);
} else document.body.attachEvent("onclick", CallerObject.ClickHandler);
} else {
if (CallerObject.hasEvent)
{
document.body.removeEventListener("click", CallerObject.ClickHandler, false);
} else document.body.addEventListener("click", CallerObject.ClickHandler, false);
if (e) e.stopPropagation();
}
CallerObject.hasEvent = !CallerObject.hasEvent;
if (CallerObject.ContentVisible())
{
CallerObject.HideContent();
} else {
CallerObject.ShowContent();
}
}
} (this);
}// /js/namespaces/components/treeview.js
var TreeViewSkins = {
XPRoyale : {
Collapsed: "http://media.monster.com/mm/homepage/qs/xproyale/treeview-collapsed-sign.png",
Expanded: "http://media.monster.com/mm/homepage/qs/xproyale/treeview-expanded-sign.png",
Normal: "http://media.monster.com/mm/homepage/qs/xproyale/radio-unselected.png",
NormalHover: "http://media.monster.com/mm/homepage/qs/xproyale/radio-over.png",
NormalPressed: "http://media.monster.com/mm/homepage/qs/xproyale/radio-unselected-pressed.png",
Selected: "http://media.monster.com/mm/homepage/qs/xproyale/radio-selected.png",
SelectedHover: "http://media.monster.com/mm/homepage/qs/xproyale/radio-selected-over.png",
SelectedPressed: "http://media.monster.com/mm/homepage/qs/xproyale/radio-selected-pressed.png",
Disabled: "http://media.monster.com/mm/homepage/qs/xproyale/radio-disabled.png",
ssWidth: "9px",
ssHeight: "9px",
isWidth: 9,
isHeight: 9,
ContentBackgroundColor: "white",
Cursor: "pointer",
FontFamily: "Verdana",
FontSize: "11px",
FontColor: "#333333"
},
VistaAero : {
Collapsed: "http://media.monster.com/mm/homepage/qs/vista/treeview-collapsed-sign.png",
Expanded: "http://media.monster.com/mm/homepage/qs/vista/treeview-expanded-sign.png",
Normal: "http://media.monster.com/mm/homepage/qs/vista/radio-unselected.png",
NormalHover: "http://media.monster.com/mm/homepage/qs/vista/radio-over.png",
NormalPressed: "http://media.monster.com/mm/homepage/qs/vista/radio-over.png",
Selected: "http://media.monster.com/mm/homepage/qs/vista/radio-selected.png",
SelectedHover: "http://media.monster.com/mm/homepage/qs/vista/radio-unselected-pressed.png",
SelectedPressed: "http://media.monster.com/mm/homepage/qs/vista/radio-selected.png",
Disabled: "http://media.monster.com/mm/homepage/qs/xproyale/radio-disabled.png",
ssWidth: "9px",
ssHeight: "9px",
isWidth: 9,
isHeight: 9
},
AlphaChannel: "http://media.monster.com/mm/homepage/qs/spacer.png",
MaxHeight : 17,
ApplyIEFilter: function (El)
{
El.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + El.src + "', sizingMethod='image')";
El.src = this.AlphaChannel;
}
}; // TreeViewSkins class
var TextNodeSkins = {
XPRoyale : {
ContentBackgroundColor: "white",
Cursor: "pointer",
FontFamily: "Verdana",
FontSize: "11px",
FontColor: "#333333",
Height: 17,
Padding: "0px 0px 0px 3px",
OnOverStyle: "text-decoration: none",
OnOutStyle: "text-decoration: none"
},
VistaAero : {
ContentBackgroundColor: "white",
Cursor: "pointer",
FontFamily: "Verdana",
FontSize: "11px",
FontColor: "#333333",
Height: 17,
Padding: "0px 0px 0px 3px",
OnOverStyle: "text-decoration: none",
OnOutStyle: "text-decoration: none"
},
AlphaChannel: "http://media.monster.com/mm/homepage/qs/spacer.png",
MaxHeight : 17,
ApplyIEFilter: function (El)
{
El.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + El.src + "', sizingMethod='image')";
El.src = this.AlphaChannel;
}
}; // TextNodeSkins class
var TVCheckBoxMenuSkins = {
XPRoyale : {
ContentBackgroundColor: "#AEC350",
Cursor: "pointer",
FontFamily: "Verdana",
FontSize: "11px",
FontColor: "#4B590E",
Height: 17,
Padding: "0px 3px 0px 3px",
OnOverStyle: "text-decoration: none",
OnOutStyle: "text-decoration: none"
},
VistaAero : {
ContentBackgroundColor: "white",
Cursor: "pointer",
FontFamily: "Verdana",
FontSize: "11px",
FontColor: "#333333",
Height: 17,
Padding: "0px 3px 0px 3px",
OnOverStyle: "text-decoration: none",
OnOutStyle: "text-decoration: none"
},
AlphaChannel: "http://media.monster.com/mm/homepage/qs/spacer.png",
MaxHeight : 17,
ApplyIEFilter: function (El)
{
El.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + El.src + "', sizingMethod='image')";
El.src = this.AlphaChannel;
}
}; // TVCheckBoxMenuSkins class
function Parameter(paramName, paramValue)
{
this.Name = paramName;
this.Value = paramValue;
}
function CTextNode(Skin, Caption, Variable, TreeView)
{
this.Caption = "";
this.Element = null;
this.Skin = Skin;
this.Value = "";
this.TreeView = TreeView;
this.Variable = Variable;
this.setCaption = function (caption)
{
this.Caption = caption;
if (this.Element != null)
{
this.Element.innerHTML = this.Caption;
this.Element.title = this.Caption;
}
}
this.setValue = function(newValue)
{
this.Value = newValue;
}
this.Create = function()
{
this.Element = document.createElement("div");
this.Element.style.padding = this.Skin.Padding;
this.Element.style.styleFloat = "left";
this.Element.style.cssFloat = "left";
this.Element.style.height = "auto";
this.Element.style.width = this.TreeView.Container.ContentWidth - 50 + "px";
this.Element.style.fontFamily = this.Skin.FontFamily;
this.Element.style.fontSize = this.Skin.FontSize;
this.Element.style.color = this.Skin.FontColor;
this.Element.style.cursor = this.Skin.Cursor;
this.Element.style.lineHeight = this.Skin.Height + "px";
this.Element.innerHTML = this.Caption;
this.Element.title = this.Caption;
this.Element.style.overflow = "hidden";
this.Element.onmouseover = function(Caller) { return function() { System.DOM.AddStyle(Caller.Element, Caller.Skin.OnOverStyle); } } (this)
this.Element.onmouseout = function(Caller) { return function() { System.DOM.ReplaceStyle(Caller.Element, Caller.Skin.OnOverStyle, Caller.Skin.OnOutStyle); } } (this)
}
if (typeof Caption != "undefined")
{
this.Caption = Caption;
this.Create();
}
}
function CCheckBoxTextNode(Skin, Caption, Variable, TreeView)
{
this.Caption = "";
this.Element = null;
this.Skin = Skin;
this.Value = "";
this.TreeView = TreeView;
this.Checkbox = null;
this.Variable = Variable;
this.FirstCaption = "";
this.setCaption = function (caption)
{
this.Caption = caption;
if (this.Element != null)
{
this.Element.innerHTML = this.Caption;
}
if (this.FirstCaption == "")
{
this.FirstCaption = this.Caption;
}
}
this.setValue = function(newValue)
{
this.Value = newValue;
this.Checkbox.value = this.Value;
}
this.Create = function()
{
this.Element = document.createElement("div");
this.Element.style.padding = this.Skin.Padding;
this.Element.style.styleFloat = "left";
this.Element.style.cssFloat = "left";
this.Element.style.height = "auto";
this.Element.style.fontFamily = this.Skin.FontFamily;
this.Element.style.fontSize = this.Skin.FontSize;
this.Element.style.color = this.Skin.FontColor;
this.Element.style.cursor = this.Skin.Cursor;
this.Element.style.lineHeight = this.Skin.Height + "px";
this.Element.style.width = this.TreeView.Container.ContentWidth - 40 + "px";
this.Element.style.overflow = "hidden";
this.Checkbox = document.createElement("input");
this.Checkbox.type = "checkbox";
this.Checkbox.style.styleFloat = "left";
this.Checkbox.style.cssFloat = "left";
this.Checkbox.style.lineHeight = this.Skin.Height + "px";
this.Checkbox.value = this.Value;
this.Checkbox.name = this.Variable;
this.TextNode = document.createElement("div");
this.TextNode.style.padding = this.Skin.Padding;
this.TextNode.style.styleFloat = "left";
this.TextNode.style.cssFloat = "left";
this.TextNode.style.height = "auto";
this.TextNode.style.fontFamily = this.Skin.FontFamily;
this.TextNode.style.fontSize = this.Skin.FontSize;
this.TextNode.style.color = this.Skin.FontColor;
this.TextNode.style.cursor = this.Skin.Cursor;
this.TextNode.style.lineHeight = this.Skin.Height + "px";
this.TextNode.style.width = this.TreeView.Container.ContentWidth - 65 + "px";
this.TextNode.innerHTML = this.Caption;
this.TextNode.title = this.Caption;
this.Element.appendChild(this.Checkbox);
this.Element.appendChild(this.TextNode);
this.TextNode.onmouseover = function(Caller) { return function() { System.DOM.AddStyle(Caller.TextNode, Caller.Skin.OnOverStyle); } } (this);
this.TextNode.onmouseout = function(Caller) { return function() { System.DOM.ReplaceStyle(Caller.TextNode, Caller.Skin.OnOverStyle, Caller.Skin.OnOutStyle); } } (this);
this.TextNode.onclick = function(Caller) { return function() {
Caller.Checkbox.checked = !Caller.Checkbox.checked;
Caller.Checkbox.onclick();
} } (this);
this.Checkbox.onclick = function(Caller) { return function() {
var inc = (Caller.Checkbox.checked ? 1 : (Caller.TreeView.Tag == 0 ? 0 : -1));
if (Caller.TreeView.Tag == "")
{
Caller.TreeView.Tag = 0;
}
Caller.TreeView.Tag += inc;
if (Caller.TreeView.Tag < 21)
{
if (Caller.TreeView.Tag == 0)
{
Caller.TreeView.Container.setCaption(Caller.TreeView.Container.FirstCaption);
} else Caller.TreeView.Container.setCaption(Caller.TreeView.Tag + Caller.TreeView.SelectionChange);
} else
{
Caller.TreeView.Container.setCaption(Caller.TreeView.MaximumSelection);
Caller.Checkbox.checked = false;
Caller.TreeView.Tag--;
}
} } (this);
}
if (typeof Caption != "undefined")
{
this.Caption = Caption;
this.Create();
}
}
function CCheckBoxMenu(Skin, TreeView)
{
this.Item1Caption = "Alle entfernen";
this.Item2Caption = "Schliessen";
this.Element = null;
this.Skin = Skin;
this.TreeView = TreeView;
this.Skin.ContentBackgroundColor = '#82B5D2';
this.Skin.FontColor = '#FFFFFF';
this.Create = function()
{
this.Item1 = document.createElement("div");
this.Item1.style.padding = this.Skin.Padding;
this.Item1.style.styleFloat = "left";
this.Item1.style.cssFloat = "left";
this.Item1.style.height = this.Skin.Height + "px";
this.Item1.style.fontFamily = this.Skin.FontFamily;
this.Item1.style.fontSize = this.Skin.FontSize;
this.Item1.style.color = this.Skin.FontColor;
this.Item1.style.cursor = this.Skin.Cursor;
this.Item1.style.lineHeight = this.Skin.Height + "px";
this.Item1.style.backgroundColor = this.Skin.ContentBackgroundColor;
this.Item1.innerHTML = this.Item1Caption;
this.Item1.onmouseover = function(Caller) { return function() { System.DOM.AddStyle(Caller.Item1, Caller.Skin.OnOverStyle); } } (this);
this.Item1.onmouseout = function(Caller) { return function() { System.DOM.ReplaceStyle(Caller.Item1, Caller.Skin.OnOverStyle, Caller.Skin.OnOutStyle); } } (this);
this.Item1.onclick = function(Caller) { return function() {
for (var i=0; i<Caller.TreeView.rootNode.Count; i++)
{
if (Caller.TreeView.rootNode.children[i].Count > 0)
{
for (var j=0; j<Caller.TreeView.rootNode.children[i].Count; j++)
{
Caller.TreeView.rootNode.children[i].children[j].nodeItem.Checkbox.checked = false;
Caller.TreeView.rootNode.children[i].children[j].nodeItem.Checkbox.onclick();
}
} else {
Caller.TreeView.rootNode.children[i].nodeItem.Checkbox.checked = false;
Caller.TreeView.rootNode.children[i].nodeItem.Checkbox.onclick();
}
}
Caller.TreeView.Container.setCaption(Caller.TreeView.Container.FirstCaption);
} } (this);
this.Item2 = document.createElement("div");
this.Item2.style.padding = this.Skin.Padding;
this.Item2.style.styleFloat = "right";
this.Item2.style.cssFloat = "right";
this.Item2.style.height = this.Skin.Height + "px";
this.Item2.style.fontFamily = this.Skin.FontFamily;
this.Item2.style.fontSize = this.Skin.FontSize;
this.Item2.style.color = this.Skin.FontColor;
this.Item2.style.cursor = this.Skin.Cursor;
this.Item2.style.lineHeight = this.Skin.Height + "px";
this.Item2.style.backgroundColor = this.Skin.ContentBackgroundColor;
this.Item2.innerHTML = this.Item2Caption;
this.Item2.onmouseover = function(Caller) { return function() { System.DOM.AddStyle(Caller.Item2, Caller.Skin.OnOverStyle); } } (this)
this.Item2.onmouseout = function(Caller) { return function() { System.DOM.ReplaceStyle(Caller.Item2, Caller.Skin.OnOverStyle, Caller.Skin.OnOutStyle); } } (this);
this.Item2.onclick = function(Caller) { return function() { Caller.TreeView.Container.MCCOpen(); } } (this);
this.Element = document.createElement("div");
this.Element.style.width = "100%";
this.Element.style.height = this.Skin.Height + "px";
this.Element.style.backgroundColor = this.Skin.ContentBackgroundColor;
this.Element.appendChild(this.Item1);
this.Element.appendChild(this.Item2);
}
}
function CTreeViewNode(nodeValue, nodeItem)
{
this.nodeValue = (typeof nodeValue == "undefined" ? null : nodeValue);
this.nodeItem = (typeof nodeItem == "undefined" ? null : nodeItem);
if (this.nodeItem != null)
{
if (this.nodeItem.Value == "") // exists but not set
{
this.nodeItem.setValue(this.nodeValue);
}
}
this.children = null;
this.Count = 0; // children count
this.nodeParent = null;
this.AddNode = function(nodeValue, nodeItem)
{
var t = new CTreeViewNode(nodeValue, nodeItem);
t.nodeParent = this;
if (this.children == null)
{
this.children = new Array();
}
this.children.push(t);
this.Count = this.children.length;
return t;
}
} // CTreeViewNode()
function CTreeView(Skin)
{
IContainer(this); //Inherit IContainer
this.ContentArea = null;
this.Menu = null;
this.Skin = Skin;
this.rootNode = null;
this.Nodes = new Array();
this.Xpath = "";
this.setXPath = function(s)
{
this.Xpath = s;
}
this.IdJoin = ".";
this.setIdJoin = function(s)
{
this.IdJoin = s;
}
this.SelectionChange = " items selected";
this.MaximumSelection = "Maximum items selected";
this.Tag = ""; // all purpose variable
this.AttachTo = function (Container)
{
this.Container = Container;
}
this.Create = function()
{
this.Menu = new CCheckBoxMenu(TVCheckBoxMenuSkins.XPRoyale, this);
this.Menu.Create();
this.ContentArea = document.createElement("div");
if (this.Container != null)
{
this.ContentArea.style.height = this.Container.ContentHeight  + "px";
}
this.ContentArea.style.width = "100%";
this.ContentArea.style.backgroundColor = this.Skin.ContentBackgroundColor;
this.ContentHolder = document.createElement("div");
this.ContentHolder.style.height = (this.Container.ContentHeight-TVCheckBoxMenuSkins.XPRoyale.Height) + "px";
this.ContentHolder.style.width = "100%";
this.ContentHolder.style.backgroundColor = this.Skin.ContentBackgroundColor;
this.ContentHolder.style.overflow = "scroll";
this.ContentHolder.style.overflowX = "hidden";
this.ContentHolder.style.overflowY = "scroll";
this.ContentArea.appendChild(this.ContentHolder);
this.ContentArea.appendChild(this.Menu.Element);
this.Container.ContentHolder.appendChild(this.ContentArea);
this.rootNode = new CTreeViewNode();
this.CollapsedImg = document.createElement("img");
this.CollapsedImg.style.width = this.Skin.ssWidth;
this.CollapsedImg.style.height = this.Skin.ssHeight;
this.CollapsedImg.style.verticalAlign = "middle";
this.CollapsedImg.style.marginTop = "5px";
this.CollapsedImg.src = this.Skin.Collapsed;
this.ExpandedImg = document.createElement("img");
this.ExpandedImg.style.width = this.Skin.isWidth;
this.ExpandedImg.style.height = this.Skin.isHeight;
this.ExpandedImg.style.verticalAlign = "middle";
this.ExpandedImg.style.position = "relative";
this.ExpandedImg.style.top = "25%";
this.ExpandedImg.src = this.Skin.Expanded;
this.Collapsed = document.createElement("div");
this.Collapsed.style.height = TreeViewSkins.MaxHeight + "px";
this.Collapsed.style.cssFloat = "left";
this.Collapsed.style.styleFloat = "left";
this.Collapsed.style.lineHeight = TreeViewSkins.MaxHeight + "px";
this.Collapsed.style.margin = "0px 3px 0px 3px";
this.Collapsed.appendChild(this.CollapsedImg.cloneNode(true));
this.Expanded = document.createElement("div");
this.Expanded.style.height = TreeViewSkins.MaxHeight + "px";
this.Expanded.style.cssFloat = "left";
this.Expanded.style.styleFloat = "left";
this.Expanded.style.lineHeight = TreeViewSkins.MaxHeight + "px";
this.Expanded.style.margin = "0px 3px 0px 3px";
this.Expanded.appendChild(this.ExpandedImg.cloneNode(true));
}
this.PopulateFromXml = function(filename, variablename)
{
var request = System.Xml.HttpRequest();
request.open("GET", filename, false);
request.send(null);
var xml = request.responseXML;
var TopNodes = System.Xml.selectNodes(xml, "//Items/Item");
for (var i=0; i<TopNodes.length; i++)
{
var nodeTop = "";
var nodeVal;
if (System.OS.Browser == BT_IE)
{
nodeVal = TopNodes[i].childNodes[0].nodeValue.Trim();
} else {
if (TopNodes[i].childNodes.length > 1)
{
nodeVal = TopNodes[i].childNodes[1].nodeValue.Trim(); // skip one node
} else {
nodeVal = TopNodes[i].childNodes[0].nodeValue.Trim(); // default to zero
}
}
var SecNodes = System.Xml.selectNodes(xml, "//Items/Item[@id=" + TopNodes[i].attributes[0].nodeValue + "]/SubItem");
if (SecNodes.length > 0)
{
nodeTop = this.rootNode.AddNode(TopNodes[i].attributes[0].nodeValue, new CTextNode(TextNodeSkins.XPRoyale, nodeVal, variablename, this));
for (var k=0; k<SecNodes.length; k++)
{
nodeTop.AddNode(TopNodes[i].attributes[0].nodeValue + this.IdJoin + SecNodes[k].attributes[0].nodeValue, new CCheckBoxTextNode(TextNodeSkins.XPRoyale, SecNodes[k].text, variablename, this));
}
} else {
nodeTop = this.rootNode.AddNode(TopNodes[i].attributes[0].nodeValue, new CCheckBoxTextNode(TextNodeSkins.XPRoyale, nodeVal, variablename, this));
}
}
}
this.RenderDeep = function(dNode, level)
{
var divC = document.createElement("div");
divC.style.width = "100%";
divC.style.paddingLeft = (9 * 2) + "px";
for (var i=0; i<dNode.Count; i++)
{
var brclr = document.createElement("br");
brclr.style.clear = "both";
brclr.style.cssFloat = "none";
brclr.style.styleFloat = "none";
var img = this.Collapsed.cloneNode(true);
if (dNode.children[i].Count > 0)
{
divC.appendChild(img);
}
divC.appendChild(dNode.children[i].nodeItem.Element);
if (i < dNode.Count || dNode.children[i].Count > 0)
{
divC.appendChild(brclr);
}
if (dNode.children[i].Count > 0)
{
var divDeeper = this.RenderDeep(dNode.children[i], level+1);
divDeeper.style.display = "none";
divC.appendChild(divDeeper);
img.onclick = function (Caller) { return function() {
if (this.firstChild.src.indexOf(Caller.Skin.Expanded) > -1)
{
this.firstChild.src = Caller.Skin.Collapsed;
this.nextSibling.nextSibling.nextSibling.style.display = "none";
} else {
this.firstChild.src = Caller.Skin.Expanded;
this.nextSibling.nextSibling.nextSibling.style.display = "block";
}
} } (this);
}
}
return divC;
}
this.Render = function()
{
var divC = document.createElement("div");
divC.style.width = "100%";
divC.style.paddingLeft = "0px";
divC.style.paddingTop = "3px";
var i = 0;
for (i=0; i<this.rootNode.Count; i++)
{
var brclr = document.createElement("br");
brclr.style.clear = "both";
brclr.style.cssFloat = "none";
brclr.style.styleFloat = "none";
var img = this.Collapsed.cloneNode(true);
if (this.rootNode.children[i].Count > 0)
{
divC.appendChild(img);
}
divC.appendChild(this.rootNode.children[i].nodeItem.Element);
if (i < this.rootNode.Count-1 || this.rootNode.children[i].Count > 0)
{
divC.appendChild(brclr);
}
if (this.rootNode.children[i].Count > 0)
{
var divDeeper = this.RenderDeep(this.rootNode.children[i], 1);
divDeeper.style.display = "none";
divC.appendChild(divDeeper);
img.onclick = function (Caller) { return function() {
if (this.firstChild.src.indexOf(Caller.Skin.Expanded) > -1)
{
this.firstChild.src = Caller.Skin.Collapsed;
this.nextSibling.nextSibling.nextSibling.style.display = "none";
} else {
this.firstChild.src = Caller.Skin.Expanded;
this.nextSibling.nextSibling.nextSibling.style.display = "block";
}
} } (this);
}
}
this.ContentHolder.appendChild(divC);
}
} // CTreeView()// /js/namespaces/components/components.js
CMonsterComponents.prototype.ComboBox = CComboBox;
CMonsterComponents.prototype.jComboBox = CjComboBox;
CMonsterComponents.prototype.TreeView = CTreeView;
CMonsterComponents.prototype.TreeViewNode = CTreeViewNode;
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);
}
function getMName() {
var cookieString = readCookie('AdCtx');
if (cookieString) {
var reg = /fi=([^&]*)\&/;
var args = reg.exec(cookieString);
firstName = args[1];
if (firstName) {
return decodeURI(firstName);
} else {
return null;
}
} else {
return null;
}
}
var turnOffYearSpan = false;     // true = Only show This Year and Next, false = show +/- 5 years
var weekStartsOnSunday = false;  // true = Start the week on Sunday, false = start the week on Monday
var showWeekNumber = true;  // true = show week number,  false = do not show week number
var languageCode = 'ge';    // Possible values:     en,ge,no,nl,es,pt-br,fr
var calendar_display_time = true;
var todayStringFormat = '[todayString] [UCFdayString]. [day]. [monthString] [year]';
var pathToImages = image_path + "calendar/";    // Relative to your HTML file
var speedOfSelectBoxSliding = 200;  // Milliseconds between changing year and hour when holding mouse over "-" and "+" - lower value = faster
var intervalSelectBox_minutes = 5;  // Minute select box - interval between each option (5 = default)
var calendar_offsetTop = 0;     // Offset - calendar placement - You probably have to modify this value if you're not using a strict doctype
var calendar_offsetLeft = 0;    // Offset - calendar placement - You probably have to modify this value if you're not using a strict doctype
var calendarDiv = false;
var MSIE = false;
var Opera = false;
if(navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('Opera')<0)MSIE=true;
if(navigator.userAgent.indexOf('Opera')>=0)Opera=true;
switch(languageCode){
case "en":
var monthArray = ['January','February','March','April','May','June','July','August','September','October','November','December'];
var monthArrayShort = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
var dayArray = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'];
var weekString = 'Week';
var todayString = '';
break;
case "ge":
var monthArray = ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'];
var monthArrayShort = ['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'];
var dayArray = ['Mon','Die','Mit','Don','Fre','Sam','Son'];
var weekString = 'Woche';
var todayString = 'Heute';
break;
case "no":
var monthArray = ['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'];
var monthArrayShort = ['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Des'];
var dayArray = ['Man','Tir','Ons','Tor','Fre','L&oslash;r','S&oslash;n'];
var weekString = 'Uke';
var todayString = 'Dagen i dag er';
break;
case "nl":
var monthArray = ['Januari','Februari','Maart','April','Mei','Juni','Juli','Augustus','September','Oktober','November','December'];
var monthArrayShort = ['Jan','Feb','Mar','Apr','Mei','Jun','Jul','Aug','Sep','Okt','Nov','Dec'];
var dayArray = ['Ma','Di','Wo','Do','Vr','Za','Zo'];
var weekString = 'Week';
var todayString = 'Vandaag';
break;
case "es":
var monthArray = ['Enero','Febrero','Marzo','April','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'];
var monthArrayShort =['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'];
var dayArray = ['Lun','Mar','Mie','Jue','Vie','Sab','Dom'];
var weekString = 'Semana';
var todayString = 'Hoy es';
break;
case "pt-br":
var monthArray = ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'];
var monthArrayShort = ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'];
var dayArray = ['Seg','Ter','Qua','Qui','Sex','S&aacute;b','Dom'];
var weekString = 'Sem.';
var todayString = 'Hoje &eacute;';
break;
case "fr":
var monthArray = ['Janvier','F�vrier','Mars','Avril','Mai','Juin','Juillet','Ao�t','Septembre','Octobre','Novembre','D�cembre'];
var monthArrayShort = ['Jan','Fev','Mar','Avr','Mai','Jun','Jul','Aou','Sep','Oct','Nov','Dec'];
var dayArray = ['Lun','Mar','Mer','Jeu','Ven','Sam','Dim'];
var weekString = 'Sem';
var todayString = "Aujourd'hui";
break;
case "da":
var monthArray = ['januar','februar','marts','april','maj','juni','juli','august','september','oktober','november','december'];
var monthArrayShort = ['jan','feb','mar','apr','maj','jun','jul','aug','sep','okt','nov','dec'];
var dayArray = ['man','tirs','ons','tors','fre','l&oslash;r','s&oslash;n'];
var weekString = 'Uge';
var todayString = 'I dag er den';
break;
case "hu":
var monthArray = ['Január','Február','Március','�?prilis','Május','Június','Július','Augusztus','Szeptember','Október','November','December'];
var monthArrayShort = ['Jan','Feb','Márc','�?pr','Máj','Jún','Júl','Aug','Szep','Okt','Nov','Dec'];
var dayArray = ['Hé','Ke','Sze','Cs','Pé','Szo','Vas'];
var weekString = 'Hét';
var todayString = 'Mai nap';
break;
case "it":
var monthArray = ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'];
var monthArrayShort = ['Gen','Feb','Mar','Apr','Mag','Giu','Lugl','Ago','Set','Ott','Nov','Dic'];
var dayArray = ['Lun',';Mar','Mer','Gio','Ven','Sab','Dom'];
var weekString = 'Settimana';
var todayString = 'Oggi &egrave; il';
break;
case "sv":
var monthArray = ['Januari','Februari','Mars','April','Maj','Juni','Juli','Augusti','September','Oktober','November','December'];
var monthArrayShort = ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'];
var dayArray = ['M&aring;n','Tis','Ons','Tor','Fre','L&ouml;r','S&ouml;n'];
var weekString = 'Vecka';
var todayString = 'Idag &auml;r det den';
break;
case "cz":
var monthArray = ['leden','&#250;nor','b&#345;ezen','duben','kv&#283;ten','&#269;erven','&#269;ervenec','srpen','z&#225;&#345;&#237;','&#345;&#237;jen','listopad','prosinec'];
var monthArrayShort = ['led','&#250;n','b&#345;','dub','kv&#283;','&#269;er','&#269;er-ec','srp','z&#225;&#345;','&#345;&#237;j','list','pros'];
var dayArray = ['Pon','&#218;t','St','&#268;t','P&#225;','So','Ne'];
var weekString = 't&#253;den';
var todayString = '';
break;
}
if (weekStartsOnSunday) {
var tempDayName = dayArray[6];
for(var theIx = 6; theIx > 0; theIx--) {
dayArray[theIx] = dayArray[theIx-1];
}
dayArray[0] = tempDayName;
}
var daysInMonthArray = [31,28,31,30,31,30,31,31,30,31,30,31];
var currentMonth;
var currentYear;
var currentHour;
var currentMinute;
var calendarContentDiv;
var returnDateTo;
var returnFormat;
var activeSelectBoxMonth;
var activeSelectBoxYear;
var activeSelectBoxHour;
var activeSelectBoxMinute;
var iframeObj = false;
var iframeObj2 =false;
function EIS_FIX_EI1(where2fixit)
{
if(!iframeObj2)return;
iframeObj2.style.display = 'block';
iframeObj2.style.height =document.getElementById(where2fixit).offsetHeight+1;
iframeObj2.style.width=document.getElementById(where2fixit).offsetWidth;
iframeObj2.style.left=getleftPos(document.getElementById(where2fixit))+1-calendar_offsetLeft;
iframeObj2.style.top=getTopPos(document.getElementById(where2fixit))-document.getElementById(where2fixit).offsetHeight-calendar_offsetTop;
}
function EIS_Hide_Frame()
{       if(iframeObj2)iframeObj2.style.display = 'none';}
var returnDateToYear;
var returnDateToMonth;
var returnDateToDay;
var returnDateToHour;
var returnDateToMinute;
var inputYear;
var inputMonth;
var inputDay;
var inputHour;
var inputMinute;
var calendarDisplayTime = false;
var selectBoxHighlightColor = '#D60808'; // Highlight color of select boxes
var selectBoxRolloverBgColor = '#E2EBED'; // Background color on drop down lists(rollover)
var selectBoxMovementInProgress = false;
var activeSelectBox = false;
function cancelCalendarEvent()
{
return false;
}
function isLeapYear(inputYear)
{
if(inputYear%400==0||(inputYear%4==0&&inputYear%100!=0)) return true;
return false;
}
var activeSelectBoxMonth = false;
var activeSelectBoxDirection = false;
function highlightMonthYear()
{
if(activeSelectBoxMonth)activeSelectBoxMonth.className='';
activeSelectBox = this;
if(this.className=='monthYearActive'){
this.className='';
}else{
this.className = 'monthYearActive';
activeSelectBoxMonth = this;
}
if(this.innerHTML.indexOf('-')>=0 || this.innerHTML.indexOf('+')>=0){
if(this.className=='monthYearActive')
selectBoxMovementInProgress = true;
else
selectBoxMovementInProgress = false;
if(this.innerHTML.indexOf('-')>=0)activeSelectBoxDirection = -1; else activeSelectBoxDirection = 1;
}else selectBoxMovementInProgress = false;
}
function showMonthDropDown()
{
if(document.getElementById('monthDropDown').style.display=='block'){
document.getElementById('monthDropDown').style.display='none';
EIS_Hide_Frame();
}else{
document.getElementById('monthDropDown').style.display='block';
document.getElementById('yearDropDown').style.display='none';
document.getElementById('hourDropDown').style.display='none';
document.getElementById('minuteDropDown').style.display='none';
if (MSIE)
{ EIS_FIX_EI1('monthDropDown')}
}
}
function showYearDropDown()
{
if(document.getElementById('yearDropDown').style.display=='block'){
document.getElementById('yearDropDown').style.display='none';
EIS_Hide_Frame();
}else{
document.getElementById('yearDropDown').style.display='block';
document.getElementById('monthDropDown').style.display='none';
document.getElementById('hourDropDown').style.display='none';
document.getElementById('minuteDropDown').style.display='none';
if (MSIE)
{ EIS_FIX_EI1('yearDropDown')}
}
}
function showHourDropDown()
{
if(document.getElementById('hourDropDown').style.display=='block'){
document.getElementById('hourDropDown').style.display='none';
EIS_Hide_Frame();
}else{
document.getElementById('hourDropDown').style.display='block';
document.getElementById('monthDropDown').style.display='none';
document.getElementById('yearDropDown').style.display='none';
document.getElementById('minuteDropDown').style.display='none';
if (MSIE)
{ EIS_FIX_EI1('hourDropDown')}
}
}
function showMinuteDropDown()
{
if(document.getElementById('minuteDropDown').style.display=='block'){
document.getElementById('minuteDropDown').style.display='none';
EIS_Hide_Frame();
}else{
document.getElementById('minuteDropDown').style.display='block';
document.getElementById('monthDropDown').style.display='none';
document.getElementById('yearDropDown').style.display='none';
document.getElementById('hourDropDown').style.display='none';
if (MSIE)
{ EIS_FIX_EI1('minuteDropDown')}
}
}
function selectMonth()
{
document.getElementById('calendar_month_txt').innerHTML = this.innerHTML
currentMonth = this.id.replace(/[^\d]/g,'');
document.getElementById('monthDropDown').style.display='none';
EIS_Hide_Frame();
for(var no=0;no<monthArray.length;no++){
document.getElementById('monthDiv_'+no).style.color='';
}
this.style.color = selectBoxHighlightColor;
activeSelectBoxMonth = this;
writeCalendarContent();
}
function selectHour()
{
document.getElementById('calendar_hour_txt').innerHTML = this.innerHTML
currentHour = this.innerHTML.replace(/[^\d]/g,'');
document.getElementById('hourDropDown').style.display='none';
EIS_Hide_Frame();
if(activeSelectBoxHour){
activeSelectBoxHour.style.color='';
}
activeSelectBoxHour=this;
this.style.color = selectBoxHighlightColor;
}
function selectMinute()
{
document.getElementById('calendar_minute_txt').innerHTML = this.innerHTML
currentMinute = this.innerHTML.replace(/[^\d]/g,'');
document.getElementById('minuteDropDown').style.display='none';
EIS_Hide_Frame();
if(activeSelectBoxMinute){
activeSelectBoxMinute.style.color='';
}
activeSelectBoxMinute=this;
this.style.color = selectBoxHighlightColor;
}
function selectYear()
{
document.getElementById('calendar_year_txt').innerHTML = this.innerHTML
currentYear = this.innerHTML.replace(/[^\d]/g,'');
document.getElementById('yearDropDown').style.display='none';
EIS_Hide_Frame();
if(activeSelectBoxYear){
activeSelectBoxYear.style.color='';
}
activeSelectBoxYear=this;
this.style.color = selectBoxHighlightColor;
writeCalendarContent();
}
function switchMonth()
{
if(this.src.indexOf('left')>=0){
currentMonth=currentMonth-1;;
if(currentMonth<0){
currentMonth=11;
currentYear=currentYear-1;
}
}else{
currentMonth=currentMonth+1;;
if(currentMonth>11){
currentMonth=0;
currentYear=currentYear/1+1;
}
}
writeCalendarContent();
}
function createMonthDiv(){
var div = document.createElement('DIV');
div.className='monthYearPicker';
div.id = 'monthPicker';
for(var no=0;no<monthArray.length;no++){
var subDiv = document.createElement('DIV');
subDiv.innerHTML = monthArray[no];
subDiv.onmouseover = highlightMonthYear;
subDiv.onmouseout = highlightMonthYear;
subDiv.onclick = selectMonth;
subDiv.id = 'monthDiv_' + no;
subDiv.style.width = '56px';
subDiv.onselectstart = cancelCalendarEvent;
div.appendChild(subDiv);
if(currentMonth && currentMonth==no){
subDiv.style.color = selectBoxHighlightColor;
activeSelectBoxMonth = subDiv;
}
}
return div;
}
function changeSelectBoxYear(e,inputObj)
{
if(!inputObj)inputObj =this;
var yearItems = inputObj.parentNode.getElementsByTagName('DIV');
if(inputObj.innerHTML.indexOf('-')>=0){
var startYear = yearItems[1].innerHTML/1 -1;
if(activeSelectBoxYear){
activeSelectBoxYear.style.color='';
}
}else{
var startYear = yearItems[1].innerHTML/1 +1;
if(activeSelectBoxYear){
activeSelectBoxYear.style.color='';
}
}
for(var no=1;no<yearItems.length-1;no++){
yearItems[no].innerHTML = startYear+no-1;
yearItems[no].id = 'yearDiv' + (startYear/1+no/1-1);
}
if(activeSelectBoxYear){
activeSelectBoxYear.style.color='';
if(document.getElementById('yearDiv'+currentYear)){
activeSelectBoxYear = document.getElementById('yearDiv'+currentYear);
activeSelectBoxYear.style.color=selectBoxHighlightColor;;
}
}
}
function changeSelectBoxHour(e,inputObj)
{
if(!inputObj)inputObj = this;
var hourItems = inputObj.parentNode.getElementsByTagName('DIV');
if(inputObj.innerHTML.indexOf('-')>=0){
var startHour = hourItems[1].innerHTML/1 -1;
if(startHour<0)startHour=0;
if(activeSelectBoxHour){
activeSelectBoxHour.style.color='';
}
}else{
var startHour = hourItems[1].innerHTML/1 +1;
if(startHour>14)startHour = 14;
if(activeSelectBoxHour){
activeSelectBoxHour.style.color='';
}
}
var prefix = '';
for(var no=1;no<hourItems.length-1;no++){
if((startHour/1 + no/1) < 11)prefix = '0'; else prefix = '';
hourItems[no].innerHTML = prefix + (startHour+no-1);
hourItems[no].id = 'hourDiv' + (startHour/1+no/1-1);
}
if(activeSelectBoxHour){
activeSelectBoxHour.style.color='';
if(document.getElementById('hourDiv'+currentHour)){
activeSelectBoxHour = document.getElementById('hourDiv'+currentHour);
activeSelectBoxHour.style.color=selectBoxHighlightColor;;
}
}
}
function updateYearDiv()
{
var yearSpan = 5;
if (turnOffYearSpan) {
yearSpan = 0;
}
var div = document.getElementById('yearDropDown');
var yearItems = div.getElementsByTagName('DIV');
for(var no=1;no<yearItems.length-1;no++){
yearItems[no].innerHTML = currentYear/1 -yearSpan + no;
if(currentYear==(currentYear/1 -yearSpan + no)){
yearItems[no].style.color = selectBoxHighlightColor;
activeSelectBoxYear = yearItems[no];
}else{
yearItems[no].style.color = '';
}
}
}
function updateMonthDiv()
{
for(no=0;no<12;no++){
document.getElementById('monthDiv_' + no).style.color = '';
}
document.getElementById('monthDiv_' + currentMonth).style.color = selectBoxHighlightColor;
activeSelectBoxMonth =  document.getElementById('monthDiv_' + currentMonth);
}
function updateHourDiv()
{
var div = document.getElementById('hourDropDown');
var hourItems = div.getElementsByTagName('DIV');
var addHours = 0;
if((currentHour/1 -6 + 1)<0){
addHours =  (currentHour/1 -6 + 1)*-1;
}
for(var no=1;no<hourItems.length-1;no++){
var prefix='';
if((currentHour/1 -6 + no + addHours) < 10)prefix='0';
hourItems[no].innerHTML = prefix +  (currentHour/1 -6 + no + addHours);
if(currentHour==(currentHour/1 -6 + no)){
hourItems[no].style.color = selectBoxHighlightColor;
activeSelectBoxHour = hourItems[no];
}else{
hourItems[no].style.color = '';
}
}
}
function updateMinuteDiv()
{
for(no=0;no<60;no+=intervalSelectBox_minutes){
var prefix = '';
if(no<10)prefix = '0';
document.getElementById('minuteDiv_' + prefix + no).style.color = '';
}
if(document.getElementById('minuteDiv_' + currentMinute)){
document.getElementById('minuteDiv_' + currentMinute).style.color = selectBoxHighlightColor;
activeSelectBoxMinute = document.getElementById('minuteDiv_' + currentMinute);
}
}
function createYearDiv()
{
if(!document.getElementById('yearDropDown')){
var div = document.createElement('DIV');
div.className='monthYearPicker';
}else{
var div = document.getElementById('yearDropDown');
var subDivs = div.getElementsByTagName('DIV');
for(var no=0;no<subDivs.length;no++){
subDivs[no].parentNode.removeChild(subDivs[no]);
}
}
var d = new Date();
if(currentYear){
d.setFullYear(currentYear);
}
var startYear = d.getFullYear()/1 - 5;
var yearSpan = 10;
if (! turnOffYearSpan) {
var subDiv = document.createElement('DIV');
subDiv.innerHTML = '&nbsp;&nbsp;- ';
subDiv.onclick = changeSelectBoxYear;
subDiv.onmouseover = highlightMonthYear;
subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};
subDiv.onselectstart = cancelCalendarEvent;
div.appendChild(subDiv);
} else {
startYear = d.getFullYear()/1 - 0;
yearSpan = 2;
}
for(var no=startYear;no<(startYear+yearSpan);no++){
var subDiv = document.createElement('DIV');
subDiv.innerHTML = no;
subDiv.onmouseover = highlightMonthYear;
subDiv.onmouseout = highlightMonthYear;
subDiv.onclick = selectYear;
subDiv.id = 'yearDiv' + no;
subDiv.onselectstart = cancelCalendarEvent;
div.appendChild(subDiv);
if(currentYear && currentYear==no){
subDiv.style.color = selectBoxHighlightColor;
activeSelectBoxYear = subDiv;
}
}
if (! turnOffYearSpan) {
var subDiv = document.createElement('DIV');
subDiv.innerHTML = '&nbsp;&nbsp;+ ';
subDiv.onclick = changeSelectBoxYear;
subDiv.onmouseover = highlightMonthYear;
subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};
subDiv.onselectstart = cancelCalendarEvent;
div.appendChild(subDiv);
}
return div;
}
function slideCalendarSelectBox()
{
if(selectBoxMovementInProgress){
if(activeSelectBox.parentNode.id=='hourDropDown'){
changeSelectBoxHour(false,activeSelectBox);
}
if(activeSelectBox.parentNode.id=='yearDropDown'){
changeSelectBoxYear(false,activeSelectBox);
}
}
setTimeout('slideCalendarSelectBox()',speedOfSelectBoxSliding);
}
function createHourDiv()
{
if(!document.getElementById('hourDropDown')){
var div = document.createElement('DIV');
div.className='monthYearPicker';
}else{
var div = document.getElementById('hourDropDown');
var subDivs = div.getElementsByTagName('DIV');
for(var no=0;no<subDivs.length;no++){
subDivs[no].parentNode.removeChild(subDivs[no]);
}
}
if(!currentHour)currentHour=0;
var startHour = currentHour/1;
if(startHour>14)startHour=14;
var subDiv = document.createElement('DIV');
subDiv.innerHTML = '&nbsp;&nbsp;- ';
subDiv.onclick = changeSelectBoxHour;
subDiv.onmouseover = highlightMonthYear;
subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};
subDiv.onselectstart = cancelCalendarEvent;
div.appendChild(subDiv);
for(var no=startHour;no<startHour+10;no++){
var prefix = '';
if(no/1<10)prefix='0';
var subDiv = document.createElement('DIV');
subDiv.innerHTML = prefix + no;
subDiv.onmouseover = highlightMonthYear;
subDiv.onmouseout = highlightMonthYear;
subDiv.onclick = selectHour;
subDiv.id = 'hourDiv' + no;
subDiv.onselectstart = cancelCalendarEvent;
div.appendChild(subDiv);
if(currentYear && currentYear==no){
subDiv.style.color = selectBoxHighlightColor;
activeSelectBoxYear = subDiv;
}
}
var subDiv = document.createElement('DIV');
subDiv.innerHTML = '&nbsp;&nbsp;+ ';
subDiv.onclick = changeSelectBoxHour;
subDiv.onmouseover = highlightMonthYear;
subDiv.onmouseout = function(){ selectBoxMovementInProgress = false;};
subDiv.onselectstart = cancelCalendarEvent;
div.appendChild(subDiv);
return div;
}
function createMinuteDiv()
{
if(!document.getElementById('minuteDropDown')){
var div = document.createElement('DIV');
div.className='monthYearPicker';
}else{
var div = document.getElementById('minuteDropDown');
var subDivs = div.getElementsByTagName('DIV');
for(var no=0;no<subDivs.length;no++){
subDivs[no].parentNode.removeChild(subDivs[no]);
}
}
var startMinute = 0;
var prefix = '';
for(var no=startMinute;no<60;no+=intervalSelectBox_minutes){
if(no<10)prefix='0'; else prefix = '';
var subDiv = document.createElement('DIV');
subDiv.innerHTML = prefix + no;
subDiv.onmouseover = highlightMonthYear;
subDiv.onmouseout = highlightMonthYear;
subDiv.onclick = selectMinute;
subDiv.id = 'minuteDiv_' + prefix +  no;
subDiv.onselectstart = cancelCalendarEvent;
div.appendChild(subDiv);
if(currentYear && currentYear==no){
subDiv.style.color = selectBoxHighlightColor;
activeSelectBoxYear = subDiv;
}
}
return div;
}
function highlightSelect()
{
if(this.className=='selectBoxTime'){
this.className = 'selectBoxTimeOver';
this.getElementsByTagName('IMG')[0].src = pathToImages + 'down_time_over.gif';
}else if(this.className=='selectBoxTimeOver'){
this.className = 'selectBoxTime';
this.getElementsByTagName('IMG')[0].src = pathToImages + 'down_time.gif';
}
if(this.className=='selectBox'){
this.className = 'selectBoxOver';
this.getElementsByTagName('IMG')[0].src = pathToImages + 'down_over.gif';
}else if(this.className=='selectBoxOver'){
this.className = 'selectBox';
this.getElementsByTagName('IMG')[0].src = pathToImages + 'down.gif';
}
}
function highlightArrow()
{
if(this.src.indexOf('over')>=0){
if(this.src.indexOf('left')>=0)this.src = pathToImages + 'left.gif';
if(this.src.indexOf('right')>=0)this.src = pathToImages + 'right.gif';
}else{
if(this.src.indexOf('left')>=0)this.src = pathToImages + 'left_over.gif';
if(this.src.indexOf('right')>=0)this.src = pathToImages + 'right_over.gif';
}
}
function highlightClose()
{
if(this.src.indexOf('over')>=0){
this.src = pathToImages + 'close.gif';
}else{
this.src = pathToImages + 'close_over.gif';
}
}
function closeCalendar(){
document.getElementById('yearDropDown').style.display='none';
document.getElementById('monthDropDown').style.display='none';
document.getElementById('hourDropDown').style.display='none';
document.getElementById('minuteDropDown').style.display='none';
calendarDiv.style.display='none';
if(iframeObj){
iframeObj.style.display='none';
EIS_Hide_Frame();}
if(activeSelectBoxMonth)activeSelectBoxMonth.className='';
if(activeSelectBoxYear)activeSelectBoxYear.className='';
}
function writeTopBar()
{
var topBar = document.createElement('DIV');
topBar.className = 'topBar';
topBar.id = 'topBar';
calendarDiv.appendChild(topBar);
var leftDiv = document.createElement('DIV');
leftDiv.style.marginRight = '1px';
var img = document.createElement('IMG');
img.src = pathToImages + 'left.gif';
img.onmouseover = highlightArrow;
img.onclick = switchMonth;
img.onmouseout = highlightArrow;
leftDiv.appendChild(img);
topBar.appendChild(leftDiv);
if(Opera)leftDiv.style.width = '16px';
var rightDiv = document.createElement('DIV');
rightDiv.style.marginRight = '1px';
var img = document.createElement('IMG');
img.src = pathToImages + 'right.gif';
img.onclick = switchMonth;
img.onmouseover = highlightArrow;
img.onmouseout = highlightArrow;
rightDiv.appendChild(img);
if(Opera)rightDiv.style.width = '16px';
topBar.appendChild(rightDiv);
var monthDiv = document.createElement('DIV');
monthDiv.id = 'monthSelect';
monthDiv.onmouseover = highlightSelect;
monthDiv.onmouseout = highlightSelect;
monthDiv.onclick = showMonthDropDown;
var span = document.createElement('SPAN');
span.innerHTML = monthArray[currentMonth];
span.id = 'calendar_month_txt';
monthDiv.appendChild(span);
var img = document.createElement('IMG');
img.src = pathToImages + 'down.gif';
img.style.position = 'absolute';
img.style.right = '0px';
monthDiv.appendChild(img);
monthDiv.className = 'selectBox';
if(Opera){
img.style.cssText = 'float:right;position:relative';
img.style.position = 'relative';
img.style.styleFloat = 'right';
}
topBar.appendChild(monthDiv);
var monthPicker = createMonthDiv();
monthPicker.style.left = '37px';
monthPicker.style.top = monthDiv.offsetTop + monthDiv.offsetHeight + 1 + 'px';
monthPicker.style.width ='60px';
monthPicker.id = 'monthDropDown';
calendarDiv.appendChild(monthPicker);
var yearDiv = document.createElement('DIV');
yearDiv.onmouseover = highlightSelect;
yearDiv.onmouseout = highlightSelect;
yearDiv.onclick = showYearDropDown;
var span = document.createElement('SPAN');
span.innerHTML = currentYear;
span.id = 'calendar_year_txt';
yearDiv.appendChild(span);
topBar.appendChild(yearDiv);
var img = document.createElement('IMG');
img.src = pathToImages + 'down.gif';
yearDiv.appendChild(img);
yearDiv.className = 'selectBox';
if(Opera){
yearDiv.style.width = '50px';
img.style.cssText = 'float:right';
img.style.position = 'relative';
img.style.styleFloat = 'right';
}
var yearPicker = createYearDiv();
yearPicker.style.left = '113px';
yearPicker.style.top = monthDiv.offsetTop + monthDiv.offsetHeight + 1 + 'px';
yearPicker.style.width = '35px';
yearPicker.id = 'yearDropDown';
calendarDiv.appendChild(yearPicker);
var img = document.createElement('IMG');
img.src = pathToImages + 'close.gif';
img.style.styleFloat = 'right';
img.onmouseover = highlightClose;
img.onmouseout = highlightClose;
img.onclick = closeCalendar;
topBar.appendChild(img);
if(!document.all){
img.style.position = 'absolute';
img.style.right = '2px';
}
}
function writeCalendarContent()
{
var calendarContentDivExists = true;
if(!calendarContentDiv){
calendarContentDiv = document.createElement('DIV');
calendarDiv.appendChild(calendarContentDiv);
calendarContentDivExists = false;
}
currentMonth = currentMonth/1;
var d = new Date();
d.setFullYear(currentYear);
d.setDate(1);
d.setMonth(currentMonth);
var dayStartOfMonth = d.getDay();
if (! weekStartsOnSunday) {
if(dayStartOfMonth==0)dayStartOfMonth=7;
dayStartOfMonth--;
}
document.getElementById('calendar_year_txt').innerHTML = currentYear;
document.getElementById('calendar_month_txt').innerHTML = monthArray[currentMonth];
document.getElementById('calendar_hour_txt').innerHTML = currentHour;
document.getElementById('calendar_minute_txt').innerHTML = currentMinute;
var existingTable = calendarContentDiv.getElementsByTagName('TABLE');
if(existingTable.length>0){
calendarContentDiv.removeChild(existingTable[0]);
}
var calTable = document.createElement('TABLE');
calTable.width = '100%';
calTable.cellSpacing = '0';
calendarContentDiv.appendChild(calTable);
var calTBody = document.createElement('TBODY');
calTable.appendChild(calTBody);
var row = calTBody.insertRow(-1);
row.className = 'calendar_week_row';
if (showWeekNumber) {
var cell = row.insertCell(-1);
cell.innerHTML = weekString;
cell.className = 'calendar_week_column';
cell.style.backgroundColor = selectBoxRolloverBgColor;
}
for(var no=0;no<dayArray.length;no++){
var cell = row.insertCell(-1);
cell.innerHTML = dayArray[no];
}
var row = calTBody.insertRow(-1);
if (showWeekNumber) {
var cell = row.insertCell(-1);
cell.className = 'calendar_week_column';
cell.style.backgroundColor = selectBoxRolloverBgColor;
var week = getWeek(currentYear,currentMonth,1);
cell.innerHTML = week;       // Week
}
for(var no=0;no<dayStartOfMonth;no++){
var cell = row.insertCell(-1);
cell.innerHTML = '&nbsp;';
}
var colCounter = dayStartOfMonth;
var daysInMonth = daysInMonthArray[currentMonth];
if(daysInMonth==28){
if(isLeapYear(currentYear))daysInMonth=29;
}
for(var no=1;no<=daysInMonth;no++){
d.setDate(no-1);
if(colCounter>0 && colCounter%7==0){
var row = calTBody.insertRow(-1);
if (showWeekNumber) {
var cell = row.insertCell(-1);
cell.className = 'calendar_week_column';
var week = getWeek(currentYear,currentMonth,no);
cell.innerHTML = week;      // Week
cell.style.backgroundColor = selectBoxRolloverBgColor;
}
}
var cell = row.insertCell(-1);
if(currentYear==inputYear && currentMonth == inputMonth && no==inputDay){
cell.className='activeDay';
}
cell.innerHTML = no;
cell.onclick = pickDate;
colCounter++;
}
if(!document.all){
if(calendarContentDiv.offsetHeight)
document.getElementById('topBar').style.top = calendarContentDiv.offsetHeight + document.getElementById('timeBar').offsetHeight + document.getElementById('topBar').offsetHeight -1 + 'px';
else{
document.getElementById('topBar').style.top = '';
document.getElementById('topBar').style.bottom = '0px';
}
}
if(iframeObj){
if(!calendarContentDivExists)setTimeout('resizeIframe()',350);else setTimeout('resizeIframe()',10);
}
}
function resizeIframe()
{
iframeObj.style.width = calendarDiv.offsetWidth + 'px';
iframeObj.style.height = calendarDiv.offsetHeight + 'px' ;
}
function pickTodaysDate()
{
var d = new Date();
currentMonth = d.getMonth();
currentYear = d.getFullYear();
pickDate(false,d.getDate());
}
function pickDate(e,inputDay)
{
var month = currentMonth/1 +1;
if(month<10)month = '0' + month;
var day;
if(!inputDay && this)day = this.innerHTML; else day = inputDay;
if(day/1<10)day = '0' + day;
if(returnFormat){
returnFormat = returnFormat.replace('dd',day);
returnFormat = returnFormat.replace('mm',month);
returnFormat = returnFormat.replace('yyyy',currentYear);
returnFormat = returnFormat.replace('hh',currentHour);
returnFormat = returnFormat.replace('ii',currentMinute);
returnFormat = returnFormat.replace('d',day/1);
returnFormat = returnFormat.replace('m',month/1);
returnDateTo.value = returnFormat;
try{
returnDateTo.onchange();
}catch(e){
}
}else{
for(var no=0;no<returnDateToYear.options.length;no++){
if(returnDateToYear.options[no].value==currentYear){
returnDateToYear.selectedIndex=no;
break;
}
}
for(var no=0;no<returnDateToMonth.options.length;no++){
if(returnDateToMonth.options[no].value==parseInt(month)){
returnDateToMonth.selectedIndex=no;
break;
}
}
for(var no=0;no<returnDateToDay.options.length;no++){
if(returnDateToDay.options[no].value==parseInt(day)){
returnDateToDay.selectedIndex=no;
break;
}
}
if(calendarDisplayTime){
for(var no=0;no<returnDateToHour.options.length;no++){
if(returnDateToHour.options[no].value==parseInt(currentHour)){
returnDateToHour.selectedIndex=no;
break;
}
}
for(var no=0;no<returnDateToMinute.options.length;no++){
if(returnDateToMinute.options[no].value==parseInt(currentMinute)){
returnDateToMinute.selectedIndex=no;
break;
}
}
}
}
closeCalendar();
}
function getWeek(year,month,day){
if (! weekStartsOnSunday) {
day = (day/1);
} else {
day = (day/1)+1;
}
year = year /1;
month = month/1 + 1; //use 1-12
var a = Math.floor((14-(month))/12);
var y = year+4800-a;
var m = (month)+(12*a)-3;
var jd = day + Math.floor(((153*m)+2)/5) +
(365*y) + Math.floor(y/4) - Math.floor(y/100) +
Math.floor(y/400) - 32045;      // (gregorian calendar)
var d4 = (jd+31741-(jd%7))%146097%36524%1461;
var L = Math.floor(d4/1460);
var d1 = ((d4-L)%365)+L;
NumberOfWeek = Math.floor(d1/7) + 1;
return NumberOfWeek;
}
function writeTimeBar()
{
var timeBar = document.createElement('DIV');
timeBar.id = 'timeBar';
timeBar.className = 'timeBar';
var subDiv = document.createElement('DIV');
subDiv.innerHTML = 'Time:';
var hourDiv = document.createElement('DIV');
hourDiv.onmouseover = highlightSelect;
hourDiv.onmouseout = highlightSelect;
hourDiv.onclick = showHourDropDown;
hourDiv.style.width = '30px';
var span = document.createElement('SPAN');
span.innerHTML = currentHour;
span.id = 'calendar_hour_txt';
hourDiv.appendChild(span);
timeBar.appendChild(hourDiv);
var img = document.createElement('IMG');
img.src = pathToImages + 'down_time.gif';
hourDiv.appendChild(img);
hourDiv.className = 'selectBoxTime';
if(Opera){
hourDiv.style.width = '30px';
img.style.cssText = 'float:right';
img.style.position = 'relative';
img.style.styleFloat = 'right';
}
var hourPicker = createHourDiv();
hourPicker.style.left = '130px';
hourPicker.style.width = '35px';
hourPicker.id = 'hourDropDown';
calendarDiv.appendChild(hourPicker);
var minuteDiv = document.createElement('DIV');
minuteDiv.onmouseover = highlightSelect;
minuteDiv.onmouseout = highlightSelect;
minuteDiv.onclick = showMinuteDropDown;
minuteDiv.style.width = '30px';
var span = document.createElement('SPAN');
span.innerHTML = currentMinute;
span.id = 'calendar_minute_txt';
minuteDiv.appendChild(span);
timeBar.appendChild(minuteDiv);
var img = document.createElement('IMG');
img.src = pathToImages + 'down_time.gif';
minuteDiv.appendChild(img);
minuteDiv.className = 'selectBoxTime';
if(Opera){
minuteDiv.style.width = '30px';
img.style.cssText = 'float:right';
img.style.position = 'relative';
img.style.styleFloat = 'right';
}
var minutePicker = createMinuteDiv();
minutePicker.style.left = '167px';
minutePicker.style.width = '35px';
minutePicker.id = 'minuteDropDown';
calendarDiv.appendChild(minutePicker);
return timeBar;
}
function writeBottomBar()
{
var d = new Date();
var bottomBar = document.createElement('DIV');
bottomBar.id = 'bottomBar';
bottomBar.style.cursor = 'pointer';
bottomBar.className = 'todaysDate';
var subDiv = document.createElement('DIV');
subDiv.onclick = pickTodaysDate;
subDiv.id = 'todaysDateString';
subDiv.style.width = (calendarDiv.offsetWidth - 95) + 'px';
var day = d.getDay();
if (! weekStartsOnSunday) {
if(day==0)day = 7;
day--;
}
var bottomString = todayStringFormat;
bottomString = bottomString.replace('[monthString]',monthArrayShort[d.getMonth()]);
bottomString = bottomString.replace('[day]',d.getDate());
bottomString = bottomString.replace('[year]',d.getFullYear());
bottomString = bottomString.replace('[dayString]',dayArray[day].toLowerCase());
bottomString = bottomString.replace('[UCFdayString]',dayArray[day]);
bottomString = bottomString.replace('[todayString]',todayString);
subDiv.innerHTML = todayString + ': ' + d.getDate() + '. ' + monthArrayShort[d.getMonth()] + ', ' +  d.getFullYear() ;
subDiv.innerHTML = bottomString ;
bottomBar.appendChild(subDiv);
var timeDiv = writeTimeBar();
bottomBar.appendChild(timeDiv);
calendarDiv.appendChild(bottomBar);
}
function getTopPos(inputObj)
{
var returnValue = inputObj.offsetTop + inputObj.offsetHeight;
while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetTop;
return returnValue + calendar_offsetTop;
}
function getleftPos(inputObj)
{
var returnValue = inputObj.offsetLeft;
while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetLeft;
return returnValue + calendar_offsetLeft;
}
function positionCalendar(inputObj)
{
calendarDiv.style.left = getleftPos(inputObj) + 'px';
calendarDiv.style.top = getTopPos(inputObj) + 'px';
if(iframeObj){
iframeObj.style.left = calendarDiv.style.left;
iframeObj.style.top =  calendarDiv.style.top;
iframeObj2.style.left = calendarDiv.style.left;
iframeObj2.style.top =  calendarDiv.style.top;
}
}
function initCalendar()
{
if(MSIE){
iframeObj = document.createElement('IFRAME');
iframeObj.style.filter = 'alpha(opacity=0)';
iframeObj.style.position = 'absolute';
iframeObj.border='0px';
iframeObj.style.border = '0px';
iframeObj.style.backgroundColor = '#FF0000';
iframeObj2 = document.createElement('IFRAME');
iframeObj2.style.position = 'absolute';
iframeObj2.border='0px';
iframeObj2.style.border = '0px';
iframeObj2.style.height = '1px';
iframeObj2.style.width = '1px';
iframeObj2.src = 'blank.html';
iframeObj.src = 'blank.html';
document.body.appendChild(iframeObj2);  // gfb move this down AFTER the .src is set
document.body.appendChild(iframeObj);
}
calendarDiv = document.createElement('DIV');
calendarDiv.id = 'leo_calendarDiv';
calendarDiv.style.zIndex = 1000;
slideCalendarSelectBox();
document.body.appendChild(calendarDiv);
writeBottomBar();
writeTopBar();
if(!currentYear){
var d = new Date();
currentMonth = d.getMonth();
currentYear = d.getFullYear();
}
writeCalendarContent();
}
function setTimeProperties()
{
if(!calendarDisplayTime){
document.getElementById('timeBar').style.display='none';
document.getElementById('timeBar').style.visibility='hidden';
document.getElementById('todaysDateString').style.width = '100%';
}else{
document.getElementById('timeBar').style.display='block';
document.getElementById('timeBar').style.visibility='visible';
document.getElementById('hourDropDown').style.top = document.getElementById('calendar_minute_txt').parentNode.offsetHeight + calendarContentDiv.offsetHeight + document.getElementById('topBar').offsetHeight + 'px';
document.getElementById('minuteDropDown').style.top = document.getElementById('calendar_minute_txt').parentNode.offsetHeight + calendarContentDiv.offsetHeight + document.getElementById('topBar').offsetHeight + 'px';
document.getElementById('minuteDropDown').style.right = '50px';
document.getElementById('hourDropDown').style.right = '50px';
document.getElementById('todaysDateString').style.width = '115px';
}
}
function calendarSortItems(a,b)
{
return a/1 - b/1;
}
function displayCalendar(inputField,format,buttonObj,displayTime,timeInput)
{
if(displayTime)calendarDisplayTime=true; else calendarDisplayTime = false;
if(inputField.value.length>6){ //dates must have at least 6 digits...
if(!inputField.value.match(/^[0-9]*?$/gi)){
var items = inputField.value.split(/[^0-9]/gi);
var positionArray = new Object();
positionArray.m = format.indexOf('mm');
if(positionArray.m==-1)positionArray.m = format.indexOf('m');
positionArray.d = format.indexOf('dd');
if(positionArray.d==-1)positionArray.d = format.indexOf('d');
positionArray.y = format.indexOf('yyyy');
positionArray.h = format.indexOf('hh');
positionArray.i = format.indexOf('ii');
this.initialHour = '00';
this.initialMinute = '00';
var elements = ['y','m','d','h','i'];
var properties = ['currentYear','currentMonth','inputDay','currentHour','currentMinute'];
var propertyLength = [4,2,2,2,2];
for(var i=0;i<elements.length;i++) {
if(positionArray[elements[i]]>=0) {
window[properties[i]] = inputField.value.substr(positionArray[elements[i]],propertyLength[i])/1;
}
}
currentMonth--;
}else{
var monthPos = format.indexOf('mm');
currentMonth = inputField.value.substr(monthPos,2)/1 -1;
var yearPos = format.indexOf('yyyy');
currentYear = inputField.value.substr(yearPos,4);
var dayPos = format.indexOf('dd');
tmpDay = inputField.value.substr(dayPos,2);
var hourPos = format.indexOf('hh');
if(hourPos>=0){
tmpHour = inputField.value.substr(hourPos,2);
currentHour = tmpHour;
}else{
currentHour = '00';
}
var minutePos = format.indexOf('ii');
if(minutePos>=0){
tmpMinute = inputField.value.substr(minutePos,2);
currentMinute = tmpMinute;
}else{
currentMinute = '00';
}
}
}else{
var d = new Date();
currentMonth = d.getMonth();
currentYear = d.getFullYear();
currentHour = '08';
currentMinute = '00';
inputDay = d.getDate()/1;
}
inputYear = currentYear;
inputMonth = currentMonth;
if(!calendarDiv){
initCalendar();
}else{
if(calendarDiv.style.display=='block'){
closeCalendar();
return false;
}
writeCalendarContent();
}
returnFormat = format;
returnDateTo = inputField;
positionCalendar(buttonObj);
calendarDiv.style.visibility = 'visible';
calendarDiv.style.display = 'block';
if(iframeObj){
iframeObj.style.display = '';
iframeObj.style.height = '140px';
iframeObj.style.width = '195px';
iframeObj2.style.display = '';
iframeObj2.style.height = '140px';
iframeObj2.style.width = '195px';
}
setTimeProperties();
updateYearDiv();
updateMonthDiv();
updateMinuteDiv();
updateHourDiv();
}
function displayCalendarSelectBox(yearInput,monthInput,dayInput,hourInput,minuteInput,buttonObj)
{
if(!hourInput)calendarDisplayTime=false; else calendarDisplayTime = true;
currentMonth = monthInput.options[monthInput.selectedIndex].value/1-1;
currentYear = yearInput.options[yearInput.selectedIndex].value;
if(hourInput){
currentHour = hourInput.options[hourInput.selectedIndex].value;
inputHour = currentHour/1;
}
if(minuteInput){
currentMinute = minuteInput.options[minuteInput.selectedIndex].value;
inputMinute = currentMinute/1;
}
inputYear = yearInput.options[yearInput.selectedIndex].value;
inputMonth = monthInput.options[monthInput.selectedIndex].value/1 - 1;
inputDay = dayInput.options[dayInput.selectedIndex].value/1;
if(!calendarDiv){
initCalendar();
}else{
writeCalendarContent();
}
returnDateToYear = yearInput;
returnDateToMonth = monthInput;
returnDateToDay = dayInput;
returnDateToHour = hourInput;
returnDateToMinute = minuteInput;
returnFormat = false;
returnDateTo = false;
positionCalendar(buttonObj);
calendarDiv.style.visibility = 'visible';
calendarDiv.style.display = 'block';
if(iframeObj){
iframeObj.style.display = '';
iframeObj.style.height = calendarDiv.offsetHeight + 'px';
iframeObj.style.width = calendarDiv.offsetWidth + 'px';
iframeObj2.style.display = '';
iframeObj2.style.height = calendarDiv.offsetHeight + 'px';
iframeObj2.style.width = calendarDiv.offsetWidth + 'px'
}
setTimeProperties();
updateYearDiv();
updateMonthDiv();
updateHourDiv();
updateMinuteDiv();
}
displaywhenempty = "";
valuewhenempty = -1;
displaywhennotempty = "";
valuewhennotempty = 0;
idPraefix = "leocombo_";
function change(currentbox) {
numb = currentbox.id.split("_");
currentbox = numb[1];
i = parseInt(currentbox)+1;
while ((eval("typeof(document.getElementById(\"" + idPraefix + i+ "\"))!='undefined'")) &&
(document.getElementById(idPraefix+i)!=null)) {
son = document.getElementById(idPraefix + i);
for (m=son.options.length-1;m>0;m--) son.options[m]=null;
son.options[0]=new Option(displaywhenempty,valuewhenempty);
i = i+1;
}
stringa = 'data';
i = 0;
while ((eval("typeof(document.getElementById(\"" + idPraefix + i + "\"))!='undefined'")) &&
(document.getElementById(idPraefix + i)!=null)) {
eval("stringa=stringa+'_'+document.getElementById(\"" + idPraefix + i + "\").selectedIndex")
if (i==currentbox) break;
i = i+1;
}
following = parseInt(currentbox)+1;
if ((eval("typeof(document.getElementById(\"" + idPraefix + following + "\"))!='undefined'")) &&
(document.getElementById(idPraefix + following)!=null)) {
son = document.getElementById(idPraefix + following);
stringa = stringa + "_";
i = 0;
while ((eval("typeof("+stringa+i+")!='undefined'")) || (i==0)) {
if ((i==0) && eval("typeof("+stringa+"0)=='undefined'"))
if (eval("typeof("+stringa+"1)=='undefined'"))
eval("son.options[0]=new Option(displaywhenempty,valuewhenempty)");
else
eval("son.options[0]=new Option(displaywhennotempty,valuewhennotempty)");
else
eval("son.options["+i+"]=new Option("+stringa+i+".text,"+stringa+i+".value)");
i = i+1;
}
i = 1;
combostatus = '';
cstatus = stringa.split("_");
while (cstatus[i]!=null) {
combostatus=combostatus+cstatus[i];
i = i+1;
}
return combostatus;
}
}
var MGFX=MGFX||{};MGFX.Rotater=new Class({Implements:[Options,Events],options:{slideInterval:4000,transitionDuration:1000,startIndex:0,autoplay:true,hover:false},initialize:function(B,A){this.setOptions(A);this.slides=$$(B);this.createFx();this.showSlide(this.options.startIndex);if(this.slides.length<2){this.options.autoplay=false}if(this.options.autoplay){this.autoplay()}if(this.options.hover){this.slides.addEvent('mouseenter',function(){this.stop()}.bind(this));}return this},toElement:function(){return this.container},createFx:function(){if(!this.slideFx){this.slideFx=new Fx.Elements(this.slides,{duration:this.options.transitionDuration})}this.slides.each(function(A){A.setStyle("display","none")})},showSlide:function(B){var A={};this.slides.each(function(C,D){if(D==B&&D!=this.currentSlide){A[D.toString()]={display:'block'}}else{A[D.toString()]={display:'none'}}},this);this.fireEvent("onShowSlide",B);this.currentSlide=B;this.slideFx.start(A);return this},autoplay:function(){this.slideshowInt=this.rotate.periodical(this.options.slideInterval,this);this.fireEvent("onAutoPlay");return this},stop:function(){$clear(this.slideshowInt);this.fireEvent("onStop");return this},rotate:function(){current=this.currentSlide;next=(current+1>=this.slides.length)?0:current+1;this.showSlide(next);this.fireEvent("onRotate",next);return this}});var MGFX=MGFX||{};MGFX.Tabs=new Class({Extends:MGFX.Rotater,options:{slideInterval:6000,transitionDuration:300,autoplay:false},initialize:function(B,C,A){this.tabs=$$(B+" li");this.tabsA=$$(B+" a");this.createTabs();this.parent(C,A);return this},createTabs:function(){this.tabsA.each(function(B,A){B.addEvent("click",function(C){C.stop();this.showSlide(A);this.stop()}.bind(this))}.bind(this))},activateTab:function(A){this.tabs.removeClass("active");this.tabsA.removeClass("active");this.tabs[A].addClass("active");this.tabsA[A].addClass("active")},showSlide:function(A){if(A==this.currentSlide)return;this.activateTab(A);this.parent(A);return this}});
var noobSlide=new Class({initialize:function(a){this.items=a.items;this.mode=a.mode||'horizontal';this.modes={horizontal:['left','width'],vertical:['top','height']};this.size=a.size||240;this.box=a.box.setStyle(this.modes[this.mode][1],(this.size*this.items.length)+'px');this.button_event=a.button_event||'click';this.handle_event=a.handle_event||'click';this.onWalk=a.onWalk||null;this.currentIndex=null;this.previousIndex=null;this.nextIndex=null;this.interval=a.interval||5000;this.autoPlay=a.autoPlay||false;this._play=null;this.handles=a.handles||null;if(this.handles){this.addHandleButtons(this.handles)}this.buttons={previous:[],next:[],play:[],playback:[],stop:[]};if(a.addButtons){for(var b in a.addButtons){this.addActionButtons(b,$type(a.addButtons[b])=='array'?a.addButtons[b]:[a.addButtons[b]])}}this.fx=new Fx.Tween(this.box,$extend((a.fxOptions||{duration:500,wait:false}),{property:this.modes[this.mode][0]}));this.walk((a.startItem||0),true,true)},addHandleButtons:function(a){for(var i=0;i<a.length;i++){a[i].addEvent(this.handle_event,this.walk.bind(this,[i,true]))}},addActionButtons:function(a,b){for(var i=0;i<b.length;i++){switch(a){case'previous':b[i].addEvent(this.button_event,this.previous.bind(this,[true]));break;case'next':b[i].addEvent(this.button_event,this.next.bind(this,[true]));break;case'play':b[i].addEvent(this.button_event,this.play.bind(this,[this.interval,'next',false]));break;case'playback':b[i].addEvent(this.button_event,this.play.bind(this,[this.interval,'previous',false]));break;case'stop':b[i].addEvent(this.button_event,this.stop.bind(this));break}this.buttons[a].push(b[i])}},previous:function(a){this.walk((this.currentIndex>0?this.currentIndex-1:this.items.length-1),a)},next:function(a){this.walk((this.currentIndex<this.items.length-1?this.currentIndex+1:0),a)},play:function(a,b,c){this.stop();if(!c){this[b](false)}this._play=this[b].periodical(a,this,[false])},stop:function(){$clear(this._play)},walk:function(a,b,c){if(a!=this.currentIndex){this.currentIndex=a;this.previousIndex=this.currentIndex+(this.currentIndex>0?-1:this.items.length-1);this.nextIndex=this.currentIndex+(this.currentIndex<this.items.length-1?1:1-this.items.length);if(b){this.stop()}if(c){this.fx.cancel().set((this.size*-this.currentIndex)+'px')}else{this.fx.start(this.size*-this.currentIndex)}if(b&&this.autoPlay){this.play(this.interval,'next',true)}if(this.onWalk){this.onWalk((this.items[this.currentIndex]||null),(this.handles&&this.handles[this.currentIndex]?this.handles[this.currentIndex]:null))}}}});
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
function ControlVersion()
{
var version;
var axo;
var e;
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
version = axo.GetVariable("$version");
} catch (e) {
}
if (!version)
{
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
version = "WIN 6,0,21,0";
axo.AllowScriptAccess = "always";
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = "WIN 3,0,18,0";
} catch (e) {
}
}
if (!version)
{
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
version = "WIN 2,0,0,11";
} catch (e) {
version = -1;
}
}
return version;
}
function GetSwfVer(){
var flashVer = -1;
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];
var versionRevision = descArray[3];
if (versionRevision == "") {
versionRevision = descArray[4];
}
if (versionRevision[0] == "d") {
versionRevision = versionRevision.substring(1);
} else if (versionRevision[0] == "r") {
versionRevision = versionRevision.substring(1);
if (versionRevision.indexOf("d") > 0) {
versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
}
}
var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
}
}
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
else if ( isIE && isWin && !isOpera ) {
flashVer = ControlVersion();
}
return flashVer;
}
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
versionStr = GetSwfVer();
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
tempString        = tempArray[1];			// "2,0,0,11"
versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
} else {
versionArray      = versionStr.split(".");
}
var versionMajor      = versionArray[0];
var versionMinor      = versionArray[1];
var versionRevision   = versionArray[2];
if (versionMajor > parseFloat(reqMajorVer)) {
return true;
} else if (versionMajor == parseFloat(reqMajorVer)) {
if (versionMinor > parseFloat(reqMinorVer))
return true;
else if (versionMinor == parseFloat(reqMinorVer)) {
if (versionRevision >= parseFloat(reqRevision))
return true;
}
}
return false;
}
}
function AC_AddExtension(src, ext)
{
if (src.indexOf('?') != -1)
return src.replace(/\?/, ext+'?');
else
return src + ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs)
{
var str = '';
if (isIE && isWin && !isOpera)
{
str += '<object ';
for (var i in objAttrs)
{
str += i + '="' + objAttrs[i] + '" ';
}
str += '>';
for (var i in params)
{
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
}
str += '</object>';
}
else
{
str += '<embed ';
for (var i in embedAttrs)
{
str += i + '="' + embedAttrs[i] + '" ';
}
str += '> </embed>';
}
document.write(str);
}
function AC_FL_RunContent(){
var ret =
AC_GetArgs
(  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_SW_RunContent(){
var ret =
AC_GetArgs
(  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
, null
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[args[i]] = args[i+1];
break;
case "src":
case "movie":
args[i+1] = AC_AddExtension(args[i+1], ext);
ret.embedAttrs["src"] = args[i+1];
ret.params[srcParamName] = args[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblclick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
case "id":
ret.objAttrs[args[i]] = args[i+1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
}
ret.objAttrs["classid"] = classid;
if (mimeType) ret.embedAttrs["type"] = mimeType;
return ret;
}
function MM_CheckFlashVersion(reqVerStr,msg){
with(navigator){
var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
if (!isIE || !isWin){
var flashVer = -1;
if (plugins && plugins.length > 0){
var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
if (desc == "") flashVer = -1;
else{
var descArr = desc.split(" ");
var tempArrMajor = descArr[2].split(".");
var verMajor = tempArrMajor[0];
var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
flashVer =  parseFloat(verMajor + "." + verMinor);
}
}
else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;
var verArr = reqVerStr.split(",");
var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
if (flashVer < reqVer){
if (confirm(msg))
window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
}
}
}
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_openBrWindow(theURL,winName,features)
{
window.open(theURL,winName,features);
}
var UvumiDropdown = new Class({
Implements:Options,
options:{
clickToOpen:false,
delay:50,
duration:250,	//duration in millisecond of opening/closing effect
transition:Fx.Transitions.Linear	//effect's transitions. See http://docs.mootools.net/Fx/Fx.Transitions for more details
},
initialize: function(menu,options){
this.menu = menu;
this.setOptions(options);
window.addEvent('domready',this.domReady.bind(this));
},
domReady:function(){
this.menu = document.id(this.menu);
if(!$defined(this.menu)){
return false;
}
if(this.menu.get('tag')!='ul'){
this.menu = this.menu.getFirst('ul');
if(!$defined(this.menu)){
return false;
}
}
this.menu.setStyles({
overflow:'hidden',
height:0,
marginLeft:(Browser.Engine.trident?1:-1)
});
this.createSubmenu(this.menu);
this.menu.getChildren('li').setStyles({
'float':'left',
display:'block',
top:0
});
var clear = new Element('li',{
html:"&nbsp;",
styles:{
clear:'both',
display:(Browser.Engine.trident?'inline':'block'), //took me forever to find that fix
position:'relative',
top:0,
height:0,
width:0,
fontSize:0,
lineHeight:0,
margin:0,
padding:0
}
}).setProperty('class', 'last').inject(this.menu);
this.menu.setStyles({
height:'auto',
overflow:'visible',
visibility:'visible'
});
this.menu.getElements('a').setStyle('display',(Browser.Engine.trident?'inline-block':'block'));
},
createSubmenu:function(ul){
var LIs = ul.getChildren('li');
var offset = 0;
LIs.each(function(li){
li.setStyles({
position:'relative',
display:'block',
top:-offset,
zIndex:1
});
offset += li.getSize().y;
var innerUl = li.getFirst('ul');
if($defined(innerUl)){
innerUl.setStyle('display','none');
if(ul == this.menu){
var x = 0;
var y = li.getSize().y;
this.options.link='cancel';
li.store('animation',new Fx.Elements($$(innerUl,innerUl.getChildren('li')).setStyle('opacity',0),this.options));
}else{
var x = li.getSize().x-li.getStyle('border-left-width').toInt();
var y = -li.getStyle('border-bottom-width').toInt();
this.options.link='chain';
li.store('animation',new Fx.Elements($$(innerUl,innerUl.getChildren('li')).setStyle('opacity',0),this.options));
offset=li.getSize().y+li.getPosition(this.menu).y;
}
innerUl.setStyles({
position:'absolute',
display:'block',
top:y,
left:x,
marginLeft:-x,
opacity:0
});
this.createSubmenu(innerUl);
if(this.options.clickToOpen){
li.addEvents({
click:function(e){
e.stop();
$clear(li.retrieve('delay'));
this.showChildList(li);
}.bind(this),
mouseenter:function(){
$clear(li.retrieve('delay'));
}.bind(this)
});
}else{
li.addEvent('mouseenter',function(){
$clear(li.retrieve('delay'));
this.showChildList(li);
}.bind(this));
}
li.addEvent('mouseleave', function(){
li.store('delay',this.hideChildList.delay(this.options.delay,this,li));
}.bind(this)).addClass('submenu');
}
},this);
},
showChildList:function(li){
var ul = li.getFirst('ul');
var LIs =  $$(ul.getChildren('li'));
var animation = li.retrieve('animation');
if(li.getParent('ul')!=this.menu){
animation.cancel();
animation.start({
0:{
opacity:1,
marginLeft:0
},
1:{
opacity:1
}
});
var animobject={};
}else{
var animobject = {0:{opacity:1}};
}
LIs.each(function(innerli,i){
animobject[i+1]={
top:0,
opacity:1
};
});
li.setStyle('z-index',99);
animation.start(animobject);
},
hideChildList:function(li){
var animation = li.retrieve('animation');
var ul = li.getFirst('ul');
var LIs =  $$(ul.getChildren('li'));
var offset = 0;
var animobject={};
LIs.each(function(innerli,i){
animobject[i+1]={
top:-offset,
opacity:0
};
offset += innerli.getSize().y;
});
li.setStyle('z-index',1);
if(li.getParent('ul')!=this.menu){
animobject[1]=null;
animation.cancel();
animation.start(animobject);
animation.start({
0:{
opacity:0,
marginLeft:-ul.getSize().x
},
1:{
opacity:0
}
});
}else{
animobject[0]={opacity:0};
animation.start(animobject);
}
}
});
new UvumiDropdown('dropdown', {transition:Fx.Transitions.Linear,duration:0});
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typeof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType" in G&&"tagName" in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return !B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});
(function(){var I=document,B=I.createElement("p"),D=B.style,C=YAHOO.lang,L={},H={},E=0,J=("cssFloat" in D)?"cssFloat":"styleFloat",F,A,K;A=("opacity" in D)?function(M){M.opacity="";}:function(M){M.filter="";};D.border="1px solid red";D.border="";K=D.borderLeft?function(M,O){var N;if(O!==J&&O.toLowerCase().indexOf("float")!=-1){O=J;}if(typeof M[O]==="string"){switch(O){case"opacity":case"filter":A(M);break;case"font":M.font=M.fontStyle=M.fontVariant=M.fontWeight=M.fontSize=M.lineHeight=M.fontFamily="";break;default:for(N in M){if(N.indexOf(O)===0){M[N]="";}}}}}:function(M,N){if(N!==J&&N.toLowerCase().indexOf("float")!=-1){N=J;}if(C.isString(M[N])){if(N==="opacity"){A(M);}else{M[N]="";}}};function G(T,O){var W,R,V,U={},N,X,Q,S,M,P;if(!(this instanceof arguments.callee)){return new arguments.callee(T,O);}W=I.getElementsByTagName("head")[0];if(!W){throw new Error("HEAD element not found to append STYLE node");}R=T&&(T.nodeName?T:I.getElementById(T));if(T&&H[T]){return H[T];}else{if(R&&R.yuiSSID&&H[R.yuiSSID]){return H[R.yuiSSID];}}if(!R||!/^(?:style|link)$/i.test(R.nodeName)){R=I.createElement("style");R.type="text/css";}if(C.isString(T)){if(T.indexOf("{")!=-1){if(R.styleSheet){R.styleSheet.cssText=T;}else{R.appendChild(I.createTextNode(T));}}else{if(!O){O=T;}}}if(R.parentNode!==W){W.appendChild(R);}V=R.sheet||R.styleSheet;N=V&&("cssRules" in V)?"cssRules":"rules";for(S=V[N].length-1;S>=0;--S){M=V[N][S];P=M.selectorText;if(U[P]){U[P].style.cssText+=";"+M.style.cssText;Q(S);}else{U[P]=M;}}Q=("deleteRule" in V)?function(Y){V.deleteRule(Y);}:function(Y){V.removeRule(Y);};X=("insertRule" in V)?function(a,Z,Y){V.insertRule(a+" {"+Z+"}",Y);}:function(a,Z,Y){V.addRule(a,Z,Y);};R.yuiSSID="yui-stylesheet-"+(E++);G.register(R.yuiSSID,this);if(O){G.register(O,this);}C.augmentObject(this,{getId:function(){return R.yuiSSID;},node:R,enable:function(){V.disabled=false;return this;},disable:function(){V.disabled=true;return this;},isEnabled:function(){return !V.disabled;},set:function(b,a){var d=U[b],c=b.split(/\s*,\s*/),Z,Y;if(c.length>1){for(Z=c.length-1;Z>=0;--Z){this.set(c[Z],a);}return this;}if(!G.isValidSelector(b)){return this;}if(d){d.style.cssText=G.toCssText(a,d.style.cssText);}else{Y=V[N].length;a=G.toCssText(a);if(a){X(b,a,Y);U[b]=V[N][Y];}}return this;},unset:function(b,a){var d=U[b],c=b.split(/\s*,\s*/),Y=!a,e,Z;if(c.length>1){for(Z=c.length-1;Z>=0;--Z){this.unset(c[Z],a);}return this;}if(d){if(!Y){if(!C.isArray(a)){a=[a];}D.cssText=d.style.cssText;for(Z=a.length-1;Z>=0;--Z){K(D,a[Z]);}if(D.cssText){d.style.cssText=D.cssText;}else{Y=true;}}if(Y){e=V[N];for(Z=e.length-1;Z>=0;--Z){if(e[Z]===d){delete U[b];Q(Z);break;}}}}return this;},getCssText:function(Z){var a,Y;if(C.isString(Z)){a=U[Z.split(/\s*,\s*/)[0]];return a?a.style.cssText:null;}else{Y=[];for(Z in U){if(U.hasOwnProperty(Z)){a=U[Z];Y.push(a.selectorText+" {"+a.style.cssText+"}");}}return Y.join("\n");}}},true);}F=function(M,O){var N=M.styleFloat||M.cssFloat||M["float"],Q;D.cssText=O||"";if(N&&!M[J]){M=C.merge(M);delete M.styleFloat;delete M.cssFloat;delete M["float"];M[J]=N;}for(Q in M){if(M.hasOwnProperty(Q)){try{D[Q]=C.trim(M[Q]);}catch(P){}}}return D.cssText;};C.augmentObject(G,{toCssText:(("opacity" in D)?F:function(M,N){if("opacity" in M){M=C.merge(M,{filter:"alpha(opacity="+(M.opacity*100)+")"});delete M.opacity;}return F(M,N);}),register:function(M,N){return !!(M&&N instanceof G&&!H[M]&&(H[M]=N));},isValidSelector:function(N){var M=false;if(N&&C.isString(N)){if(!L.hasOwnProperty(N)){L[N]=!/\S/.test(N.replace(/\s+|\s*[+~>]\s*/g," ").replace(/([^ ])\[.*?\]/g,"$1").replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/ig,"$1").replace(/(?:^| )[a-z0-6]+/ig," ").replace(/\\./g,"").replace(/[.#]\w[\w\-]*/g,""));}M=L[N];}return M;}},true);YAHOO.util.StyleSheet=G;})();YAHOO.register("stylesheet",YAHOO.util.StyleSheet,{version:"2.7.0",build:"1799"});
if (typeof now == 'undefined') var now = new Date();
if(typeof bc_experience == 'undefined') { var bc_experience = new Object(); }
if(typeof bc_player == 'undefined') { var bc_player = new Object(); }
if(typeof bc_social == 'undefined') { var bc_social = new Object(); }
if(typeof bc_content == 'undefined') { var bc_content = new Object(); }
if(typeof bc_playerOpened == 'undefined') { var bc_playerOpened = new Array(); }
var bc_firstWidget = true;
if(typeof bc_id_ez != 'array') {
var bc_id_ez = new Array();
}
function onTemplateLoaded(pExperienceId) {
bc_experience[pExperienceId] = brightcove.getExperience(pExperienceId);
bc_player[pExperienceId] = bc_experience[pExperienceId].getModule(APIModules.VIDEO_PLAYER);
bc_social[pExperienceId] = bc_experience[pExperienceId].getModule(APIModules.SOCIAL);
bc_content[pExperienceId] = bc_experience[pExperienceId].getModule(APIModules.CONTENT);
}
function bc_widget_single(arg) {
var id = bc_id_ez.length;
bc_id_ez.push(new bc_make_widget_single(arg, id));
bc_id_ez[id].generate();
bc_id_ez[id].retrieve();
bc_id_ez[id].listen(id);
}
function createXMLHttpRequest() {
try { return new XMLHttpRequest(); } catch(e) {}
try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
return null;
}
function bc_widget_scripts() {
var now = new Date();
var milli = now.getTime();
var script = document.createElement('script');
script.type = 'text/javascript';
script.setAttribute('charset', 'UTF-8');
script.src = 'http://admin.brightcove.com/js/APIModules_all.js?' + milli;
document.getElementsByTagName('head')[0].appendChild(script);
var script1 = document.createElement('script');
script1.type = 'text/javascript';
script1.setAttribute('charset', 'UTF-8');
script1.src = 'http://admin.brightcove.com/js/BrightcoveExperiences.js?' + milli;
document.getElementsByTagName('head')[0].appendChild(script1);
}
function bc_make_widget_single(arg, id) {
this.id = id;
this.postfix = arg.postfix || '';
this.token = arg.token || (this.id > 0? bc_id_ez[0].token: 'myReadToken.');
this.dir = arg.dir || 'bcw_single';
this.videoId = (!arg.videoIds) ? null : arg.videoIds[0];
this.playerId = (!arg.playerIds) ? null : arg.playerIds[0];
this.width = arg.width || 300;
this.height = null;
this.viewed = false;
this.ff = false;
this.saf = false;
this.ie = false;
this.ie7 = false
this.ie6 = false;
this.first = (bc_firstWidget) ? true : false;
this.referName = 'singlewidget';
this.TSshow = (!arg.TSshow) ? true : arg.TSshow;
this.TSurl = this.TSsytyle = this.TSurlText = null;
if (arg.TSopt)  {
if (arg.TSopt['target'] && arg.TSopt['target'].length > 2)  {
this.TStarget = ' target="' + arg.TSopt.target + '"';
this.TStargets = arg.TSopt.target;
}
if (arg.TSopt['style'] && arg.TSopt['style'].length > 1)
this.TSsytyle = arg.TSopt['style'];
if (arg.TSopt['url'] && arg.TSopt['url'].length > 1)
this.TSurl = arg.TSopt['url'];
if (arg.TSopt['urltext'] && arg.TSopt['urltext'].length > 1)
this.TSurlText = arg.TSopt['urltext'];
}
this.generate = function() {
var browser = this.detect()[1];
var version = this.detect()[2];
if(browser == 'firefox') {
this.ff = true;
} else if(browser == 'safari') {
this.saf = true;
} else if(browser == 'explorer') {
this.ie = true;
if(version < 7) {
this.ie6 = true;
} else if(version < 8) {
this.ie7 = true;
}
}
var code = document.createElement("link");
code.setAttribute('href', this.dir + this.postfix + '/brightcove.css');
code.setAttribute('rel', 'stylesheet');
code.setAttribute('type', 'text/css');
document.getElementsByTagName('head')[0].appendChild(code);
bc_firstWidget = false;
if(this.ie)
{
var css = '<style type="text/css">' + "\n" +
'div.bc_widget_single' + this.postfix + ' div.bc_overlay_off' + this.postfix + ' { background: none; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + this.dir + this.postfix + '/bc_playOverlay_Off.png", sizingMethod="image"); }' + "\n" +
'div.bc_widget_single' + this.postfix + ' div.bc_overlay_on' + this.postfix + ' { background: none; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + this.dir + this.postfix + '/bc_playOverlay_On.png", sizingMethod="image"); }' + "\n" +
'div.bc_widget_single' + this.postfix + ' div.bc_metaOverlay' + this.postfix + ' { background: none; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + this.dir + this.postfix + '/bc_metaOverlay.png", sizingMethod="scale"); } ';
if(this.ie6) {
css += ' div.bc_widget_single_overlay' + this.postfix + ' { background: #000; filter:alpha(opacity=90); position: absolute; } ';
}
if (this.ie) {
css += 'div.bc_widget_single_overlay' + this.postfix + ' { position: absolute; top:0px; } ';
}
css += ' </style>';
css = css.replace(/\/\//g, '/');
sheet = new YAHOO.util.StyleSheet(css);
}
document.write('<div id="' + this.id + 'BCWS_widget" class="bc_widget_single' + this.postfix + '" onmouseout="bc_id_ez[' + this.id + '].overlaySwitch(0);" onmouseover="bc_id_ez[' + this.id + '].overlaySwitch(1);"></div>');
}
this.playerCheck = function() {
brightcove.createExperiences([], this.id + 'BCWS_experience');
if(this.saf) {
if(!bc_playerOpened[this.id]) {
brightcove.createExperiences([], this.id + 'BCWS_experience');
bc_playerOpened[this.id] = true;
}
}
}
this.retrieve = function() {
var code = document.createElement('script');
var now = new Date();
var milli = now.getTime();
code.setAttribute('src', 'http://api.brightcove.com/services/library?' + milli + '=&command=find_video_by_id&video_id=' + this.videoId + '&token=' + this.token + '&fields=name,id,shortDescription,videoStillURL,length&callback=bc_id_ez[' + this.id + '].autoReturn');
code.setAttribute('charset', 'UTF-8');
code.setAttribute('type', 'text/javascript');
document.getElementsByTagName('head')[0].appendChild(code);
}
this.autoReturn = function(pData) {
if (! pData)
return(true);
var pMin = Math.floor((pData.length / 1000) / 60);
var pSec = Math.round((((pData.length / 1000) % 60) * 60) / 60);
var now = new Date();
var milli = now.getTime();
if(pSec < 10) {
pSec = '0' + pSec;
}
var code = '<img src="' + pData.videoStillURL + '" class="bc_still' + this.postfix + '" onclick="bc_id_ez[' + this.id + '].openBox();" id="' + this.id + 'BCWS_image" />';
code += '<div id="' + this.id + 'BCWS_overlayOn" onclick="bc_id_ez[' + this.id + '].openBox();" class="bc_overlay_on' + this.postfix + '" style="display: none;"></div>';
code += '<div id="' + this.id + 'BCWS_overlayOff" class="bc_overlay_off' + this.postfix + '"></div>';
code += '<div id="' + this.id + 'BCWS_metaOverlay" onclick="bc_id_ez[' + this.id + '].openBox();" class="bc_metaOverlay' + this.postfix + '">' + pData.name + ' <span>(' + pMin + ':' + pSec + ')</span></div>';
code += '<div id="' + this.id + 'BCWS_overlay" class="bc_widget_single_overlay' + this.postfix + '" onclick="bc_id_ez[' + this.id + '].closeBox();" style="display:none;">';
code += '<div id="' + this.id + 'BCWS_box" class="bc_widget_single_lightbox' + this.postfix + '" onclick="event.cancelBubble = true; return false;">';
code += '<div class="bc_close' + this.postfix + '"><a href="#" onclick="bc_id_ez[' + this.id + '].closeBox();return false;">Schlie&szlig;en</a></div>';
code += '<iframe name="' + this.id + 'BCWS_experience" frameBorder="0" id="' + this.id + 'BCWS_experience" src="' + this.dir + this.postfix + '/bcw_single_blank.html" width="486" height="425"></iframe>';
code += '<div class="bc_metaLightbox' + this.postfix + '">';
code += '<div class="bc_title' + this.postfix + '">' + pData.name + '</div>';
code += '<div class="bc_desc' + this.postfix + '">' + pData.shortDescription + '</div>';
if (this.TSurl)
code += '<div class="bc_ts_link' + this.postfix + '" style="' + (this.TSsytyle || 'text-align: right;line-height:14px;padding:0 3px;') + '"><a href="#" onclick="bc_id_ez[' + this.id + '].closeBox();return(window.location.href=\'' + this.TSurl + '\');">' + (this.TSurlText || 'Alle Videos') + '</a></div>';
code += '</div></div></div>';
document.getElementById(this.id + 'BCWS_widget').innerHTML = code;
this.setSize();
(document.getElementById('bc_single_dummy') || document.body).appendChild(document.getElementById(this.id + 'BCWS_overlay'));
this.tsAutoCheck();
}
this.setSize = function() {
this.height = this.width * 0.75;
document.getElementById(this.id + 'BCWS_widget').style.height = this.height + 'px';
document.getElementById(this.id + 'BCWS_overlayOn').style.top = ((this.height / 2) - 45) + 'px';
document.getElementById(this.id + 'BCWS_overlayOn').style.left = ((this.width / 2) - 60) + 'px';
document.getElementById(this.id + 'BCWS_overlayOff').style.top = ((this.height / 2) - 45) + 'px';
document.getElementById(this.id + 'BCWS_overlayOff').style.left = ((this.width / 2) - 60) + 'px';
if(this.ie) {
document.getElementById(this.id + 'BCWS_widget').style.width = this.width + 'px';
document.getElementById(this.id + 'BCWS_image').style.width = (this.width - 5) + 'px';
document.getElementById(this.id + 'BCWS_image').style.height = (this.height - 6) + 'px';
document.getElementById(this.id + 'BCWS_metaOverlay').style.width = (this.width - 5) + 'px';
document.getElementById(this.id + 'BCWS_metaOverlay').style.bottom = '-1px';
} else {
document.getElementById(this.id + 'BCWS_widget').style.width = (this.width - 6) + 'px';
document.getElementById(this.id + 'BCWS_image').style.width = (this.width - 6) + 'px';
document.getElementById(this.id + 'BCWS_image').style.height = this.height + 'px';
document.getElementById(this.id + 'BCWS_metaOverlay').style.width = (this.width - 16) + 'px';
}
}
this.listen = function(pId) {
var prevScroll = window.onscroll;
var prevResize = window.onresize;
window.onscroll = function() {
if(typeof prevScroll == 'function') {
prevScroll();
}
bc_id_ez[pId].position();
};
window.onresize = function() {
if(typeof prevResize == 'function') {
prevResize();
}
bc_id_ez[pId].position();
};
}
this.overlaySwitch = function(pState) {
if(pState == 1) {
document.getElementById(this.id + 'BCWS_overlayOn').style.display = 'block';
document.getElementById(this.id + 'BCWS_overlayOff').style.display = 'none';
document.getElementById(this.id + 'BCWS_widget').className = 'bc_widget_single' + this.postfix + ' bc_widget_single_over' + this.postfix;
} else {
document.getElementById(this.id + 'BCWS_overlayOn').style.display = 'none';
document.getElementById(this.id + 'BCWS_overlayOff').style.display = 'block';
document.getElementById(this.id + 'BCWS_widget').className = 'bc_widget_single' + this.postfix;
}
}
this.openBox = function() {
ch_ez(true);// stop scrolling, special_ez
var overlay = document.getElementById(this.id + 'BCWS_overlay');
var box = document.getElementById(this.id + 'BCWS_box');
var embed = document.getElementById(this.id + 'BCWS_experience');
this.flashDisplay(true);
overlay.style.display = 'block';
box.style.display = 'block';
embed.style.width = '486px';
embed.style.height = '425px';
this.position();
var milli = now.getTime();
window.frames[this.id + 'BCWS_experience'].location = this.dir + this.postfix + '/bcw_single_player.html?id=' + this.id + '&videoId=' + this.videoId + '&playerId=' + this.playerId + '&refer=' + this.referName + '&timestamp='+ milli + '&doply=' + (this.doply? 'true': 'false');
}
this.closeBox = function() {
ch_ez(false);// activate scrolling, special_ez
var overlay = document.getElementById(this.id + 'BCWS_overlay');
var box = document.getElementById(this.id + 'BCWS_box');
var iFrame = window.frames[this.id + 'BCWS_experience'];
iFrame.bc_player.pause();
iFrame.bc_player.stop();
overlay.style.display = 'none';
box.style.display = 'none';
this.flashDisplay(false);
}
this.position = function() {
var widget = document.getElementById(this.id + 'BCWS_widget');
var overlay = document.getElementById(this.id + 'BCWS_overlay');
var box = document.getElementById(this.id + 'BCWS_box');
var embed = document.getElementById(this.id + 'BCWS_experience');
var size = this.dimensions();
try {
overlay.style.top = (size[2] - 3) + 'px';
overlay.style.left = (size[3] - 3) + 'px';
if(embed.offsetHeight > 100) {
box.style.top = ((size[1] / 2) - (box.offsetHeight / 2)) + 'px';
box.style.left = ((size[0] / 2) - (box.offsetWidth / 2)) + 'px';
} else {
box.style.top = (((size[1] / 2) - (box.offsetHeight / 2)) - 206) + 'px';
box.style.left = ((size[0] / 2) - (box.offsetWidth / 2)) + 'px';
}
if(this.ie) {
overlay.style.width = (size[0] + 13) + 'px';
overlay.style.height = (size[1] + 18) + 'px';
} else {
overlay.style.width = size[0] + 'px';
overlay.style.height = size[1] + 'px';
}
} catch(e) {
}
}
this.flashDisplay = function(pOff) {
var setState = 'visible';
var tsActiveObject = this.id + 'BCWS_experience';
var tsObject = document.getElementsByTagName('object');
if(pOff) {
setState = 'hidden';
}
if(tsObject != null) {
var apNum = tsObject.length;
for(var i = 0; i < apNum; i++) {
tsObject[i].style.visibility = setState;
}
if(tsActiveObject.length > 0 && pOff) {
document.getElementById(tsActiveObject).style.visibility = 'visible';
}
}
}
this.dimensions = function() {
var BC_WINDOW_W = 0, BC_WINDOW_H = 0, BC_SCROLL_H = 0, BC_SCROLL_W = 0;
if (typeof(window.innerWidth) == 'number') {
BC_WINDOW_W = window.innerWidth;
BC_WINDOW_H = window.innerHeight;
BC_SCROLL_H = window.pageYOffset;
BC_SCROLL_W = window.pageXOffset;
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
BC_WINDOW_W = document.documentElement.clientWidth;
BC_WINDOW_H = document.documentElement.clientHeight;
BC_SCROLL_H = document.documentElement.scrollTop;
BC_SCROLL_W = document.documentElement.scrollLeft;
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
BC_WINDOW_W = document.body.clientWidth;
BC_WINDOW_H = document.body.clientHeight;
BC_SCROLL_H = document.body.scrollTop;
BC_SCROLL_W = document.body.scrollLeft;
}
return [ BC_WINDOW_W, BC_WINDOW_H, BC_SCROLL_H, BC_SCROLL_W ];
}
this.detect = function() {
var t;
var b = new Array(
{string: navigator.userAgent, subString: "Chrome", identity: "Chrome"},
{string: navigator.userAgent, subString: "OmniWeb", versionSearch: "OmniWeb/", identity: "OmniWeb"},
{string: navigator.vendor, subString: "Apple", identity: "Safari", versionSearch: "version"},
{prop: window.opera, identity: "Opera"},
{string: navigator.vendor, subString: "iCab", identity: "iCab"},
{string: navigator.vendor, subString: "KDE", identity: "Konqueror"},
{string: navigator.userAgent, subString: "Firefox", 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"}
);
var o = new Array(
{string: navigator.platform, subString: "Win", identity: "windows"},
{string: navigator.platform, subString: "Mac", identity: "mac"},
{string: navigator.platform, subString: "Linux", identity: "linux"}
);
var g = function(d) {
for(var i = 0; i < d.length; i++) {
var s = d[i].string;
var p = d[i].prop;
t = d[i].versionSearch || d[i].identity;
if(s) {
if(s.indexOf(d[i].subString) != -1) {
return d[i].identity;
}
} else if(p) {
return d[i].identity;
}
}
};
var h = function(s, t) {
var i = s.indexOf(t);
if(i == -1) {
return;
}
return parseFloat(s.substring(i + t.length + 1));
};
browser = g(b) || "unknown";
version = h(navigator.userAgent, t) || h(navigator.appVersion, t) || "unknown";
browser = browser.toLowerCase();
os = g(o) || "unknown";
return new Array(os, browser, version);
}
this.tsAutoCheck = function() {
var query = window.location.search.substring(1);
this.doply = false;
if (query.indexOf('doply=true') > -1)   {
this.doply = true;
this.openBox();
}
}
}
var saved_body_overflow = "";
function ch_ez(lison)
{
if( typeof(document.getElementsByTagName) != "undefined" )
{
if( typeof(document.getElementsByTagName("html")[0] ) != "undefined" ) var htmltag = document.getElementsByTagName("html")[0];
var bodytag = document.getElementsByTagName("body")[0];
if( lison )
{
saved_body_overflow = bodytag.style.overflow;
bodytag.style.overflow = "hidden";
if( typeof(htmltag.style.overflowX ) != "undefined" )
{
htmltag.style.overflowX = "hidden";
htmltag.style.overflowY = "hidden";
}
}
else if( typeof(saved_body_overflow) != "undefined" )
{
bodytag.style.overflow = saved_body_overflow;
if( typeof(htmltag.style.overflowX ) != "undefined" )
{
htmltag.style.overflowX = "auto";
htmltag.style.overflowY = "auto";
}
if (typeof(window.innerWidth) == 'number') {
window.scrollTo(window.pageXOffset, window.pageYOffset+1);
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
window.scrollTo(document.documentElement.scrollLeft, document.documentElement.scrollTop+1);
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
window.scrollTo(document.body.scrollLeft, document.body.scrollTop+1);
}
}
}
}
window.addEvent('domready', function() {
$$('a.tipz').each(function(element,index) {
var content = element.get('title').split('::');
element.store('tip:title', content[0]);
element.store('tip:text', content[1]);
});
var tipz = new Tips('.tipz',{
className: 'tipz',
fixed: true,
hideDelay: 50,
showDelay: 50
});
});
var gsTabView = function (_tabcontainer, _params)
{
var gstb = this;
this.init = function(_tabcontainer, _params)
{
this.tabContainer = jQuery(_tabcontainer);
this.navElement = jQuery(this.tabContainer).children('div').children('ul.gstab-nav');
this.contentElement = jQuery(this.tabContainer).children('div.gstab-content');
this.active=0;
this.active = (typeof(_params.selected)!='undefined') ? _params.selected : 0;
if(this.navElement.children().length > 0)
{
this.navElement.children('li').removeClass('selected');
this.contentElement.children('div').addClass('gstab-hidden');
this.navElement.children('li').eq(this.active).addClass('selected');
this.contentElement.children('div').eq(this.active).removeClass('gstab-hidden');
jQuery(gstb.navElement.children('li')).each(function(index)
{
gstb.navElement.children('li').eq(index).click(function(e)
{
gstb.selectTab(jQuery(e.currentTarget).index());
});
});
}
}
this.selectTab = function(_index)
{
if((this.navElement.children('li').eq(_index)) && this.contentElement.children('div').eq(_index))
{
this.navElement.children('li').removeClass('selected');
this.contentElement.children('div').addClass('gstab-hidden');
this.navElement.children('li').eq(_index).addClass('selected');
this.contentElement.children('div').eq(_index).removeClass('gstab-hidden');
this.active = _index;
return true;
}
else
{
return false;
}
}
this.getTab = function(_index)
{
var index = (typeof(_index)!='undefined') ? _index : this.active;
return (this.contentElement.children('div').eq(index).length > 0) ? this.contentElement.children('div').eq(index) : false ;
}
this.getActive = function()
{
return this.active;
}
this.getTabCount = function()
{
return this.navElement.children('li').length;
}
this.addTab = function (_params)
{
var tabcount = this.getTabCount();
var label = (typeof(_params.label)!='undefined') ? _params.label : (tabcount+1);
var content = (typeof(_params.content)!='undefined') ? _params.content : '';
var active = (typeof(_params.active)!='undefined') ? _params.active : false;
if(active && tabcount != 0)
{
this.navElement.children('li').removeClass('selected');
this.contentElement.children('div').addClass('gstab-hidden');
}
this.navElement.append('<li><a href="#tab'+(tabcount+1)+'"><em>'+label+'</em></a></li>');
this.contentElement.append('<div>'+content+'</div>');
if(active || tabcount == 0)
{
this.navElement.children('li').last().addClass('selected');
this.active = this.navElement.children('li').last().index();
}
else
{
this.contentElement.children('div').last().addClass('gstab-hidden');
}
this.navElement.children('li').last().click(function(e)
{
gstb.selectTab(jQuery(e.currentTarget).index());
});
return true;
}
if(_tabcontainer)
{
if(typeof(_params)=='undefined')
{
_params='';
}
this.init(_tabcontainer, _params);
}
};
var gsCarousel = function (_carouselcontainer, _params)
{
var gscl = this;
this.numVisible = 3;
this.useAnimation=false;
this.isCircular=false;
this.animationSpeed=500;
this.pages=0;
this.currentPage=0;
this.usePagination=false;
this.inverseSelection=false;
this.eventHandler=new Array();
this.timeout=10000;
this.autoScroll=false;
this.timer=null;
this.touchPosition=null;
this.maxPages=9;
this.numItems = function()
{
return gscl.carouselList.children('li').length;
}
this.back = function()
{
return gscl.selectPage(gscl.currentPage-1);
}
this.forward = function()
{
return gscl.selectPage(gscl.currentPage+1);
}
this.getCurrentPage = function()
{
return gscl.currentPage;
}
this.selectPage = function(_pageIndex, _notuser)
{
if(typeof(_notuser)=='undefined')
{
_notuser=false;
}
var end=false;
var curLeft=0;
if(_pageIndex>=gscl.pages)
{
_pageIndex = (gscl.isCircular) ? 0 : gscl.pages-1;
end=true;
}
if(_pageIndex<0)
{
_pageIndex = (gscl.isCircular) ? gscl.pages-1 : 0;
end=true;
}
gscl.currentPage=_pageIndex;
curLeft=-gscl.pageWidth*_pageIndex;
if(gscl.useAnimation){ gscl.carouselList.animate( {'left': curLeft}, gscl.animationSpeed, 'swing'); } else { gscl.carouselList.css('left', curLeft); }
if(gscl.usePagination)
{
jQuery(gscl.carouselContainer).children('div.gs-carousel-nav').children('div.gs-carousel-pagination').children('ul.gs-carousel-pagelist').children('li.gs-carousel-pageritem').removeClass('gs-carousel-selectedpage');
jQuery(gscl.carouselContainer).children('div.gs-carousel-nav').children('div.gs-carousel-pagination').children('ul.gs-carousel-pagelist').children('li.gs-carousel-pageritem').eq(_pageIndex).addClass('gs-carousel-selectedpage');
if(gscl.pages>gscl.maxPages)
{
jQuery(gscl.carouselContainer).children('div.gs-carousel-nav').children('div.gs-carousel-pagination').children('ul.gs-carousel-pagelist').children('li.gs-carousel-pageritem').removeClass('gs-carousel-pagevisible');
var pgLow=_pageIndex-Math.floor(gscl.maxPages/2);
if(pgLow<=0)
{
pgLow=0;
}
var pgHigh=_pageIndex+Math.floor(gscl.maxPages/2)+1;
for(var pg=pgLow; pg <pgHigh; pg++)
{
jQuery(gscl.carouselContainer).children('div.gs-carousel-nav').children('div.gs-carousel-pagination').children('ul.gs-carousel-pagelist').children('li.gs-carousel-pageritem').eq(pg).addClass('gs-carousel-pagevisible');
}
}
}
if(gscl.inverseSelection)
{
gscl.carouselList.children('li').addClass('gs-carousel-itemnotselected');
for(var i=0; i<gscl.numVisible; ++i)
{
gscl.carouselList.children('li').eq((_pageIndex * gscl.numVisible) +i).removeClass('gs-carousel-itemnotselected');
}
}
gscl.carouselList.children('li').removeClass('gs-carousel-itemselected');
for(var i=0; i<gscl.numVisible; ++i)
{
gscl.carouselList.children('li').eq((_pageIndex * gscl.numVisible) +i).addClass('gs-carousel-itemselected');
}
if((_notuser==false) && (gscl.autoScroll==true))
{
gscl.autoScroll=false;
clearTimeout(gscl.timer);
}
for(var i=0; i<gscl.eventHandler.length; ++i)
{
gscl.eventHandler[i](_pageIndex, _notuser);
}
return end;
}
this.touchMove = function(e)
{
e.preventDefault();
var etouch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
var offset = gscl.touchPosition-etouch.pageX;
if(offset < -30)
{
offset=0;
gscl.back();
gscl.touchPosition=etouch.pageX;
gscl.carouselList.unbind('touchmove' );
}
if(offset > 30)
{
offset=0;
gscl.forward();
gscl.touchPosition=etouch.pageX;
gscl.carouselList.unbind('touchmove' );
}
}
this.startAutoScroll = function()
{
gscl.timer=setTimeout(gscl.startAutoScroll, gscl.timeout);
gscl.autoScroll=true;
if(gscl.selectPage(gscl.currentPage+1, true))
{
gscl.selectPage(0, true);
}
}
this.addItem = function(_item, _class)
{
var itemClass = (_class)? _class : 'gs-carousel-item';
gscl.carouselList.append('<li class='+itemClass+'>'+_item+'</li>');
gscl.touch();
return gscl.carouselList.children().last();
}
this.touch = function()
{
gscl.pages=Math.ceil(gscl.numItems()/gscl.numVisible);
gscl.itemWidth = gscl.carouselList.children('li').outerWidth('true');
gscl.pageWidth = gscl.itemWidth*gscl.numVisible;
gscl._touchp();
}
this._touchp = function()
{
if(gscl.usePagination)
{
jQuery(gscl.carouselContainer).children('div.gs-carousel-nav').children('div.gs-carousel-pagination').children('ul.gs-carousel-pagelist').empty();
for(i=0; i<gscl.pages; ++i)
{
jQuery(gscl.carouselContainer).children('div.gs-carousel-nav').children('div.gs-carousel-pagination').children('ul.gs-carousel-pagelist').append('<li class="gs-carousel-pageritem"><a href="JavaScript:void(0);"><em>'+(i+1)+'</em></a></li>');
jQuery(gscl.carouselContainer).children('div.gs-carousel-nav').children('div.gs-carousel-pagination').children('ul.gs-carousel-pagelist').children('li').last().children('a').click(function(e)
{
gscl.selectPage(jQuery(e.currentTarget).parent().index());
});
}
if(gscl.pages>0)
{
jQuery(gscl.carouselContainer).children('div.gs-carousel-nav').children('div.gs-carousel-pagination').children('ul.gs-carousel-pagelist').children('li.gs-carousel-pageritem').eq(0).addClass('gs-carousel-selectedpage');
}
jQuery(gscl.carouselContainer).children('div.gs-carousel-nav').children('div.gs-carousel-pagination').children('ul.gs-carousel-pagelist').children('li.gs-carousel-pageritem').addClass('gs-carousel-pagevisible');
if(gscl.carouselList.children('li.gs-carousel-itemselected').index()!=-1)
{
gscl.selectPage(Math.floor(gscl.carouselList.children('li.gs-carousel-itemselected').index()/gscl.numVisible), true);
}
}
}
this.clearItems = function()
{
gscl.carouselList.empty();
}
this.registerEventHandler = function(_handler)
{
var handlerIndex = jQuery.inArray( _handler, gscl.eventHandler );
if(handlerIndex==-1)
{
gscl.eventHandler.push(_handler);
}
}
this.removeEventHandler = function(_handler)
{
var handlerIndex = jQuery.inArray( _handler, gscl.eventHandler );
if(handlerIndex!=-1)
{
gscl.eventHandler.splice(handlerIndex, 1);
return true;
}
else
{
return false;
}
}
this.init = function(_carouselcontainer, _params)
{
this.numVisible = (typeof(_params.numVisible)!='undefined') ? _params.numVisible : 3;
this.useAnimation = (typeof(_params.useAnimation)!='undefined') ? _params.useAnimation : false;
this.animationSpeed = (typeof(_params.animationSpeed)!='undefined') ? _params.animationSpeed : 300;
this.isCircular = (typeof(_params.isCircular)!='undefined') ? _params.isCircular : false;
this.usePagination = (typeof(_params.usePagination)!='undefined') ? _params.usePagination : false;
this.inverseSelection = (typeof(_params.inverseSelection)!='undefined') ? _params.inverseSelection : false;
this.autoScroll = (typeof(_params.autoScroll)!='undefined') ? _params.autoScroll : false;
this.timeout = (typeof(_params.timeout)!='undefined') ? _params.timeout : 10000;
var shouldBeItems = (typeof(_params.numItems)!='undefined') ? _params.numItems : 0;
this.maxPages = (typeof(_params.maxPages)!='undefined') ? _params.maxPages : 9;
this.carouselContainer = jQuery(_carouselcontainer);
this.carouselList = this.carouselContainer.children('ol.carousel');
this.carouselList.wrap('<div class="gs-carousel-content" />');
this.pageWidth = 505;
var paginator = (this.usePagination) ? '<div class="gs-carousel-pagination"><ul class="gs-carousel-pagelist"></ul></div>' : '';
jQuery(this.carouselContainer).prepend('<div class="gs-carousel-nav">'+paginator+'<span style="visibility: visible;" class="gs-carousel-button gs-carousel-first-button"><button type="button" name="Previous Page">Previous Page</button></span><span style="visibility: visible;" class="gs-carousel-button gs-carousel-next-button"><button name="Next Page">Next Page</button></span></div>');
this.carouselList.addClass('gs-carousel-element');
this.itemWidth = this.carouselList.children('li').outerWidth('true');
this.pageWidth = this.itemWidth*this.numVisible;
jQuery(this.carouselContainer).children('div.gs-carousel-nav').children('span.gs-carousel-first-button').children('button').click(gscl.back);
jQuery(this.carouselContainer).children('div.gs-carousel-nav').children('span.gs-carousel-next-button').children('button').click(gscl.forward);
if(this.numItems()<shouldBeItems)
{
while(this.numItems()<shouldBeItems)
{
this.addItem('&nbsp;', 'gs-carousel-item-loading');
}
}
if(this.numItems()>0)
{
this.pages=Math.ceil(this.numItems()/this.numVisible);
this._touchp();
}
if(this.autoScroll)
{
this.timer=setTimeout(gscl.startAutoScroll, this.timeout);
}
this.carouselList.bind('touchstart', function(e)
{
var etouch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
gscl.touchPosition= etouch.pageX;
gscl.carouselList.bind('touchmove', gscl.touchMove );
});
this.carouselList.bind('touchend', function(e) {
e.preventDefault();
gscl.touchPosition=null;
gscl.carouselList.unbind('touchmove', gscl.touchMove );
});
}
if(_carouselcontainer)
{
this.init(_carouselcontainer, _params);
}
};
var gsjquerycalendar = function(_container, _blockid, _params)
{
var gjqcMe = this;
this.container = jQuery(_container);
this.blockid = _blockid;
this.weekDays = [ 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So' ];
this.monthNames = [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ];
this.changePageHandler = function (date) { };
this.renderStack = new Array();
this.currentDate;
this.selectedDate;
this.touchPosition=null;
{
var today = new Date();
this.currentDate = { 'day': today.getDate(), 'month' : today.getMonth(), 'year' : today.getFullYear() };
this.selectedDate=this.currentDate;
}
this.getCorrectDate = function(year, month, day)
{
var corDate = new Date(year, month, day);
corDate.setYear(year);
corDate.setMonth(month);
corDate.setDate(day);
return corDate;
}
this.registerPageHandler = function(handler)
{
this.changePageHandler = handler;
}
this.addRenderer = function(cellDate, renderer)
{
var temp=cellDate.split(".");
var idDate = new Date(temp[2], temp[1]-1, temp[0]);
gjqcMe.renderStack.push({'id' : idDate, 'fn' : renderer });
}
this.bindCalBtns = function()
{
this.container.find('a.calnavleft').click(function(){gjqcMe.prevMonth();});
this.container.find('a.calnavright').click(function(){gjqcMe.nextMonth();});
}
this.touchMove = function(e)
{
e.preventDefault();
var etouch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
var offset = gjqcMe.touchPosition-etouch.pageX;
if(offset< -30)
{
offset=0;
gjqcMe.prevMonth();
gjqcMe.touchPosition=etouch.pageX;
gjqcMe.container.unbind('touchmove' );
}
if(offset > 30)
{
offset=0;
gjqcMe.nextMonth();
gjqcMe.touchPosition=etouch.pageX;
gjqcMe.container.unbind('touchmove' );
}
}
this.nextMonth = function()
{
var nextDate=gjqcMe.getCorrectDate(gjqcMe.selectedDate['year'], gjqcMe.selectedDate['month']+1, 2);
gjqcMe.selectedDate = { 'day': nextDate.getDate(), 'month' : nextDate.getMonth(), 'year' : nextDate.getFullYear() };
gjqcMe.render();
gjqcMe.changePageHandler(nextDate);
}
this.prevMonth = function()
{
var prevDate=gjqcMe.getCorrectDate(gjqcMe.selectedDate['year'], gjqcMe.selectedDate['month']-1, 2);
gjqcMe.selectedDate = { 'day': prevDate.getDate(), 'month' : prevDate.getMonth(), 'year' : prevDate.getFullYear() };
gjqcMe.render();
gjqcMe.changePageHandler(prevDate);
}
this.getCellClass = function(offset, iCol, iRow)
{
var css ="";
var tempdate = gjqcMe.getCorrectDate(gjqcMe.selectedDate['year'], gjqcMe.selectedDate['month'], ((iCol+(iRow*7))-offset));
if((tempdate.getMonth()<gjqcMe.selectedDate['month']) || (tempdate.getMonth()>gjqcMe.selectedDate['month']))
{
css +=" oom";
}
if(tempdate.getMonth()==gjqcMe.currentDate['month'] && tempdate.getDate()==gjqcMe.currentDate['day'] && tempdate.getFullYear()==gjqcMe.currentDate['year'])
{
css +=" today";
}
return css;
}
this.getCellContent = function(offset, iCol, iRow)
{
var celldate = gjqcMe.getCorrectDate(gjqcMe.selectedDate['year'], gjqcMe.selectedDate['month'], ((iCol+(iRow*7))-offset));
return celldate.getDate();
}
this.getMonthYear = function(month, year)
{
var tempDate = gjqcMe.getCorrectDate(year, month, 10);
return gjqcMe.monthNames[tempDate.getMonth()]+' '+tempDate.getFullYear();
}
this.getFirstDayOffset = function(month, year)
{
var tempDate = new Date(year, month, 1);
var offset = tempDate.getDay()-2;
if(offset<0)
{
offset+=7;
}
return offset;
}
this.removeRenderers = function()
{
gjqcMe.renderStack = new Array();
}
this.applyCustomRenderer = function(offset, iCol, iRow, cellId)
{
var celldate = gjqcMe.getCorrectDate(gjqcMe.selectedDate['year'], gjqcMe.selectedDate['month'], ((iCol+(iRow*7))-offset));
var arr = jQuery.grep(gjqcMe.renderStack, function(elementOfArray, index)
{
return (celldate.toGMTString()==elementOfArray.id.toGMTString());
});
for(var i=0, iLen=arr.length; i<iLen; ++i)
{
arr[i].fn(celldate, cellId);
}
}
this.render = function()
{
gjqcMe.container.empty()
gjqcMe.container.html(gjqcMe.buildCalHTML());
var iCalCell=1;
if(gjqcMe.renderStack.length>0)
{
var offset = gjqcMe.getFirstDayOffset(gjqcMe.selectedDate['month'], gjqcMe.selectedDate['year'])
for(var iRow=0; iRow<6; ++iRow)
{
for(var iCol=0; iCol<7; ++iCol)
{
gjqcMe.applyCustomRenderer(offset, iCol, iRow, gjqcMe.blockid+'_cell'+iCalCell);
iCalCell++;
}
}
}
gjqcMe.bindCalBtns();
}
this.buildCalHTML = function()
{
var offset = gjqcMe.getFirstDayOffset(gjqcMe.selectedDate['month'], gjqcMe.selectedDate['year'])
var calHTML ='<table class="gs-calendar" id="'+gjqcMe.blockid+'">'+
'<thead>'+
'<tr>'+
'<th colspan="7" class="calhead">'+
'<div class="calheader">'+
'<a class="calnavleft" href="#calprev">Previous Month ('+gjqcMe.getMonthYear(gjqcMe.selectedDate['month']-1, gjqcMe.selectedDate['year'])+')</a>';
calHTML +=gjqcMe.getMonthYear(gjqcMe.selectedDate['month'], gjqcMe.selectedDate['year']);
calHTML +='<a class="calnavright" href="#calnext">Next Month ('+gjqcMe.getMonthYear(gjqcMe.selectedDate['month']+1, gjqcMe.selectedDate['year'])+')</a>';
calHTML +='</div>'+
'</th>'+
'</tr>'+
'<tr class="gs-calweekdayrow">';
for(var i=0;i<7;++i)
{
calHTML +='<th class="calweekdaycell">'+gjqcMe.weekDays[i]+'</th>';
}
calHTML +='</tr>'+
'</thead>'+
'<tbody class="calbody">';
var iCalCell=1;
for(var iRow=0; iRow<6; ++iRow)
{
calHTML +='<tr class="w'+(iRow+1)+'">';
for(var iCol=0; iCol<7; ++iCol)
{
calHTML +='<td id="'+gjqcMe.blockid+'_cell'+iCalCell+'" class="calcell '+gjqcMe.getCellClass(offset, iCol, iRow)+'">'+gjqcMe.getCellContent(offset, iCol, iRow)+'</td>';
iCalCell++;
}
calHTML +='</tr>';
}
calHTML +='</tbody>'+
'</table>';
return calHTML;
}
this.container.bind('touchstart', function(e)
{
var etouch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
gjqcMe.touchPosition= etouch.pageX;
gjqcMe.container.bind('touchmove', gjqcMe.touchMove );
});
this.container.bind('touchend', function() {
e.preventDefault();
gjqcMe.touchPosition=null;
gjqcMe.container.unbind('touchmove', gjqcMe.touchMove );
});
};
var gsjquerytooltip = function(_tooltipId, _ttcontext, _params)
{
var gstpMe = this;
this.divId = _tooltipId;
this.id = '';
this.text = '';
this.ttcontext = _ttcontext;
this.container = (typeof(_params.container)!='undefined')? jQuery(_params.container) : jQuery('body');
this.hideDelay = (typeof(_params.hidedelay)!='undefined')? _params.hidedelay : 10000;
this.showDelay = (typeof(_params.showdelay)!='undefined')? _params.showdelay : 0;
this.offsetX = (typeof(_params.x)!='undefined')? _params.x : 0;
this.offsetY = (typeof(_params.x)!='undefined')? _params.y : 0;
this.preventOverlap = (typeof(_params.preventOverlap)!='undefined')? _params.preventOverlap : false;
this.followMouse = (typeof(_params.followMouse)!='undefined')? _params.followMouse : false;
this.entertimer = null;
this.leavetimer = null;
this.show = function()
{
jQuery(gstpMe.id).css('display', 'block');
}
this.hide = function()
{
jQuery(gstpMe.id).css('display', 'none');
if(gstpMe.entertimer!=null)
{
clearTimeout(gstpMe.entertimer);
gstpMe.entertimer=null;
}
if(gstpMe.leavetimer!=null)
{
clearTimeout(gstpMe.leavetimer);
gstpMe.leavetimer=null;
}
}
this.mouseMovement = function(e)
{
jQuery(gstpMe.id).css('left', e.clientX+gstpMe.offsetX);
jQuery(gstpMe.id).css('top', e.clientY+gstpMe.offsetY);
}
this.leaveContext = function(e)
{
if(gstpMe.followMouse==true)
{
jQuery(gstpMe.ttcontext).unbind('mousemove', gstpMe.mouseMovement);
}
if(gstpMe.showDelay==0)
{
gstpMe.hide();
}
else
{
if(gstpMe.entertimer!=null)
{
clearTimeout(gstpMe.entertimer);
gstpMe.entertimer=null;
}
if(gstpMe.leavetimer==null)
{
gstpMe.leavetimer = setTimeout(gstpMe.hide, gstpMe.showDelay);
}
}
e.stopPropagation();
}
this.enterContext = function(e)
{
if(gstpMe.preventOverlap==true)
{
gstpMe.container.trigger('gsjqttPreventOverlap');
}
if(gstpMe.followMouse==true)
{
jQuery(gstpMe.ttcontext).bind('mousemove', gstpMe.mouseMovement);
}
gstpMe.show();
if(gstpMe.leavetimer!=null)
{
clearTimeout(gstpMe.leavetimer);
gstpMe.leavetimer=null;
}
if(gstpMe.hideDelay>0)
{
if(gstpMe.entertimer==null)
{
gstpMe.entertimer = setTimeout(gstpMe.hide, gstpMe.hideDelay);
}
}
e.stopPropagation();
}
this.destroy = function()
{
jQuery(gstpMe.id).remove();
}
this.enterSelf = function(e)
{
if(!gstpMe.followMouse)
{
gstpMe.show();
if(gstpMe.leavetimer!=null)
{
clearTimeout(gstpMe.leavetimer);
gstpMe.leavetimer=null;
}
if(gstpMe.hideDelay>0)
{
if(gstpMe.entertimer==null)
{
gstpMe.entertimer = setTimeout(gstpMe.hide, gstpMe.hideDelay);
}
}
e.stopPropagation();
}
}
this.leaveSelf = function(e)
{
if(gstpMe.showDelay==0)
{
gstpMe.hide();
}
else
{
if(gstpMe.entertimer!=null)
{
clearTimeout(gstpMe.entertimer);
gstpMe.entertimer=null;
}
if(gstpMe.leavetimer==null)
{
gstpMe.leavetimer = setTimeout(gstpMe.hide, gstpMe.showDelay);
}
}
e.stopPropagation();
}
var position = jQuery(gstpMe.ttcontext).position();
gstpMe.text='';
if(typeof(_params.text)!='undefined')
{
gstpMe.text= _params.text;
}
else if(typeof(jQuery(gstpMe.ttcontext).attr('title')!='undefined'))
{
gstpMe.text=jQuery(gstpMe.ttcontext).attr('title');
jQuery(gstpMe.ttcontext).removeAttr('title');
}
else if(jQuery(gstpMe.ttcontext).is('img'))
{
gstpMe.text=jQuery(gstpMe.ttcontext).attr('alt');
}
gstpMe.container.append('<div id="'+gstpMe.divId+'" class="gs-module gs-overlay gs-tt"><div class="bd">'+gstpMe.text+'</div></div>');
gstpMe.id = '#'+ gstpMe.divId;
jQuery(gstpMe.ttcontext).mouseenter(gstpMe.enterContext);
jQuery(gstpMe.ttcontext).mouseleave(gstpMe.leaveContext);
jQuery(gstpMe.id).mouseenter(gstpMe.enterSelf);
jQuery(gstpMe.id).mouseleave(gstpMe.leaveSelf);
if(typeof(_params.width)!='undefined')
{
jQuery(gstpMe.id).css('width', _params.width);
}
if(typeof(_params.height)!='undefined')
{
jQuery(gstpMe.id).css('height', _params.height);
}
gstpMe.hide();
if(gstpMe.followMouse==true)
{
jQuery(gstpMe.id).css('position', 'fixed');
}
else
{
jQuery(gstpMe.id).css('position', 'absolute');
}
jQuery(gstpMe.id).css('left', position.left+gstpMe.offsetX);
jQuery(gstpMe.id).css('top', position.top+gstpMe.offsetY);
if(typeof(_params.zIndex)!='undefined')
{
jQuery(gstpMe.id).css('z-index', _params.zIndex);
}
if(gstpMe.preventOverlap==true)
{
gstpMe.container.bind('gsjqttPreventOverlap', gstpMe.hide);
}
if(gstpMe.followMouse==true)
{
jQuery(gstpMe.id).css('position', 'fixed');
}
};
var gsEShop = function (_container, _params)
{
var gseMe = this;
this.container=jQuery(_container);
this.touchPosition=null;
this.car=null;
this.cloneImages = (typeof(_params.cloneImages)!='undefined')? _params.cloneImages : false;
this.back = function()
{
gseMe.setDesc();
}
this.forward = function()
{
gseMe.setDesc();
}
this.setDesc = function()
{
jQuery(this.container).children('div.eshopdesc').html(jQuery(this.container).children('div.gs-carousel-content').children('ol.carousel').children('li.gs-carousel-itemselected').children('div.shop_artikel').children('div.shop_absatz').html());
}
this.touchMove = function(e)
{
e.preventDefault();
var etouch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
var offset = gseMe.touchPosition-etouch.pageX;
if(offset < -30)
{
offset=0;
jQuery(gseMe.container).children('div.gs-carousel-nav').children('span.gs-carousel-first-button').children('button').trigger('click');
gseMe.touchPosition=etouch.pageX;
jQuery(gseMe.container).unbind('touchmove' );
}
if(offset > 30)
{
offset=0;
jQuery(gseMe.container).children('div.gs-carousel-nav').children('span.gs-carousel-next-button').children('button').trigger('click');
gseMe.touchPosition=etouch.pageX;
jQuery(gseMe.container).unbind('touchmove' );
}
}
this.init = function ()
{
gseMe.container.children('ol.carousel').children('li').addClass('gs-carousel-itemnotselected');
gseMe.container.children('ol.carousel').children('li').first().removeClass('gs-carousel-itemnotselected');
gseMe.container.children('ol.carousel').children('li').first().addClass('gs-carousel-itemselected');
gseMe.container.children('ol.carousel').children('li').each( function(index, element)
{
if(gseMe.cloneImages)
{
if(jQuery(element).children('div.shop_artikel:has(>a)').length)
{
jQuery(element).children('div.shop_artikel').children('a').clone().appendTo(jQuery(element).children('div.shop_artikel'));
}
else
{
jQuery(element).children('div.shop_artikel').children('img').clone().appendTo(jQuery(element).children('div.shop_artikel'));
}
}
if(jQuery(element).children('div.shop_artikel:has(>a)').length)
{
jQuery(element).children('div.shop_artikel').children('a').first().wrap('<div class="shop_img" />');
}
else
{
jQuery(element).children('div.shop_artikel').children('img').first().wrap('<div class="shop_img" />');
}
if(gseMe.cloneImages)
{
if(jQuery(element).children('div.shop_artikel:has(>a)').length)
{
jQuery(element).children('div.shop_artikel').children('a').last().wrap('<div class="shop_imgflip" />');
}
else
{
jQuery(element).children('div.shop_artikel').children('img').last().wrap('<div class="shop_imgflip" />');
}
}
var destination = jQuery(element).children('div.shop_artikel').children('div.shop_absatz').children('h3').children('a').attr('href');
jQuery(element).children('div.shop_artikel').children('div.shop_absatz').append('<a href="'+destination+'" class="mbk-more">mehr</a>');
});
this.car = new gsCarousel(this.container,
{
numVisible : 1,
useAnimation: true,
animationSpeed: 600,
isCircular: false,
usePagination: false,
inverseSelection: true
});
jQuery(this.container).prepend('<div class="eshopdesc" />');
gseMe.setDesc();
jQuery(this.container).children('div.gs-carousel-nav').children('span.gs-carousel-first-button').children('button').click(gseMe.back);
jQuery(this.container).children('div.gs-carousel-nav').children('span.gs-carousel-next-button').children('button').click(gseMe.forward);
jQuery(this.container).children('div.gs-carousel-content').children('ol.carousel').unbind('touchstart');
jQuery(this.container).children('div.gs-carousel-content').children('ol.carousel').unbind('touchend');
jQuery(this.container).bind('touchstart', function(e)
{
var etouch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
gseMe.touchPosition= etouch.pageX;
jQuery(gseMe.container).bind('touchmove', gseMe.touchMove );
});
jQuery(this.container).bind('touchend', function() {
e.preventDefault();
gseMe.touchPosition=null;
jQuery(gseMe.container).unbind('touchmove', gseMe.touchMove );
});
if(jQuery(this.container).children('div.gs-carousel-content').children('ol.carousel').children('li').length > 2)
{
gseMe.car.forward();
gseMe.forward();
}
jQuery(this.container).children('div.eshopdesc').click(function(e)
{
if(jQuery(e.originalTarget).is('a'))
{
e.stopPropagation();
}
else
{
var href=jQuery(e.currentTarget).find('a.mbk-shoplink').attr('href');
if(typeof(href)!='undefined')
{
if(href!='')
{
window.location.href=href;
}
}
}
});
jQuery(this.container).children('div.gs-carousel-content').children('ol.carousel').children('li').click(function(e)
{
if(jQuery(e.currentTarget).hasClass('gs-carousel-itemselected'))
{
var href=jQuery(e.currentTarget).find('a.mbk-shoplink').attr('href');
if(typeof(href)!='undefined')
{
if(href!='')
{
window.location.href=href;
}
}
}
});
}
if(this.container)
{
this.init();
}
};
﻿var chlCalenderClassObject = function(_chlObjName, _chlNodeID, _chlJSONSource, _chlToolTipDivName, _chlCalenderDivName, _chlFooterDivName)
{
var chlMe = this; //zeiger auf sich selbst für callback!
this.chlName = _chlObjName;
this.chlNodeID = _chlNodeID;
this.chlJSONSource = _chlJSONSource;
this.chlToolTipDivName = _chlToolTipDivName;
this.chlCalenderDivName = _chlCalenderDivName;
this.chlFooterDivName = _chlFooterDivName;
this.chlEvents = [];
this.chlCurrentTime = new Date();
this.chlCurrentMonth = this.chlCurrentTime.getMonth() + 1;
this.chlCurrentDay = this.chlCurrentTime.getDate();
this.chlCurrentYear = this.chlCurrentTime.getFullYear();
this.chlCurrentDate = this.chlCurrentDay + "." + this.chlCurrentMonth + "." + this.chlCurrentYear;
this.chlSelectedMonth = this.chlCurrentMonth;
this.chlSelectedYear = this.chlCurrentYear;
this.chlCatFilter=false;
this.chlCatNr = new Array();
this.chlEventNameToDate = new Object;
this.chlToolTips = new Object;
this.chlToolTipsObj = new Array;
this.chlCalendarObj = new gsjquerycalendar('#'+this.chlCalenderDivName, this.chlName);
this.chlCleanUp = function ()
{
for(var chlAllDates in chlMe.chlEventNameToDate)
{
delete chlMe.chlEventNameToDate[chlAllDates];
}
for (var k = 0, klen = chlMe.chlToolTipsObj.length; k < klen; ++k)
{
if(typeof(chlMe.chlToolTipsObj[k])!='undefined')
{
chlMe.chlToolTipsObj[k].destroy();
delete chlMe.chlToolTipsObj[k];
}
}
for(var n in chlMe.chlToolTips)
{
delete chlMe.chlToolTips[n];
}
jQuery('#'+chlMe.chlToolTipDivName).empty();
}
this.chlRefreshCatView = function()
{
chlMe.chlCalendarObj.removeRenderers();
for (var i = 0, len = this.chlEvents.calendar.category.length; i < len; ++i)
{
if((chlMe.chlCatFilter==false)||(chlMe.chlCatNr[i]===true))
{
if("undefined" != typeof(chlMe.chlEvents.calendar.category[i].event))
{
for (var k = 0, klen = chlMe.chlEvents.calendar.category[i].event.length; k < klen; ++k)
{
var fromTime;
var toTime;
var chlDateStamp = chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromday + "." + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.frommonth + "." + this.chlEvents.calendar.category[i].event[k].eventfromtime.fromyear;
if(0==chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromminute)
{
chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromminute="00";
}
if(!chlMe.chlEventNameToDate[chlDateStamp])//wenn das datum noch vorhanden ist, datum als array anlegen
{
chlMe.chlEventNameToDate[chlDateStamp]=new Array();
}
if((chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromday == chlMe.chlEvents.calendar.category[i].event[k].eventtotime.today) && (chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.frommonth == chlMe.chlEvents.calendar.category[i].event[k].eventtotime.tomonth) && (chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromyear == chlMe.chlEvents.calendar.category[i].event[k].eventtotime.toyear))
{
fromTime = chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromhour + ":" + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromminute;
toTime = chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromhour + ":" + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromminute;
}
else
{
fromTime = chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromday + "." + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.frommonth + "." + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromyear + " " + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromhour + ":" + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromminute;
toTime = chlMe.chlEvents.calendar.category[i].event[k].eventtotime.today + "." + chlMe.chlEvents.calendar.category[i].event[k].eventtotime.tomonth + "." + chlMe.chlEvents.calendar.category[i].event[k].eventtotime.toyear + " " + chlMe.chlEvents.calendar.category[i].event[k].eventtotime.tohour + ":" + chlMe.chlEvents.calendar.category[i].event[k].eventtotime.tominute;
}
chlMe.chlEventNameToDate[chlDateStamp].push((new Object({'eventname': chlMe.chlEvents.calendar.category[i].event[k].eventname,
'eventfromtime': fromTime,
'eventtotime': toTime,
'eventdesc': chlMe.chlEvents.calendar.category[i].event[k].eventdesc,
'eventlink': chlMe.chlEvents.calendar.category[i].event[k].eventlink })));
chlMe.chlCalendarObj.addRenderer(chlDateStamp, chlMe.chlMyCustomRenderer);
}
}
}
}
chlMe.chlCalendarObj.render();
var p=0;
for(var n in chlMe.chlToolTips)
{
chlMe.chlToolTipsObj[p] = new gsjquerytooltip(n+'tooltip', jQuery('#'+n), { container: '#'+chlMe.chlToolTipDivName, text : chlMe.chlToolTips[n], showdelay: 400, hidedelay: 2500, x : 25, y : 25, zIndex : 9999999, preventOverlap : true });
p++;
}
}
this.chlShowAll = function ()
{
chlMe.chlCatFilter=false;
for(var n in chlMe.chlCatNr)
{
var catNr = parseInt(n,10)+1;
jQuery('#'+chlMe.chlName+"Box"+catNr).removeClass('checked');
delete chlMe.chlCatNr[n];
}
jQuery('#'+chlMe.chlName+"BoxAll").addClass("checked");
chlMe.chlCleanUp();
chlMe.chlRefreshCatView();
}
this.chlShowEvent = function (_chlCatNr)
{
chlMe.chlCatFilter=true;
var chlCheckBox = jQuery('#'+chlMe.chlName+"Box"+_chlCatNr);
if(!chlMe.chlCatNr[_chlCatNr-1])
{
chlCheckBox.addClass("checked");
chlMe.chlCatNr[_chlCatNr-1]=true;
}
else
{
chlCheckBox.removeClass("checked");
delete chlMe.chlCatNr[_chlCatNr-1];
}
jQuery('#'+chlMe.chlName+"BoxAll").removeClass("checked");
chlMe.chlCleanUp();
chlMe.chlRefreshCatView();
}
this.chlPageChangeHandler = function (date)
{
chlMe.chlSelectedMonth = date.getMonth()+1;
chlMe.chlSelectedYear = date.getFullYear();
chlMe.chlCatFilter=false;
startMonth = chlMe.chlSelectedMonth-1;
startYear = chlMe.chlSelectedYear;
if(0 == startMonth)
{
startYear = startYear - 1;
startMonth = 12;
}
endYear = chlMe.chlSelectedYear;
endMonth = chlMe.chlSelectedMonth+1;
if(13 == endMonth)
{
endYear = endYear+1;
endMonth = 1;
}
if(startMonth<10)
{
startMonth='0'+startMonth;
}
if(endMonth<10)
{
endMonth='0'+endMonth;
}
jQuery.getJSON(chlMe.chlJSONSource + "(start)/" + startYear + "-" + startMonth + "-1" + "/(end)/" + endYear + "-" + endMonth + "-31" + "/(nid)/" + chlMe.chlNodeID + "/(j)/1" , chlMe.handleSuccess);
}
this.chlMyCustomRenderer = function (workingDate, cell) //Renderer für die Makierten Daten, benutzt um die Kalenderzellen id den Tooltips zuzuordnen
{
var day = workingDate.getDate();
var month = workingDate.getMonth()+1
if(day<10) day = "0" + day;
if(month<10) month= "0" + month;
var pDate = day + "." + month + "." + workingDate.getFullYear(); //Datum in dt. Format bringen
var chlToolTipText ="";
if('undefined' != typeof(chlMe.chlEventNameToDate[pDate]))
{
for (var z = 0, zlen = chlMe.chlEventNameToDate[pDate].length; z < zlen; ++z)
{
if(chlMe.chlEventNameToDate[pDate][z].eventlink)
{
chlToolTipText += "<a href=\""+ chlMe.chlEventNameToDate[pDate][z].eventlink+"\"><b>" +chlMe.chlEventNameToDate[pDate][z].eventname + "</b> " + chlMe.chlEventNameToDate[pDate][z].eventfromtime + " - " + chlMe.chlEventNameToDate[pDate][z].eventtotime + "</a>";
}
else
{
chlToolTipText += "<b>" + chlMe.chlEventNameToDate[pDate][z].eventname + "</b> " + chlMe.chlEventNameToDate[pDate][z].eventfromtime + " - " + chlMe.chlEventNameToDate[pDate][z].eventtotime ; //cell.title
}
if(chlMe.chlEventNameToDate[pDate][z].eventdesc)
{
chlToolTipText += "<br />" + chlMe.chlEventNameToDate[pDate][z].eventdesc;
}
if(z < zlen)
{
chlToolTipText += "<br />\n";
}
}
jQuery('#'+cell).addClass("highlight1"); //Datum markieren
if(!chlMe.chlToolTips[cell])
{
chlMe.chlToolTips[cell] = chlToolTipText;
}
}
}
this.start = function ()
{
startMonth = chlMe.chlSelectedMonth-1;
startYear = chlMe.chlSelectedYear;
if(0 == startMonth)
{
startYear = startYear - 1;
startMonth = 12;
}
endYear = chlMe.chlSelectedYear;
endMonth = chlMe.chlSelectedMonth+1;
if(13 == endMonth)
{
endYear = endYear+1;
endMonth = 1;
}
if(startMonth<10)
{
startMonth='0'+startMonth;
}
if(endMonth<10)
{
endMonth='0'+endMonth;
}
jQuery.getJSON(chlMe.chlJSONSource + "(start)/" + startYear + "-" + startMonth + "-1" + "/(end)/" + endYear + "-" + endMonth + "-31" + "/(nid)/" + chlMe.chlNodeID + "/(j)/1" , chlMe.handleSuccess);
}
this.handleSuccess = function (data)
{
chlMe.chlCleanUp();
chlMe.chlEvents=data;
chlMe.chlCalendarObj.removeRenderers();
var chlFooter = jQuery('#'+chlMe.chlFooterDivName);
var chlFooterCache = "<table class=\"chlFooterInnerTable\"><tbody><tr class=\"chlFooterInnerRow\">";
var chlLeftRightSwitch = true;
var chlRowEnd = "";
if(('object' == typeof(chlMe.chlEvents.calendar.category)) && (undefined == chlMe.chlEvents.calendar.category.length) && (undefined != chlMe.chlEvents.calendar.category.categoryname))
{
chlMe.chlEvents.calendar.category = new Array(chlMe.chlEvents.calendar.category);
}
for (var i = 0, len = chlMe.chlEvents.calendar.category.length; i < len; ++i)
{
if(chlLeftRightSwitch==false)
{
chlRowEnd="</tr><tr class=\"chlFooterInnerRow\">";
chlLeftRightSwitch=true;
}
else
{
chlRowEnd="<td class=\"chlFooterEmptyCell\"></td>";
chlLeftRightSwitch=false;
}
chlFooterCache += "<td class=\"chlFooterInnerCell\"><div class=\"chkbox\"><input type=\"button\" id=\""+chlMe.chlName+"Box"+(i+1)+"\" class=\"chlCheckBox\" onclick=\""+chlMe.chlName+".chlShowEvent("+(i+1)+")\" /></div><div class=\"chkboxtext\"><a class=\"chlCheckLink\" onclick=\""+chlMe.chlName+".chlShowEvent("+(i+1)+")\">" + chlMe.chlEvents.calendar.category[i].categoryname + "</a></div></td>";
chlFooterCache += chlRowEnd;
if("undefined" != typeof(chlMe.chlEvents.calendar.category[i].event))
{
for (var k = 0, klen = chlMe.chlEvents.calendar.category[i].event.length; k < klen; ++k)
{
var fromTime;
var toTime;
var chlDateStamp = chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromday + "." + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.frommonth + "." + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromyear;
if(0==chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromminute)
{
chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromminute="00";
}
if(!chlMe.chlEventNameToDate[chlDateStamp])//wenn das datum nicht vorhanden ist, datum als array anlegen
{
chlMe.chlEventNameToDate[chlDateStamp]=new Array();
}
if(chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromday == chlMe.chlEvents.calendar.category[i].event[k].eventtotime.today && chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.frommonth == chlMe.chlEvents.calendar.category[i].event[k].eventtotime.tomonth && chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromyear == chlMe.chlEvents.calendar.category[i].event[k].eventtotime.toyear)
{
fromTime = chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromhour + ":" + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromminute;
toTime = chlMe.chlEvents.calendar.category[i].event[k].eventtotime.tohour + ":" + chlMe.chlEvents.calendar.category[i].event[k].eventtotime.tominute;
}
else
{
fromTime = chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromday + "." + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.frommonth + "." + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromyear + " " + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromhour + ":" + chlMe.chlEvents.calendar.category[i].event[k].eventfromtime.fromminute;
toTime = chlMe.chlEvents.calendar.category[i].event[k].eventtotime.today + "." + chlMe.chlEvents.calendar.category[i].event[k].eventtotime.tomonth + "." + chlMe.chlEvents.calendar.category[i].event[k].eventtotime.toyear + " " +  chlMe.chlEvents.calendar.category[i].event[k].eventtotime.tohour + ":" + chlMe.chlEvents.calendar.category[i].event[k].eventtotime.tominute;
}
chlMe.chlEventNameToDate[chlDateStamp].push((new Object({'eventname': chlMe.chlEvents.calendar.category[i].event[k].eventname,
'eventfromtime': fromTime,
'eventtotime': toTime,
'eventdesc': chlMe.chlEvents.calendar.category[i].event[k].eventdesc,
'eventlink': chlMe.chlEvents.calendar.category[i].event[k].eventlink })));
chlMe.chlCalendarObj.addRenderer(chlDateStamp, chlMe.chlMyCustomRenderer);
}
}
}
chlFooterCache += "<td class=\"chlFooterInnerCell\"><input type=\"button\" class=\"chlCheckBox\" id=\""+chlMe.chlName+"BoxAll\" onclick=\""+chlMe.chlName+".chlShowAll()\" /><a class=\"chlCheckLink\" onclick=\""+chlMe.chlName+".chlShowAll()\">Alle Kategorien</a></td>";
if(chlLeftRightSwitch==true)
{
chlFooterCache+="<td class=\"chlFooterEmptyCell\"></td><td class=\"chlFooterInnerCell\"></td>";
chlLeftRightSwitch=false;
}
chlFooterCache += "</tr></tbody></table>";
chlFooter.html(chlFooterCache);
jQuery('#'+chlMe.chlName+"BoxAll").addClass("checked");
jQuery('#'+chlMe.chlName+"BoxAll").attr('checked', true);
chlMe.chlCalendarObj.render();
var p=0;
for(var n in chlMe.chlToolTips)
{
chlMe.chlToolTipsObj[p] = new gsjquerytooltip(n+'tooltip', jQuery('#'+n), { container: '#'+chlMe.chlToolTipDivName, text : chlMe.chlToolTips[n], showdelay: 400, hidedelay: 2500, x : 25, y : 25, zIndex : 9999999, preventOverlap : true });
p++;
}
}
this.chlCalendarObj.registerPageHandler(chlMe.chlPageChangeHandler);
};
var imagePreloadHandler = function ()
{
this.cache = [];
this.preLoadImages = function()
{
var args_len = arguments.length;
for (var i = args_len; i--;)
{
var cacheImage = document.createElement('img');
cacheImage.src = arguments[i];
this.cache.push(cacheImage);
}
}
};
function cropImage(_image, _maxwidth, _maxheight)
{
var imageWidth=_image.width();
var imageHeight=_image.height();
var imageRatio=imageWidth/imageHeight;
var maxRatio=_maxwidth/_maxheight;
if(imageRatio>maxRatio)
{
_image.css('height', _maxheight);
return true;
}
else if(imageRatio<maxRatio)
{
_image.css('width', _maxwidth);
_image.css('top', 0);
return true;
}
else if(imageRatio==maxRatio)
{
_image.css('height', _maxheight);
_image.css('width', _maxwidth);
return true;
}
else { return false; }
}
;
var newsTickerVertical = function (_container, _params)
{
var ntvlMe = this;
this.minItems = 2;
this.numItems=0;
this.itemHeight=0;
this.totalHeight=0;
this.direction='top';
if(typeof(_params)!='undefined')
{
if(typeof(_params.horizontal)!='undefined') { if(_params.horizontal==true){ this.direction='left'; } }
if(typeof(_params.minItems)!='undefined') { this.minItems = _params.minItems; }
}
this.timer;
this.newsTickerC = jQuery(_container);
if( this.newsTickerC )
{this.newsTicker = (this.direction=='top') ? this.newsTickerC.children('div.newsvertical').children('ul.tickervertical') : this.newsTickerC.find('div.adticker').children('ul.tickerhorizontal'); }
this.step = function ()
{
var curTop = ntvlMe.newsTicker.css(ntvlMe.direction);
if(curTop == 'auto')
{
curTop=0;
}
else
{
curTop = parseInt(curTop.replace('/px/i'));
}
curTop = curTop-ntvlMe.itemHeight;
if(curTop<=(-ntvlMe.totalHeight))
{
curTop = 0;
}
if(ntvlMe.direction=='top')
{
ntvlMe.newsTicker.animate( { 'top' : curTop}, 800, function(){
ntvlMe.newsTicker.children('li').first().appendTo(ntvlMe.newsTicker);
ntvlMe.newsTicker.css('top', '0px'); });
}
else
{
ntvlMe.newsTicker.animate( { 'left' : curTop}, 800, function(){
ntvlMe.newsTicker.children('li').first().appendTo(ntvlMe.newsTicker);
ntvlMe.newsTicker.css('left', '0px'); });
}
ntvlMe.timer = setTimeout(ntvlMe.step, 8000);
}
if(this.newsTicker)
{
this.newsTicker.css('position', 'absolute');
this.numItems = this.newsTicker.children('li').length;
this.itemHeight = (ntvlMe.direction=='top') ? this.newsTicker.children('li').outerHeight(true) : this.newsTicker.children('li').outerWidth(true);
if(this.numItems>=this.minItems)
{
this.totalHeight=(this.numItems*this.itemHeight)-this.itemHeight;
jQuery(window).unload(function(){ clearTimeout(ntvlMe.timer) })
ntvlMe.timer = setTimeout(ntvlMe.step, 8000);
}
}
};
var weatherFunctions = (function() {
var instance = null;
function PrivateConstructor()
{
var counter=0;
this.convertToList = function(_inputObject)
{
var temp = new Array();
for(var i =0, iLen=_inputObject.length; i<iLen; ++i)
{
temp[i]={'NAME': _inputObject[i].NAME, 'ID': _inputObject[i]['@attributes'].ID};
}
temp.sort(function(m1,p1)
{
var m=(''+m1).toLowerCase(),
p=(''+p1).toLowerCase();
if(m > p) return 1;
if(m < p) return -1;
return 0;
});
return temp;
}
this.setList = function(_listId, _listArray)
{
for(var i =0, iLen=_listArray.length; i<iLen; ++i)
{
jQuery(_listId).append('<option value = "'+_listArray[i].ID+'">'+_listArray[i].NAME+'</option>');
}
}
this.getRain = function(_in)
{
if( _in < 32 ) return 3;
if( _in > 31 && _in < 64 ) return 2;
if( _in > 63 ) return 1;
}
this.getPollenText = function(_input)
{
if(_input==1) return 'Kein';
if(_input==2) return 'Gering';
if(_input==3) return 'Mäßig';
if(_input==4) return 'Stark';
return 'keine Angabe';
}
this.getWind = function(_input)
{
if( _input < 15 ) return 1;
if( _input > 14 && _input < 30 ) return 2;
if( _input > 29 && _input < 45 ) return 3;
if( _input > 44 ) return 4;
}
this.dateConversion = function(_dat)
{
var gerDate = _dat.split('.');
var now = new Date();
if(gerDate[2].length==2){ gerDate[2]='20'+gerDate[2]; }
var tDate = new Date(gerDate[2], (gerDate[1]-1), gerDate[0]);
var st = tDate.getDate() + '.' + tDate.getMonth() +'.'+ tDate.getFullYear();
if((tDate.getDate() == now.getDate() ) && (tDate.getMonth() == now.getMonth() ) && (tDate.getFullYear() == now.getFullYear() ))
{
return "Heute";
}
else
{
var dayInWeek = tDate.getDay();
var weekdays = new Array("Sonntag", "Montag", "Dienstag", "Mittwoch",
"Donnerstag", "Freitag", "Samstag");
var todayWeekday = weekdays[dayInWeek];
return todayWeekday;
}
}
this.setWeatherText = function(_value, _day)
{
var tagBez='';
var nachtBez='';
switch (_value)
{
case '1': tagBez = 'sonnig'; nachtBez = 'klar'; break;
case '2': tagBez = 'heiter'; nachtBez = 'heiter'; break;
case '3': tagBez = 'wolkig'; nachtBez = 'wolkig'; break;
case '4': tagBez = 'stark bew&ouml;lkt'; nachtBez = 'stark bew&ouml;lkt'; break;
case '5': tagBez = 'bedeckt'; nachtBez = 'bedeckt'; break;
case '6': tagBez = 'Regenschauer'; nachtBez = 'Regenschauer'; break;
case '7': tagBez = 'Regen'; nachtBez = 'Regen'; break;
case '8': tagBez = 'Gewitter'; nachtBez = 'Gewitter'; break;
case '9': tagBez = 'Schneeschauer'; nachtBez = 'Schneeschauer'; break;
case '10':tagBez = 'Schneefall'; nachtBez = 'Schneefall'; break;
case '11':tagBez = 'Schneeregen'; nachtBez = 'Schneeregen'; break;
case '12':tagBez = 'Nebel'; nachtBez = 'Nebel'; break;
case '13':tagBez = 'in Wolken'; nachtBez = 'in Wolken'; break;
case '14':tagBez = 'Spr&uuml;hregen'; nachtBez = 'Spr&uuml;hregen'; break;
default:tagBez = 'keine Daten'; nachtBez = 'keine Daten'; break;
}
return (_day) ? tagBez : nachtBez;
}
this.incCounter = function() {
counter++;
}
}
return new function() {
this.getInstance = function() {
if (instance == null) {
instance = new PrivateConstructor();
instance.constructor = null;
}
return instance;
}
}
})();
var foreCastSmall = function(_params)
{
var fscMe =this;
this.data=new Object;
this.dataSet=false;
this.imgUrl='/extension/moldesign/design/moldesign/images/weather/small';
this.staticIds = new Array('110','112','2', '36', '14', '17','131');
if(_params)
{
if(_params.staticIds) { this.staticIds = _params.staticIds; }
}
this.formatArray = function(_array)
{
if(_array.length>0)
{
var getString='';
getString+=+_array[0];
for(var i=1, iLen=_array.length; i<iLen; ++i)
{
getString+=';'+_array[i];
}
return getString;
}
else
{
return 0;
}
}
this.readCityDataSmall = function(_id, _first)
{
if(!this.dataSet)
{
var server = '/molweather/data/(type)/mapweather/(cityids)/'+fscMe.formatArray(fscMe.staticIds);
jQuery.getJSON(server, function(response)
{
fscMe.data=response;
fscMe.dataSet=true;
fscMe.setData(_id);
});
}
else
{
fscMe.setData(_id);
}
if (_first == true)
{
for (var i = 0; i < jQuery('#smallWeatherSelect').children().length; i++)
{
if (jQuery('#smallWeatherSelect')[0].options[i].value == _id)
{
jQuery('#smallWeatherSelect')[0].options[i].selected = true;
break;
}
}
}
}
this.setData = function(_id)
{
var result= jQuery.grep( fscMe.data, function(elementOfArray, indexInArray)
{
return elementOfArray['@attributes'].ID==_id;
});
if(typeof(result[0])!='undefined')
{
var wetfunc = weatherFunctions.getInstance();
wetfunc.incCounter;
jQuery('#max_today_small').html(result[0].PROGNOSE.TAGESMAXIMUM);
jQuery('#min_today_small').html(result[0].PROGNOSE.NACHTMINIMUM);
jQuery('#rain_today_small').html(result[0].PROGNOSE.NW_TAG);
jQuery('#wind_today_small').html(result[0].PROGNOSE.WINDGESCHW);
jQuery('#progday_today_small').html(wetfunc.setWeatherText(result[0].PROGNOSE['WETTER-ID_TAG']));
jQuery('#prognight_today_small').html(wetfunc.setWeatherText(result[0].PROGNOSE['WETTER-ID_NACHT'], false));
jQuery('#pollen_today_small').html(wetfunc.getPollenText(result[0].PROGNOSE['POLLEN-ID']));
jQuery('#img_raintoday_small').attr('src', fscMe.imgUrl+'/regen-'+(typeof(wetfunc.getRain(result[0].PROGNOSE['NW_TAG']))!='undefined' ? wetfunc.getRain(result[0].PROGNOSE['NW_TAG']) : 1) +'.gif');
jQuery('#img_windtoday_small').attr('src', fscMe.imgUrl+'/w-'+ (typeof(wetfunc.getWind(result[0].PROGNOSE['WINDGESCHW']))!='undefined' ? wetfunc.getWind(result[0].PROGNOSE['WINDGESCHW']) : 1) +'.gif');
jQuery('#img_maxtoday_small').attr('src', fscMe.imgUrl+'/g'+(typeof(result[0].PROGNOSE['WETTER-ID_TAG'])!='undefined' ? result[0].PROGNOSE['WETTER-ID_TAG'] : 1) +'.gif');
jQuery('#img_mintoday_small').attr('src', fscMe.imgUrl+'/g'+(typeof(result[0].PROGNOSE['WETTER-ID_NACHT'])!='undefined' ? result[0].PROGNOSE['WETTER-ID_NACHT'] : 1)+'n.gif');
jQuery('#img_pollentoday_small').attr('src', fscMe.imgUrl+'/'+(typeof(result[0].PROGNOSE['POLLEN-ID'])!='undefined' ? result[0].PROGNOSE['POLLEN-ID'] : 1) + '.gif');
}
}
jQuery('#smallWeatherSelect').change(function(e)
{
fscMe.readCityDataSmall(e.target.value,false);
});
};
function showmail(nospamplease, idontlikespam, nothanks, no, way){
var str_out = '';
var num_out = '';
var num_in;
var hex = '0123456789abcdef'
num_out = nospamplease;
for(i = 0; i < num_out.length; i += 2) {
num_in1 = ''
num_in = parseInt(num_out.substr(i,2)) + 23;
while (num_in != 0) {
num_in1 = hex.charAt(num_in%16)+num_in1;
num_in = num_in >> 4;}
num_in = unescape('%' + num_in1);
str_out += num_in;
str_out = unescape(str_out);}
nospamplease = str_out;
speakfriendandenter = '&#109;&#97;&#105;&#108;&#116;&#111;:' + nospamplease;
voila = '<a class="mail" href="' + speakfriendandenter + '" title="'+ nospamplease + '">';
if((idontlikespam != "") && (nothanks != "")) voila = idontlikespam  + " " + voila;
else if((idontlikespam != "") && (nothanks == "")) voila += idontlikespam;
if(nothanks != "") voila += '<img src="' + nothanks + '" width="' + no + '" height="' + way + '" border="0" alt="' + nospamplease + '" />' ;
else if((idontlikespam == "") && (nothanks == "")) voila += nospamplease;
voila += '</a>';
document.write(voila);
}
(function(a,b){function cg(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cd(a){if(!bZ[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bZ[a]=c}return bZ[a]}function cc(a,b){var c={};d.each(cb.concat.apply([],cb.slice(0,b)),function(){c[this]=a});return c}function bY(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bX(){try{return new a.XMLHttpRequest}catch(b){}}function bW(){d(a).unload(function(){for(var a in bU)bU[a](0,1)})}function bQ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h==="string"&&(f[h.toLowerCase()]=a.converters[h]);l=k,k=e[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=f[m]||f["* "+k];if(!n){p=b;for(o in f){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=f[j[1]+" "+k];if(p){o=f[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&d.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bP(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bO(a,b,c,e){if(d.isArray(b)&&b.length)d.each(b,function(b,f){c||bq.test(a)?e(a,f):bO(a+"["+(typeof f==="object"||d.isArray(f)?b:"")+"]",f,c,e)});else if(c||b==null||typeof b!=="object")e(a,b);else if(d.isArray(b)||d.isEmptyObject(b))e(a,"");else for(var f in b)bO(a+"["+f+"]",b[f],c,e)}function bN(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bH,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bN(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bN(a,c,d,e,"*",g));return l}function bM(a){return function(b,c){typeof b!=="string"&&(c=b,b="*");if(d.isFunction(c)){var e=b.toLowerCase().split(bB),f=0,g=e.length,h,i,j;for(;f<g;f++)h=e[f],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bo(a,b,c){var e=b==="width"?bi:bj,f=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return f;d.each(e,function(){c||(f-=parseFloat(d.css(a,"padding"+this))||0),c==="margin"?f+=parseFloat(d.css(a,"margin"+this))||0:f-=parseFloat(d.css(a,"border"+this+"Width"))||0});return f}function ba(a,b){b.src?d.ajax({url:b.src,async:!1,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function _(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function $(a,b){if(b.nodeType===1){var c=b.nodeName.toLowerCase();b.clearAttributes(),b.mergeAttributes(a);if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(d.expando)}}function Z(a,b){if(b.nodeType===1&&d.hasData(a)){var c=d.expando,e=d.data(a),f=d.data(b,e);if(e=e[c]){var g=e.events;f=f[c]=d.extend({},e);if(g){delete f.handle,f.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)d.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function Y(a,b){return d.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function O(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return d.grep(a,function(a,d){return a===b===c});if(typeof b==="string"){var e=d.grep(a,function(a){return a.nodeType===1});if(J.test(b))return d.filter(b,e,!c);b=d.filter(b,e)}return d.grep(a,function(a,e){return d.inArray(a,b)>=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(r,"`").replace(s,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,q=[],r=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;i<t.length;i++)g=t[i],g.origType.replace(p,"")===a.type?r.push(g.selector):t.splice(i--,1);f=d(a.target).closest(r,a.currentTarget);for(j=0,k=f.length;j<k;j++){m=f[j];for(i=0;i<t.length;i++){g=t[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,e=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,e=d(a.relatedTarget).closest(g.selector)[0];(!e||e!==h)&&q.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=q.length;j<k;j++){f=q[j];if(c&&f.level>c)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function w(){return!0}function v(){return!1}function g(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){e=i[c],f=a[c];if(i===f)continue;l&&f&&(d.isPlainObject(f)||(g=d.isArray(f)))?(g?(g=!1,h=e&&d.isArray(e)?e:[]):h=e&&d.isPlainObject(e)?e:{},i[c]=d.extend(l,h,f)):f!==b&&(i[c]=f)}return i},d.extend({noConflict:function(b){a.$=f,b&&(a.jQuery=e);return d},isReady:!1,readyWait:1,ready:function(a){a===!0&&d.readyWait--;if(!d.readyWait||a!==!0&&!d.isReady){if(!c.body)return setTimeout(d.ready,1);d.isReady=!0;if(a!==!0&&--d.readyWait>0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g<h;)if(c.apply(a[g++],e)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(var j=a[0];g<h&&c.call(j,g,j)!==!1;j=a[++g]){}return a},trim:F?function(a){return a==null?"":F.call(a)}:function(a){return a==null?"":(a+"").replace(j,"").replace(k,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var e=d.type(a);a.length==null||e==="string"||e==="function"||e==="regexp"||d.isWindow(a)?D.call(c,a):d.merge(c,a)}return c},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length==="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,b,c){var d=[],e;for(var f=0,g=a.length;f<g;f++)e=b(a[f],f,c),e!=null&&(d[d.length]=e);return d.concat.apply([],d)},guid:1,proxy:function(a,c,e){arguments.length===2&&(typeof c==="string"?(e=a,a=e[c],c=b):c&&!d.isFunction(c)&&(e=c,c=b)),!c&&a&&(c=function(){return a.apply(e||this,arguments)}),a&&(c.guid=a.guid=a.guid||c.guid||d.guid++);return c},access:function(a,c,e,f,g,h){var i=a.length;if(typeof c==="object"){for(var j in c)d.access(a,j,c[j],f,g,e);return a}if(e!==b){f=!h&&f&&d.isFunction(e);for(var k=0;k<i;k++)g(a[k],c,f?e.call(a[k],k,g(a[k],c)):e,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},_Deferred:function(){var a=[],b,c,e,f={done:function(){if(!e){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=d.type(i),j==="array"?f.done.apply(f,i):j==="function"&&a.push(i);k&&f.resolveWith(k[0],k[1])}return this},resolveWith:function(d,f){if(!e&&!b&&!c){c=1;try{while(a[0])a.shift().apply(d,f)}catch(g){throw g}finally{b=[d,f],c=0}}return this},resolve:function(){f.resolveWith(d.isFunction(this.promise)?this.promise():this,arguments);return this},isResolved:function(){return c||b},cancel:function(){e=1,a=[];return this}};return f},Deferred:function(a){var b=d._Deferred(),c=d._Deferred(),e;d.extend(b,{then:function(a,c){b.done(a).fail(c);return this},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,promise:function(a){if(a==null){if(e)return e;e=a={}}var c=z.length;while(c--)a[z[c]]=b[z[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){var b=arguments.length,c=b<=1&&a&&d.isFunction(a.promise)?a:d.Deferred(),e=c.promise();if(b>1){var f=E.call(arguments,0),g=b,h=function(a){return function(b){f[a]=arguments.length>1?E.call(arguments,0):b,--g||c.resolveWith(e,f)}};while(b--)a=f[b],a&&d.isFunction(a.promise)?a.promise().then(h(b),c.reject):--g;g||c.resolveWith(e,f)}else c!==a&&c.resolve(a);return e},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e),b=e=f=null}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!g(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,h=b.nodeType,i=h?d.cache:b,j=h?b[d.expando]:d.expando;if(!i[j])return;if(c){var k=e?i[j][f]:i[j];if(k){delete k[c];if(!g(k))return}}if(e){delete i[j][f];if(!g(i[j]))return}var l=i[j][f];d.support.deleteExpando||i!=a?delete i[j]:i[j]=null,l?(i[j]={},h||(i[j].toJSON=d.noop),i[j][f]=l):h&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i<j;i++)h=g[i].name,h.indexOf("data-")===0&&(h=h.substr(5),f(this[0],h,e[h]))}}return e}if(typeof a==="object")return this.each(function(){d.data(this,a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(c===b){e=this.triggerHandler("getData"+k[1]+"!",[k[0]]),e===b&&this.length&&(e=d.data(this[0],a),e=f(this[0],a,e));return e===b&&k[1]?this.data(k[0]):e}return this.each(function(){var b=d(this),e=[k[0],c];b.triggerHandler("setData"+k[1]+"!",e),d.data(this,a,c),b.triggerHandler("changeData"+k[1]+"!",e)})},removeData:function(a){return this.each(function(){d.removeData(this,a)})}}),d.extend({queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var e=d._data(a,b);if(!c)return e||[];!e||d.isArray(c)?e=d._data(a,b,d.makeArray(c)):e.push(c);return e}},dequeue:function(a,b){b=b||"fx";var c=d.queue(a,b),e=c.shift();e==="inprogress"&&(e=c.shift()),e&&(b==="fx"&&c.unshift("inprogress"),e.call(a,function(){d.dequeue(a,b)})),c.length||d.removeData(a,b+"queue",!0)}}),d.fn.extend({queue:function(a,c){typeof a!=="string"&&(c=a,a="fx");if(c===b)return d.queue(this[0],a);return this.each(function(b){var e=d.queue(this,a,c);a==="fx"&&e[0]!=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,b){a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){d.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var h=/[\n\t\r]/g,i=/\s+/,j=/\r/g,k=/^(?:href|src|style)$/,l=/^(?:button|input)$/i,m=/^(?:button|input|object|select|textarea)$/i,n=/^a(?:rea)?$/i,o=/^(?:radio|checkbox)$/i;d.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},d.fn.extend({attr:function(a,b){return d.access(this,a,b,!0,d.attr)},removeAttr:function(a,b){return this.each(function(){d.attr(this,a,""),this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.addClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"){var b=(a||"").split(i);for(var c=0,e=this.length;c<e;c++){var f=this[c];if(f.nodeType===1)if(f.className){var g=" "+f.className+" ",h=f.className;for(var j=0,k=b.length;j<k;j++)g.indexOf(" "+b[j]+" ")<0&&(h+=" "+b[j]);f.className=d.trim(h)}else f.className=a}}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"||a===b){var c=(a||"").split(i);for(var e=0,f=this.length;e<f;e++){var g=this[e];if(g.nodeType===1&&g.className)if(a){var j=(" "+g.className+" ").replace(h," ");for(var k=0,l=c.length;k<l;k++)j=j.replace(" "+c[k]+" "," ");g.className=d.trim(j)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,e=typeof b==="boolean";if(d.isFunction(a))return this.each(function(c){var e=d(this);e.toggleClass(a.call(this,c,e.attr("class"),b),b)});return this.each(function(){if(c==="string"){var f,g=0,h=d(this),j=b,k=a.split(i);while(f=k[g++])j=e?j:!h.hasClass(f),h[j?"addClass":"removeClass"](f)}else if(c==="undefined"||c==="boolean")this.className&&d._data(this,"__className__",this.className),this.className=this.className||a===!1?"":d._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(h," ").indexOf(b)>-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var k=i?f:0,l=i?f+1:h.length;k<l;k++){var m=h[k];if(m.selected&&(d.support.optDisabled?!m.disabled:m.getAttribute("disabled")===null)&&(!m.parentNode.disabled||!d.nodeName(m.parentNode,"optgroup"))){a=d(m).val();if(i)return a;g.push(a)}}if(i&&!g.length&&h.length)return d(h[f]).val();return g}if(o.test(c.type)&&!d.support.checkOn)return c.getAttribute("value")===null?"on":c.value;return(c.value||"").replace(j,"")}return b}var n=d.isFunction(a);return this.each(function(b){var c=d(this),e=a;if(this.nodeType===1){n&&(e=a.call(this,b,c.val())),e==null?e="":typeof e==="number"?e+="":d.isArray(e)&&(e=d.map(e,function(a){return a==null?"":a+""}));if(d.isArray(e)&&o.test(this.type))this.checked=d.inArray(c.val(),e)>=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=k.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&l.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:m.test(a.nodeName)||n.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var p=/\.(.*)$/,q=/^(?:textarea|input|select)$/i,r=/\./g,s=/ /g,t=/[^\w\s.|`]/g,u=function(a){return a.replace(t,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=v;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),u).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))d.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=d.event.special[h]||{};for(j=f||0;j<p.length;j++){q=p[j];if(e.guid===q.guid){if(l||n.test(q.namespace))f==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(f!=null)break}}if(p.length===0||f!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&d.removeEvent(a,h,s.handle),g=null,delete t[h]}if(d.isEmptyObject(t)){var w=s.handle;w&&(w.elem=null),delete s.events,delete s.handle,d.isEmptyObject(s)&&d.removeData(a,b,!0)}}},trigger:function(a,c,e){var f=a.type||a,g=arguments[3];if(!g){a=typeof a==="object"?a[d.expando]?a:d.extend(d.Event(f),a):d.Event(f),f.indexOf("!")>=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(p,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l<m;l++){var n=f[l];if(e||h.test(n.namespace)){c.handler=n.handler,c.data=n.data,c.handleObj=n;var o=n.handler.apply(this,k);o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[d.expando])return a;var e=a;a=d.Event(e);for(var f=this.props.length,g;f;)g=this.props[--f],a[g]=e[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=c.documentElement,i=c.body;a.pageX=a.clientX+(h&&h.scrollLeft||i&&i.scrollLeft||0)-(h&&h.clientLeft||i&&i.clientLeft||0),a.pageY=a.clientY+(h&&h.scrollTop||i&&i.scrollTop||0)-(h&&h.clientTop||i&&i.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a){d.event.add(this,F(a.origType,a.selector),d.extend({},a,{handler:E,guid:a.handler.guid}))},remove:function(a){d.event.remove(this,F(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){d.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},d.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},d.Event=function(a){if(!this.preventDefault)return new d.Event(a);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?w:v):this.type=a,this.timeStamp=d.now(),this[d.expando]=!0},d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=w;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=w;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=w,this.stopPropagation()},isDefaultPrevented:v,isPropagationStopped:v,isImmediatePropagationStopped:v};var x=function(a){var b=a.relatedTarget;try{if(b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,d.event.handle.apply(this,arguments))}catch(e){}},y=function(a){a.type=a.data,d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){d.event.special[a]={setup:function(c){d.event.add(this,b,c&&c.selector?y:x,a)},teardown:function(a){d.event.remove(this,b,a&&a.selector?y:x)}}}),d.support.submitBubbles||(d.event.special.submit={setup:function(a,b){if(this.nodeName&&this.nodeName.toLowerCase()!=="form")d.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&d(b).closest("form").length&&C("submit",this,arguments)}),d.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&d(b).closest("form").length&&a.keyCode===13&&C("submit",this,arguments)});else return!1},teardown:function(a){d.event.remove(this,".specialSubmit")}});if(!d.support.changeBubbles){var z,A=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(q.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return q.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return q.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i<j;i++)d.event.add(this[i],a,h,e);return this}}),d.fn.extend({unbind:function(a,b){if(typeof a!=="object"||a.preventDefault)for(var e=0,f=this.length;e<f;e++)d.event.remove(this[e],a,b);else for(var c in a)this.unbind(c,a[c]);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=d.Event(a);c.preventDefault(),c.stopPropagation(),d.event.trigger(c,b,this[0]);return c.result}},toggle:function(a){var b=arguments,c=1;while(c<b.length)d.proxy(a,b[c++]);return this.click(d.proxy(a,function(e){var f=(d._data(this,"lastToggle"+a.guid)||0)%c;d._data(this,"lastToggle"+a.guid,f+1),e.preventDefault();return b[f].apply(this,arguments)||!1}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var D={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};d.each(["live","die"],function(a,c){d.fn[c]=function(a,e,f,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:d(this.context);if(typeof a==="object"&&!a.preventDefault){for(var o in a)n[c](o,e,a[o],m);return this}d.isFunction(e)&&(f=e,e=b),a=(a||"").split(" ");while((h=a[i++])!=null){j=p.exec(h),k="",j&&(k=j[0],h=h.replace(p,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,h==="focus"||h==="blur"?(a.push(D[h]+k),h=h+k):h=(D[h]||h)+k;if(c==="live")for(var q=0,r=n.length;q<r;q++)d.event.add(n[q],"live."+F(h,m),{data:e,selector:m,handler:f,origType:h,origHandler:f,preType:l});else n.unbind("live."+F(h,m),f)}return this}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){d.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!=="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!=="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(f){if(f===!0)continue}else g=o=!0}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1){}a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.getAttribute("type")},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(d||!l.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return k(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};d.find=k,d.expr=k.selectors,d.expr[":"]=d.expr.filters,d.unique=k.uniqueSort,d.text=k.getText,d.isXMLDoc=k.isXML,d.contains=k.contains}();var G=/Until$/,H=/^(?:parents|prevUntil|prevAll)/,I=/,/,J=/^.[^:#\[\.,]*$/,K=Array.prototype.slice,L=d.expr.match.POS,M={children:!0,contents:!0,next:!0,prev:!0};d.fn.extend({find:function(a){var b=this.pushStack("","find",a),c=0;for(var e=0,f=this.length;e<f;e++){c=b.length,d.find(a,this[e],b);if(e>0)for(var g=c;g<b.length;g++)for(var h=0;h<c;h++)if(b[h]===b[g]){b.splice(g--,1);break}}return b},has:function(a){var b=d(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(d.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(O(this,a,!1),"not",a)},filter:function(a){return this.pushStack(O(this,a,!0),"filter",a)},is:function(a){return!!a&&d.filter(a,this).length>0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e<f;e++)i=a[e],j[i]||(j[i]=d.expr.match.POS.test(i)?d(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e<f;e++){g=this[e];while(g){if(l?l.index(g)>-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/<tbody/i,U=/<|&#?\w+;/,V=/<(?:script|object|embed|option|style)/i,W=/checked\s*(?:[^=]|=\s*.checked.)/i,X={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div<div>","</div>"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1></$2>");try{for(var c=0,e=this.length;c<e;c++)this[c].nodeType===1&&(d.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(f){this.empty().append(a)}}return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(d.isFunction(a))return this.each(function(b){var c=d(this),e=c.html();c.replaceWith(a.call(this,b,e))});typeof a!=="string"&&(a=d(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;d(this).remove(),b?d(b).before(a):d(c).append(a)})}return this.pushStack(d(d.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,e){var f,g,h,i,j=a[0],k=[];if(!d.support.checkClone&&arguments.length===3&&typeof j==="string"&&W.test(j))return this.each(function(){d(this).domManip(a,c,e,!0)});if(d.isFunction(j))return this.each(function(f){var g=d(this);a[0]=j.call(this,f,c?g.html():b),g.domManip(a,c,e)});if(this[0]){i=j&&j.parentNode,d.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?f={fragment:i}:f=d.buildFragment(a,this,k),h=f.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&d.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)e.call(c?Y(this[l],g):this[l],f.cacheable||m>1&&l<n?d.clone(h,!0,!0):h)}k.length&&d.each(k,ba)}return this}}),d.buildFragment=function(a,b,e){var f,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]==="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!V.test(a[0])&&(d.support.checkClone||!W.test(a[0]))&&(g=!0,h=d.fragments[a[0]],h&&(h!==1&&(f=h))),f||(f=i.createDocumentFragment(),d.clean(a,i,f,e)),g&&(d.fragments[a[0]]=h?f:1);return{fragment:f,cacheable:g}},d.fragments={},d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(c){var e=[],f=d(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&f.length===1){f[b](this[0]);return this}for(var h=0,i=f.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){$(a,e),f=_(a),g=_(e);for(h=0;f[h];++h)$(f[h],g[h])}if(b){Z(a,e);if(c){f=_(a),g=_(e);for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1></$2>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]==="<table>"&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bb=/alpha\([^)]*\)/i,bc=/opacity=([^)]*)/,bd=/-([a-z])/ig,be=/([A-Z])/g,bf=/^-?\d+(?:px)?$/i,bg=/^-?\d/,bh={position:"absolute",visibility:"hidden",display:"block"},bi=["Left","Right"],bj=["Top","Bottom"],bk,bl,bm,bn=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bk(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bk)return bk(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bd,bn)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bo(a,b,e):d.swap(a,bh,function(){f=bo(a,b,e)});if(f<=0){f=bk(a,b,b),f==="0px"&&bm&&(f=bm(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bf.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bb.test(f)?f.replace(bb,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bl=function(a,c,e){var f,g,h;e=e.replace(be,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bm=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bf.test(d)&&bg.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bk=bl||bm,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bp=/%20/g,bq=/\[\]$/,br=/\r?\n/g,bs=/#.*$/,bt=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bu=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bv=/(?:^file|^widget|\-extension):$/,bw=/^(?:GET|HEAD)$/,bx=/^\/\//,by=/\?/,bz=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bA=/^(?:select|textarea)/i,bB=/\s+/,bC=/([?&])_=[^&]*/,bD=/(^|\-)([a-z])/g,bE=function(a,b,c){return b+c.toUpperCase()},bF=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,bG=d.fn.load,bH={},bI={},bJ,bK;try{bJ=c.location.href}catch(bL){bJ=c.createElement("a"),bJ.href="",bJ=bJ.href}bK=bF.exec(bJ.toLowerCase()),d.fn.extend({load:function(a,c,e){if(typeof a!=="string"&&bG)return bG.apply(this,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var g=a.slice(f,a.length);a=a.slice(0,f)}var h="GET";c&&(d.isFunction(c)?(e=c,c=b):typeof c==="object"&&(c=d.param(c,d.ajaxSettings.traditional),h="POST"));var i=this;d.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?d("<div>").append(c.replace(bz,"")).find(g):c)),e&&i.each(e,[c,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bA.test(this.nodeName)||bu.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(br,"\r\n")}}):{name:b.name,value:c.replace(br,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,c){d[c]=function(a,e,f,g){d.isFunction(e)&&(g=g||f,f=e,e=b);return d.ajax({type:c,url:a,data:e,success:f,dataType:g})}}),d.extend({getScript:function(a,c){return d.get(a,b,c,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a,b){b?d.extend(!0,a,d.ajaxSettings,b):(b=a,a=d.extend(!0,d.ajaxSettings,b));for(var c in {context:1,url:1})c in b?a[c]=b[c]:c in d.ajaxSettings&&(a[c]=d.ajaxSettings[c]);return a},ajaxSettings:{url:bJ,isLocal:bv.test(bK[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bM(bH),ajaxTransport:bM(bI),ajax:function(a,c){function v(a,c,l,n){if(r!==2){r=2,p&&clearTimeout(p),o=b,m=n||"",u.readyState=a?4:0;var q,t,v,w=l?bP(e,u,l):b,x,y;if(a>=200&&a<300||a===304){if(e.ifModified){if(x=u.getResponseHeader("Last-Modified"))d.lastModified[k]=x;if(y=u.getResponseHeader("Etag"))d.etag[k]=y}if(a===304)c="notmodified",q=!0;else try{t=bQ(e,w),c="success",q=!0}catch(z){c="parsererror",v=z}}else{v=c;if(!c||a)c="error",a<0&&(a=0)}u.status=a,u.statusText=c,q?h.resolveWith(f,[t,c,u]):h.rejectWith(f,[u,c,v]),u.statusCode(j),j=b,s&&g.trigger("ajax"+(q?"Success":"Error"),[u,e,q?t:v]),i.resolveWith(f,[u,c]),s&&(g.trigger("ajaxComplete",[u,e]),--d.active||d.event.trigger("ajaxStop"))}}typeof a==="object"&&(c=a,a=b),c=c||{};var e=d.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof d)?d(f):d.event,h=d.Deferred(),i=d._Deferred(),j=e.statusCode||{},k,l={},m,n,o,p,q,r=0,s,t,u={readyState:0,setRequestHeader:function(a,b){r||(l[a.toLowerCase().replace(bD,bE)]=b);return this},getAllResponseHeaders:function(){return r===2?m:null},getResponseHeader:function(a){var c;if(r===2){if(!n){n={};while(c=bt.exec(m))n[c[1].toLowerCase()]=c[2]}c=n[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){r||(e.mimeType=a);return this},abort:function(a){a=a||"abort",o&&o.abort(a),v(0,a);return this}};h.promise(u),u.success=u.done,u.error=u.fail,u.complete=i.done,u.statusCode=function(a){if(a){var b;if(r<2)for(b in a)j[b]=[j[b],a[b]];else b=a[u.status],u.then(b,b)}return this},e.url=((a||e.url)+"").replace(bs,"").replace(bx,bK[1]+"//"),e.dataTypes=d.trim(e.dataType||"*").toLowerCase().split(bB),e.crossDomain||(q=bF.exec(e.url.toLowerCase()),e.crossDomain=q&&(q[1]!=bK[1]||q[2]!=bK[2]||(q[3]||(q[1]==="http:"?80:443))!=(bK[3]||(bK[1]==="http:"?80:443)))),e.data&&e.processData&&typeof e.data!=="string"&&(e.data=d.param(e.data,e.traditional)),bN(bH,e,c,u);if(r===2)return!1;s=e.global,e.type=e.type.toUpperCase(),e.hasContent=!bw.test(e.type),s&&d.active++===0&&d.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url+=(by.test(e.url)?"&":"?")+e.data),k=e.url;if(e.cache===!1){var w=d.now(),x=e.url.replace(bC,"$1_="+w);e.url=x+(x===e.url?(by.test(e.url)?"&":"?")+"_="+w:"")}}if(e.data&&e.hasContent&&e.contentType!==!1||c.contentType)l["Content-Type"]=e.contentType;e.ifModified&&(k=k||e.url,d.lastModified[k]&&(l["If-Modified-Since"]=d.lastModified[k]),d.etag[k]&&(l["If-None-Match"]=d.etag[k])),l.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(t in e.headers)u.setRequestHeader(t,e.headers[t]);if(e.beforeSend&&(e.beforeSend.call(f,u,e)===!1||r===2)){u.abort();return!1}for(t in {success:1,error:1,complete:1})u[t](e[t]);o=bN(bI,e,c,u);if(o){u.readyState=1,s&&g.trigger("ajaxSend",[u,e]),e.async&&e.timeout>0&&(p=setTimeout(function(){u.abort("timeout")},e.timeout));try{r=1,o.send(l,v)}catch(y){status<2?v(-1,y):d.error(y)}}else v(-1,"No Transport");return u},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){f(this.name,this.value)});else for(var g in a)bO(g,a[g],c,f);return e.join("&").replace(bp,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bR=d.now(),bS=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bR++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){var f=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bS.test(b.url)||f&&bS.test(b.data))){var g,h=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2",m=function(){a[h]=i,g&&d.isFunction(i)&&a[h](g[0])};b.jsonp!==!1&&(j=j.replace(bS,l),b.url===j&&(f&&(k=k.replace(bS,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},e.then(m,m),b.converters["script json"]=function(){g||d.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bT=d.now(),bU,bV;d.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&bX()||bY()}:bX,bV=d.ajaxSettings.xhr(),d.support.ajax=!!bV,d.support.cors=bV&&"withCredentials"in bV,bV=b,d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var c;return{send:function(e,f){var g=a.xhr(),h,i;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(i in a.xhrFields)g[i]=a.xhrFields[i];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),(!a.crossDomain||a.hasContent)&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(i in e)g.setRequestHeader(i,e[i])}catch(j){}g.send(a.hasContent&&a.data||null),c=function(e,i){var j,k,l,m,n;try{if(c&&(i||g.readyState===4)){c=b,h&&(g.onreadystatechange=d.noop,delete bU[h]);if(i)g.readyState!==4&&g.abort();else{j=g.status,l=g.getAllResponseHeaders(),m={},n=g.responseXML,n&&n.documentElement&&(m.xml=n),m.text=g.responseText;try{k=g.statusText}catch(o){k=""}j||!a.isLocal||a.crossDomain?j===1223&&(j=204):j=m.text?200:404}}}catch(p){i||f(-1,p)}m&&f(j,k,m,l)},a.async&&g.readyState!==4?(bU||(bU={},bW()),h=bT++,g.onreadystatechange=bU[h]=c):c()},abort:function(){c&&c(0,1)}}}});var bZ={},b$=/^(?:toggle|show|hide)$/,b_=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ca,cb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(cc("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)e=this[g],f=e.style.display,!d._data(e,"olddisplay")&&f==="none"&&(f=e.style.display=""),f===""&&d.css(e,"display")==="none"&&d._data(e,"olddisplay",cd(e.nodeName));for(g=0;g<h;g++){e=this[g],f=e.style.display;if(f===""||f==="none")e.style.display=d._data(e,"olddisplay")||""}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cc("hide",3),a,b,c);for(var e=0,f=this.length;e<f;e++){var g=d.css(this[e],"display");g!=="none"&&!d._data(this[e],"olddisplay")&&d._data(this[e],"olddisplay",g)}for(e=0;e<f;e++)this[e].style.display="none";return this},_toggle:d.fn.toggle,toggle:function(a,b,c){var e=typeof a==="boolean";d.isFunction(a)&&d.isFunction(b)?this._toggle.apply(this,arguments):a==null||e?this.each(function(){var b=e?a:d(this).is(":hidden");d(this)[b?"show":"hide"]()}):this.animate(cc("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){var f=d.speed(b,c,e);if(d.isEmptyObject(a))return this.each(f.complete);return this[f.queue===!1?"each":"queue"](function(){var b=d.extend({},f),c,e=this.nodeType===1,g=e&&d(this).is(":hidden"),h=this;for(c in a){var i=d.camelCase(c);c!==i&&(a[i]=a[c],delete a[c],c=i);if(a[c]==="hide"&&g||a[c]==="show"&&!g)return b.complete.call(this);if(e&&(c==="height"||c==="width")){b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(d.css(this,"display")==="inline"&&d.css(this,"float")==="none")if(d.support.inlineBlockNeedsLayout){var j=cd(this.nodeName);j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else this.style.display="inline-block"}d.isArray(a[c])&&((b.specialEasing=b.specialEasing||{})[c]=a[c][1],a[c]=a[c][0])}b.overflow!=null&&(this.style.overflow="hidden"),b.curAnim=d.extend({},a),d.each(a,function(c,e){var f=new d.fx(h,b,c);if(b$.test(e))f[e==="toggle"?g?"show":"hide":e](a);else{var i=b_.exec(e),j=f.cur();if(i){var k=parseFloat(i[2]),l=i[3]||(d.cssNumber[c]?"":"px");l!=="px"&&(d.style(h,c,(k||1)+l),j=(k||1)/f.cur()*j,d.style(h,c,j+l)),i[1]&&(k=(i[1]==="-="?-1:1)*k+j),f.custom(j,k,l)}else f.custom(j,e,"")}});return!0})},stop:function(a,b){var c=d.timers;a&&this.queue([]),this.each(function(){for(var a=c.length-1;a>=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:cc("show",1),slideUp:cc("hide",1),slideToggle:cc("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||(d.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!ca&&(ca=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||d.fx.stop()},interval:13,stop:function(){clearInterval(ca),ca=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){d.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),d.expr&&d.expr.filters&&(d.expr.filters.animated=function(a){return d.grep(d.timers,function(b){return a===b.elem}).length});var ce=/^t(?:able|d|h)$/i,cf=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?d.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,g=f.documentElement;if(!c||!d.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=f.body,i=cg(f),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||d.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||d.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:d.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);d.offset.initialize();var c,e=b.offsetParent,f=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(d.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===e&&(l+=b.offsetTop,m+=b.offsetLeft,d.offset.doesNotAddBorder&&(!d.offset.doesAddBorderForTableAndCells||!ce.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),f=e,e=b.offsetParent),d.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;d.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},d.offset={initialize:function(){var a=c.body,b=c.createElement("div"),e,f,g,h,i=parseFloat(d.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=cf.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!cf.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=cg(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=cg(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window);
if(!console){
var console={};
console.log = function() {}
}
var ez_forum_handler={};
window.addEvent('domready', function() {
ez_forum_handler= new EZForumHandler();
});
EZForumHandler = new Class({
base_url:'http://vb.mol.vs.bluedotmedia.de'
,c_id_prefix:'article-'
,c_bag:[]
,tid:0
,f_url:''
,Implements: [Options],
options: {
},
initialize: function(options) {
this.setOptions(options);
this.get_detail_data();
this.get_overview_data();
}
,get_detail_data: function() {
var that=this;
var nodes=$$('.comments_detail_hook');
if(nodes.length==0)return;
this.tid=nodes[0].get('tid');
console.log(that.base_url+'/ajax.php?do=fetch_comments&tid='+that.tid)
new Request.JSONP({
url: that.base_url+'/ajax.php?do=fetch_comments&tid='+that.tid,
data: {
state: 'bootstrap'
},
onComplete: that.get_detail_data_resp.bind(that)
}).send();
}
,get_detail_data_resp: function(data) {
var that=this;
console.log(this, data);
this.f_url=data.forum_url;
data.articles.each(that.build_detail_comments, that);
}
,build_detail_comments: function(article, index) {
document.id('modul_kommentare').erase('html');
var that=this;
console.log('build comments for article detail', article.id, article);
var title_node=new Element('h4', {'html': 'Kommentare im Forum'});
if(article.comments.length == 0) {
title_node.set( 'class', 'noborder' );
}
$$('.comments_detail_hook')[0].adopt(title_node);
if(article.comments.length>0) {
var clist_node=new Element('div', {'id': 'kommentarliste'});
$$('.comments_detail_hook')[0].adopt(clist_node);
}
var table_node=new Element('table', {'class': 'kommentare_service'});
var tbody_node= new Element('tbody', {});
var tr_node= new Element('tr', {});
var td1_node=new Element('td', {'class':'more_link', html:'<a href="'+that.f_url+'/showthread.php?t='+that.tid+'">Weitere Kommentare</a>'});
var td2_node=new Element('td', {'class':'more_link', html:'<a href="'+that.f_url+'">Startseite Forum</a>'});
var html_write='';
if(article.comments_allowed==true) {
html_write='<a href="'+that.f_url+'/newreply.php?do=newreply&noquote=1&t='+that.tid+'">Kommentar schreiben</a>'
}
var td3_node=new Element('td', {'class':'kommentar_button', html:html_write});
table_node.adopt(tbody_node.adopt(tr_node.adopt(td1_node, td2_node, td3_node)));
$$('.comments_detail_hook')[0].adopt(table_node);
article.f_url=this.f_url;
article.tid=this.tid;
article.comments.each(that.build_detail_comment, article);
}
,build_detail_comment: function(item, index, comments) {
console.log(item, index, comments.length, this.comment_count);
console.log('build comment:', item.id);
var el_classes='kommentar c'+index;
if(index==0)el_classes+=' first';
if(index+1==comments.length)el_classes+=' last';
var base_el  = new Element('div', {'class': el_classes});
var post_nr=(item.postInThread);
base_el.set({html:
'<!-- Beginn Kommentar -->' +
'<p class="kommentar_name">'+item.author+'</p>' +
'<p class="kommentar_number">#<a target="new" href="'+this.f_url+'/showpost.php?p='+item.id+'&postcount='+post_nr+'&page='+item.siteno+'">'+(post_nr-1)+'</a></p>' +
'<div class="clearBoth_noheight"></div>' +
'<p class="kommentar_date">'+item.date+'</p>' +
'<h3><a href="'+this.f_url+'/showthread.php?t='+this.tid+'&page='+item.siteno+'#'+post_nr+'">'+item.title+'</a></h3>' +
'<p class="kommentar_content">' +item.teaser+'</p>'
})
document.id('kommentarliste').adopt(base_el);
}
,get_overview_data: function() {
var that=this;
var nodes=$$('.comments_hook');
if(nodes.length==0)return;
var tid=0;
var collection=nodes.map(function(item, index){
tid=item.get('tid');
that.c_bag.push({'tid':tid, 'item':item});
return tid;
}).join(",");
console.log('collection:', collection, that.c_bag);
new Request.JSONP({
url: this.base_url+'/ajax.php?do=fetch_comments&tid='+collection,
data: {
state: 'bootstrap'
},
onComplete: that.get_overview_data_resp.bind(that)
}).send();
}
,get_overview_data_resp: function(data) {
console.log(this, data);
this.c_bag.each(this.build_overview_comments, data.articles);
}
,build_overview_comments: function(el, index) {
var res=this.filter(function(item, index) {
return item.id == el.tid;
});
if(res.length>0) {
el.item.getElement('.comment_count').set('text', res[0].comment_count);
}
delete res;
}
});
var mmbMultiMediaBox = function (_blockId, _mainNode, _bCClId, _bcMax, _portalNodeId, _startNodeId )
{
var mmbMe = this;
this.blockId = _blockId;
this.mainNode = _mainNode;          //{jQueryblock.custom_attributes.BildHauptKnotenID};
this.brightCoveChannelId = _bCClId; //{jQueryblock.custom_attributes.BrigtcoveKanalID};
this.bcMax = _bcMax;                //{jQueryblock.custom_attributes.BrigtcoveAnzahl};
this.portalNodeId = _portalNodeId;  //{jQueryblock.custom_attributes.PortalKnotenID};
this.startNodeId = _startNodeId;    //{jQuerynode.contentobject_id};
this.vidCarousel;
this.imgCarousel;
this.mmbMultimediaTabs;
this.setImageCaption = function(_listItem)
{
var caption = jQuery(_listItem).children('div.mmb-imagecontainer').children('div.mmb-imagecaption');
var iHeight = caption.height();
caption.css('height', 0);
caption.parent().mouseenter(function(e){ jQuery(e.currentTarget).find('div.mmb-imagecaption').animate( {'height':iHeight} ); });
caption.parent().mouseleave(function(e) { jQuery(e.currentTarget).find('div.mmb-imagecaption').animate( {'height':0} ); } );
jQuery(_listItem).children('div.mmb-imagecontainer').bind('touchstart', function(e)
{
if(jQuery(e.currentTarget).find('div.mmb-imagecaption').css('height')=='0px')
{
jQuery(e.currentTarget).find('div.mmb-imagecaption').animate( {'height':iHeight} );
e.preventDefault();
}
else if(jQuery(e.currentTarget).find('div.mmb-imagecaption').css('height')==iHeight+'px')
{
}
else
{
e.preventDefault();
}
});
}
this.getImageTag = function(_title, _img, _url)
{
return '<div class="mmb-imagecontainer" ><a class="mmb-imagelink" href='+_url+'><img class="mmb-image" src='+_img+' alt="'+_title+'" /></a><div class="mmb-imagecaption"><div class="mmb-innerimagecaption"><a class="mmb-imagelink" href='+_url+'>'+_title+'</a></div></div></div>';
}
this.start = function ()
{
var bcVideo=false;
if(this.mainNode!='')
{
jQuery("#mmb-imgcarcontainer"+this.blockId).removeClass('mmb-noscript');
jQuery("#mmb-imgcarcontainer"+this.blockId).children('ol.carousel').children('li').each(function(index, element)
{
mmbMe.setImageCaption(element);
cropImage(jQuery(element).children('div').children('a').children('img'), 142, 107 );
});
this.imgCarousel = new gsCarousel("#mmb-imgcarcontainer"+this.blockId, { useAnimation: true, animationSpeed: 500, isCircular: true, numVisible: 3, usePagination: true });
}
if(this.brightCoveChannelId!='')
{
bcVideo=true;
}
if(bcVideo)
{
this.vidCarousel = new gsCarousel("#mmb-vidcarcontainer"+this.blockId, { useAnimation: true, animationSpeed: 500, isCircular: true, numVisible: 3, numItems: 3, usePagination: true });
jQuery.getJSON("/xmldata/data/(type)/bcmedia/(start)/"+this.mainNode+"/(bcpid)/"+this.brightCoveChannelId+"/(bcmax)/"+this.bcMax+"/(bcportnode)/"+this.portalNodeId+"/(at)/"+this.startNodeId+"/(j)/1",
function (response)
{
if(response)
{
var iVidImages=0;
if (typeof mmbMe.vidCarousel != "undefined")
{
mmbMe.vidCarousel.clearItems();
for (var i in response.medienteaser.teaser)
{
if(('undefined'!=typeof response.medienteaser.teaser[i].bildmedium) && ('video'==response.medienteaser.teaser[i].typ))
{
mmbMe.vidCarousel.addItem(mmbMe.getImageTag(response.medienteaser.teaser[i].title, response.medienteaser.teaser[i].bildmedium.url,response.medienteaser.teaser[i].url) );
}
iVidImages++;
}
items = [];
}
if(iVidImages>0)
{
jQuery('#multimediatabs'+mmbMe.blockId).find('div.mmb-noscript-vid').removeClass('mmb-noscript-vid');
jQuery("#mmb-vidtab"+mmbMe.blockId).removeClass('mmb-noscript-vid');
jQuery("#mmb-vidcarcontainer"+mmbMe.blockId).removeClass('mmb-noscript-vid');
jQuery("#mmb-vidtbdiv"+mmbMe.blockId).css('display', 'block');
mmbMe.vidCarousel.touch();
jQuery("#mmb-vidcarcontainer"+mmbMe.blockId).children('div.gs-carousel-content').children('ol.carousel').children('li').each(function(index, element)
{
mmbMe.setImageCaption(element);
jQuery(element).children('div').children('a').children('img').load(function(e)
{
cropImage(jQuery(element).children('div').children('a').children('img'), 142, 107 );
});
});
}
}
});
this.mmbMultimediaTabs = new gsTabView("#multimediatabs"+this.blockId);
if(this.mainNode!='')
{
this.mmbMultimediaTabs.selectTab(1);
}
}
}
};

