function RedrawSliderRange(a,b,c){try{if(-1!=navigator.userAgent.indexOf("MSIE")){c.style.top=a.offsetTop-2+"px";}else{c.style.top=a.offsetTop+3+"px";}c.style.left=a.offsetLeft+5+"px";c.style.width=186+2-a.offsetLeft-(190-b.offsetLeft)+"px";c.style.display="block";}catch(e){}}//MooTools, <http://mootools.net>, My Object Oriented (JavaScript) Tools. Copyright (c) 2006-2009 Valerio Proietti, <http://mad4milk.net>, MIT Style License.

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, <http://mootools.net/more>. Copyright (c) 2006-2009 Aaron Newton <http://clientcide.com/>, Valerio Proietti <http://mad4milk.net> & the MooTools team <http://mootools.net/developers>, MIT Style License.

MooTools.More={version:"1.2.4.4",build:"6f6057dc645fdb7547689183b2311063bd653ddf"};(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(e,d){b[d]=this.lambda(e);},this);},getCurrentLanguage:function(){return a.language;
},addLanguage:function(c){a.languages[c]=a.languages[c]||{};return this;},cascade:function(e){var c=(a.languages[e]||{}).cascades||[];c.combine(a.cascades);
c.erase(e).push(e);var d=c.map(function(f){return a.languages[f];},this);return $merge.apply(this,d);},lambda:function(c){(c||{}).get=function(e,d){return $lambda(c[e]).apply(this,$splat(d));
};return c;},get:function(e,d,c){if(b&&b[e]){return(d?b[e].get(d,c):b[e]);}},set:function(d,e,c){this.addLanguage(d);langData=a.languages[d];if(!langData[e]){langData[e]={};
}$extend(langData[e],c);if(d==this.getCurrentLanguage()){this.load();this.fireEvent("langChange",d);}return this;},list:function(){return Hash.getKeys(a.languages);
}});})();(function(){var i=this.Date;if(!i.now){i.now=$time;}i.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"].each(function(p){i.Methods[p.toLowerCase()]=p;
});var d=function(q,p){return new Array(p-String(q).length+1).join("0")+q;};i.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=i.Methods;if(q[t]){this["set"+q[t]](r);}}return this;},get:function(q){q=q.toLowerCase();var p=i.Methods;if(p[q]){return this["get"+p[q]]();
}return null;},clone:function(){return new i(this.get("time"));},increment:function(p,r){p=p||"day";r=$pick(r,1);switch(p){case"year":return this.increment("month",r*12);
case"month":var q=this.get("date");this.set("date",1).set("mo",this.get("mo")+r);return this.set("date",q.min(this.get("lastdayofmonth")));case"week":return this.increment("day",r*7);
case"day":return this.set("date",this.get("date")+r);}if(!i.units[p]){throw new Error(p+" is not a supported interval");}return this.set("time",this.get("time")+r*i.units[p]());
},decrement:function(p,q){return this.increment(p,-1*$pick(q,1));},isLeapYear:function(){return i.isLeapYear(this.get("year"));},clearTime:function(){return this.set({hr:0,min:0,sec:0,ms:0});
},diff:function(q,p){if($type(q)=="string"){q=i.parse(q);}return((q-this)/i.units[p||"day"](3,3)).toInt();},getLastDayOfMonth:function(){return i.daysInMonth(this.get("mo"),this.get("year"));
},getDayOfYear:function(){return(i.UTC(this.get("year"),this.get("mo"),this.get("date")+1)-i.UTC(this.get("year"),0,1))/i.units.day();},getWeek:function(){return(this.get("dayofyear")/7).ceil();
},getOrdinal:function(p){return i.getMsg("ordinal",p||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 p=this.get("timezoneOffset");return((p>0)?"-":"+")+d((p.abs()/60).floor(),2)+d(p%60,2);},setAMPM:function(p){p=p.toUpperCase();
var q=this.get("hr");if(q>11&&p=="AM"){return this.decrement("hour",12);}else{if(q<12&&p=="PM"){return this.increment("hour",12);}}return this;},getAMPM:function(){return(this.get("hr")<12)?"AM":"PM";
},parse:function(p){this.set("time",i.parse(p));return this;},isValid:function(p){return !!(p||this).valueOf();},format:function(p){if(!this.isValid()){return"invalid date";
}p=p||"%x %X";p=k[p.toLowerCase()]||p;var q=this;return p.replace(/%([a-z%])/gi,function(s,r){switch(r){case"a":return i.getMsg("days")[q.get("day")].substr(0,3);
case"A":return i.getMsg("days")[q.get("day")];case"b":return i.getMsg("months")[q.get("month")].substr(0,3);case"B":return i.getMsg("months")[q.get("month")];
case"c":return q.toString();case"d":return d(q.get("date"),2);case"H":return d(q.get("hr"),2);case"I":return((q.get("hr")%12)||12);case"j":return d(q.get("dayofyear"),3);
case"m":return d((q.get("mo")+1),2);case"M":return d(q.get("min"),2);case"o":return q.get("ordinal");case"p":return i.getMsg(q.get("ampm"));case"S":return d(q.get("seconds"),2);
case"U":return d(q.get("week"),2);case"w":return q.get("day");case"x":return q.format(i.getMsg("shortDate"));case"X":return q.format(i.getMsg("shortTime"));
case"y":return q.get("year").toString().substr(2);case"Y":return q.get("year");case"T":return q.get("GMTOffset");case"Z":return q.get("Timezone");}return r;
});},toISOString:function(){return this.format("iso8601");}});i.alias("toISOString","toJSON");i.alias("diff","compare");i.alias("format","strftime");var k={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 g=[];var e=i.parse;var n=function(s,u,r){var q=-1;var t=i.getMsg(s+"s");switch($type(u)){case"object":q=t[u.get(s)];break;case"number":q=t[month-1];
if(!q){throw new Error("Invalid "+s+" index: "+index);}break;case"string":var p=t.filter(function(v){return this.test(v);},new RegExp("^"+u,"i"));if(!p.length){throw new Error("Invalid "+s+" string");
}if(p.length>1){throw new Error("Ambiguous "+s);}q=p[0];}return(r)?t.indexOf(q):q;};i.extend({getMsg:function(q,p){return MooTools.lang.get("Date",q,p);
},units:{ms:$lambda(1),second:$lambda(1000),minute:$lambda(60000),hour:$lambda(3600000),day:$lambda(86400000),week:$lambda(608400000),month:function(q,p){var r=new i;
return i.daysInMonth($pick(q,r.get("mo")),$pick(p,r.get("year")))*86400000;},year:function(p){p=p||new i().get("year");return i.isLeapYear(p)?31622400000:31536000000;
}},daysInMonth:function(q,p){return[31,i.isLeapYear(p)?29:28,31,30,31,30,31,31,30,31,30,31][q];},isLeapYear:function(p){return((p%4===0)&&(p%100!==0))||(p%400===0);
},parse:function(r){var q=$type(r);if(q=="number"){return new i(r);}if(q!="string"){return r;}r=r.clean();if(!r.length){return null;}var p;g.some(function(t){var s=t.re.exec(r);
return(s)?(p=t.handler(s)):false;});return p||new i(e(r));},parseDay:function(p,q){return n("day",p,q);},parseMonth:function(q,p){return n("month",q,p);
},parseUTC:function(q){var p=new i(q);var r=i.UTC(p.get("year"),p.get("mo"),p.get("date"),p.get("hr"),p.get("min"),p.get("sec"));return new i(r);},orderIndex:function(p){return i.getMsg("dateOrder").indexOf(p)+1;
},defineFormat:function(p,q){k[p]=q;},defineFormats:function(p){for(var q in p){i.defineFormat(q,p[q]);}},parsePatterns:g,defineParser:function(p){g.push((p.re&&p.handler)?p:l(p));
},defineParsers:function(){Array.flatten(arguments).each(i.defineParser);},define2DigitYearStart:function(p){h=p%100;m=p-h;}});var m=1900;var h=70;var j=function(p){return new RegExp("(?:"+i.getMsg(p).map(function(q){return q.substr(0,3);
}).join("|")+")[a-z]*");};var a=function(p){switch(p){case"x":return((i.orderIndex("month")==1)?"%m[.-/]%d":"%d[.-/]%m")+"([.-/]%y)?";case"X":return"%H([.:]%M)?([.:]%S([.:]%s)?)? ?%p? ?%T?";
}return null;};var o={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})?/};
o.m=o.I;o.S=o.M;var c;var b=function(p){c=p;o.a=o.A=j("days");o.b=o.B=j("months");g.each(function(r,q){if(r.format){g[q]=l(r.format);}});};var l=function(r){if(!c){return{format:r};
}var p=[];var q=(r.source||r).replace(/%([a-z])/gi,function(t,s){return a(s)||t;}).replace(/\((?!\?)/g,"(?:").replace(/ (?!\?|\*)/g,",? ").replace(/%([a-z%])/gi,function(t,s){var u=o[s];
if(!u){return s;}p.push(s);return"("+u.source+")";}).replace(/\[a-z\]/gi,"[a-z\\u00c0-\\uffff]");return{format:r,re:new RegExp("^"+q+"$","i"),handler:function(u){u=u.slice(1).associate(p);
var s=new i().clearTime();if("d" in u){f.call(s,"d",1);}if("m" in u||"b" in u||"B" in u){f.call(s,"m",1);}for(var t in u){f.call(s,t,u[t]);}return s;}};
};var f=function(p,q){if(!q){return this;}switch(p){case"a":case"A":return this.set("day",i.parseDay(q,true));case"b":case"B":return this.set("mo",i.parseMonth(q,true));
case"d":return this.set("date",q);case"H":case"I":return this.set("hr",q);case"m":return this.set("mo",q-1);case"M":return this.set("min",q);case"p":return this.set("ampm",q.replace(/\./g,""));
case"S":return this.set("sec",q);case"s":return this.set("ms",("0."+q)*1000);case"w":return this.set("day",q);case"Y":return this.set("year",q);case"y":q=+q;
if(q<100){q+=m+(q<h?100:0);}return this.set("year",q);case"T":if(q=="Z"){q="+00";}var r=q.match(/([+-])(\d{2}):?(\d{2})?/);r=(r[1]+"1")*(r[2]*60+(+r[3]||0))+this.getTimezoneOffset();
return this.set("time",this-r*60000);}return this;};i.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(p){if(MooTools.lang.get("Date")){b(p);}}).fireEvent("langChange",MooTools.lang.getCurrentLanguage());})();
Date.implement({timeDiffInWords:function(a){return Date.distanceOfTimeInWords(this,a||new Date);},timeDiff:function(g,b){if(g==null){g=new Date;}var f=((g-this)/1000).toInt();
if(!f){return"0s";}var a={s:60,m:60,h:24,d:365,y:0};var e,d=[];for(var c in a){if(!f){break;}if((e=a[c])){d.unshift((f%e)+c);f=(f/e).toInt();}else{d.unshift(f+c);
}}return d.join(b||":");}});Date.alias("timeDiffInWords","timeAgoInWords");Date.extend({distanceOfTimeInWords:function(b,a){return Date.getTimePhrase(((a-b)/1000).toInt());
},getTimePhrase:function(f){var d=(f<0)?"Until":"Ago";if(f<0){f*=-1;}var b={minute:60,hour:60,day:24,week:7,month:52/12,year:12,eon:Infinity};var e="lessThanMinute";
for(var c in b){var a=b[c];if(f<1.5*a){if(f>0.75*a){e=c;}break;}f/=a;e=c+"s";}return Date.getMsg(e+d).substitute({delta:f.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(e){var f=new Date().clearTime();
var b=f.getDay();var c=Date.parseDay(e[2],true);var a=c-b;if(c<=b){a+=7;}if(e[1]=="last"){a-=7;}return f.set("date",f.getDate()+a);}});Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(b,a){this.elements=this.subject=$$(b);
this.parent(a);},compute:function(g,h,j){var c={};for(var d in g){var a=g[d],e=h[d],f=c[d]={};for(var b in a){f[b]=this.parent(a[b],e[b],j);}}return c;
},set:function(b){for(var c in b){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 h={},j={};for(var d in c){var f=c[d],a=h[d]={},g=j[d]={};for(var b in f){var e=this.prepare(this.elements[d],b,f[b]);a[b]=e.from;g[b]=e.to;}}return this.parent(h,j);
}});Fx.Accordion=new Class({Extends:Fx.Elements,options:{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(e,d){if(this.options.show===d){this.fireEvent("active",[this.togglers[d],e]);}else{for(var f in this.effects){e.setStyle(f,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(e,c){e=document.id(e);c=document.id(c);var f=this.togglers.contains(e);
this.togglers.include(e);this.elements.include(c);var a=this.togglers.indexOf(e);var b=this.display.bind(this,a);e.store("accordion:display",b);e.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(!f){for(var d in this.effects){c.setStyle(d,0);}}return this;},detach:function(){this.togglers.each(function(a){a.removeEvent(this.options.trigger,a.retrieve("accordion:display"));
},this);},display:function(a,b){if(!this.check(a,b)){return this;}b=$pick(b,true);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]]);}}}a=($type(a)=="element")?this.elements.indexOf(a):a;if((this.timer&&this.options.wait)||(a===this.previous&&!this.options.alwaysHide)){return this;
}this.previous=a;var e={};this.elements.each(function(h,g){e[g]={};var f;if(g!=a){f=true;}else{if(this.options.alwaysHide&&((h.offsetHeight>0&&this.options.height)||h.offsetWidth>0&&this.options.width)){f=true;
this.selfHidden=true;}}this.fireEvent(f?"background":"active",[this.togglers[g],h]);for(var j in this.effects){e[g][j]=f?0:h[this.effects[j]];}},this);
this.internalChain.chain(function(){if(this.options.returnHeightToAuto&&!this.selfHidden){var f=this.elements[a];if(f){f.setStyle("height","auto");}}}.bind(this));
return b?this.start(e):this.set(e);}});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,e){c=document.id(c);b=document.id(b);var d=this.togglers.contains(c);var a=this.togglers.length;if(a&&(!d||e)){e=$pick(e,a-1);
c.inject(this.togglers[e],"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.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],a[1]);},compute:function(c,b,a){return[0,1].map(function(d){return Fx.compute(c[d],b[d],a);});},start:function(c,g){if(!this.check(c,g)){return this;
}var e=this.element.getScrollSize(),b=this.element.getScroll(),d={x:c,y:g};for(var f in d){var a=e[f];if($chk(d[f])){d[f]=($type(d[f])=="number")?d[f]:a;
}else{d[f]=b[f];}d[f]+=this.options.offset[f];}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,e,d){e=e?$splat(e):["x","y"];var h={};c=document.id(c);var f=c.getPosition(this.element);var i=c.getSize();
var g=this.element.getScroll();var a=this.element.getSize();var b={x:f.x+i.x,y:f.y+i.y};["x","y"].each(function(j){if(e.contains(j)){if(b[j]>g[j]+a[j]){h[j]=b[j]-a[j];
}if(f[j]<g[j]){h[j]=f[j];}}if(h[j]==null){h[j]=g[j];}if(d&&d[j]){h[j]=h[j]+d[j];}},this);if(h.x!=g.x||h.y!=g.y){this.start(h.x,h.y);}return this;},scrollToCenter:function(c,e,d){e=e?$splat(e):["x","y"];
c=$(c);var h={},f=c.getPosition(this.element),i=c.getSize(),g=this.element.getScroll(),a=this.element.getSize(),b={x:f.x+i.x,y:f.y+i.y};["x","y"].each(function(j){if(e.contains(j)){h[j]=f[j]-(a[j]-i[j])/2;
}if(h[j]==null){h[j]=g[j];}if(d&&d[j]){h[j]=h[j]+d[j];}},this);if(h.x!=g.x||h.y!=g.y){this.start(h.x,h.y);}return this;}});Fx.Slide=new Class({Extends:Fx,options:{mode:"vertical",wrapper:false,hideOverflow:true},initialize:function(b,a){this.addEvent("complete",function(){this.open=(this.wrapper["offset"+this.layout.capitalize()]!=0);
if(this.open){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,e){if(!this.check(b,e)){return this;
}this[e||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 g=[[d,c],[-this.offset,0]];var f;switch(b){case"in":f=a;break;case"out":f=g;break;case"toggle":f=(c==0)?a:g;}return this.parent(f[0],f[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,e){d=d||"toggle";
var b=this.get("slide"),a;switch(d){case"hide":b.hide(e);break;case"show":b.show(e);break;case"toggle":var c=this.retrieve("slide:flag",b.open);b[c?"slideOut":"slideIn"](e);
this.store("slide:flag",!c);a=true;break;default:b.start(d,e);}if(!a){this.eliminate("slide:flag");}return this;}});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(c){if(c.rightClick){return;}if(this.options.preventDefault){c.preventDefault();}if(this.options.stopPropagation){c.stopPropagation();
}this.mouse.start=c.page;this.fireEvent("beforeStart",this.element);var a=this.options.limit;this.limit={x:[],y:[]};for(var d in this.options.modifiers){if(!this.options.modifiers[d]){continue;
}if(this.options.style){this.value.now[d]=this.element.getStyle(this.options.modifiers[d]).toInt();}else{this.value.now[d]=this.element[this.options.modifiers[d]];
}if(this.options.invert){this.value.now[d]*=-1;}this.mouse.pos[d]=c.page[d]-this.value.now[d];if(a&&a[d]){for(var b=2;b--;b){if($chk(a[d][b])){this.limit[d][b]=$lambda(a[d][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.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));}});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"});
$A = function(iterable, start, length){
    if (Browser.Engine.trident && $type(iterable) == 'collection'){
        start = start || 0;
        if (start < 0) start = iterable.length + start;
        length = length || (iterable.length - start);
        var array = [];
        for (var i = 0; i < length; i++) array[i] = iterable[start++];
        return array;
    }
    start = (start || 0) + ((start < 0) ? iterable.length : 0);
    var end = ((!$chk(length)) ? iterable.length : length) + start;
    return Array.prototype.slice.call(iterable, start, end);
};

(function(){
    var natives = [Array, Function, String, RegExp, Number];
    for (var i = 0, l = natives.length; i < l; i++) natives[i].extend = natives[i].implement;
})();

window.extend = document.extend = function(properties){
    for (var property in properties) this[property] = properties[property];
};

window[Browser.Engine.name] = window[Browser.Engine.name + Browser.Engine.version] = true;

window.ie = window.trident;
window.ie6 = window.trident4;
window.ie7 = window.trident5;

Class.empty = $empty;

//legacy .extend support

Class.prototype.extend = function(properties){
    properties.Extends = this;
    return new Class(properties);
};

Array.implement({

    copy: function(start, length){
        return $A(this, start, length);
    }

});

Array.alias({erase: 'remove', combine: 'merge'});

Function.extend({

    bindAsEventListener: function(bind, args){
        return this.create({'bind': bind, 'event': true, 'arguments': args});
    }

});

Function.empty = $empty;

Hash.alias({getKeys: 'keys', getValues: 'values', has: 'hasKey', combine: 'merge'});
var Abstract = Hash;

Element.extend = Element.implement;

Elements.extend = Elements.implement;

Element.implement({

    getFormElements: function(){
        return this.getElements('input, textarea, select');
    },

    replaceWith: function(el){
        el = $(el);
        this.parentNode.replaceChild(el, this);
        return el;
    },
    
    removeElements: function(){
        return this.dispose();
    }

});

Element.alias({'dispose': 'remove', 'getLast': 'getLastChild'});

Element.implement({

    getText: function(){
        return this.get('text');
    },

    setText: function(text){
        return this.set('text', text);
    },

    setHTML: function(){
        return this.set('html', arguments);
    },
    
    getHTML: function(){
        return this.get('html');
    },

    getTag: function(){
        return this.get('tag');
    }

});

Event.keys = Event.Keys;

Element.implement({
    
    setOpacity: function(op){
        return this.set('opacity', op);
    }
    
});

Object.toQueryString = Hash.toQueryString;

Fx.implement({

    custom: function(from, to){
        return this.start(from, to);
    },

    clearTimer: function(){
        return this.cancel();
    },
    
    stop: function(){
        return this.cancel();
    }

});

Fx.Base = Fx;

Fx.Style = function(element, property, options){
    return new Fx.Tween(element, $extend({property: property}, options));
};

Element.implement({
    
    effect: function(property, options){
        return new Fx.Tween(this, $extend({property: property}, options));
    }

});

Fx.Styles = Fx.Morph;

Element.implement({
    
    effects: function(options){
        return new Fx.Morph(this, options);
    }

});

Native.implement([Element, Document], {

    getElementsByClassName: function(className){
        return this.getElements('.' + className);
    },

    getElementsBySelector: function(selector){
        return this.getElements(selector);
    }

});

Elements.implement({

    filterByTag: function(tag){
        return this.filter(tag);
    },

    filterByClass: function(className){
        return this.filter('.' + className);
    },

    filterById: function(id){
        return this.filter('#' + id);
    },

    filterByAttribute: function(name, operator, value){
        return this.filter('[' + name + (operator || '') + (value || '') + ']');
    }

});

var $E = function(selector, filter){
    return ($(filter) || document).getElement(selector);
};

var $ES = function(selector, filter){
    return ($(filter) || document).getElements(selector);
};

var Json = JSON;

JSON.toString = JSON.encode;
JSON.evaluate = JSON.decode;

Cookie.set = function(key, value, options){
    return new Cookie(key, options).write(value);
};

Cookie.get = function(key){
    return new Cookie(key).read();
};

Cookie.remove = function(key, options){
    return new Cookie(key, options).dispose();
};Fx.Scroll.implement({

    scrollTo: function(y, x){
        return this.start(y, x);
    }

});/*
Class: Slider
        Creates a slider with two elements: a knob and a container. Returns the values.
Note:
        The Slider requires an XHTML doctype.
Arguments:
        element - the knob container
        knob - the handle
        options - see Options below
        maxknob - an optional maximum slider handle
Options:
		start - the minimum value for your slider.
		end - the maximum value for your slider.
        mode - either 'horizontal' or 'vertical'. defaults to horizontal.
        offset - relative offset for knob position. default to 0.
        knobheight - positions the max slider knob
		snap - whether the slider will slide in steps 
		numsteps - number of slide steps 
Events:
        onChange - a function to fire when the value changes.
        onComplete - a function to fire when you're done dragging.
        onTick - optionally, you can alter the onTick behavior, for example displaying an effect of the knob moving to the desired position.
                Passes as parameter the new position.
*/
var MooSlider = new Class({
	options: {
		onChange: Class.empty,
		onComplete: Class.empty,
		onTick: function(pos){
			this.moveKnob.setStyle(this.p, pos);			
		},
		start: 0,
		end: 100,
		offset: 0,
		knobheight: 20,
		knobwidth: 14,
		mode: 'horizontal',
		clip_w:0, 
		clip_l:0,
		isinit:true,
		snap: false,
		range: false,
		numsteps:null
	},
    initialize: function(el, knob,bkg, options, maxknob) {
		this.setOptions(options);
		this.element = $(el);
		this.knob = $(knob);
		this.previousChange = this.previousEnd = this.step = -1;
		this.bkg = $(bkg);
		if(this.options.steps==null){
			this.options.steps = this.options.end - this.options.start;
		}
		if(maxknob!=null)
			this.maxknob = $(maxknob);
		//else
		//	this.element.addEvent('mousedown', this.clickedElement.bindWithEvent(this));
		var mod, offset;
		switch(this.options.mode){
			case 'horizontal':
				this.z = 'x';
				this.p = 'left';
				mod = {'x': 'left', 'y': false};
				offset = 'offsetWidth';
				break;
			case 'vertical':
				this.z = 'y';
				this.p = 'top';
				mod = {'x': false, 'y': 'top'};
				offset = 'offsetHeight';
		}
		this.max = this.element[offset] - this.knob[offset] + (this.options.offset * 2);
		this.half = this.knob[offset]/2;
		this.full = this.element[offset] - this.knob[offset] + (this.options.offset * 2);
		this.min = $chk(this.options.range[0]) ? this.options.range[0] : 0;
		this.getPos = this.element['get' + this.p.capitalize()].bind(this.element);
		this.knob.setStyle('position', 'relative').setStyle(this.p, - this.options.offset);

		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) ;
		

		if(maxknob != null) {
			this.maxPreviousChange = -1;
			this.maxPreviousEnd = -1;
			this.maxstep = this.options.end;
			this.maxknob.setStyle('position', 'relative').setStyle(this.p, + this.max - this.options.offset).setStyle('bottom', this.options.knobheight);
		}
		var lim = {};
		//status = this.z
		lim[this.z] = [- this.options.offset, this.max - this.options.offset];
		//lim[this.z] = [100, this.max - this.options.offset];

		this.drag = new Drag(this.knob, {
			limit: lim,
			modifiers: mod,
			snap: 0,
			onStart: function(){
					this.draggedKnob();
			}.bind(this),
			onDrag: function(){
					this.draggedKnob();
			}.bind(this),
			onComplete: function(){
					this.draggedKnob();
					this.end();
			}.bind(this)
		});
		if(maxknob != null) {  
			this.maxdrag = new Drag(this.maxknob, {
				limit: lim,
				modifiers: mod,
				snap: 0, 
				onStart: function(){
					this.draggedKnob(1);
				}.bind(this),
				onDrag: function(){
					this.draggedKnob(1);
				}.bind(this),
				onComplete: function(){
					this.draggedKnob(1);
					this.end();
				}.bind(this)
			});		
		}

		if (this.options.snap) {
			//this.drag.options.grid = Math.ceil(this.stepWidth);
			this.drag.options.grid = (this.full)/this.options.numsteps ;
			this.drag.options.limit[this.z][1] = this.full;
			//this.drag.options.grid = this.drag.options.grid - (this.knob[offset]/this.options.numsteps);
			status = "GRID - " + this.drag.options.grid  + "  , full = " + this.full// DEBUG

		}
		if (this.options.initialize) this.options.initialize.call(this);
    },
	setMin: function(stepMin){
		this.step = stepMin.limit(this.options.start, this.options.end);
		this.checkStep();
		this.end();
		this.moveKnob = this.knob;
		this.bkg.style.clip = "rect(0px "+  (parseInt(this.toPosition(this.step)) +3) + "px 10px 0px)";
		status =this.bkg.style.clip + "  vl= " + parseInt(this.toPosition(this.step)) ; //Debug
		this.fireEvent('onTick', this.toPosition(this.step));
		return this;
	},
	setMax: function(stepMax){
		this.maxstep = stepMax.limit(this.options.start, this.options.end);
		this.checkStep(1);
		this.end();
		this.moveKnob = this.maxknob;
		var w= Math.abs(this.toPosition(this.step)- this.toPosition(this.maxstep)) + 3 ;
		var r = parseInt(this.clip_l + w); 
		this.bkg.style.clip = "rect(0px "+  r + "px 10px "+ this.clip_l + "px)";

		this.fireEvent('onTick', this.toPosition(this.maxstep));
		// For Init Only 
		if(this.options.isinit){
			var lim = {}; var mi,mx;
			mi = - this.options.offset; 
			mx= parseInt(this.maxknob.getStyle('left')) - this.options.offset-4 ;
			lim[this.z] = [mi, mx];
			this.drag.options.limit = lim;
			this.options.isinit = false;
		}
		return this; 
	},
	clickedElement: function(event){
		var position = event.page[this.z] - this.getPos() - this.half;
		position = position.limit(-this.options.offset, this.max -this.options.offset);

		this.step = this.toStep(position);

		//this.moveKnob = this.knob;
		this.bkg.style.clip = "rect(0px "+  (parseInt(this.toPosition(this.step)) +3) + "px 10px 0px)"  
		//status =this.bkg.style.clip; //Debug
		this.checkStep();
		this.end();
		this.fireEvent('onTick', position);
	},

	draggedKnob: function(mx){
		var lim = {}; var mi,mx;
		if(mx==null) {
			this.step = this.toStep(this.drag.value.now[this.z]);	 
			this.checkStep();
		}else {
			this.maxstep = this.toStep(this.maxdrag.value.now[this.z]); 
			this.checkStep(1);
		}
	},
	checkStep: function(mx){
		var lim = {}; var mi,mx;
		var limm = {};
		if(mx==null) {if (this.previousChange != this.step){this.previousChange = this.step;}}
		else {if (this.maxPreviousChange != this.maxstep){this.maxPreviousChange = this.maxstep;}}

		if(this.maxknob!=null) {

			mi = - this.options.offset; 
			mx= parseInt(this.maxknob.getStyle('left')) - this.options.offset-4 ;
			//mx= parseInt(this.maxknob.getStyle('left')) - this.options.offset ;
			lim[this.z] = [mi, mx];
			this.drag.options.limit = lim;
		

			mi = parseInt(this.knob.getStyle('left'))-this.options.offset+22; 
			//mi = parseInt(this.knob.getStyle('left'))-this.options.offset; 
			
			mx= this.max - this.options.offset;
			limm[this.z] = [mi, mx];
			this.maxdrag.options.limit = limm; 

			if(this.step < this.maxstep){
				this.fireEvent('onChange', { minpos: this.step, maxpos: this.maxstep });
				//this.clip_l = parseInt(this.knob.getStyle('left'));
			}
			else{
				this.fireEvent('onChange', { minpos: this.maxstep, maxpos: this.step });
				//this.clip_l = (parseInt(this.maxknob.getStyle('left')) + 10) ;
			}	
			this.clip_l = parseInt(this.knob.getStyle('left')) + 10;
			//var w = Math.abs(parseInt(this.knob.getStyle('left')) - parseInt(this.maxknob.getStyle('left'))) + 3;	
			var w = Math.abs(parseInt(this.knob.getStyle('left')) - parseInt(this.maxknob.getStyle('left')));
			//if(w > 3) w = w+3;
			
			var r = parseInt(this.clip_l + w); 
			this.bkg.style.clip = "rect(0px "+  r + "px 10px "+ this.clip_l + "px)"  
			//status =this.bkg.style.clip  + " w= " + w //Debug

		}else {  
			this.fireEvent('onChange', this.step);
			this.bkg.style.clip = "rect(0px "+  (parseInt(this.drag.value.now[this.z]) +3)  + "px 10px 0px)"  

		}
	},
	end: function(){
		if (this.previousEnd !== this.step || (this.maxknob != null && this.maxPreviousEnd != this.maxstep)) {
			this.previousEnd = this.step;
			if(this.maxknob != null) {
				this.maxPreviousEnd = this.maxstep;
				if(this.step < this.maxstep)
					this.fireEvent('onComplete', { minpos: this.step + '', maxpos: this.maxstep + '' });
				else    
					this.fireEvent('onComplete', { minpos: this.maxstep + '', maxpos: this.step + '' });
			}else{  
				this.fireEvent('onComplete', this.step + '');
			}
		}
	},
	
	toStep: function(position){
		return Math.round((position + this.options.offset) / this.max * this.options.steps) + this.options.start;
	},

	toPosition: function(step){
		return (this.max * step / this.options.steps) - (this.max * this.options.start / this.options.steps) - this.options.offset;
	}

});

MooSlider.implement(new Events);
MooSlider.implement(new Options);(function(){var a={};var b=(window.navigator.userAgent.indexOf("MSIE")>0);var c=(window.navigator.userAgent.indexOf("MSIE 7")>0);window['CQS']=a;window['isIE']=b;window['isIE7']=c;})();CQS.Common=new function(){var _j=null;this.redirectTo=function(a){window.location.href=a;};this.reloadPage=function(){document.location.reload(true);};this.addEvent=function(b,d,f){try{b.addEventListener(d,f,false);}catch(e){b.attachEvent('on'+d,f);}};this.removeEvent=function(b,d,f){try{b.removeEventListener(d,f,false);}catch(e){b.detachEvent('on'+d,f);}};this.getClientWidth=function(){if(typeof(window.innerWidth)=='number'){if(this.getWindowHeight()<this.getPageHeightWithScroll())return window.innerWidth-23;else return window.innerWidth;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){return document.documentElement.clientWidth;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){return document.body.clientWidth;}};this.getClientHeight=function(g){if(_j==null){_j=document.createElement("div");document.body.appendChild(_j);}var _k=parseInt(this.getPageY(_j))+15;if(_k<this.getWindowHeight()){_k=this.getWindowHeight();}return _k;};this.getWindowHeight=function(){if(typeof(window.innerWidth)=='number'){return window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){return document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){return document.body.clientHeight;}};this.getPageHeightWithScroll=function(){if(window.innerHeight&&window.scrollMaxY){return window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){return document.body.scrollHeight;}else{return document.body.offsetHeight;}};this.getPageWidthWithScroll=function(){if(window.innerWidth&&window.scrollMaxX){return window.innerWidth+window.scrollMaxX;}else if(document.body.scrollWidth>document.body.offsetWidth){return document.body.scrollWidth;}else{return document.body.offsetWidth;}};this.getScrollX=function(){if(!isIE){return window.pageXOffset;}else{if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft;}else if(document.body){return document.body.scrollLeft;}}return 0;};this.getScrollY=function(){if(!isIE){return window.pageYOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop;}else if(document.body){return document.body.scrollTop;}}return 0;};this.getPageX=function(e){var x=0;while(e){if(this.isDefined(e.offsetLeft))x+=e.offsetLeft;e=this.isDefined(e.offsetParent)?e.offsetParent:null;}return x;};this.getPageY=function(e){var y=0;while(e){if(this.isDefined(e.offsetTop))y+=e.offsetTop;e=this.isDefined(e.offsetParent)?e.offsetParent:null;}return y;};this.isDefined=function(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false;}return true;};this.setOpacity=function(h,j){try{j=(j==100)?99.999:j;h.style.filter="alpha(opacity:"+j+")";h.style.KHTMLOpacity=j/100;h.style.MozOpacity=j/100;h.style.j=j/100;}catch(e){}};this.innerHTML=function(k){return document.getElementById(k).innerHTML;};this.showBrowserOfflineMessage=function(){alert("Your browser is currently in offline mode. Please set your browser to run in online mode. This page will now be refreshed.");};if(!String.prototype.trim){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};};if(!String.prototype.ltrim){String.prototype.ltrim=function(){return this.replace(/^\s+/,"");};};if(!String.prototype.rtrim){String.prototype.rtrim=function(){return this.replace(/\s+$/,"");};};if(!String.prototype.removeAllWhitespace){String.prototype.removeAllWhitespace=function(){return this.replace(/\s+/g,'');};};this.getPreviousSibling=function(l){while(l!=null){if(l.previousSibling)l=l.previousSibling;else l=null;if(l){if(l.nodeType==1)break;}}return l;};this.getNextSibling=function(l){while(l!=null){if(l.nextSibling)l=l.nextSibling;else l=null;if(l){if(l.nodeType==1)break;}}return l;};this.getElementWithId=function(m,k){var _l=null;var _m=m.getElementsByTagName("\x2a");var _n=_m.length;for(var _o=0;_o<_n;_o++){var l=_m[_o];if(!l.id)continue;if(l.id+""==k+""){_l=l;break;}}return _l;};this.getElementEndingWithId=function(n,o){var _l=null;var _m=n.getElementsByTagName("\x2a");var _n=_m.length;for(var _o=0;_o<_n;_o++){var l=_m[_o];if(!l.id)continue;var _p=(l.id+"");if(_p.indexOf(o)>=0){_p=_p.substring(_p.indexOf(o),_p.length);if((_p.length==o.length)&&(_p.indexOf(o)>=0)){_l=l;break;}}}return _l;};this.getElementsEndingWithId=function(n,o,p){var _q=new Array();var _m;if(p){_m=n.getElementsByTagName(p);}else{_m=n.getElementsByTagName("\x2a");}var _n=_m.length;for(var _o=0;_o<_n;_o++){var l=_m[_o];if(!l.id)continue;var _p=(l.id+"");if(_p.indexOf(o)>=0){_p=_p.substring(_p.indexOf(o),_p.length);if((_p.length==o.length)&&(_p.indexOf(o)>=0)){_q[_q.length]=l;continue;}}}return _q;};this.getElementsEndingWithId=function(n,o){var _q=new Array();var _m=n.getElementsByTagName("\x2a");var _n=_m.length;for(var _o=0;_o<_n;_o++){var l=_m[_o];if(!l.id)continue;var _p=(l.id+"");if(_p.indexOf(o)>=0){_p=_p.substring(_p.indexOf(o),_p.length);if((_p.length==o.length)&&(_p.indexOf(o)>=0)){_q[_q.length]=l;continue;}}}return _q;};this.getElementWithIdContaining=function(n,o){var _l=null;var _m=n.getElementsByTagName("\x2a");var _n=_m.length;for(var _o=0;_o<_n;_o++){var l=_m[_o];if(!l.id)continue;if((l.id+"").indexOf(o)>=0){_l=l;break;}}return _l;};this.getElementsWithIdContaining=function(n,o,p){var _q=new Array();var _m;if(p){_m=n.getElementsByTagName(p);}else{_m=n.getElementsByTagName("\x2a");}var _n=_m.length;for(var _o=0;_o<_n;_o++){var l=_m[_o];if(!l.id)continue;if((l.id+"").indexOf(o)>=0){_q[_q.length]=l;continue;}}return _q;};this.getElementsWithNameContaining=function(n,q){var _q=new Array();var _m=n.getElementsByTagName("\x2a");var _n=_m.length;for(var _o=0;_o<_n;_o++){var l=_m[_o];if(!l.name)continue;if((l.name+"").indexOf(q)>=0){_q[_q.length]=l;continue;}}return _q;};this.getElementsWithContainingAttribute=function(n,r,s){var _q=new Array();var _m=n.getElementsByTagName("\x2a");var _n=_m.length;for(var _o=0;_o<_n;_o++){var l=_m[_o];if(CQS.Common.elementHasAttribute(l,r)){if(CQS.Common.elementGetAttribute(l,r)==s){_q[_q.length]=l;}}}return _q;};this.dateIsValid=function(t,u,v){var _r=new Date();_r.setFullYear(v,u-1,t);if(((_r.getMonth()+1)+'')!=(u+'')){return false;}else{return true;}};this.elementHasAttribute=function(w,z){if(this.isDefined(w)&&this.isDefined(z)){var _s=w.getAttribute(z);return(_s!=null&&_s.length>0)?true:false;}return false;};this.elementGetAttribute=function(w,z){if(this.elementHasAttribute(w,z)){return w.getAttribute(z);}return"";};this.elementSetAttribute=function(w,_a,_b){if(this.elementHasAttribute(w,_a)){w.setAttribute(_a,_b);}else{eval("document.getElementById('"+w.id+"')."+_a+" = '"+_b+"'");}};this.removeAllChildNodes=function(l){try{if(l&&l.hasChildNodes&&l.removeChild){while(l.hasChildNodes()){l.removeChild(l.firstChild);}}}catch(e){}};this.removeChildNode=function(parentNode,_c){try{if(parentNode&&parentNode.hasChildNodes&&parentNode.removeChild){parentNode.removeChild(_c);}}catch(e){}};this.appendChildNode=function(parentNode,_d){try{if(parentNode&&parentNode.appendChild){parentNode.appendChild(_d);}}catch(e){}};this.createCookie=function(_e,_f,_g){if(_g){var _t=new Date();_t.setTime(_t.getTime()+(_g*24*60*60*1000));var _u="; expires="+_t.toGMTString();}else var _u="";document.cookie=_e+"="+_f+_u+"; path=/";};this.readCookie=function(_e){var _v=_e+"=";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(_v)==0)return c.substring(_v.length,c.length);}return null;};this.eraseCookie=function(_e){CQS.Common.createCookie(_e,'',-1);};this.onInputBlurPlaceText=function(_h){var b=$defined(_h.target)?$(_h.target):$(_h.srcElement);var _w=b.get('value');if(_w==''){b.set('value',getCMSFAQContent());}};this.onInputFocusClearText=function(_h){var b=$defined(_h.target)?$(_h.target):$(_h.srcElement);b.set('value','');};this.onInputFocusTargetClearText=function(_h,_i){var b=$defined(_h.target)?$(_h.target):$(_h.srcElement);if(_i==b.value){b.set('value','');}};}();CQS.AT=new function(){this.MessageBox=new function(){var _c;var s;var _d;var _e=-1;var _f;var _g=false;var _h=false;var _i=false;this.init=function(a){_c=new Madurodam.Popup(460,180,{elementId:'YT_messageBody',blockBackground:true});document.body.insertBefore($('YT_messageBody'),document.body.firstChild);};this.setupLoadingBoxAndShow=function(b,c,d,f,g,h,j,k){ShowWaitingScreen(f,k);if(d.length>0){if(typeof(LogAnalyticsMessageView)!='undefined'){LogAnalyticsMessageView(d);}}else{if(typeof(LogAnalyticsMessageView)!='undefined'){LogAnalyticsMessageView(f);}}if(_i&&_g){if(typeof(AnalyticsLoadingBoxEnd)!='undefined'){AnalyticsLoadingBoxEnd(_h);}_g=false;_i=false;}if(typeof(AnalyticsLoadingBoxStart)!='undefined'){_g=true;_i=true;_h=f;AnalyticsLoadingBoxStart(_h);}};this.setupMessageBoxAndShow=function(b,c,d,f,l,m,n,o,p,g,h,j,q,r){CQS.Block.setup(undefined,50);if(c<180){c=180;}var t=null
s=460;_d=c;_f=q;YT_SetMessagePropertiesAndShow(s,c,d,f,l,m,n,o,p,g,h,j,q,t,r);if(d.length>0){if(typeof(LogAnalyticsMessageView)!='undefined'){LogAnalyticsMessageView(d);}}else{if(typeof(LogAnalyticsMessageView)!='undefined'){LogAnalyticsMessageView(f);}}if(_i&&_g){if(typeof(AnalyticsLoadingBoxEnd)!='undefined'){AnalyticsLoadingBoxEnd(_h);}_g=false;_i=false;}};this.showMessageBox=function(){HideWaitingScreen(false);try{CQS.Block.setup(undefined,50);_c.showCenter(undefined,s,_d);}catch(e){if(CQS.Block.isVisible()){CQS.Block.hide();}}};this.cancelLoadingBox=function(){_f="";Madurodam.Ajax.abortAllCallbacks();CQS.Callback.abortAllCallbacks();HideWaitingScreen(true);};this.requestMessageBoxHide=function(){YT_HideMessageBox();};this.messageBoxOnUnload=function(){if(_i&&_g){if(typeof(AnalyticsLoadingBoxEnd)!='undefined'){AnalyticsLoadingBoxEnd(_h);}_g=false;_i=false;}};this.hideMessageBox=function(u,r){if(u>=0){_e=u;}else{_e=-1;}_c.hide(r);if(u==-1&&_i&&_g){if(typeof(AnalyticsLoadingBoxEnd)!='undefined'){AnalyticsLoadingBoxEnd(_h);}_g=false;_i=false;}if(_f!=undefined){if(_f.length>0){eval(_f+"('"+_e+"')");}}CQS.CursorAnimation.StopAnimation();};};this.ValidationMessage=new function(){var _j="ValidationInputError";var _k="ValidationSelectError";var _l="ValidationSetError";this.init=function(){CQS.Notify.create("INPUT",_j,8,8);CQS.Notify.create("SELECT",_k,8,8);CQS.Notify.create("DIV",_l,8,8,true);};this.show=function(v,w,x){CQS.Notify.show(_j,v,"",w,x);};this.hide=function(v){CQS.Notify.hide(_j,v);};this.showSelect=function(v,w){CQS.Notify.show(_k,v,"",w);};this.hideSelect=function(v){CQS.Notify.hide(_k,v);};this.showSet=function(v,w,x){CQS.Notify.show(_l,v,"",w,x);};this.hideSet=function(v){CQS.Notify.hide(_l,v);};this.hideAll=function(){CQS.Notify.hideAll();};this.redraw=function(){CQS.Notify.redraw();};};this.FAQ=new function(){var _m=null;var _n=730;var _o=505;var _p=function(){if(_m.style.display=="block"){_m.style.top=(CQS.Common.getScrollY()+(CQS.Common.getWindowHeight()/2))-(_o/2)+"px";_m.style.left=CQS.Common.getScrollX()+(CQS.Common.getClientWidth()/2)-(_n/2)+"px";}};this.init=function(){_m=CQS.Common.getElementEndingWithId(document,"ifFAQ");this.frame=_m;};this.show=function(){_m.style.top=(CQS.Common.getScrollY()+(CQS.Common.getWindowHeight()/2))-(_o/2)+"px";_m.style.left=CQS.Common.getScrollX()+(CQS.Common.getClientWidth()/2)-(_n/2)+"px";CQS.Block.setup(undefined,50);CQS.Block.show();_m.width=_n+"px";_m.height=_o+"px";_m.style.position="absolute";_m.style.display="block";CQS.Common.addEvent(window,'resize',function(){_p();});CQS.Common.addEvent(window,'scroll',function(){_p();});};this.hide=function(){_m.style.display="none";CQS.Common.removeEvent(window,'resize',function(){_p();});CQS.Common.removeEvent(window,'scroll',function(){_p();});CQS.Block.hide();};this.frame=_m;};}();function ValidateBrowserOnline(){if(BrowserDetect.browser==='Safari'||BrowserDetect.browser==='Chrome'){return true;}if(navigator){if(typeof(navigator.onLine)==='undefined'){return true;}if(!navigator.onLine){CQS.Common.showBrowserOfflineMessage();CQS.Common.reloadPage();return false;}}return true;}this.BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(y){for(var i=0;i<y.length;i++){var z=y[i].string;var _q=y[i].prop;this.versionSearchString=y[i].versionSearch||y[i].identity;if(z){if(z.indexOf(y[i].subString)!=-1)return y[i].identity;}else if(_q)return y[i].identity;}},searchVersion:function(z){var _r=z.indexOf(this.versionSearchString);if(_r==-1)return;return parseFloat(z.substring(_r+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.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"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();function PleaseLoad(){};window.addEvent('ondomready',function(){CQS.AT.ValidationMessage.init();window.addEvent('updatepanelcomplete',function(_a,_b){CQS.AT.ValidationMessage.init();});window.addEvent('resize',function(){CQS.AT.ValidationMessage.redraw();});window.addEvent('scroll',function(){CQS.AT.ValidationMessage.redraw();});var _s=document.getElementsByTagName('a');for(var _t=0;_t<_s.length;_t++){if(!_s[_t].href||_s[_t].href.length===0||_s[_t].href.contains('#')){_s[_t].href='javascript:PleaseLoad();';}}});CQS.Block=new function(){this.init=function(){Madurodam.Block.init();};this.setup=function(a,b){if($defined(b)){b=b/100;}Madurodam.Block.setup(b);};this.show=function(c){Madurodam.Block.show(0.5);};this.redraw=function(){Madurodam.Block.redraw();};this.hide=function(){Madurodam.Block.hide();};this.isVisible=function(){return Madurodam.Block.isVisible();};}();CQS.Popup=function(a,b,c){var h=new Madurodam.Popup(a,b,{URL:c,blockBackground:true});this.showCenter=function(d,e,f){if($defined(d)){d=d/100;}h.showCenter(d,e,f);};this.hide=function(g){h.hide(!g);};this.frame=h.frame;};this.allAirtradeCalendars=new Array();function HideAllAirtradeCalendars(){for(var _i=0;_i<allAirtradeCalendars.length;_i++){if(allAirtradeCalendars[_i].isVisible()){allAirtradeCalendars[_i].hide();}}};function AtLeastOneAirtradeCalendarIsVisible(){for(var _i=0;_i<allAirtradeCalendars.length;_i++){if(allAirtradeCalendars[_i].isVisible()){return true;}}return false;};function RemoveAllAirtradeCalendars(){for(var _i=allAirtradeCalendars.length-1;_i>=0;_i--){allAirtradeCalendars[_i].removeResizeEvent();allAirtradeCalendars[_i]=null;}allAirtradeCalendars.length=0;};AirtradeCalendar=function(a,b,c,d,e,f,g,h,k){var _j=0;var _k=1;var _l=1;var _m=new Date();var _n=new Date();var _o=new Date(_m);_o.setDate(1);var _p=new Date(_m);_p.setFullYear(_p.getFullYear()+1,_p.getMonth(),1);_p.setDate(_p.getDate()-1);var _q=a;var _r=b;var _s=new Date(parseDate(c));var _t=new Date(parseDate(d));var w=new Date(parseDate(e));var _u=eval(f);var _v=false;var _w=$(g);var _x=h;var _y=k;if(_x==2){_l=0;}var _z=0;var _aa=22;if(_x==1){_z=77;_aa=-123;if(isIE&&isIE7){_aa=-135;}}var _ab=0;var _ac=0;setPosition();validateVariables();this.show=function(){try{_am(w);_v=true;showCalendar(_v);}catch(u){_ak(u);}};this.hide=function(){try{_v=false;showCalendar(_v);}catch(u){_ak(u);}};this.setDates=function(l,m,o){try{_s=l;_t=m;w=o;validateVariables();_am(w);}catch(u){_ak(u);}};this.reset=function(l,m,o,p){try{_s=new Date(parseDate(l));_t=new Date(parseDate(m));w=new Date(parseDate(o));_y=p;validateVariables();_am(w);}catch(u){_ak(u);}};this.redraw=function(){try{validateVariables();_am(w);}catch(u){_ak(u);}};this.getSelectedDate=function(){return w;};this.setSelectedDate=function(o){w=o;};this.getEnabledToDate=function(){return _t;};this.isVisible=function(){return _v;};this.removeResizeEvent=function(){CQS.Common.removeEvent(window,'resize',eval(_q+".resizeHandler"));};this.resizeHandler=function(){setPosition();if(_v){_an(w);}};function setPosition(){_ab=CQS.Common.getPageX(_w)+_z;_ac=CQS.Common.getPageY(_w)+_aa;};function showCalendar(q){var _ad=q?'':'none';var _ae=q?'block':'none';setPosition();$("divAirtradeCalendar"+_q).style.top=_ac+"px";$("divAirtradeCalendar"+_q).style.left=_ab+"px";$("displaymonth_"+_q).style.display=_ad;$("displayDates_"+_q).style.display=_ad;if(_x==1){$("displaySelectedDate_"+_q).style.display=_ad;}$("divAirtradeCalendar"+_q).style.display=_ad;};function parseDate(r){if(r.length!=8){throw("["+r+"] not a valid length of 8");}var _af=new Date();var _f=r.substring(0,4);var y=r.substring(4,6)-1;var _a=r.substring(6,8);_af.setFullYear(_f,y,_a);var _ag=getYYYYMMDD(_af);if(_ag!=r){throw("["+r+"] turned into ["+_ag+"], perhaps it has some strange values");}return _af;};function getYYYYMMDD(s){var _ah=s.getFullYear();var _ai=s.getMonth()+1;var _aj=s.getDate();var _ag=_ah+((_ai<=9)?"0"+_ai:_ai+"")+((_aj<=9)?"0"+_aj:_aj+"");return _ag;};function validateVariables(){if(_t<_s){throw("enabledToDate["+_t.toDateString()+"] before enabledFromDate["+_s.toDateString()+"]");}if(w<_s){w=_s;}return true;};var _ak=function(u){alert("ERROR: \n"+u);};var _al=function(){try{if(_u!=""){_u(_q,w);}}catch(u){_ak(u);}};var _am=function(v){_n=new Date(v);_firstday=new Date(_n);_firstday.setDate(1);_firstday.setDate(1-(7+_firstday.getDay()-_k)%7);_firstday.setHours(0,0,0,0);_an(w);};var _an=function(w){var monthdata=(_x==2?"":_ar());var _ao=(_x==2?_ba():_ay());var _ap=new Date(w);var _aq=false;_ap=_ap.getDate()+" "+_bd(_ap.getMonth(),_aq)+" "+_ap.getFullYear();setPosition();$("divAirtradeCalendar"+_q).style.top=_ac+"px";$("divAirtradeCalendar"+_q).style.left=_ab+"px";$("displaymonth_"+_q).innerHTML=monthdata;$("displayDates_"+_q).innerHTML=_ao;if(_x==1){$("displaySelectedDate_"+_q).innerHTML=_ap;}};var _ar=function(){var startmonth=_m.getMonth();var _as=_m.getFullYear();var _at=0;var _au=new Array();var _av=new Array();for(var i=0;i<12;i++){_au[i]=startmonth++;_av[i]=_as;if(startmonth>=12){startmonth=startmonth-12;if(_at==0){_as=_as+1;_at++;}}}var _ao="<table class='cal-m'><tr>";var _aw=_n.getMonth();var _aq=false;for(var j=0;j<12;j++){var _ax=(_au[j]==_aw?'class="selected"':'');_ao+='<td '+_ax+'>';_ao+='<a href="javascript:'+_q+'.changeMonth(\''+_au[j]+'\',\''+_av[j]+'\')">'+_bd(_au[j],_aq)+'</a>';_ao+='</td>';if(j==5){_ao+="</tr><tr>";}}_ao+="</tr></table>";return _ao;};var _ay=function(){var _ao='';var _az=true;_ao+=_bc(_n,_az);_ao+=_cj(_n);return _ao;};var _ba=function(){var _ao='';var _az=false;_ao+="<table><tr>";_ao+="<td>";_ao+="<a href=javascript:"+_q+".changeDate('prev_month')><b class='cal-nav-arrow-left'>&nbsp;</b></a>";_ao+="</td>";var _bb=new Date(_n);_bb.setDate(1);for(var tlr=0;tlr<3;tlr++){_ao+='<td valign="top">';_ao+=_bc(_bb,_az);_ao+=_cj(_bb);_ao+="</td>";_bb.setMonth(_bb.getMonth()+1);}_ao+="<td>";_ao+="<a href=javascript:"+_q+".changeDate('next_month')><b class='cal-nav-arrow-right'>&nbsp;</b></a>";_ao+="</td>";_ao+="</tr></table>";return _ao;};var _bc=function(s,x){var _ao='';var _aq=true;_ao+="<table class='cal-nav'><tr>";_ao+="<td>";if(x){_ao+="<a href=javascript:"+_q+".changeDate('prev_month')><b class='cal-nav-arrow-left'>&nbsp;</b></a>";}_ao+=_bd(s.getMonth(),_aq)+' '+s.getFullYear();if(x){_ao+="<a href=javascript:"+_q+".changeDate('next_month')><b class='cal-nav-arrow-right'>&nbsp;</b></a>";}_ao+="</td>";_ao+="</tr></table>";return _ao;};this.getMonthName=function(y,z){return _bd(y,z);};var _bd=function(y,z){var months_1031=new Array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");var _be=new Array("Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez");var _bf=new Array("January","February","March","April","May","June","July","August","September","October","November","December");var _bg=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var _bh=_bf;var _bi=_bg;var _bj=new Array("Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December");var _bk=new Array("Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec");var _bl=_bj;var _bm=_bk;var _bn=new Array("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");var _bo=new Array("Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc");var _bp=_bn;var _bq=_bo;var _br=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");var _bs=new Array("Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic");var _bt="";switch(_r){case"1031":_bt=months_1031[y];break;case"1033":_bt=_bf[y];break;case"2057":_bt=_bh[y];break;case"1043":_bt=_bj[y];break;case"2067":_bt=_bl[y];break;case"1036":_bt=_bn[y];break;case"2060":_bt=_bp[y];break;case"1034":_bt=_br[y];break;default:_bt=_bf[y];}if(!z){if(_bt!='undefined'){switch(_r){case"1031":_bt=_be[y];break;case"1033":_bt=_bg[y];break;case"2057":_bt=_bi[y];break;case"1043":_bt=_bk[y];break;case"2067":_bt=_bm[y];break;case"1036":_bt=_bo[y];break;case"2060":_bt=_bq[y];break;case"1034":_bt=_bs[y];break;default:_bt=_bg[y];break;}}}return _bt;};var _bu=function(_a,z){var days_1031=new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");var _bv=new Array("So","Mo","Di","Mi","Do","Fr","Sa");var _bw=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");var _bx=new Array("Su","Mo","Tu","We","Th","Fr","Sa");var _by=_bw;var _bz=_bx;var _ca=new Array("Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag");var _cb=new Array("Zo","Ma","Di","Wo","Do","Vr","Za");var _cc=_ca;var _cd=_cb;var _ce=new Array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");var _cf=new Array("Di","Lu","Ma","Me","Je","Ve","Sa");var _cg=_ce;var _cg=_cf;var _ch=new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");var _ci=new Array("Do","Lu","Ma","Mi","Ju","Vi","Sá");var _bt="";switch(_r){case"1031":_bt=days_1031[_a];break;case"1033":_bt=_bw[_a];break;case"2057":_bt=_by[_a];break;case"1043":_bt=_ca[_a];break;case"2067":_bt=_cc[_a];break;case"1036":_bt=_ce[_a];break;case"2060":_bt=_cg[_a];break;case"1034":_bt=_ch[_a];break;default:_bt=_bw[_a];}if(!z){switch(_r){case"1031":_bt=_bv[_a];break;case"1033":_bt=_bx[_a];break;case"2057":_bt=_bz[_a];break;case"1043":_bt=_cb[_a];break;case"2067":_bt=_cd[_a];break;case"1036":_bt=_cf[_a];break;case"2060":_bt=days_short_2060[_a];break;case"1034":_bt=_ci[_a];break;default:_bt=_bx[_a];break;}}return _bt;};var _cj=function(s){var _ao='';var _ck=false;_ao+="<table class='cal-d'>";for(var n=0;n<7;n++){_ao+="<th scope='col' width=30>"+_bu((_k+n)%7,_ck)+"</th>";}var _cl=new Date(s);_cl.setDate(1);_cl.setDate(1-(7+_cl.getDay()-_k)%7);_cl.setHours(0,0,0,0);var _cm=new Date(_cl);_s.setHours(0,0,0,0);_t.setHours(0,0,0,0);var _cn=0;while(_cm.getMonth()==s.getMonth()||_cm.getMonth()==_cl.getMonth()){_ao+='<tr>';for(var _co=0;_co<7;_co++){_ao+="<td>";_ao+=_cp(_cm,s);_ao+="</td>";_cm.setDate(_cm.getDate()+1);}_ao+='</tr>';_cn++;}if((h==2)&&(_cn<6)){_ao+='<tr><td style="line-height: 22px;">&nbsp;</td></tr>';}_ao+="</table>";return _ao;};var _cp=function(_b,s){if((_b>=_s)&&(_b<=_t)){return _cs(_b,s);}else{return _cq(_b,s);}};var _cq=function(_b,s){var _c="n-a";if(_b.toDateString()==_m.toDateString()){_c+=" today";}if(_b.getMonth()!=s.getMonth()){_c+=' o-m';}var _cr=false;return _ct(_b,_c,_cr);};var _cs=function(_b,s){var _c="";var _cr=true;if((_b.toDateString()==_m.toDateString())&&(_b.getMonth()==s.getMonth())){_c+=" today";}if(_y!=null&&_y!="undefined"){if(_cu(_b)){_c+=" available";}else{_c+=" n-a";_cr=false;}}if((_b.toDateString()==w.toDateString())&&(_b.getMonth()==s.getMonth())){_c+=" selected";}if(_b.getMonth()!=s.getMonth()){_c='o-m';}return _ct(_b,_c,_cr);};var _ct=function(_b,_c,_d){var _ao="";if(_d){_ao+="<a ";if(h==1){_ao+="onmouseover='javascript:"+_q+".onDateHover("+_b.getTime()+")'";}_ao+=" href='javascript:"+_q+".setSelectedDate("+_b.getTime()+")' class='"+_c+"' >";_ao+=_b.getDate();_ao+="</a>";}else{_ao+="<a href='javascript:void(0)' class='"+_c+"' >";_ao+=_b.getDate();_ao+="</a>";}return _ao;};var _cu=function(_b){var t=0;var _cv=false;while(t<_y.length){if(_y[t]==getYYYYMMDD(_b)){_cv=true;break;}t++;}return _cv;};this.changeMonth=function(_e,_f){_am(new Date(_f,_e,1));};this.setSelectedDate=function(_g){w=new Date(_g);_al();if(_l){this.hide();}else{_an(w);}};this.onDateHover=function(_g){var _ap=new Date(_g);var _aq=false;_ap=_ap.getDate()+" "+_bd(_ap.getMonth(),_aq)+" "+_ap.getFullYear();if(_x==1){$("displaySelectedDate_"+_q).innerHTML=_ap;}};this.changeDate=function(_h){var _cw=new Date(_n);if(_h=="next_month"){_cw.setMonth(_cw.getMonth()+1);}if(_h=="prev_month"){_cw.setMonth(_cw.getMonth()-1);}if(_j){alert('startCalendar: '+_o.toDateString()+'\nendCalendar: '+_p.toDateString()+'\nchangedDate: '+_cw.toDateString());}if((_cw>=_o)&&(_cw<=_p)){_am(_cw);}};};CQS.Callback=new function(){this.doAsynchronousCallBack=function(a,b,d){if(!ValidateBrowserOnline()){return false;}this.Ajax.doAsynchronousCallBack(a,b,d,AjaxCallbackURL());};this.doAsyncCallback=function(a,f,g){if(!ValidateBrowserOnline()){return false;}var v='';var w=0;if(f.constructor==Array){if(f.length>0){for(w=0;w<f.length;w++){v+=f[w]+'##';}}}this.Ajax.doAsynchronousCallBack(a,v+'<?xml version="1.0" ?>'+this.getAllInputElementsAsXML(g),true,AjaxCallbackURL());};this.getAllInputElementsAsXML=function(h){var s='';var c;var x,y;var z;s='<form>';x=h.getElementsByTagName('INPUT');if(x.length>0){s+='<input>';for(z=0;z<x.length;z++){c=x[z];if(c.type=='radio'||c.type=='checkbox'){if(c.checked)s+='<field id="'+c.id+'" value="true"/>';else s+='<field id="'+c.id+'" value="false"/>';}else s+='<field id="'+c.id+'" value="'+c.value+'"/>';}s+='</input>';}y=h.getElementsByTagName('SELECT');if(y.length>0){s+='<select>';for(z=0;z<y.length;z++){c=y[z];s+='<field id="'+c.id+'" value="'+c.value+'"/>';}s+='</select>';}s+='</form>';return s;};this.abortAllCallbacks=function(){this.Ajax.abortAllCallbacks();};this.reloadUpdatePanel=function(a,b,j,d){if(!ValidateBrowserOnline()){return false;}this.Ajax.reloadUpdatePanel(a,b,j,d,AjaxCallbackURL());};this.doCallbackAndReloadUpdatePanel=function(a,b,j,k,l,d){this.reloadUpdatePanel(a,'DoCallback,'+a+','+b+',UPC,'+k+','+l,j,d);};this.doCallbackAndReloadMainContent=function(a,b,d){if(CQS_GetContentUpdatePanelID&&CQS_GetContentUpdatePanelCallbackID&&CQS_GetContentUpdatePanelCallbackArgs){this.doCallbackAndReloadUpdatePanel(a,b,CQS_GetContentUpdatePanelID(),CQS_GetContentUpdatePanelCallbackID(),CQS_GetContentUpdatePanelCallbackArgs(),d);}};this.Ajax=new function(){var _a=new Array();var _b=new Array();this.doAsynchronousCallBack=function(a,b,d,m){var _c="__EVENTTARGET=&"+"__CALLBACKID=__Page"+"&hidvsid="+document.getElementById('hidvsid').value+"&__CALLBACKPARAM="+_o(a,b,d,false);var _d=_n();var _e=new Object();_e.eventCallback=_v;_e.context=a;_e.errorCallback=_w;_e.async=true;_l(_a,_e);_d.onreadystatechange=_g;_e.xmlRequest=_d;if(CQS.Common.isDefined(m))_d.open("POST",m,true);else _d.open("POST",window.document.forms[0].action,true);_d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");_d.send(_c);};this.reloadUpdatePanel=function(a,b,j,d,m){var _c="__EVENTTARGET=&"+"__CALLBACKID=__Page"+"&hidvsid="+document.getElementById('hidvsid').value+"&__CALLBACKPARAM="+_o(a,b,d,true);var _d=_n();var _e=new Object();_e.eventCallback=_x;_e.context=a+','+j;_e.errorCallback=_af;_e.async=true;_l(_b,_e);_d.onreadystatechange=_g;_e.xmlRequest=_d;if(CQS.Common.isDefined(m))_d.open("POST",m,true);else _d.open("POST",window.document.forms[0].action,true);_d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");_d.send(_c);};this.pushToDifferentPage=function(a,b,m,d){var _c="__EVENTTARGET=&__CALLBACKID=__Page&__CALLBACKPARAM="+_o(a,b,d,false);var _d=_n();_d.open("POST",m,true);_d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");_d.send(_c);_d=null;};this.abortAllCallbacks=function(){var _f=_a.length;var ii=_f;while(ii-->0){if(_a[ii]!=null&&_a[ii]!=undefined){_a[ii].xmlRequest.abort();}}_a.length=0;var ii=_b.length;while(ii-->0){if(_b[ii]!=null&&_b[ii]!=undefined){_b[ii].xmlRequest.abort();}}_b.length=0;};this.isCallbackComplete=function(a){var _f=_a.length;var ii=_f;while(ii-->0){if(_a[ii]!=null&&_a[ii]!=undefined){if(_a[ii].context.indexOf(a)>-1){return'false';}}}return'true';};var _g=function(){for(i=0;i<_a.length;i++){n=_a[i];if(n&&n.xmlRequest&&(n.xmlRequest.readyState==4)){_a[i]=null;_h(n);return;}}for(i=0;i<_b.length;i++){n=_b[i];if(n&&n.xmlRequest&&(n.xmlRequest.readyState==4)){_b[i]=null;_h(n);return;}}};var _h=function(n){var response=n.xmlRequest.responseText;if(response.charAt(0)=="s"){if((typeof(n.eventCallback)!="undefined")&&(n.eventCallback!=null))n.eventCallback(response.substring(1),n.context);}else if(response.charAt(0)=="e"){if((typeof(n.errorCallback)!="undefined")&&(n.errorCallback!=null))n.errorCallback(response.substring(1),n.context);}else{var _i=response.indexOf("|");if(_i!=-1){var _j=parseInt(response.substring(0,_i));if(!isNaN(_j)){var _k=response.substring(_i+1,_i+_j+1);if((typeof(n.eventCallback)!="undefined")&&(n.eventCallback!=null)){n.eventCallback(response.substring(_i+_j+1),n.context);}}}}};var _l=function(o,p){var i;for(i=0;i<o.length;i++){if(!o[i])break;}o[i]=p;return i;};var _m=function(q){if(encodeURIComponent){return encodeURIComponent(q);}else{return escape(q);}};var _n=function(){var _d,e;try{_d=new XMLHttpRequest();}catch(e){try{_d=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}return _d;};var _o=function(a,b,d,r){var callBackStr="";if(CQS.Common.isDefined(a)&&CQS.Common.isDefined(b)){if(a.length>0||b.length>0){if(CQS.Common.isDefined(d)&&d==true){if((b+"").indexOf("DoCallback")>=0)callBackStr=b+"";else callBackStr=a+"##"+b;if(r)callBackStr=callBackStr+"ISUPC";}else{if((b+"").indexOf("DoCallback")>=0)callBackStr=b+"";else callBackStr=a+","+b;if(r)callBackStr=callBackStr+"ISUPC";}callBackStr=_m(callBackStr);}}return callBackStr;};var _p=function(t){var resEndIdx=t.indexOf("___");var _q=resEndIdx+3;var _r=t.length;var _s=t.substring(0,resEndIdx);var js=t.substring(_q,_r);if(js.length>0){eval(js);}return _s;};var _t=function(t){return t.substring(0,t.indexOf("___"));};var _u=function(t){var _q=t.indexOf("___")+3;var _r=t.length;return t.substring(_q,_r);};var _v=function(u,a){u=_p(u);if(u.indexOf("__Error")>=0){_w(u.substring(7,u.length),a);u="";return;}if(typeof(CQS_OnCompleteAsynch)!='undefined')CQS_OnCompleteAsynch(u,a);};var _w=function(u,a){if(typeof(CQS_OnErrorAsynch)!='undefined'){CQS_OnErrorAsynch(u,a);}};var _x=function(u,a){var responseJS=_u(u);u=_t(u);if(window.location.href.contains('Finalize.aspx')){while(u.contains("background-image: url('../../images/empty.gif');")){u=u.replace("background-image: url('../../images/empty.gif');","");}}var _y=a.indexOf(",");var _z=a.substring(_y+1,a.length);a=a.substring(0,_y);if(u.indexOf("__Error")>=0){_af(u.substring(7,u.length),a);u="";return;}var _aa=document.getElementById(_z);var _ab=document.createElement("div");_ab.style.display="none";_ab.innerHTML=u;var _ac=CQS.Common.getElementWithId(_ab,_z);var _ad=_aa.parentNode;if(_ac==null)return;if(_ad==null)return;_ac.parentNode.removeChild(_ac);var _ae=CQS.Common.getNextSibling(_aa);if(_ae!=null)_ad.insertBefore(_ac,_ae);else _ad.appendChild(_ac);_ad.removeChild(_aa);_ab=null;if(responseJS!=null&&responseJS.length>0){eval(responseJS);}setTimeout('RedrawFooter();',200);if(typeof(CQS_OnCompleteReloadUpdatePanel)!='undefined'){CQS_OnCompleteReloadUpdatePanel(a);}window.fireEvent('updatepanelcomplete',a);};var _af=function(u,a){if(typeof(CQS_OnErrorAsynch)!='undefined'){CQS_OnErrorAsynch(u,a);}};};}();CQS.ServerElement=new function(){var c=[];this.register=function(a){c.push(a);};this.get=function(b){var a="";for(var i=0;i<c.length;i++){a=c[i];if(a.indexOf(b)>=0){break;}}return document.getElementById(a);};};this._CQSNotificationArray=new Array();CQS.Notify=new function(){function NotificationElement(a,b,c,d,f,g){this.ElementID=a+'';this.NotifyText=b;this.ErrorText=c;this.Visible=false;this.ContainerID=d;this.HeaderID=g;this.TextID=f;};function Notification(h,j,k,l,m){this.ID=j;this.Left=0;if(CQS.Common.isDefined(k)){this.Left=k;}this.Top=0;if(CQS.Common.isDefined(l)){this.Top=l;}this.ElementType=h;this.m=false;if(CQS.Common.isDefined(m)){this.m=m;}this.Elements=new Array();this.Add=function(a,b,c,d,f,g){this.Elements[this.Elements.length]=new NotificationElement(a,b,c,d,f,g);};this.getElement=function(n){for(var i=0;i<this.Elements.length;i++){if(this.Elements[i].ElementID==n){return this.Elements[i];}}return null;};};this.create=function(h,j,k,l,m){if(!CQS.Common.isDefined(m)){m=false;}var _a=new Notification(h,j,k,l,m);var _c=document.getElementsByTagName(h);for(var i=0;i<_c.length;i++){if(CQS.Common.elementHasAttribute(_c[i],'CQSEnableNotification')&&CQS.Common.elementGetAttribute(_c[i],'CQSEnableNotification')=='true'&&_c[i].id!=null&&_c[i].id.length>0){var _d=document.createElement('div');_d.id=_c[i].id+'_NotifyContainer';_d.style.zIndex=999999;_d.style.display='none';_d.className='notificationpopup';var _e=document.createElement('div');_e.className='np-top';_d.appendChild(_e);var _f=document.createElement('div');_f.className='np-body';_d.appendChild(_f);var _g=document.createElement('h2');_g.id=_c[i].id+'_TextHeader';_f.appendChild(_g);var _h=document.createElement('p');_h.id=_c[i].id+'_TextContainer';_h.innerHTML='No body text provided';_f.appendChild(_h);var _i=document.createElement('div');_i.className='np-bottom';_d.appendChild(_i);document.body.appendChild(_d);if(!m){_c[i].style.borderTopWidth='1px';_c[i].style.borderLeftWidth='1px';_c[i].style.borderBottomWidth='1px';_c[i].style.borderRightWidth='1px';_c[i].style.borderTopStyle='solid';_c[i].style.borderLeftStyle='solid';_c[i].style.borderBottomStyle='solid';_c[i].style.borderRightStyle='solid';_c[i].style.borderColor='Silver';}_a.Add(_c[i].id,CQS.Common.elementGetAttribute(_c[i],'CQSNotifyText'),CQS.Common.elementGetAttribute(_c[i],'CQSErrorText'),_d.id,_h.id,_g.id);}};for(var _j=0;_j<_CQSNotificationArray.length;_j++){if(_CQSNotificationArray[_j].ElementType==h&&_CQSNotificationArray[_j].ID==j){_CQSNotificationArray[_j]=_a;return;}}_CQSNotificationArray[_CQSNotificationArray.length]=_a;};this.show=function(j,n,o,p,q){var r=_r(j);if(r!=null){var s=r.getElement(n);var _k='';var t='';if(CQS.Common.isDefined(p)&&p.length>0){_k=p;if(CQS.Common.isDefined(q)&&q.length>0){t=q;}}else{if(o=='error')_k=s.ErrorText;else _k=s.NotifyText;}_l(r,s,n,_k,t);return true;}return false;};var _l=function(r,s,n,p,t){var _b=$(s.ContainerID);var _m=$(s.HeaderID);var _n=$(s.TextID);var _o=$(n);if(CQS.Common.isDefined(t)&&t.length>0){_m.innerHTML=t;_m.style.height='';}else{_m.style.height='0px';}if(CQS.Common.isDefined(p)&&p.length>0){_n.innerHTML=p;}_b.x=_s(_o,'left')+r.Left;_b.y=_s(_o,'top')+r.Top;_b.style.left=_b.x-_u(_o,'rightedge',r,_b)+_o.offsetWidth+'px';_b.style.top=_b.y-_u(_o,'bottomedge',r,_b)+'px';if(!window.XMLHttpRequest){var _p=$("ifNotificationBlock");_p.style.left=_b.x-_u(_o,'rightedge',r,_b)+_o.offsetWidth+18+'px';_p.style.top=_b.y-_u(_o,'bottomedge',r,_b)-18+'px';_p.style.height=_o.offsetHeight+58;_p.style.zIndex=999998;_p.style.display='block';}_b.style.display='block';try{_o.style.border='red 1px solid';_o.focus();_o.select();}catch(e){}s.Visible=true;};this.redraw=function(){for(var _j=0;_j<_CQSNotificationArray.length;_j++){for(var _q=0;_q<_CQSNotificationArray[_j].Elements.length;_q++){if(_CQSNotificationArray[_j].Elements[_q].Visible){_l(_CQSNotificationArray[_j],_CQSNotificationArray[_j].Elements[_q],_CQSNotificationArray[_j].Elements[_q].ElementID,'');}}}};this.hide=function(j,n){var r=_r(j);if(r!=null){var s=r.getElement(n);$(s.ContainerID).style.display='none';_o=$(s.ElementID);_o.style.border='';if(!r.m){_o.style.borderTopWidth='1px';_o.style.borderLeftWidth='1px';_o.style.borderBottomWidth='1px';_o.style.borderRightWidth='1px';_o.style.borderTopStyle='solid';_o.style.borderLeftStyle='solid';_o.style.borderBottomStyle='solid';_o.style.borderRightStyle='solid';_o.style.borderColor='Silver';}s.Visible=false;if($("ifNotificationBlock")){$("ifNotificationBlock").style.display='none';}return true;}return false;};this.hideAll=function(){for(var _j=0;_j<_CQSNotificationArray.length;_j++){for(var _q=0;_q<_CQSNotificationArray[_j].Elements.length;_q++){if(_CQSNotificationArray[_j].Elements[_q].Visible){this.hide(_CQSNotificationArray[_j].ID,_CQSNotificationArray[_j].Elements[_q].ElementID);}}}};var _r=function(j){for(var i=0;i<_CQSNotificationArray.length;i++){if(_CQSNotificationArray[i].ID==j){return _CQSNotificationArray[i];}}return null;};var _s=function(u,v){var totaloffset=(v=='left')?u.offsetLeft:u.offsetTop;var _t=u.offsetParent;while(_t!=null){totaloffset=(v=='left')?totaloffset+_t.offsetLeft:totaloffset+_t.offsetTop;_t=_t.offsetParent;}return totaloffset;};var _u=function(w,z,_a,_b){if(z=='rightedge'){edgeoffsetx=0;var _v=isIE&&!window.opera?_x().scrollLeft+_x().clientWidth-15:window.pageXOffset+window.innerWidth-15;_b.contentmeasure=_b.offsetWidth;if(_v-_b.x<_b.contentmeasure)edgeoffsetx=_b.contentmeasure-w.offsetWidth;return edgeoffsetx;}else{edgeoffsety=0;var _w=isIE&&!window.opera?_x().scrollTop:window.pageYOffset;var _v=isIE&&!window.opera?_x().scrollTop+_x().clientHeight-15:window.pageYOffset+window.innerHeight-18;_b.contentmeasure=_b.offsetHeight;if(_v-_b.y<_b.contentmeasure)edgeoffsety=_b.contentmeasure+w.offsetHeight+(_a.Top*2);return edgeoffsety;}};var _x=function(){return(document.compatMode&&document.compatMode!='BackCompat')?document.documentElement:document.body};};CQS.SlideShowManger=new function(){var o=new Array();this.createNewSlideShow=function(a,b,c,d,f,g){var p=new CQS.SlideShow(a,b,c,d,f,g);o[o.length]=p;return p;};this.getSlideShow=function(a){for(var i=0;i<o.length;i++){if(o[i].ID==a){return o[i];}}return null;};};CQS.SlideShow=function(a,b,c,h,f,g){var q=function(j,k,l){this.isVisible=l;this.fx=j;this.ID=k.id;var r=k.className;var s=k;var t=k.parentNode;this.removeFromParent=function(){CQS.Common.removeChildNode(t,s);};this.addToParent=function(){CQS.Common.appendChildNode(t,s);};};this.EventHandlers=new function(){this.onSlideOutStart=undefined;this.onSlideInStart=undefined;this.onSlideOutComplete=undefined;this.onSlideInComplete=undefined;};this.ID=a;var u=h;var v=h.style.width.substring(0,h.style.width.indexOf('px'));var w=b;var x=c;var y=g;var f=f;var z=0;var _a=0;var _b=new Array();var _c=new Array();var _d=this.EventHandlers;var _e=false;var _f="right";$(w).addEvent('click',function(e){e=new Event(e);if(!_e&&_c.length>0){_e=true;_f="left";z=_a;if(_c.length>1){if(_a==0){_a=_c.length-1;}else{_a=_a-1;}}else{_a=0;}_h(_a);}e.stop();});$(x).addEvent('click',function(e){e=new Event(e);if(!_e&&_c.length>0){_e=true;_f="right";z=_a;if(_c.length>1){if(_a==_c.length-1){_a=0;}else{_a=_a+1;}}else{_a=0;}_h(_a);}e.stop();});this.addSlide=function(m){var _g=new Fx.Morph(u,{duration:f});_g.set({'width':'0px','margin-left':v+'px'});if(_c.length==0){_c[_c.length]=new q(_g,$(m),true);}else{_c[_c.length]=new q(_g,$(m),false);_c[_c.length-1].removeFromParent();}};var _h=function(n){_c[n].isVisible=true;_c[z].isVisible=false;if(_f=="left"){_c[z].fx.set({'width':'0px','margin-left':v+'px'});_c[z].fx.start({'width':v+'px','margin-left':'0px'});}else{_c[z].fx.set({'width':'0px','margin-left':'0px'});_c[z].fx.start({'width':v+'px','margin-left':'0px'});}setTimeout("CQS.SlideShowManger.getSlideShow('"+a+"').exchangeSlides()",f+100);};this.exchangeSlides=function(){_c[z].removeFromParent();_c[_a].addToParent();_c[_a].isVisible=true;if(_f=="right"){_c[_a].fx.set({'width':v+'px','margin-left':'0px'});_c[_a].fx.start({'width':'0px','margin-left':v+'px'});}else{_c[_a].fx.set({'width':v+'px','margin-left':'0px'});_c[_a].fx.start({'width':'0px','margin-left':'0px'});}setTimeout("CQS.SlideShowManger.getSlideShow('"+a+"').transitionEnded()",f+50);};this.transitionEnded=function(){_e=false;};};window['Airtrade']=new Object();var _a=(window.navigator.appName.toLowerCase().indexOf('explorer')==-1);var _b=true;function PreventSessionTimeout(){if(_b){_b=false;}else{CQS.Callback.Ajax.pushToDifferentPage('','',GetSessionExpireURL());}setTimeout('PreventSessionTimeout()',300000);};function fadeOut(a,b){if(document.getElementById){g=document.getElementById(a);if(b>=0){SetOpacity(g,b);b-=10;window.setTimeout("fadeOut('"+a+"',"+b+")",10);}else{g.style.display='none';}}};function PrintPage(){if(window.print){window.print();}else if(VBS){printIt();}else{alert('It is not possible to print this page from script. Please utilize your browsers print function to print this page.');}};function PrintContent(c,d){try{var _c=CQS.Common.getElementsWithIdContaining(document,c);for(var _d=0;_d<_c.length;_d++){var _e=_c[_d];if(_e.style.display!='none'){var _f=CQS.Common.getElementWithIdContaining(document,'divPrintLogo');var _g=_c[0];var _h=window.open('','','left=50,top=0,width=600,height=400,location=center,toolbar=0,scrollbars=1,status=0');_h.document.write("<html><head><link rel='stylesheet' type='text/css' href='/Styles/airtrade-home.css' /></head><body>"+_f.innerHTML+"<div class='"+d+"'>"+_g.innerHTML+"</div></body></html>");_h.document.close();_h.focus();_h.print();_h.close();}}}catch(e){alert('It is not possible to print this page from script. Please utilize your browsers print function to print this page.');}};function fadeIn(a,b){if(document.getElementById){g=document.getElementById(a);if(b<=100){SetOpacity(g,b);b+=5;window.setTimeout("fadeIn('"+a+"',"+b+")",10);}else{g.style.display='block';}}};function MakeTransparent(f){SetOpacity(f,0);};function SetOpacity(g,b){b=(b==100)?99.999:b;g.style.filter='alpha(opacity:'+b+')';g.style.KHTMLOpacity=b/100;g.style.MozOpacity=b/100;g.style.b=b/100;};var _i;function YT_top(){if(document.body.scrollTop!=0||document.documentElement.scrollTop!=0){window.scrollBy(0,-20);_i=setTimeout('YT_top()',10);}else clearTimeout(_i);};function YT_ScrollToTop(){window.scrollTo(0,0);};function YT_ScrollToElement(h){window.scrollTo(0,getPageY(h));};function YT_ScrollTo(x,y){window.scrollTo(x,y);};function YT_GetScrollX(){if(_a){return window.pageXOffset;}else{if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft;}else if(document.body){return document.body.scrollLeft;}}return 0;};function YT_GetScrollY(){if(_a){return window.pageYOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop;}else if(document.body){return document.body.scrollTop;}}return 0;};function YT_GetWindowHeight(){if(parseInt(navigator.appVersion)>3){if(navigator.appName=='Netscape'){return window.innerHeight;}if(navigator.appName.indexOf('Microsoft')!=-1){return document.body.offsetHeight;}}};function getPageX(e){if(!(e=xGetElementById(e)))return 0;var x=0;while(e){if(xDef(e.offsetLeft)){x+=e.offsetLeft;}e=xDef(e.offsetParent)?e.offsetParent:null;}return x;};function getPageY(e){if(!(e=xGetElementById(e))){return 0;}var y=0;while(e){if(xDef(e.offsetTop)){y+=e.offsetTop;}e=xDef(e.offsetParent)?e.offsetParent:null;}return y;};function xGetElementById(e){if(typeof(e)!='string'){return e;}if(document.getElementById){e=document.getElementById(e);}else if(document.all){e=document.all[e];}else{e=null;}return e;};function xDef(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false;}return true;};var _j=new Array();function DisableElement(h,j,k,l){var _k;var _l=document.getElementById(h+'iframe');if(_l==null||_l==undefined){_l=document.createElement('iframe');_l.id=h+'iframe';_l.src='../../block.aspx';_l.className='filterBlockIFrame';_l.frameBorder=0;_l.scrolling='no';_l.style.position='absolute';document.body.insertBefore(_l,document.body.firstChild);_k={ElementID:'',ElementWidth:0,ElementHeight:0};_k.ElementID=h;_k.ElementWidth=j;_k.ElementHeight=k;_j[_j.length]=_k;}else{_k=GetGrayOutObject(h);if(l==true){_k.ElementWidth=j;_k.ElementHeight=k;}}_l.style.top=getPageY(h)+'px';_l.style.left=getPageX(h)+'px';_l.style.width=_k.ElementWidth+'px';_l.style.height=_k.ElementHeight+'px';_l.style.display='block';};function EnableElement(h){var _l=document.getElementById(h+'iframe');if(_l!=null&&_l!=undefined){_l.style.display='none';}};function RedrawGrayOutIFrames(){for(ytCount=0;ytCount<_j.length;ytCount++){var _l=document.getElementById(_j[ytCount].ElementID+'iframe');if(_l!=null&&_l!=undefined){if(_l.style.display=='block'){DisableElement(_j[ytCount].ElementID,_j[ytCount].ElementWidth,_j[ytCount].ElementHeight,false);}}}};function GetGrayOutObject(h){for(ytCount=0;ytCount<_j.length;ytCount++){if(_j[ytCount].ElementID==h){return _j[ytCount];}}return null;};var LB={init:function(){var menu=document.getElementById('mainmenu');if(menu)new LB.Foldout(menu);var _m=document.getElementById('shoppingcart');if(_m)new LB.SimpleFoldout(_m);LB.EventListener.addEvent(document,'mouseup',LB.blurButtons);LB.EventListener.addEvent(window,'resize',RedrawGrayOutIFrames);},EventListener:{addEvent:function(m,n,o){try{m.addEventListener(n,o,false);}catch(e){m.attachEvent('on'+n,o);}},getTarget:function(e,p){var _n=e.target||e.srcElement;if(_n.nodeType>1){_n=_n.parentNode;}return p?LB.bubble(_n,p):_n;}},r:function(q,r){return function(){q.apply(r,arguments);}},bubble:function(s,n){var _o=new RegExp('^'+n+'$','i');while(s&&!_o.test(s.nodeName)){s=s.parentNode;}return s;},blurButtons:function(e){var _p=LB.EventListener.getTarget(e,'a');if(_p&&/button/i.test(_p.className)){_p.blur();}},ClassName:{add:function(s,p){s.className+=s.className?(' '+p):p;},remove:function(s,p){var _o=new RegExp('(^|\\s)'+p+'(\\s|$)','g');if(_o.test(s.className))s.className=s.className.replace(_o,' ');}}};LB.Foldout=function(t){this.container=t;this.current=null;this.coolDown=null;LB.EventListener.addEvent(t,'mouseover',LB.r(this.handleMouseover,this));LB.EventListener.addEvent(document,'mouseover',LB.r(this.handleMouseout,this));};LB.Foldout.prototype={LIST:/^li$/i,KEEPALIVE:1000,handleMouseover:function(e){this.close();var _n=LB.EventListener.getTarget(e,'li');if(_n){clearTimeout(this.coolDown);this.coolDown=null;var s=_n;while(s&&s!=this.container){if(this.LIST.test(s.nodeName)){LB.ClassName.add(s,'active');}s=s.parentNode;}this.current=_n;}},handleMouseout:function(e){if(this.current&&!this.coolDown){var s=LB.EventListener.getTarget(e);while(s){if(s==this.container)return;s=s.parentNode;}this.coolDown=setTimeout(LB.r(this.close,this),this.KEEPALIVE);}},close:function(){var s=this.current;while(s&&s!=this.container){if(this.LIST.test(s.nodeName)){LB.ClassName.remove(s,'active');}s=s.parentNode;}this.current=null;}};LB.SimpleFoldout=function(t){this.container=t;LB.EventListener.addEvent(t,'mouseover',LB.r(this.handleMouseover,this));LB.EventListener.addEvent(document,'mouseover',LB.r(this.handleMouseout,this));};LB.SimpleFoldout.prototype={KEEPALIVE:1000,handleMouseover:function(e){clearTimeout(this.coolDown);this.coolDown=null;if(!this.isOpen){LB.ClassName.add(this.container,'active');this.isOpen=true;}},handleMouseout:function(e){if(this.isOpen&&!this.coolDown){var s=LB.EventListener.getTarget(e);while(s){if(s==this.container)return;s=s.parentNode;}this.coolDown=setTimeout(LB.r(this.close,this),this.KEEPALIVE);}},close:function(){LB.ClassName.remove(this.container,'active');this.isOpen=false;if(this.container.id=='shoppingcart'){if(typeof(ShowSelectBoxInIE)!='undefined'){ShowSelectBoxInIE();}}}};LB.EventListener.addEvent(window,'load',function(){});function ValidateDayInput(u){ValidateNonDecimalNumericInput(u);};function ValidateDayOnBlur(u){ValidateNonDecimalNumericInput(u);if(u.value.length==0){u.value='DD';}else if(parseFloat(u.value)>31){u.value='31';}else if(parseFloat(u.value)<=0){u.value='1';}ValidateDayAgainstMonth(u);if(u.value.length==1){u.value='0'+u.value;}};function ValidateDayAgainstMonth(v){var _q=v.id.substring(0,v.id.indexOf('inDay'));var _r=_q+'inMonth';var _s=document.getElementById(_r);if(_s.value.length>0&&_s.value!='MM'&&v.value.length>0&&v.value!='DD'){var _t=parseFloat(_s.value);var _u=document.getElementById(_q+'inYear');if(_u.value.length>0&&_u.value!='YYYY'&&parseFloat(_u.value)==YT_GetCurrentYear()&&_t>YT_MonthOfYear()){_s.value=YT_MonthOfYear();if(_s.value.length==1){_s.value='0'+_s.value;}_t=YT_MonthOfYear();v.value='01';}if(_t==1||_t==3||_t==5||_t==7||_t==8||_t==10||_t==12){if(parseFloat(v.value)>31){v.value='31';}}else if(_t==4||_t==6||_t==9||_t==11){if(parseFloat(v.value)>30){v.value='30';}}else if(_t==2){if(YT_IsLeapYear()){if(parseFloat(v.value)>29){v.value='29';}}else{if(parseFloat(v.value)>28){v.value='28';}}}}};function ValidateMonthAgainstDay(w){var _v=document.getElementById(w.id.substring(0,w.id.indexOf('inMonth'))+'inDay');ValidateDayAgainstMonth(_v);};function ValidateMonthAndDayAgainstYear(z){var _v=document.getElementById(z.id.substring(0,z.id.indexOf('inYear'))+'inDay');ValidateDayAgainstMonth(_v);};function ValidateMonthInput(w){ValidateNonDecimalNumericInput(w);};function ValidateMonthOnBlur(w){ValidateNonDecimalNumericInput(w);if(w.value.length==0){w.value='MM';}else if(parseFloat(w.value)>12){w.value='12';}else if(parseFloat(w.value)<=0){w.value='01';}ValidateMonthAgainstDay(w);if(w.value.length==1){w.value='0'+w.value;}};function ValidateYearInput(u){ValidateNonDecimalNumericInput(u);};function ValidateYearOnBlur(u){ValidateNonDecimalNumericInput(u);if(u.value.length==0){u.value='YYYY';}else if(parseFloat(u.value)>YT_GetCurrentYear()||parseFloat(u.value)<1900){u.value=YT_GetCurrentYear();}if(parseFloat(u.value)==YT_GetCurrentYear()){ValidateMonthAndDayAgainstYear(u);}};function YT_ShowDelayedLoadingBox(a,b,c,d,e,f,g,h){CQS.AT.MessageBox.setupLoadingBoxAndShow(a,b,c,d,e,f,g,h);}function YT_ShowLoadingBox(a,b,c,d,f,g,h){YT_ShowDelayedLoadingBox(a,b,c,d,0,f,g,h);}function YT_HideLoadingBox(){HideWaitingScreen(true);}function YT_CancelLoadingBox(){Madurodam.Ajax.abortAllCallbacks();CQS.AT.MessageBox.cancelLoadingBox();}function YT_MessageBoxShowYesNo(a,b,c,d,i){return YT_MessageBoxShow(a,b,c,d,true,true,false,false,false,0,0,0,i);}function YT_MessageBoxShowYesNoCancel(a,b,c,d,i){return YT_MessageBoxShow(a,b,c,d,true,true,true,false,false,0,0,0,i);}function YT_MessageBoxShowYesCancel(a,b,c,d,i){return YT_MessageBoxShow(a,b,c,d,true,false,true,false,false,0,0,0,i);}function YT_MessageBoxShowOkClose(a,b,c,d,i){return YT_MessageBoxShow(a,b,c,d,false,false,false,true,true,0,0,0,i);}function YT_MessageBoxShowClose(a,b,c,d,i){return YT_MessageBoxShow(a,b,c,d,false,false,false,false,true,0,0,0,i);}function YT_MessageBoxShowOk(a,b,c,d,i,j){YT_MessageBoxShow(a,b,c,d,false,false,false,true,false,0,0,0,i,j);}function YT_MessageBoxShowOkDelayed(a,b,c,d,i,e){return setTimeout("YT_MessageBoxShow("+a+", "+b+", \""+c+"\", \""+d+"\", false, false, false, true, false, 0, 0, 0, \""+i+"\")",e);}function YT_MessageBoxShow(a,b,c,d,k,l,m,n,o,e,f,g,i,j){CQS.AT.MessageBox.setupMessageBoxAndShow(a,b,c,d,k,l,m,n,o,e,f,g,i,j);}function YT_MessageBoxHide(){CQS.AT.MessageBox.requestMessageBoxHide();}function MessageBoxHide(p,j){CQS.AT.MessageBox.hideMessageBox(p,j);}function MessageBoxShow(){CQS.AT.MessageBox.showMessageBox();}var t;function YT_MessageBoxShowSessionExpire(q,c,d){t=q;return YT_MessageBoxShow(400,200,c,d,false,false,false,true,false,0,0,0,"SessionExpireErrorOnClose");}function SessionExpireErrorOnClose(r){window.location.href=t;}function YT_MessageBoxShowErrorBox(c,d){return YT_MessageBoxShow(600,400,c,d,false,false,false,true,false,0,0,0,"ErrorBoxOnClose");}function YT_MessageBoxHandleOnHide(){if(typeof(YT_MessageBoxOnHide)!='undefined')YT_MessageBoxOnHide();}function DoNothing(){}function HideMessageBoxBlock(){CQS.Block.hide();CQS.CursorAnimation.StopAnimation();}function ShowMessageBoxBlock(){CQS.Block.show(0.01);}function EB(s){Madurodam.Block.hide();}function BB(s){if(!Madurodam.Block.isVisible()){Madurodam.Block.show(0.01);;}}function YT_DoAsynchronousCallBack(a,b,c){CQS.Callback.doAsynchronousCallBack(a,b,c);}function YT_ReloadUpdatePanelMSAjax(d,a,b){Sys.WebForms.PageRequestManager.getInstance()._doPostBack(d,a+','+b);}function YT_ReloadUpdatePanel(d,a,b){if(RadCallbackNamespace.Prefix!='undefined'&&RadCallbackNamespace.Prefix!=undefined){RadCallbackNamespace.AsyncRequest(d,a+','+b,d);}else{setTimeout("YT_ReloadUpdatePanel(\""+d+"\", \""+a+"\", \""+b+"\")",1000);}}function CQS_ReloadUpdatePanel(d,a,b){CQS.Callback.reloadUpdatePanel(a,b,d);}function CQS_DoCallbackAndReloadUpdatePanel(a,b,d,e,f){CQS.Callback.doCallbackAndReloadUpdatePanel(a,b,d,e,f);}function CQS_DoCallbackAndReloadMainContent(a,b){CQS.Callback.doCallbackAndReloadMainContent(a,b);}function CQS_OnErrorAsynch(g,a){}function CQS_GetContentUpdatePanelID(){if(typeof(GetContentUpdatePanelID)!='undefined'){return GetContentUpdatePanelID();}else{return"";}}function CQS_GetContentUpdatePanelCallbackID(){if(typeof(GetContentUpdatePanelCallbackID)!='undefined'){return GetContentUpdatePanelCallbackID();}else{return"";}}function CQS_GetContentUpdatePanelCallbackArgs(){if(typeof(GetContentUpdatePanelCallbackArgs)!='undefined'){return GetContentUpdatePanelCallbackArgs();}else{return"";}}function roundNumber(a,b){if(a>8191&&a<10485){a=a-5000;var c=Math.round(a*Math.pow(10,b))/Math.pow(10,b);}else{var c=Math.round(a*Math.pow(10,b))/Math.pow(10,b);}return c;}function ValidateEmailAddress(a){var c=document.getElementById(a).value.trim();var j=/^([\w\xc0-\xff-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
if(!j.test(c)){CQS.AT.ValidationMessage.show(a,InvalidEmailAddressMessage(),NotValidMessageHeader());return false;}return true;}function ValidateEmptyInput(a){var k=document.getElementById(a).value.trim();if(k.length<=0){CQS.AT.ValidationMessage.show(a,MandatoryFieldMessage(),NotValidMessageHeader());return false;}return true;}function ValidateNumeric(a){try{var l=document.getElementById(a).value.trim();for(i=0;i<l.length;i++){var m=parseInt(l.substring(i,i+1));if(m!=0&&m!=-0){if(!m){document.getElementById(a).value="";return false;}}}return true;}catch(err){document.getElementById(a).value="";return false;}}function ValidateAlpha(b){for(i=0;i<b.length;i++){if(!IsAlphaChar(b.substring(i,i+1))){return false;}}return true;}function ValidatePositive(a){var l=parseInt(document.getElementById(a).value);if(l<=0){l=1;document.getElementById(a).value="1";}return l;}function IsAlphaChar(c){if(((c>="a")&&(c<="z"))||((c>="A")&&(c<="Z"))||IsUmlaut(c)){return true;}return false;}function IsNumeric(d){var n="0123456789.";var o=true;var p;for(i=0;i<d.length&&o==true;i++){p=d.charAt(i);if(n.indexOf(p)==-1){o=false;}}return o;}function IsNumericChar(c){if((c>="0")&&(c<="9")){return true;}return false;}function IsSpace(c){if((c==" ")){return true;}return false;}function IsUmlaut(e){var q="üéâäàåçêëèïîìæÆôöòûùÿýáíóúñÑŠŽšœžŸÝÀÁÂÃÄÅÈÉÊËÌÍÎÏÐÒÓÔÕÖØÙÚÛÜãßÇŒ`´‘’'";var r;for(var s=0;s<e.length;s++){r=e.charAt(s);if(q.indexOf(r)==-1){return false;}}return true;};function ValidateTelephoneNumber(a){try{if(document.getElementById(a).value.trim().length<=0){CQS.AT.ValidationMessage.show(a,NotValidFieldMessage(),NotValidMessageHeader());return false;}var l=document.getElementById(a).value.trim();var t=l.substring(0,1)=="+"?true:false;if(t){if(l.length==1){CQS.AT.ValidationMessage.show(a,NotValidFieldMessage(),NotValidMessageHeader());return false;}l=l.substring(1,l.length);}for(i=0;i<l.length;i++){if(!(IsNumericChar(l.substring(i,i+1))||IsSpace(l.substring(i,i+1)))){CQS.AT.ValidationMessage.show(a,NotValidFieldMessage(),NotValidMessageHeader());return false;}}return true;}catch(err){CQS.AT.ValidationMessage.show(a,NotValidFieldMessage(),NotValidMessageHeader());return false;}}function IsTelephoneChar(c){if(c=="+"){return true;}return false;}function ValidateTelephoneInputBoxForKeyPress(a){ValidateTelephoneInput(document.getElementById(a));}function ValidateTelephoneInput(f){var u="";if(f.value.length==0){return;}for(i=0;i<f.value.length;i++){if(i==0&&(IsTelephoneChar(f.value.substring(i,i+1))==true||IsNumericChar(f.value.substring(i,i+1))==true)){u+=f.value.substring(i,i+1);}else if(i!=0&&(IsNumericChar(f.value.substring(i,i+1))||(IsSpace(f.value.substring(i,i+1))&&!IsSpace(f.value.substring(i-1,i))&&!IsTelephoneChar(f.value.substring(i-1,i))))){u+=f.value.substring(i,i+1);}}if(f.value.length!=u.length){f.value=u;}return;}function ValidateNonDecimalNumericInputBoxForKeyPress(a){ValidateNonDecimalNumericInput(document.getElementById(a));}function ValidateNonDecimalNumericInput(f){var u="";if(f.value.length==0){return;}for(i=0;i<f.value.length;i++){if(IsNumericChar(f.value.substring(i,i+1))){u+=f.value.substring(i,i+1);}}if(f.value.length!=u.length){f.value=u;}return;}function ValidateMaxNumericInputValue(g){try{var f=$(g);var v=f.getProperty('MaxNumericValue');if(v!=null&&v.length>0){if(parseFloat(f.value)>parseFloat(v)){f.value=v;}}}catch(err){}}function ValidateKeyPressNumeric(){if(IsNavigationKeyCode(event.h)){return true;}if(IsNumericKeyCode(event.h)){return true;}return false;}function IsNumericKeyCode(h){if(h>=48&&h<=57){return true;}else{return false;}}function IsNavigationKeyCode(h){if(h==8){return true;}if(h==9){return true;}if(h==27){return true;}if(h==16){return true;}if(h==17){return true;}if(h==18){return true;}if(h==91){return true;}if(h==37||h==38||h==39||h==40){return true;}return false;}CQS.CursorAnimation=new function(){var f=null;var g,h,i;this.showAnimation=false;this.document;this.defaultImageId='imgLoadingCursorAnimation';this.StartAnimation=function(a){try{if(f!=null){f.style.display='block';if(a){var j=CQS.Common.getElementWithIdContaining(document,a);CQS.CursorAnimation.showOnlyImageCursor(j.id);}else{var j=CQS.Common.getElementWithIdContaining(document,CQS.CursorAnimation.defaultImageId);CQS.CursorAnimation.showOnlyImageCursor(j.id);}CQS.CursorAnimation.showAnimation=true;CQS.Common.addEvent(document,'mousemove',CQS.CursorAnimation.moveMouse);}}catch(e){}};this.showOnlyImageCursor=function(b){var k=CQS.Common.getElementWithIdContaining(document,'ifLoadingAnimation');if(k){imgCursorIDs=k.getElementsByTagName('img');for(var l=0;l<imgCursorIDs.length;l++){if(imgCursorIDs[l].id.contains(b)){imgCursorIDs[l].style["display"]='';}else{imgCursorIDs[l].style["display"]='none';}}}};this.SubscribeToCursorAnimation=function(c){CQS.Common.addEvent(c,'mousemove',CQS.CursorAnimation.moveMouse);};this.StopAnimation=function(){try{f.style.display='none';CQS.CursorAnimation.showAnimation=false;CQS.Common.removeEvent(document,'mousemove',CQS.CursorAnimation.moveMouse);}catch(e){}};this.init=function(d){f=document.getElementById(d);};this.timerID=null;var m=false;var n=true;var o;this.moveMouse=function(e){if(CQS.CursorAnimation.showAnimation==true){e?g=e:g=event;if(parent){CQS.CursorAnimation.document?o=CQS.CursorAnimation.document:o=parent.document;}else{CQS.CursorAnimation.document?o=CQS.CursorAnimation.document:o=document;}scrollTop=CQS.Common.getScrollY();scrollLeft=o.documentElement&&o.documentElement.scrollLeft?o.documentElement.scrollLeft:o.body.scrollLeft;h=g.clientX-50;i=g.clientY+10;f.style.left=h+"px";f.style.top=i+"px";f.isVisible='true';f.style.display="block";}else{f.isVisible='false';f.style.display="none";}};this.moveMouseTransistion=function(e){if(CQS.CursorAnimation.showAnimation==true){e?g=e:g=event;scrollTop=document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;scrollLeft=document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;if(g.clientX>scrollLeft){h=g.clientX-scrollLeft+5;}else{h=g.clientX+scrollLeft+5;}if(g.clientY>scrollTop){i=g.clientY+scrollTop+5;}else{i=g.clientY-scrollTop+5;}f.isVisible='true';f.style.display="block";fx.start({'left':h,'top':i});}else{f.isVisible='false';f.style.display="none";}};};function YT_CalendarDaySelected(a,b){}function ToggleCalendar(c,d,e,f,g){var h=eval(c);if(!h.isVisible()){HideAllCalendars();h.show();}else{h.hide();}}function HideCalendar(c,d,e){var a=eval(c);if(typeof(a)!='undefined'){a.hide();}}function HideAllCalendars(){HideAllAirtradeCalendars();}this.CallbackSearchHotels=function(){if(!VerifyMinimumRoomsAndAdults()){YT_MessageBoxShowOk(350,150,GetMinTravellersNotSelectedHeader(),GetMinTravellersNotSelectedContent(),'DoNothing');return;}var j=[];var k=false;var l=false;var m=0;var n=$$('div[TravellerListItem=true]');for(var i=0;i<n.length;i++){if(n[i].getElement('input').checked){j.push(n[i].getElement('input').getProperty('personId'));}};if(j.length>GetNumberOfAdults()){YT_MessageBoxShowOk(350,150,GetMoreTravellersThanPeopleHeader(),GetMoreTravellersThanPeopleContent(),'DoNothing');return;}selectedTravellerList=j.toString();if(CQS.Common.getElementWithIdContaining(document,'optTravellerPreferences')!=null){k=CQS.Common.getElementWithIdContaining(document,'optTravellerPreferences').checked;}if(CQS.Common.getElementWithIdContaining(document,'optMyPreferences')!=null){l=CQS.Common.getElementWithIdContaining(document,'optMyPreferences').checked;}if(typeof HotelSearchGetMinStarsID=='function'){m=document.getElementById(HotelSearchGetMinStarsID()).value}var o=document.getElementById(HotelSearchGetMaxPriceID());HotelSearchRemoveDefaultText(o);var p=document.getElementById(HotelSearchGetHotelNameID());HotelSearchRemoveDefaultText(p);ShowWaitingScreen(GetSearchingForHotelsMessage());var q=document.getElementById(HotelSearchGetNrNightsID());var r=parseFloat(q.value);var s=HotelSearchGetArrivalDateInputObj().GetDate();var t=new Date();t.setFullYear(s.getFullYear(),s.getMonth(),s.getDate());t.setDate(s.getDate()+r);HotelSearchGetDepartureDateInputObj().SetDate(t);var u=HotelSearchGetArrivalDateInputObj().GetDate();var v=HotelSearchGetDepartureDateInputObj().GetDate();var w='';try{w=document.getElementById(HotelSearchGetLocationsID()).firstChild.value;}catch(ex1){try{w=document.getElementById(HotelSearchGetLocationsID()).value;}catch(ex2){}}YT_DoAsynchronousCallBack('HotelMainSearchClicked',w+'##'+document.getElementById(HotelSearchGetMaxPriceID()).value+'##'+document.getElementById(HotelSearchGetHotelNameID()).value+'##'+document.getElementById(HotelSearchGetOnlyAvailHotelsID()).checked+'##'+u.getFullYear()+'##'+(u.getMonth()+1)+'##'+u.getDate()+'##'+v.getFullYear()+'##'+(v.getMonth()+1)+'##'+v.getDate()+'##'+CollateRoomOccupancies()+'##'+selectedTravellerList+'##'+k+'##'+l+'##'+m,true);};this.GetNumberOfAdults=function(){var x=0;var y=$("tblRoomOccupancies").getElements("tr[name=rowRoomOccupancy]");var z=HotelSearchNumberOfRoomsSelected();for(var _a=0;_a<y.length;_a++){if(parseInt(CQS.Common.elementGetAttribute(y[_a],"roomOccupancyId"))<=parseInt(z)){x+=parseInt(CQS.Common.getElementWithIdContaining(y[_a],"ddlAdults").options[CQS.Common.getElementWithIdContaining(y[_a],"ddlAdults").selectedIndex].value);}}return x;};this.VerifyMinimumRoomsAndAdults=function(){var y=$("tblRoomOccupancies").getElements("tr[name=rowRoomOccupancy]");var _b=$('tblRoomOccupancies').getElement("tr[firstRow=true]");var _c=parseInt(CQS.Common.elementGetAttribute(_b,"minAdults"));var _d=HotelSearchNumberOfRoomsSelected();if(y.length>0){for(var _a=0;_a<y.length;_a++){if(parseInt(CQS.Common.elementGetAttribute(y[_a],"roomOccupancyId"))<=parseInt(_d)){var _e=CQS.Common.getElementWithIdContaining(y[_a],"ddlAdults").options[CQS.Common.getElementWithIdContaining(y[_a],"ddlAdults").selectedIndex].value;if(parseInt(_e)<_c){return false;}}}return true;}return false;};this.CollateRoomOccupancies=function(){var _f="";var y=$("tblRoomOccupancies").getElements("tr[name=rowRoomOccupancy]");var z=HotelSearchNumberOfRoomsSelected();for(var _a=0;_a<y.length;_a++){if(parseInt(CQS.Common.elementGetAttribute(y[_a],"roomOccupancyId"))<=parseInt(z)){var _e=CQS.Common.getElementWithIdContaining(y[_a],"ddlAdults").options[CQS.Common.getElementWithIdContaining(y[_a],"ddlAdults").selectedIndex].value;var _g=CQS.Common.getElementWithIdContaining(y[_a],"ddlChildren").options[CQS.Common.getElementWithIdContaining(y[_a],"ddlChildren").selectedIndex].value;_f+=_e+","+_g+"@";}}if(_f.length>0){_f=_f.substring(0,_f.length-1);}return _f;};this.HotelCallbackSearch=function(){CallbackSearchHotels();};var _h;this.HotelSearchNrNightsOnFocus=function(){_h=parseFloat(document.getElementById(HotelSearchGetNrNightsID()).value);};this.HotelSearchNrNightsOnBlur=function(){var q=document.getElementById(HotelSearchGetNrNightsID());if(q.value.length==0){q.value='1';}else{if(parseFloat(q.value)==0){q.value='1';}}var r=parseFloat(q.value);if(_h!=r){var _i=HotelSearchGetArrivalDateInputObj().GetDate();var s=new Date();s.setFullYear(_i.getFullYear(),_i.getMonth(),_i.getDate());s.setDate(s.getDate()+r);HotelSearchGetDepartureDateInputObj().SetDate(s);var u=HotelSearchGetArrivalDateInputObj().GetDate();YT_DoAsynchronousCallBack('UpdateHotelDepartureCalendar',u.getFullYear()+'##'+(u.getMonth()+1)+'##'+u.getDate()+'##'+s.getFullYear()+'##'+(s.getMonth()+1)+'##'+s.getDate(),true);_h=r;}};this.HotelSearchNrNightsKeyPressed=function(){if(parseInt($(HotelSearchGetNrNightsID()).value)>30){$(window).fireEvent('OverMaximumNrOfHotelNights');}ValidateNonDecimalNumericInputBoxForKeyPress(HotelSearchGetNrNightsID());ValidateMaxNumericInputValue(HotelSearchGetNrNightsID());};this.HotelSearchMaxPriceKeyPressed=function(a){ValidateNonDecimalNumericInputBoxForKeyPress(HotelSearchGetMaxPriceID());HotelSearchAddDefaultText(a);};this.HotelSearchRemoveDefaultText=function(b){if(b.value==GetNoPreferenceText()){b.value='';}};this.HotelSearchAddDefaultText=function(b){if(b.value==''){b.value=GetNoPreferenceText();}};this.HotelSearchMaximumPriceChanged=function(b){HotelSearchMaxPriceKeyPressed(b);};this.HotelSearchOnlyAvailHotelsChanged=function(){var _j=document.getElementById(HotelSearchGetMaxPriceID());_j.value=GetNoPreferenceText();if(document.getElementById(HotelSearchGetOnlyAvailHotelsID()).checked){_j.disabled=false;}else{_j.disabled=true;}};this.HotelSearchRADCalendarArrival_OnDaySelected=function(c,d){var _k=new Date();_k.setFullYear(d.getFullYear(),d.getMonth(),d.getDate());HotelSearchGetArrivalDateInputObj().SetDate(_k);HideCalendar(HotelSearchGetArrivalDatePickerContainerID());var v=HotelSearchGetDepartureDateInputObj().GetDate();YT_DoAsynchronousCallBack('UpdateHotelDepartureCalendar',d.getFullYear()+'##'+(d.getMonth()+1)+'##'+d.getDate()+'##'+v.getFullYear()+'##'+(v.getMonth()+1)+'##'+v.getDate(),true);};this.HotelSearchRADCalendarDeparture_OnDaySelected=function(c,d){var v=new Date();v.setFullYear(d.getFullYear(),d.getMonth(),d.getDate());HotelSearchGetDepartureDateInputObj().SetDate(v);HideCalendar(HotelSearchGetDepartureDatePickerContainerID());HotelSearchSetNrNights(HotelSearchGetArrivalDateInputObj().GetDate(),v);};this.HotelSearchSetNrNights=function(e,f){var _l=1000*60*60*24;document.getElementById(HotelSearchGetNrNightsID()).value=Math.ceil((f.getTime()-e.getTime())/(_l));};this.HotelsCalendarPopupOpened=function(g){if(typeof(HotelSearchGetArrivalDatePickerContainerID)!='undefined'){if(g==HotelSearchGetArrivalDatePickerContainerID()){HideCalendar(HotelSearchGetDepartureDatePickerContainerID());}else{HideCalendar(HotelSearchGetArrivalDatePickerContainerID());}}};this.ShowAutoCompleteNoResultsMessage=function(h){if(typeof(GetAutoCompleteNoResultsMessage)!='undefined'&&typeof(GetNoResultsMessage)!='undefined'){YT_MessageBoxShowOk(350,150,GetNoResultsMessage(),GetAutoCompleteNoResultsMessage(h),'DoNothing');}};this.HotelSearchHandleWindowOnResize=function(){if(typeof(RadComboBoxHandleWindowOnResize)!="undefined"){RadComboBoxHandleWindowOnResize();}};function CallbackSearchCarsMain(){var o="";var p=false;var q=false;var r=$$('div[TravellerListItem=true]');for(var i=0;i<r.length;i++){if(r[i].getElement('input').checked){o=r[i].getElement('input').getProperty('personId');}};if(CQS.Common.getElementWithIdContaining(document,'optTravellerPreferences')!=null){p=CQS.Common.getElementWithIdContaining(document,'optTravellerPreferences').checked;}if(CQS.Common.getElementWithIdContaining(document,'optMyPreferences')!=null){q=CQS.Common.getElementWithIdContaining(document,'optMyPreferences').checked;}YT_ShowDelayedLoadingBox(400,150,"",GetSearchingForCarsMessage(),0,2000,300000);var j=GetPickupDatePickerInput().GetDate();var k=GetDropoffDatePickerInput().GetDate();YT_DoAsynchronousCallBack('CarSearchClicked',$(GetDriverAgeListClientID()).value+'##'+$(GetACPickupLocationsClientID()).value+'##'+$(GetACDropoffLocationsClientID()).value+'##'+j.getFullYear()+'##'+(j.getMonth()+1)+'##'+j.getDate()+'##'+$(GetPickupTimeClientID()).value+'##'+k.getFullYear()+'##'+(k.getMonth()+1)+'##'+k.getDate()+'##'+$(GetDropoffTimeClientID()).value+'##'+$(GetCarTypeListClientID()).value+'##'+$(GetRentalCompanyListClientID()).value+'##'+o+'##'+p+'##'+q,true);};function CallbackSearchCarsSmall(){YT_ShowDelayedLoadingBox(400,150,"",GetSearchingForCarsMessage(),0,2000,300000);var j=GetPickupDatePickerInput().GetDate();var k=GetDropoffDatePickerInput().GetDate();YT_DoAsynchronousCallBack('CarSearchClicked',$(GetACPickupLocationsClientID()).value+'##'+$(GetACDropoffLocationsClientID()).value+'##'+j.getFullYear()+'##'+(j.getMonth()+1)+'##'+j.getDate()+'##'+$(GetPickupTimeClientID()).value+'##'+k.getFullYear()+'##'+(k.getMonth()+1)+'##'+k.getDate()+'##'+$(GetDropoffTimeClientID()).value+'##'+$(GetCarTypeListClientID()).value+'##'+$(GetRentalCompanyListClientID()).value,true);};function CarSearch_OnLoad(){try{$(GetDriverAgeListClientID()).focus();}catch(e){try{$(GetACPickupLocationsClientID()).focus();}catch(e){}}};function SetDropoffTimeToPickupTime(){if(!SameDaySelected()){$(GetDropoffTimeClientID()).selectedIndex=$(GetPickupTimeClientID()).selectedIndex;}};var s;function CarNrDaysOnFocus(){s=parseFloat($(GetNrDaysClientID()).value);};function CarNrDaysOnBlur(){var t=$(GetNrDaysClientID());if(t.value.length==0){t.value="1";}else{if(parseInt(t.value)==0){t.value="1";}}var u=parseInt(t.value);if(s!=u){var v=GetPickupDatePickerInput().GetDate();var w=new Date();w.setFullYear(v.getFullYear(),v.getMonth(),v.getDate());w.setDate(w.getDate()+u);GetDropoffDatePickerInput().SetDate(w);var j=v;YT_DoAsynchronousCallBack('UpdateCarDepartureCalendar',j.getFullYear()+'##'+(j.getMonth()+1)+'##'+j.getDate()+'##'+w.getFullYear()+'##'+(w.getMonth()+1)+'##'+w.getDate(),true);s=u;}};function NrDaysKeyPressed(){ValidateNonDecimalNumericInputBoxForKeyPress(GetNrDaysClientID());};function RefreshTimeSelectLists(a){var x=$(GetPickupTimeClientID());var y=$(GetDropoffTimeClientID());if(SameDaySelected()){var z=x.selectedIndex;var _a=y.selectedIndex+(48-y.options.length);if(a){x.options.length=0;}y.options.length=0;if(z==47){z=46;_a=0;}else{if(_a<=z){_a=0;}else{_a=_a-z-1;}}if(a){PopulateDDL(x,0,47);x.selectedIndex=z;}PopulateDDL(y,z+1,48);y.selectedIndex=_a;}else{var z=x.selectedIndex;var _a=y.selectedIndex+(48-y.options.length);if(a){x.options.length=0;}y.options.length=0;if(a){PopulateDDL(x,0,48);x.selectedIndex=z;}PopulateDDL(y,0,48);y.selectedIndex=_a;}window.setTimeout("SetNrDays(GetPickupDatePickerInput().GetDate(),GetDropoffDatePickerInput().GetDate())",100);};function PopulateDDL(b,c,f){for(cnt=c;cnt<f;cnt++){var _b;var _c;if((cnt%2)>0){_b=Math.floor(cnt/2)<10?"0"+Math.floor(cnt/2)+":30":Math.floor(cnt/2)+":30";_c=Math.floor(cnt/2)+".5";}else{_b=Math.floor(cnt/2)<10?"0"+Math.floor(cnt/2)+":00":Math.floor(cnt/2)+":00";_c=Math.floor(cnt/2);}b.options[b.length]=new Option(_b,_c);}};function SameDaySelected(){var j=GetPickupDatePickerInput().GetDate();var k=GetDropoffDatePickerInput().GetDate();if(j.getFullYear()==k.getFullYear()&&j.getMonth()==k.getMonth()&&j.getDate()==k.getDate()){return true;}return false;};function RADCalendarCarArrival_OnDaySelected(g,h){var d=new Date();d.setFullYear(h.getFullYear(),h.getMonth(),h.getDate());d.setHours(0,0,0,0);GetPickupDatePickerInput().SetDate(d);HideCalendar(GetPickupCalendarContainerClientID());var k=GetDropoffDatePickerInput().GetDate();YT_DoAsynchronousCallBack('UpdateCarDepartureCalendar',h.getFullYear()+'##'+(h.getMonth()+1)+'##'+h.getDate()+'##'+k.getFullYear()+'##'+(k.getMonth()+1)+'##'+k.getDate(),true);setTimeout("SetDropoffTimeToPickupTime()",1000);};function RADCalendarCarDeparture_OnDaySelected(g,h){var k=new Date();k.setFullYear(h.getFullYear(),h.getMonth(),h.getDate());k.setHours(0,0,0,0);GetDropoffDatePickerInput().SetDate(k);HideCalendar(GetDropoffCalendarContainerClientID());if($(GetDropoffTimeClientID()).options.length<48){window.setTimeout("RefreshTimeSelectLists(true);if (!SameDaySelected()) SetDropoffTimeToPickupTime();",100);}else{window.setTimeout("RefreshTimeSelectLists(true);",100);}};function SetNrDays(j,k){if(SameDaySelected()){$(GetNrDaysClientID()).value="1";}else{var _d=1000*60*60*24;var _e=parseFloat($(GetDropoffTimeClientID()).value);var _f=parseFloat($(GetPickupTimeClientID()).value);var _g=k.getTime()+1000*60*60*_e;var _h=j.getTime()+1000*60*60*_f;var _i=_g-_h;var u=Math.ceil(_i/_d);$(GetNrDaysClientID()).value=u;}};function CarsCalendarPopupOpened(l){if(typeof(GetPickupCalendarContainerClientID)!='undefined'){if(l==GetPickupCalendarContainerClientID()){HideCalendar(GetDropoffCalendarContainerClientID());}else if(l==GetDropoffCalendarContainerClientID()){HideCalendar(GetPickupCalendarContainerClientID());}}};function ShowAutoCompleteNoResultsMessage(m){if(typeof(GetAutoCompleteNoResultsMessage)!='undefined'&&typeof(GetNoResultsMessage)!='undefined'){YT_MessageBoxShowOk(350,150,GetNoResultsMessage(),GetAutoCompleteNoResultsMessage(m),"DoNothing");}};function PickUpTimeChanged(){var _j=$(GetPickupTimeClientID());if(SameDaySelected()){window.setTimeout("RefreshTimeSelectLists(false)",100);}else{SetNrDays(GetPickupDatePickerInput().GetDate(),GetDropoffDatePickerInput().GetDate());}};function DropOffTimeChanged(){SetNrDays(GetPickupDatePickerInput().GetDate(),GetDropoffDatePickerInput().GetDate());};function YT_ACDropdownClosing(n){if(typeof(GetACPickupLocationsClientID)!='undefined'){if(n.ClientID==GetACPickupLocationsClientID()&&$(n.InputID).value.length>=GetMinAutoCompleteLength()){if($(GetACDropoffLocations().InputID).value.length<=0){$(GetACDropoffLocations().InputID).value=$(n.InputID).value;eval(GetACDropoffLocationsClientID()+".la(false, 84)");}}}};function YT_ACDropdownOpening(n){if(typeof(GetACPickupLocationsClientID)!='undefined'){if(n.ClientID==GetACPickupLocationsClientID()){eval(GetACDropoffLocationsClientID()+".HideDropDown()");}else{eval(GetACPickupLocationsClientID()+".HideDropDown()");}}};CQS.AT.Flight=new function(){};CQS.AT.Flight.Search=new function(){var y=false;this.onLoad=function(){};this.showFlightSearchTab=function(a){switch(a){case 1:CQS.ServerElement.get('divFlightBox2').style.visibility='visible';CQS.ServerElement.get('divFlightBox2').style.height='auto';CQS.ServerElement.get('divFlightBox2Date').style.visibility='visible';CQS.ServerElement.get('divFlightBox2Date').style.height='auto';CQS.ServerElement.get('divFlightSearchReturnTab').style.visibility='visible';CQS.ServerElement.get('divFlightSearchOneWayTab').style.visibility='hidden';CQS.ServerElement.get('divFlightSearchMultiTripTab').style.visibility='hidden';CQS.ServerElement.get('optSearchReturn').checked=true;break;case 2:CQS.ServerElement.get('divFlightBox2').style.visibility='hidden';CQS.ServerElement.get('divFlightBox2').style.height='0px';CQS.ServerElement.get('divFlightBox2Date').style.visibility='hidden';CQS.ServerElement.get('divFlightSearchReturnTab').style.visibility='hidden';CQS.ServerElement.get('divFlightSearchOneWayTab').style.visibility='visible';CQS.ServerElement.get('divFlightSearchMultiTripTab').style.visibility='hidden';CQS.ServerElement.get('optSearchOneWay').checked=true;break;case 3:CQS.ServerElement.get('divFlightBox2').style.visibility='visible';CQS.ServerElement.get('divFlightBox2').style.height='auto';CQS.ServerElement.get('divFlightBox2Date').style.visibility='visible';CQS.ServerElement.get('divFlightBox2Date').style.height='auto';CQS.ServerElement.get('divFlightSearchReturnTab').style.visibility='hidden';CQS.ServerElement.get('divFlightSearchOneWayTab').style.visibility='hidden';CQS.ServerElement.get('divFlightSearchMultiTripTab').style.visibility='visible';CQS.ServerElement.get('optSearchMultiTrip').checked=true;break;}};this.showFlightResultsTab=function(a){document.getElementById('divFlightResultsReturn').style.display='none';document.getElementById('divFlightResultsCombineSingle').style.display='none';switch(a){case 1:document.getElementById('divFlightResultsReturn').style.display='block';document.getElementById('divFlightResultsCombineSingle').style.display='none';break;case 2:document.getElementById('divFlightResultsCombineSingle').style.display='block';document.getElementById('divFlightResultsReturn').style.display='none';break;}};this.addFlightLeg=function(){var z=0;var _a=0;var _b=document.getElementById('divFlightBoxParent');var _c=document.getElementById('prgAddButton');var _d=null;var _e=null;var _f=0;var _g=null;var _h=0;for(z=0;z<_b.childNodes.length;z++){if(_b.childNodes[z].nodeName=='DIV'){_h++;if(_b.childNodes[z].style.display=='none'){_d=_b.childNodes[z];break;}else _e=_b.childNodes[z];}_a++;}if(_h>3){_g=_e.getElementsByTagName("A");if(_g.length>0){_g[0].style.display='none';}}_d.style.display='';for(z=_a;z<_b.childNodes.length;z++){if(_b.childNodes[z].nodeName=='DIV'){if(_b.childNodes[z].style.display=='none'){_f=1;break;}}}if(!_f){_c.style.display='none';}RedrawFooter();};this.removeFlightLeg=function(){var _b=document.getElementById('divFlightBoxParent');var _c=document.getElementById('prgAddButton');var _e=null;var _j=null;var z=0;var _h=0;var _k=0;var _g=null;for(z=_b.childNodes.length-1;z>=0;z--){if(_b.childNodes[z].nodeName=='DIV'){_h++;if(_b.childNodes[z].style.display==''){_k++;if(_k==1)_e=_b.childNodes[z];else if(_k==2){_j=_b.childNodes[z];break;}}}}_c.style.display='';_e.style.display='none';if(_j){_g=_j.getElementsByTagName("A");if(_g.length>0){_g[0].style.display='';}}RedrawFooter();};this.RADCalendarDeparture1_OnDaySelected=function(b,e){var d=new Date();d.setFullYear(e.getFullYear(),e.getMonth(),e.getDate());d.setHours(0,0,0,0);getDepart1DatePickerInput().SetDate(d);HideCalendar(getDepart1CalendarContainerClientID());CQS.Callback.doAsyncCallback('FlightSearchUpdateCalendar',new Array([getDepart1DatePickerClientID()]),document.getElementById('divFlightSearchForm'));};this.RADCalendarDeparture2_OnDaySelected=function(b,e){var d=new Date();d.setFullYear(e.getFullYear(),e.getMonth(),e.getDate());d.setHours(0,0,0,0);getDepart2DatePickerInput().SetDate(d);HideCalendar(getDepart2CalendarContainerClientID());window.setTimeout("CQS.AT.Flight.Search.RefreshTimeSelectLists()",100);};this.DepartureTimeChanged=function(f){window.setTimeout("CQS.AT.Flight.Search.RefreshTimeSelectLists()",100);};this.SameDaySelected=function(g,h){if(g.getFullYear()==h.getFullYear()&&g.getMonth()==h.getMonth()&&g.getDate()==h.getDate()){return true;}return false;};this.RefreshTimeSelectLists=function(){if(this.SameDaySelected(getDepart1DatePickerInput().GetDate(),getDepart2DatePickerInput().GetDate())){this.RefreshTimePairWithSameDate(CQS.ServerElement.get('ddlDepartTimeCache'),CQS.ServerElement.get('ddlDepart1Time'),CQS.ServerElement.get('ddlDepart2Time'));}else{this.RefreshTimeList(CQS.ServerElement.get('ddlDepartTimeCache'),CQS.ServerElement.get('ddlDepart1Time'));this.RefreshTimeList(CQS.ServerElement.get('ddlDepartTimeCache'),CQS.ServerElement.get('ddlDepart2Time'));}};this.RefreshTimeLists=function(i,j,k,l,m){if(this.SameDaySelected(i.GetDate(),j.GetDate())){this.RefreshTimePairWithSameDate(k,l,m);}else{this.RefreshTimeList(k,l);this.RefreshTimeList(k,m);}};this.RefreshTimeList=function(n,o){if(n.options.length!=o.options.length){var _l=o.value;o.options.length=0;this.PopulateTimeDDL(n,o,0,n.options.length);o.value=_l;}};this.RefreshTimePairWithSameDate=function(n,p,q){var _m=p.selectedIndex;var _n=q.selectedIndex+(p.options.length-q.options.length);p.options.length=0;q.options.length=0;if(_m==48){_m=47;_n=0;}else{if(_n<=_m){_n=0;}else{_n=_n-_m;}}this.PopulateTimeDDL(n,p,0,48);this.PopulateTimeDDL(n,q,_m+1,49);p.selectedIndex=_m;q.selectedIndex=_n;};this.PopulateTimeDDL=function(r,t,u,v){for(Idx=u;Idx<v;Idx++){t.options[t.length]=new Option(r[Idx].text,r[Idx].value);}};this.traverseDOMTreeInputs=function(w){var s='';var c;var _o,_p;var _q;_o=w.getElementsByTagName('INPUT');_p=w.getElementsByTagName('SELECT');for(_q=0;_q<_o.length;_q++){c=_o[_q];if(c.type=='radio'||c.type=='checkbox'){if(c.checked)s+='<'+c.id+' v="true"/>';else s+='<'+c.id+' v="false"/>';}else s+='<'+c.id+' v="'+c.value.replace(/\s/,"")+'"/>';}for(_q=0;_q<_p.length;_q++){c=_p[_q];s+='<'+c.id+' v="'+c.value.replace(/\s/,"")+'"/>';}return s;};};CQS.AT.Flight.Callback=new function(){this.searchFlightsMain=function(){YT_ShowDelayedLoadingBox(400,150,"",GetSearchingForFlightsMessage(),0,2000,300000);CQS.Callback.doAsyncCallback('FlightSearchAdvancedClicked',GetSelectedTravelers(),document.getElementById('divFlightSearchForm'));};this.searchFlightsHome=function(){YT_ShowDelayedLoadingBox(400,150,"",GetSearchingForFlightsMessage(),0,2000,300000);CQS.Callback.doAsyncCallback('FlightSearchHomeClicked',[],document.getElementById('divFlightSearchForm'));};this.searchFlightsSmall=function(){YT_ShowDelayedLoadingBox(400,150,"",GetSearchingForFlightsMessage(),0,2000,300000);CQS.Callback.doAsyncCallback('FlightSearchSmallClicked',[],document.getElementById('divFlightSearchForm'));};this.selectFlightsMain=function(){var _r=location.href;var z=_r.indexOf('RIA');window.setTimeout("window.location.href = '"+_r.substr(0,z+3)+"/FlightReserve/FlightSelected/FlightSelected.aspx'",500);};function GetSelectedTravelers(){var _s=$$('input[groupName=TravellerList]');if(_s.length==0){return[];}var _t=new Array();for(var _i=0;_i<_s.length;_i++){if(_s[_i].checked){_t.push(_s[_i].getProperty('personId'));}}return _t;};};FlightsCalendarPopupOpened=function(x){if(typeof(getDepart1CalendarContainerClientID)!='undefined'){if(x==getDepart1CalendarContainerClientID()){HideCalendar(getDepart2CalendarContainerClientID());}else if(x==getDepart2CalendarContainerClientID()){HideCalendar(getDepart1CalendarContainerClientID());}}};window.addEvent('ondomready',function(){CQS.AT.Flight.Search.onLoad();});CQS.AT.Flights=new function(){};CQS.AT.Flights.FlightResults=new function(){this.SetDepartureTab=function(a,b){$$('#divDepartureContainer li').each(function(c){var li=$(c);li.hasChild(a.target!=null?a.target:a.srcElement)?li.addClass('active'):li.removeClass('active');});ShowFilteringResultsBox();Madurodam.Ajax.reloadUpdatePanel('FilterByDepartureAirport',b,GetMatrixAndResultsContainer());};this.SetSelectedTab=function(d){CQS.ServerElement.get('tabFlightResultsSummary').className='';CQS.ServerElement.get('tabFlightResultsCombined').className='';switch(d){case 1:CQS.ServerElement.get('tabFlightResultsSummary').className='active';CQS.ServerElement.get('divFlightResultsSummaryContainer').style.display='';CQS.ServerElement.get('divFlightResultsCombinedContainer').style.display='none';CQS.ServerElement.get('divFlightResultsCombinedFooter').style.display='';break;case 2:CQS.ServerElement.get('tabFlightResultsCombined').className='active';CQS.ServerElement.get('divFlightResultsSummaryContainer').style.display='none';CQS.ServerElement.get('divFlightResultsCombinedContainer').style.display='';CQS.ServerElement.get('divFlightResultsCombinedFooter').style.display='none';break;}RedrawFooter();};this.ToggleSearchAndFilters=function(f){switch(f){case true:CQS.ServerElement.get('divFlightSearchSmallContainer').style.display='none';CQS.ServerElement.get('divFlightResultsFilterBoxContainer').style.display='';break;case false:CQS.ServerElement.get('divFlightSearchSmallContainer').style.display='';CQS.ServerElement.get('divFlightResultsFilterBoxContainer').style.display='none';break;}RedrawFooter();};var _b=null;this.ShowFlightDetailsAndConditions=function(g,h){window.open(GetDetailsAndConditionsSRCForFlights(g,h),"FlightsDetailsAndConditions","status=0, toolbar=0, location=0, menubar=0, directory=0, scrollbars=1, resizable, height=525px, width=750px");};this.HideGeneralConditions=function(){_b.hide();};this.GetDualTimeSliderUpperCountLimit=function(){try{if(CQS.ServerElement.get('rowInboundTimeFilterHeaders').style.display!='none'){return 4;}return 2;}catch(e){return 2;}};this.ToggleOutboundSliderFilterVisibility=function(i){CQS.AT.Flights.FlightResults.ToggleOutboundSliderFilter(CQS.Common.getElementWithIdContaining(document,'rbFilterOutboundSlidersLeave').checked,i);};this.ToggleInboundSliderFilterVisibility=function(i){CQS.AT.Flights.FlightResults.ToggleInboundSliderFilter(CQS.Common.getElementWithIdContaining(document,'rbFilterInboundSlidersLeave').checked,i);};this.ToggleOutboundSliderFilter=function(j){CQS.AT.Flights.FlightResults.ToggleOutboundSliderFilter(j,false);};this.ToggleOutboundSliderFilter=function(j,i){var _c=CQS.Common.getElementWithIdContaining(document,'chkOutboundTimeFilter');var _d=CQS.Common.getElementWithIdContaining(document,'rowOutboundTimeFilterHeaders');var _e=CQS.Common.getElementWithIdContaining(document,'divFilterOutboundLeave');var _f=CQS.Common.getElementWithIdContaining(document,'divFilterOutboundArrive');if(_e!=null&&_f!=null){var _g=CQS.Common.getElementsWithIdContaining(document,'divBGTimeMinMax');var _h;var _i;for(var _j=0;_j<_g.length;_j++){if($(_g[_j]).get('id').contains('ctlTimeFilterDepartureLeave')){_h=_g[_j];}if($(_g[_j]).get('id').contains('ctlTimeFilterDepartureArrive')){_i=_g[_j];}}if(_c.checked){_d.style.display='';if(j){_e.style.display='';_f.style.display='none';}else{_e.style.display='none';_f.style.display='';}}else{_d.style.display='none';_e.style.display='none';_f.style.display='none';if(i){var _k=CQS.Common.getElementWithIdContaining(_h,'hidRawMinTime').value;var _l=CQS.Common.getElementWithIdContaining(_h,'hidRawMaxTime').value;var _m=CQS.Common.getElementWithIdContaining(_h,'hidRawCurrMinTime').value;var _n=CQS.Common.getElementWithIdContaining(_h,'hidRawCurrMaxTime').value;var _o=CQS.Common.getElementWithIdContaining(_i,'hidRawMinTime').value;var _p=CQS.Common.getElementWithIdContaining(_i,'hidRawMaxTime').value;var _q=CQS.Common.getElementWithIdContaining(_i,'hidRawCurrMinTime').value;var _r=CQS.Common.getElementWithIdContaining(_i,'hidRawCurrMaxTime').value;if(_k!=_m||_l!=_n||_o!=_q||_p!=_r){CQS.AT.Flights.FlightResults.ResetOutboundSliderFilters(_e,_f,_k,_l,_o,_p);CQS.Common.getElementWithIdContaining(document,'rbFilterOutboundSlidersLeave').checked=true;}}}}};this.ToggleInboundSliderFilter=function(j){CQS.AT.Flights.FlightResults.ToggleInboundSliderFilter(j,false);};this.ToggleInboundSliderFilter=function(j,i){var _c=CQS.Common.getElementWithIdContaining(document,'chkInboundTimeFilter');var _s=CQS.Common.getElementWithIdContaining(document,'rowInboundTimeFilterHeaders');var _t=CQS.Common.getElementWithIdContaining(document,'divFilterInboundLeave');var _u=CQS.Common.getElementWithIdContaining(document,'divFilterInboundArrive');if(_t!=null&&_u!=null){var _g=CQS.Common.getElementsWithIdContaining(document,'divBGTimeMinMax');var _v;var _w;for(var _j=0;_j<_g.length;_j++){if($(_g[_j]).get('id').contains('ctlTimeFilterReturnLeave')){_v=_g[_j];}if($(_g[_j]).get('id').contains('ctlTimeFilterReturnArrive')){_w=_g[_j];}}if(_c.checked){_s.style.display='';if(j){_t.style.display='';_u.style.display='none';}else{_t.style.display='none';_u.style.display='';}}else{_s.style.display='none';_t.style.display='none';_u.style.display='none';if(i){var _k=CQS.Common.getElementWithIdContaining(_v,'hidRawMinTime').value;var _l=CQS.Common.getElementWithIdContaining(_v,'hidRawMaxTime').value;var _m=CQS.Common.getElementWithIdContaining(_v,'hidRawCurrMinTime').value;var _n=CQS.Common.getElementWithIdContaining(_v,'hidRawCurrMaxTime').value;var _o=CQS.Common.getElementWithIdContaining(_w,'hidRawMinTime').value;var _p=CQS.Common.getElementWithIdContaining(_w,'hidRawMaxTime').value;var _q=CQS.Common.getElementWithIdContaining(_w,'hidRawCurrMinTime').value;var _r=CQS.Common.getElementWithIdContaining(_w,'hidRawCurrMaxTime').value;if(_k!=_m||_l!=_n||_o!=_q||_p!=_r){CQS.AT.Flights.FlightResults.ResetInboundSliderFilters(_t,_u,_k,_l,_o,_p);CQS.Common.getElementWithIdContaining(document,'rbFilterInboundSlidersLeave').checked=true;}}}}};this.ResetOutboundSliderFilters=function(k,l,m,n,o,p){var _x=k.style.display;var _y=l.style.display;k.style.display='';CQS.Slider.SliderManager.get('DepartureLeaveTimeFilterChanged').reset(m,n);k.style.display=_x;l.style.display='';CQS.Slider.SliderManager.get('DepartureArriveTimeFilterChanged').reset(o,p);l.style.display=_y;CQS.Slider.DualFilterCallback('OutboundTimeFilterReset',GetFlightResultsDetailsUpdatePanel(),'UpdateResults',0,0);};this.ResetInboundSliderFilters=function(q,r,m,n,o,p){var _x=q.style.display;var _y=r.style.display;q.style.display='';CQS.Slider.SliderManager.get('ReturnLeaveTimeFilterChanged').reset(m,n);q.style.display=_x;r.style.display='';CQS.Slider.SliderManager.get('ReturnArriveTimeFilterChanged').reset(o,p);r.style.display=_y;CQS.Slider.DualFilterCallback('InboundTimeFilterReset',GetFlightResultsDetailsUpdatePanel(),'UpdateResults',0,0);};this.SelectFlight=function(s){var _z=CQS.Common.getElementEndingWithId(document,'divFlightProperties_'+s);var _aa=CQS.Common.elementGetAttribute(_z,'SelectedOutboundLegId');var _ab=CQS.Common.elementGetAttribute(_z,'SelectedInboundLegId');YT_ShowLoadingBox(350,200,'',ShowSelectingFlight(),1000,0);YT_DoAsynchronousCallBack('SelectFlight',s+'##'+_aa+'##'+_ab,true);};this.SelectFlightLeg=function(t,u){var _ac=CQS.Common.getElementEndingWithId(document,t);var _ad=CQS.Common.elementGetAttribute(_ac,'FlightId');var _ae=CQS.Common.getElementEndingWithId(document,'divFlightProperties_'+_ad);var _af=CQS.Common.elementGetAttribute(_ae,'SelectedOutboundLegId');var _ag=CQS.Common.elementGetAttribute(_ae,'SelectedInboundLegId');var _ah=CQS.Common.elementGetAttribute(_ae,'AdditionalLegsVisible');var _ai=CQS.Common.getElementsWithIdContaining(_ac.parentNode,"rdSelectLeg");var _aj=CQS.Common.elementGetAttribute(_ac,'SectionIsOutbound');if(_ah=='true'){for(var _ak=0;_ak<_ai.length;_ak++){var _al=_ai[_ak];var _am=CQS.Common.elementGetAttribute(_al.parentNode.parentNode,'SectionIsOutbound');if(_am==_aj){if(_al.checked==true){CQS.AT.Flights.FlightResults.SetAllLegsUnSelected(_al.parentNode.parentNode);}else{_al.parentNode.parentNode.className=CQS.AT.Flights.FlightResults.RemoveSelectedLegStyle(_al.parentNode.parentNode.className);CQS.Common.elementSetAttribute(_al.parentNode.parentNode,'SegmentIsSelected',"false");_al.checked=false;}}}if(_aj=='true'){_af=CQS.Common.elementGetAttribute(_ac,'LegId');CQS.Common.elementSetAttribute(_ae,'SelectedOutboundLegId',''+_af+'');}else{_ag=CQS.Common.elementGetAttribute(_ac,'LegId');CQS.Common.elementSetAttribute(_ae,'SelectedInboundLegId',''+_ag+'');}CQS.AT.Flights.FlightResults.SetAllLegsSelected(_ac);YT_DoAsynchronousCallBack('SetSelectedLegs',_ad+'##'+_af+'##'+_ag,true);}};this.SetAllLegsSelected=function(v){var _an=CQS.Common.elementGetAttribute(v,"selectlegid");var _ao=v.previousSibling;v.className=CQS.AT.Flights.FlightResults.AddSelectedLegStyle(v.className);CQS.Common.elementSetAttribute(v,'SegmentIsSelected',"true");CQS.AT.Flights.FlightResults.SetCheckBox(v,true);while(_ao){if(_ao.tagName=="TR"||_ao.tagName=="TH"){var _ap=CQS.Common.elementGetAttribute(_ao,"selectlegid");if(_ap){if(_ap==_an){_ao.className=CQS.AT.Flights.FlightResults.AddSelectedLegStyle(_ao.className);CQS.Common.elementSetAttribute(_ao,'SegmentIsSelected',"true");CQS.AT.Flights.FlightResults.SetCheckBox(_ao,true);}else{break;}}}_ao=_ao.previousSibling;}var _aq=v.nextSibling;while(_aq){if(_aq.tagName=="TR"||_aq.tagName=="TH"){var _ar=CQS.Common.elementGetAttribute(_aq,"selectlegid");if(_ar){if(_ar==_an){_aq.className=CQS.AT.Flights.FlightResults.AddSelectedLegStyle(_aq.className);CQS.Common.elementSetAttribute(_aq,'SegmentIsSelected',"true");CQS.AT.Flights.FlightResults.SetCheckBox(_aq,true);}else{break;}}}_aq=_aq.nextSibling;}};this.SetCheckBox=function(w,x){u=CQS.Common.getElementWithIdContaining(w,"rdSelectLeg");if(u){u.checked=x;}};this.SetAllLegsUnSelected=function(v){var _an=CQS.Common.elementGetAttribute(v,"selectlegid");var _ao=v.previousSibling;v.className=CQS.AT.Flights.FlightResults.RemoveSelectedLegStyle(v.className);CQS.Common.elementSetAttribute(v,'SegmentIsSelected',"false");CQS.AT.Flights.FlightResults.SetCheckBox(v,false);while(_ao){if(_ao.tagName=="TR"||_ao.tagName=="TH"){var _ap=CQS.Common.elementGetAttribute(_ao,"selectlegid");if(_ap){if(_ap==_an){_ao.className=CQS.AT.Flights.FlightResults.RemoveSelectedLegStyle(_ao.className);CQS.Common.elementSetAttribute(_ao,'SegmentIsSelected',"false");CQS.AT.Flights.FlightResults.SetCheckBox(_ao,false);}else{break;}}}_ao=_ao.previousSibling;}var _aq=v.nextSibling;while(_aq){if(_aq.tagName=="TR"||_aq.tagName=="TH"){var _ar=CQS.Common.elementGetAttribute(_aq,"selectlegid");if(_ar){if(_ar==_an){_aq.className=CQS.AT.Flights.FlightResults.RemoveSelectedLegStyle(_aq.className);CQS.Common.elementSetAttribute(_aq,'SegmentIsSelected',"false");CQS.AT.Flights.FlightResults.SetCheckBox(_aq,false);}else{break;}}}_aq=_aq.nextSibling;}};this.AddSelectedLegStyle=function(y){var _as="selected";var _at=" ";var _au=y.trim();if(_au!=""&&_au.indexOf(_as)==-1){_au=_au+_at+_as;}else if(_au==""){_au=_as;}return _au;};this.RemoveSelectedLegStyle=function(y){var _as="selected";var _au=y.trim();if(_au.indexOf(_as)>-1){_au=_au.substring(0,_au.indexOf(_as));}return _au.trim();};this.ToggleFlightAdditionalLegs=function(s){var _z=CQS.Common.getElementEndingWithId(document,'divFlightProperties_'+s);var _av=CQS.Common.elementGetAttribute(_z,'AdditionalLegsVisible');var _aw=CQS.Common.getElementEndingWithId(document,'spacerOutboundInbound_'+s);if(_av=='true'){if(_aw){_aw.style.display="none";}CQS.Common.elementSetAttribute(_z,'AdditionalLegsVisible','false');this.RefreshFlight(s);}else{if(_aw){_aw.style.display="";}CQS.Common.elementSetAttribute(_z,'AdditionalLegsVisible','true');this.RefreshFlight(s);}RedrawFooter();};this.RefreshFlight1=function(s){var _z=CQS.Common.getElementEndingWithId(document,'divFlightProperties_'+s);var _av=CQS.Common.elementGetAttribute(_z,'AdditionalLegsVisible');var _ax=CQS.Common.elementGetAttribute(_z,'SegmentID');if(_av=='false'){var _ay=CQS.Common.getElementsWithIdContaining(_z.parentNode,_ax);for(var cnt=0;cnt<_ay.length;cnt++){var _az=_ay[cnt];_az.style["cursor"]="default";_az.className='';}}else{var _ay=CQS.Common.getElementsWithIdContaining(_z.parentNode,_ax);for(var cnt=0;cnt<_ay.length;cnt++){var _az=_ay[cnt];_az.style.display='';_az.style["cursor"]="pointer";}}};this.RefreshFlight=function(s){var _z=CQS.Common.getElementEndingWithId(document,'divFlightProperties_'+s);var _av=CQS.Common.elementGetAttribute(_z,'AdditionalLegsVisible');var _ba=CQS.Common.elementGetAttribute(_z,'ShowOtherTimesID');var _bb=CQS.Common.getElementEndingWithId(_z.parentNode,_ba);var _bc=CQS.Common.elementGetAttribute(_z,'FlightLegBodyID');var _bd=CQS.Common.elementGetAttribute(_z,'FlightLegRowBottom');var _be=CQS.Common.getElementEndingWithId(_z.parentNode,_bc);var _bf=CQS.Common.getElementEndingWithId(_z.parentNode,_bd);var _ax=CQS.Common.elementGetAttribute(_z,'SegmentID');if(_av=='false'){_be.className='';_bf.style.display='none';_bb.innerHTML=ShowOtherTimes();var _ay=CQS.Common.getElementsEndingWithId(_z.parentNode,_ax);for(var cnt=0;cnt<_ay.length;cnt++){var _az=_ay[cnt];var _bg=CQS.Common.elementGetAttribute(_az,'SegmentIsSelected');if(_bg=='false'){_az.style.display='none';}else{var _bh=CQS.Common.elementGetAttribute(_az,'SegmentIsInFirstLeg');var _bi=CQS.Common.elementGetAttribute(_az,'SegmentIsFirst');var _bj=CQS.Common.elementGetAttribute(_az,'SectionIsInbound');var _bk=CQS.Common.elementGetAttribute(_az,'SectionIsOutbound');if(_bh=='true'){if(_bi=='true'){_az.className='';}else{_az.className='continued';}}else{if(_bi=='true'){_az.className='';}else{_az.className='continued';}}var _bl=CQS.Common.elementGetAttribute(_az,'SegmentFirstCellId');var _bm=CQS.Common.elementGetAttribute(_az,'SegmentLastCellId');var _bn=CQS.Common.getElementWithIdContaining(_az.parentNode,_bl);var _bo=CQS.Common.getElementWithIdContaining(_az.parentNode,_bm);_bn.className='';_bo.className='';}_az.style["cursor"]="default";}}else{_be.className='flight-times';_bf.style.display='';_bb.innerHTML=CloseOtherTimes();var _ay=CQS.Common.getElementsEndingWithId(_z.parentNode,_ax);for(var cnt=0;cnt<_ay.length;cnt++){var _az=_ay[cnt];_az.style.display='';var _bh=CQS.Common.elementGetAttribute(_az,'SegmentIsInFirstLeg');var _bi=CQS.Common.elementGetAttribute(_az,'SegmentIsFirst');var _bp=CQS.Common.elementGetAttribute(_az,'SegmentIsLastInbound');var _bj=CQS.Common.elementGetAttribute(_az,'SectionIsInbound');var _bk=CQS.Common.elementGetAttribute(_az,'SectionIsOutbound');if(_bh=='true'){if(_bi=='true'){if(_bj=='true'){_az.className='return-section';}else if(_bk=='true'){_az.className='';}}else{_az.className='continued';}}else{if(_bi=='true'){_az.className='';}else{_az.className='continued';}}var _bg=CQS.Common.elementGetAttribute(_az,'SegmentIsSelected');_bf.className='continued';if(_bg=='true'){_az.className=_az.className+' selected';if(_bp=='true'){_bf.className='continued selected';}}_az.style["cursor"]="pointer";}}};this.RefreshResultsCounters=function(z,_a){if(parseInt(_a)>0){CQS.Common.getElementWithIdContaining(document,'lblVisibleResultsCount').innerHTML=z;CQS.Common.getElementWithIdContaining(document,'divResultsCounters').style.display="inline";}else{CQS.Common.getElementWithIdContaining(document,'divResultsCounters').style.display="none";}};};;CQS.Hover=new function(){var i=document.createElement("div");var j=document.createElement("div");var k=document.createElement("div");var l,m,n,o,p,q,r,t,u,v,w,y,z,_a,_b,_c,_d,_e,_f,_g;_e=false;u=10;v=10;p=0;q=0;this.init=function(){i.style.position="absolute";i.style.display='none';i.isVisible='false';document.body.insertBefore(i,document.body.firstChild);};var _h=function(){};var _i=function(){j.innerHTML='<img  style="vertical-align:middle"  src="info.gif">&nbsp;&nbsp;'+j.innerHTML;j.style.fontWeight='bold';j.style._y='150px';j.style.fontFamily='arial';j.style.border='1px solid #A5CFE9';j.style.padding='3';j.style.fontSize='11';j.style.color='#4B7A98';j.style.background='#D5EBF9';j.style.filter='alpha(opacity=85)';j.style.opacity='0.85';};var _j=function(){k.style.borderBottom='1px solid #A5CFE9';k.style.borderLeft='1px solid #A5CFE9';k.style.borderRight='1px solid #A5CFE9';k.style._y='150px';k.style.fontFamily='arial';k.style.fontSize='11';k.style.padding='3';k.style.color='#1B4966';k.style.background='#FFFFFF';k.style.filter='alpha(opacity=85)';k.style.opacity='0.85';};var _k=function(a){if(!a||typeof(a)!='string')return false;if((a.indexOf('div=')>-1||a.indexOf('body=')>-1)&&(a.indexOf('[')>-1)&&(a.indexOf('[')>-1))return true;else return false;};var _l=function(b){if(_k(b.title)){b.boHDR=_m('CQS.Hover.header',b.title);b.boBDY=_m('CQS.Hover.body',b.title);b.boDIV=_m('CQS.Hover.div',b.title);b.boCSSMAIN=_m('CQS.Hover.cssmain',b.title);b.boCSSBDY=_m('CQS.Hover.cssbody',b.title);b.boCSSHDR=_m('CQS.Hover.cssheader',b.title);b.IEbugfix=(_m('CQS.Hover.hideselects',b.title)=='on')?true:false;b.fixX=parseInt(_m('CQS.Hover.fixedrelx',b.title));b.fixY=parseInt(_m('CQS.Hover.fixedrely',b.title));b.absX=parseInt(_m('CQS.Hover.fixedabsx',b.title));b.absY=parseInt(_m('CQS.Hover.fixedabsy',b.title));b.offY=(_m('CQS.Hover.offsety',b.title)!='')?parseInt(_m('offsety',b.title)):10;b.offX=(_m('CQS.Hover.offsetx',b.title)!='')?parseInt(_m('offsetx',b.title)):10;b.fade=(_m('CQS.Hover.fade',b.title)=='on')?true:false;b.fadespeed=(_m('CQS.Hover.fadespeed',b.title)!='')?_m('fadespeed',b.title):0.04;b.delay=(_m('CQS.Hover.delay',b.title)!='')?parseInt(_m('delay',b.title)):0;if(_m('CQS.Hover.requireclick',b.title)=='on'){b.requireclick=true;document.all?b.attachEvent('onclick',showHideBox):b.addEventListener('click',showHideBox,false);document.all?b.attachEvent('onmouseover',hideBox):b.addEventListener('mouseover',hideBox,false);}else{if(_m('CQS.Hover.doubleclickstop',b.title)!='off'){document.all?b.attachEvent('ondblclick',_ad):b.addEventListener('dblclick',_ad,false);}if(_m('CQS.Hover.singleclickstop',b.title)=='on'){document.all?b.attachEvent('onclick',_ad):b.addEventListener('click',_ad,false);}}b.windowLock=_m('windowlock',b.title).toLowerCase()=='off'?false:true;b.title='';b.hasbox=1;}else{b.hasbox=2;}};var _m=function(c,f){var reg=new RegExp('([^a-zA-Z]'+c+'|^'+c+')\\s*=\\s*\\[\\s*(((\\[\\[)|(\\]\\])|([^\\]\\[]))*)\\s*\\]');var _n=reg.exec(f);var _o;if(_n){return _n[2].replace('[[','[').replace(']]',']');}else{return'';}};var _p=function(g){var x=0;if(g.calcLeft){return g.calcLeft;}var _q=g;while(g){if((g.currentStyle)&&(!isNaN(parseInt(g.currentStyle.borderLeftWidth)))&&(x!=0)){x+=parseInt(g.currentStyle.borderLeftWidth);}x+=g.offsetLeft;g=g.offsetParent;}_q.calcLeft=x;return x;};var _r=function(g){var x=0;if(g.calcTop){return g.calcTop;}var _q=g;while(g){if((g.currentStyle)&&(!isNaN(parseInt(g.currentStyle.borderTopWidth)))&&(x!=0)){x+=parseInt(g.currentStyle.borderTopWidth);}x+=g.offsetTop;g=g.offsetParent;}_q.calcTop=x;return x;};var ah,ab;var _s=function(){if(ab){i.removeChild(k);}if(ah){i.removeChild(j);}_w.boCSSMAIN?i.className=_w.boCSSMAIN:_h();ah=false;ab=false;if(_w.boHDR!=''){j=document.createElement("div");_w.boCSSHDR?j.className=_w.boCSSHDR:_i();j.innerHTML=_w.boHDR;i.appendChild(j);ah=true;}if(_w.boBDY!=''){k=document.createElement("div");_w.boCSSBDY?k.className=_w.boCSSBDY:_j();k.innerHTML=_w.boBDY;i.appendChild(k);ab=true;}if(_w.boDIV!=''){k=document.createElement("div");_w.boCSSBDY?k.className=_w.boCSSBDY:_j();k.innerHTML=document.getElementById(_w.boDIV).innerHTML;i.appendChild(k);ab=true;}};var _t,_u,_v,_w,_x,_g,_f,_y,_z;var ini=false;var SHW=function(){if(document.body&&(document.body.clientWidth!=0)){_y=document.body.clientWidth;_z=document.body.clientHeight;}if(document.documentElement&&(document.documentElement.clientWidth!=0)&&(document.body.clientWidth+20>=document.documentElement.clientWidth)){_y=document.documentElement.clientWidth;_z=document.documentElement.clientHeight;}return[_y,_z];};this.timerID=null;var _aa=false;var _ab=true;this.moveMouse=function(e){_ab=false;if(_aa==false){_aa=true;_ab=true;e?_b=e:_b=event;_t=_b.target?_b.target:_b.srcElement;if(!_t.hasbox){iElem=_t;while((iElem.parentNode)&&(!iElem.hasbox)){_l(iElem);iElem=iElem.parentNode;}}if(!_ab){_aa=false;return;}if((_t!=_v)&&(!_ag(_t,j))&&(!_ag(_t,k))){if(!_t.boxItem){_u=_t;while((_u.hasbox==2)&&(_u.parentNode)){_u=_u.parentNode;}_t.boxItem=_u;}_u=_t.boxItem;if(!_ab){_aa=false;return;}if(_t.boxItem&&(_t.boxItem.hasbox==1)){_x=_w;_w=_u;if(_w!=_x){_s();if(!_w.requireclick&&_ab){if(_w.fade){if(this.timerID!=null)clearTimeout(this.timerID);this.timerID=setTimeout("CQS.Hover.fadeIn1("+_w.fadespeed+")",_w.delay);}else{if(this.timerID!=null){clearTimeout(this.timerID);}COL=1;if(_x){if(_x.hasbox==1){this.timerID=null;}else{if(_w.delay==0){CQS.Hover.showHideBox();CQS.Hover.timerID=null;}else{this.timerID=setTimeout("CQS.Hover.showHideBox();CQS.Hover.timerID=null;",_w.delay);}}}else{if(_w.delay==0){CQS.Hover.showHideBox();CQS.Hover.timerID=null;}else{this.timerID=setTimeout("CQS.Hover.showHideBox();CQS.Hover.timerID=null;",_w.delay);}}}}if(!_ab){this.timerID=null;}if(_w.IEbugfix){_aj();}n=!isNaN(_w.fixX)?_p(_w)+_w.fixX:_w.absX;o=!isNaN(_w.fixY)?_r(_w)+_w.fixY:_w.absY;p=0;q=0;m=true;u=_w.offX?_w.offX:10;v=_w.offY?_w.offY:10;if(CQS.Common.elementHasAttribute(_t,'ToolTipEnabled')&&CQS.Common.elementGetAttribute(_t,'ToolTipEnabled')=='true'){u=25;v=15;}}}else if(!_ag(_t,j)&&!_ag(_t,k)&&(m)){if(!_ab){_aa=false;return;}if((!_ag(_w,_t))||(_t.tagName!='TABLE')){_w=null;if(this.timerID!=null){clearTimeout(this.timerID);}_af();_ai();}}if(!_ab){_aa=false;return;}_v=_t;}else if(((_ag(_t,j)||_ag(_t,k))&&(m))){_g=0;_f=0;if(!_ab){_aa=false;return;}_u=_t;while(_u){if(!isNaN(parseInt(_u.scrollTop))){_f+=parseInt(_u.scrollTop);}if(!isNaN(parseInt(_u.scrollLeft))){_g+=parseInt(_u.scrollLeft);}_u=_u.parentNode;}if(!_ab){_aa=false;return;}if(_w!=null){w=_p(_w)-_g;y=parseInt(_p(_w)+_w.offsetWidth)-_g;z=_r(_w)-_f;_a=parseInt(_r(_w)+_w.offsetHeight)-_f;_ac();}}if(!_ab){_aa=false;return;}if(m&&_w){bodyScrollTop=document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;bodyScrollLet=document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;_c=_b.pageX?_b.pageX-bodyScrollLet:_b.clientX-document.body.clientLeft;_d=_b.pageY?_b.pageY-bodyScrollTop:_b.clientY-document.body.clientTop;if(!_ab){_aa=false;return;}_d<-v?q=-_d-v:q=0;_c<-u?p=-_c-u:p=0;_d>(SHW()[1]-i.offsetHeight-v)?q=-_d+SHW()[1]-i.offsetHeight-v:q=q;_c>(SHW()[0]-k.offsetWidth-u)?p=-_c-u+SHW()[0]-k.offsetWidth:p=p;i.style.left=((n)||(n==0))?n:bodyScrollLet+_c+u+p-10+"px";i.style.top=((o)||(o==0))?o:bodyScrollTop+_d+v+q+"px";}_aa=false;}};var _ac=function(){if((_c<w)||(_c>y)||(_d<z)||(_d>_a)){if(!_w.requireclick){_af();}if(_w.IEbugfix){_ai();}_w=null;}};var _ad=function(e){e?_b=e:_b=event;m=false;_b.cancelBubble=true;};this.showHideBox=function(e){if(i.isVisible=='false'){i.style.display='block';i.isVisible='true';}else{i.style.display='none';i.isVisible='false';}};function hideBox(e){i.style.display='none';i.isVisible='false';};var COL=0;var _ae=false;this.fadeIn1=function(h){this.timerID=null;COL=0;i.style.display='block';i.isVisible='true';};this.fadeIn2=function(h){COL=COL+h;COL=(COL>1)?1:COL;i.style.filter='alpha(opacity='+parseInt(100*COL)+')';i.style.opacity=COL;if(COL<1){setTimeout("CQS.Hover.fadeIn2("+h+")",20);}};var _af=function(){i.style.display='none';i.isVisible='false';};var _ag=function(s,d){while(s){if(s==d){return true;}s=s.parentNode;}return false;};var _ah;this.checkMove=function(e){e?_b=e:_b=event;_ah=_b.target?_b.target:_b.srcElement;if((!m)&&(!_ag(_ah,i))){_af();if(_w&&_w.IEbugfix){_ai();}m=true;_w=null;}};var _ai=function(){};var _aj=function(){};};CQS.Common.addEvent(window,'load',CQS.Hover.init);CQS.Common.addEvent(document,'mousemove',CQS.Hover.moveMouse);CQS.Common.addEvent(document,'click',CQS.Hover.checkMove);(function(){window['Madurodam']={};})();Madurodam.Block=new function(){var c;this.init=function(a,b){if(!$defined(c)){c=$('ifYTBlock');if(a!=null&&a!=""){c.src=a;}}if(!$defined(c)){c=new IFrame({'frameBorder':'0','src':a,'allowTransparency':true,'scrolling':'no','class':'waitScreenBlockIFrame','styles':{'top':0,'left':0,'border':'none','zIndex':10000,'display':'none','position':'absolute','opacity':b}});document.body.insertBefore(c,document.body.firstChild);}};var d=false;this.setup=function(b){if($defined(b)){c.setStyle('opacity',b);}};this.show=function(b){d=false;if($defined(b)){c.setStyle('opacity',b);}SetBlockWidthAndHight();c.setStyle('position','absolute');c.setStyle('display','block');};this.redraw=function(){if($defined(c)){if(c.getStyle('display')==="block"){SetBlockWidthAndHight();}}};this.hide=function(){d=true;setTimeout("Madurodam.Block.private_hide()",200);};this.private_hide=function(){if(typeof(c)!='undefined'){if(c.style.display=="block"&&d){c.setStyle('display','none');d=false;}}};this.isVisible=function(){if(!$defined(c)){return true;}return(c.getStyle('display')==='block');};function SetBlockWidthAndHight(){if($(window).getScroll().x>0){if(BrowserDetect.browser==='Safari'||BrowserDetect.browser==='Chrome'){if(window.getScrollSize().y>window.getSize().y){c.setStyle('width',$(window).getScrollSize().x-18+'px');}else{c.setStyle('width',$(window).getScrollSize().x+'px');}}else{c.setStyle('width',$(window).getScrollSize().x+'px');}}else{if(BrowserDetect.browser==='Safari'||BrowserDetect.browser==='Chrome'){if(window.getScrollSize().y>window.getSize().y){c.setStyle('width',$(window).getSize().x-18+'px');}else{c.setStyle('width',$(window).getSize().x+'px');}}else{c.setStyle('width',$(window).getSize().x+'px');}}c.setStyle('height',$(window).getScrollSize().y+'px');};}();window.addEvent('ondomready',function(){Madurodam.Block.init(GetBlockSRC(),0.5);window.addEvent('resize',Madurodam.Block.redraw);window.addEvent('scroll',Madurodam.Block.redraw);});Madurodam.Ajax=new function(){this.doCallback=function(a,d,f){if(_m()){this._ajax.doCallback(a,d,f);}};this.reloadUpdatePanel=function(a,d,g,f){if(_m()){this._ajax.reloadUpdatePanel(a,d,g,f);}};this.doCallbackAndReloadUpdatePanel=function(a,d,g,h,j,f){if(_m()){this._ajax.doCallbackAndReloadUpdatePanel(a,d,g,h,j,f);}};this.doCallbackAndReloadMainContent=function(a,d,f){if(_m()){if(typeof(Madurodam_GetContentUpdatePanelID)!='undefined'&&typeof(Madurodam_GetContentUpdatePanelCallbackID)!='undefined'&&typeof(Madurodam_GetContentUpdatePanelCallbackData)!='undefined'){this._ajax.doCallbackAndReloadUpdatePanel(a,d,Madurodam_GetContentUpdatePanelID(),Madurodam_GetContentUpdatePanelCallbackID(),Madurodam_GetContentUpdatePanelCallbackData(),f);}}};this.doCallbackToDifferentUrl=function(a,d,k,f){this._ajax.doCallbackToDifferentUrl(a,d,k,f);};this.expandTemplate=function(a,d,l,m,f){if(f==undefined||f==null){f=new Object();}f.templateElementId=l;f.targetElementId=m;f.onCompleteHandler=_l;this._ajax.doCallback(a,d,f);};this.abortAllCallbacks=function(){this._ajax.abortAllCallbacks();};this.registerScript=function(o){var _j=document.getElementsByTagName('head')[0];var _k=$(document.createElement('script'));_k.setProperty('type','text/javascript');_k.text=o;_j.appendChild(_k);};var _l=function(p,q){_expandTemplate(q.templateElementId,q.targetElementId,p)};var _m=function(){if(BrowserDetect.browser==='Safari'||BrowserDetect.browser==='Chrome'){return true;}if(navigator){if(typeof(navigator.onLine)==='undefined'){return true;}if(!navigator.onLine){alert("Your browser is currently in offline mode. Please set your browser to run in online mode and refresh this page.");return false;}}return true;};this._ajax=new function(){var _n=new Array();this.doCallback=function(a,d,f){_q(a,d,undefined,undefined,undefined,false,_p(),f);};this.reloadUpdatePanel=function(a,d,g,f){_q(undefined,undefined,g,a,d,true,_p(),f);};this.doCallbackAndReloadUpdatePanel=function(a,d,g,h,j,f){_q(a,d,g,h,j,true,_p(),f);};this.doCallbackToDifferentUrl=function(a,d,k,f){_q(a,d,undefined,undefined,undefined,false,k,f);};this.abortAllCallbacks=function(){var _o=_n.length;var ii=_o;while(ii-->0){if(_n[ii]!=null&&_n[ii]!=undefined){_n[ii].xmlRequest.abort();}}_n.length=0;};this.isCallbackComplete=function(a){var _o=_n.length;var ii=_o;while(ii-->0){if(_n[ii]!=null&&_n[ii]!=undefined){if(_n[ii].ajaxCallbackId.indexOf(a)>-1){return'false';}}}return'true';};var _p=function(){if(typeof(AjaxCallbackURL)!='undefined'){return AjaxCallbackURL();}return undefined;};var _q=function(a,d,g,h,j,r,k,f){var _postData=_ac(a,d,g,h,j,f);var _r=_s(a,h,g,r,f);_t(_r,_u,k,_postData);};var _s=function(a,h,g,r,f){var _r=new Object();_r.ajaxCallbackId=a;_r.updatePanelCallbackID=h;_r.updatePanelID=g;if(r){_r.eventOnCompleteCallback=_ay;_r.eventOnErrorCallback=_bi;}else{_r.eventOnCompleteCallback=_aw;_r.eventOnErrorCallback=_ax;}if(f!=undefined&&f!=null){_r.clientOnCompleteCallback=f.onCompleteHandler;_r.clientOnErrorCallback=f.onErrorHandler;_r.templateElementId=f.templateElementId;_r.targetElementId=f.targetElementId;}_r.async=true;_z(_n,_r);return _r;};var _t=function(s,t,k,u){var _xmlRequest=_ab();_xmlRequest.onreadystatechange=t;s.xmlRequest=_xmlRequest;if($defined(k)){_xmlRequest.open("POST",k,true);}else{_xmlRequest.open("POST",window.document.forms[0].action,true);}_xmlRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");_xmlRequest.send(u);};var _u=function(){for(i=0;i<_n.length;i++){callbackObject=_n[i];if(callbackObject&&callbackObject.xmlRequest&&(callbackObject.xmlRequest.readyState==4)){_n[i]=null;_v(callbackObject);return;}}};var _v=function(v){var response=v.xmlRequest.responseText;if(response.charAt(0)=="s"){if((typeof(v.eventOnCompleteCallback)!="undefined")&&(v.eventOnCompleteCallback!=null))v.eventOnCompleteCallback(response.substring(1),v);}else if(response.charAt(0)=="e"){if((typeof(v.eventOnErrorCallback)!="undefined")&&(v.eventOnErrorCallback!=null))v.eventOnErrorCallback(response.substring(1),v);}else{var _w=response.indexOf("|");if(_w!=-1){var _x=parseInt(response.substring(0,_w));if(!isNaN(_x)){var _y=response.substring(_w+1,_w+_x+1);if((typeof(v.eventOnCompleteCallback)!="undefined")&&(v.eventOnCompleteCallback!=null)){v.eventOnCompleteCallback(response.substring(_w+_x+1),v);}}}}};var _z=function(w,x){var i;for(i=0;i<w.length;i++){if(!w[i])break;}w[i]=x;return i;};var _aa=function(y){if(encodeURIComponent){return encodeURIComponent(y);}else{return escape(y).replace(/\=/gi,"%3d").replace(/\+/gi,"%2b").replace(/\&/gi,"%26").replace(/\?/gi,"%3F");}};var _ab=function(){var _xmlRequest,e;try{_xmlRequest=new XMLHttpRequest();}catch(e){try{_xmlRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}return _xmlRequest;};var _ac=function(a,d,g,h,j,f){var _callbackObject=new Object();if(a!=null&&a!=undefined){_callbackObject.A=a;}if(h!=null&&h!=undefined){_callbackObject.C=h;}if(f!=undefined&&f!=null){if(f.stateContainerId!=undefined&&f.stateContainerId!=null){var _ad=new Array();var _ae=new Array();if(_aj(_ad,_ae,f)){_callbackObject.E=_ad;_callbackObject.F=_ae;}}}if($defined(g)){_callbackObject.G=g;}if(d===null&&d===undefined){d='';}if(j===null&&j===undefined){j='';}var _af=JSON.encode(d);var _ag=JSON.encode(j);var _ah=JSON.encode(_callbackObject);_ah=_ah+'___'+_af+'___'+_ag;var _ai=document.getElementById('hidvsid').value;return"__EVENTTARGET=&__CALLBACKID=__Page&hidvsid="+_ai+"&__CALLBACKPARAM="+_aa(_ah);};var _aj=function(z,_a,f){var _stateObjectContainer=$(f.stateContainerId);if(_stateObjectContainer!=undefined){var _ak=_stateObjectContainer.getElementsByTagName('input');if(_ak.length>0){for(var _al=0;_al<_ak.length;_al++){var _am=_ak[_al];if(_am.id!=undefined&&_am.id.length>0){if(_am.type=='radio'||_am.type=='checkbox'){if(_am.checked){z[z.length]=_am.id;_a[_a.length]='true';}else{z[z.length]=_am.id;_a[_a.length]='false';}}else{if(_am.type!='button'){z[z.length]=_am.id;_a[_a.length]=_am.value;}}}}}_an(z,_a,_stateObjectContainer,'select');_an(z,_a,_stateObjectContainer,'textarea');if(z.length>0){return true;}}return false;};var _an=function(z,_a,_b,_c){var _ctls=_b.getElementsByTagName(_c);if(_ctls.length>0){for(var _ao=0;_ao<_ctls.length;_ao++){var _ap=_ctls[_ao];if(_ap.id!=undefined&&_ap.id.length>0){z[z.length]=_ap.id;_a[_a.length]=_ap.value;}}}};var _aq=function(_d){var _resultArray=_d.split("___");var _ar=_resultArray[0];var _as=_resultArray[2];if(_as.length>0){eval(_as);}return _ar;};var _at=function(_d){return _d.split("___")[0];};var _au=function(_d){return _d.split("___")[1];};var _av=function(_d){return _d.split("___")[2];};var _aw=function(_e,q){var _az=_aq(_e);if(_az.indexOf("__Error")>=0){_ax(_az.substring(7,_az.length),q);_az="";return;}if(q.clientOnCompleteCallback!=undefined&&q.clientOnCompleteCallback!='undefined'){q.clientOnCompleteCallback(JSON.decode(_az,true),q);}};var _ax=function(_e,q){if(q.clientOnErrorCallback!=undefined&&q.clientOnErrorCallback!='undefined'){var _jsonDecoded=JSON.decode(_e,true);q.clientOnErrorCallback(_jsonDecoded,q.ajaxCallbackId);}};var _ay=function(_e,q){var _responseJS=_av(_e);var _az=_at(_e);_e=_au(_e);var _ba=q.updatePanelID;if(_az.indexOf("__Error")>=0){_bi(_az.substring(7,_az.length),q);return;}var _bb=document.getElementById(_ba);var _bc=document.createElement("div");_bc.style.display="none";_bc.innerHTML=_e;var _bd=_bj(_bc,_ba);var _be=_bb.parentNode;if(_bd!=null&&_be!=null){_bd.parentNode.removeChild(_bd);var _bf=_bn(_bb);if(_bf!=null){_be.insertBefore(_bd,_bf);}else{_be.appendChild(_bd);}_be.removeChild(_bb);_bc=null;}if(_responseJS!=null&&_responseJS.length>0){eval(_responseJS);}var _bg=JSON.decode(_az,true);if(q.clientOnCompleteCallback!=undefined&&q.clientOnCompleteCallback!='undefined'){q.clientOnCompleteCallback(_bg,q);}var _bh=new Array();_bh[0]=_bg;_bh[1]=q;window.fireEvent('updatepanelcomplete',_bh);};var _bi=function(_e,q){if(q.clientOnErrorCallback!=undefined&&q.clientOnErrorCallback!='undefined'){var _az=_at(_e);q.clientOnErrorCallback(JSON.decode(_az,true),q.updatePanelCallbackID);}};var _bj=function(_f,_g){var _foundElement=null;var _bk=_f.getElementsByTagName('*');var _bl=_bk.length;for(var cnt=0;cnt<_bl;cnt++){var _bm=_bk[cnt];if(!_bm.id)continue;if(_bm.id+""==_g+""){_foundElement=_bm;break;}}return _foundElement;};var _bn=function(_h){while(_h!=null){if(_h._bf){_h=_h._bf;}else{_h=null;}if(_h){if(_h.nodeType==1){break;}}}return _h;};};}();var _bo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";if(!String.prototype.b){String.prototype.b=function(){var _bp=this.length;var _bq=new String();var _i,_b1,_b2,_b3;for(_i=0;_i<_bp;_i+=3){_b1=this.charCodeAt(_i);_b2=this.charCodeAt(_i+1);_b3=this.charCodeAt(_i+2);_bq+=(_bo.charAt(_b1>>2))+(_bo.charAt(((_b1&3)<<4)|((_i+1<_bp)?(_b2>>4):0)))+((_i+1<_bp)?_bo.charAt(((_b2&15)<<2)|((_i+2<_bp)?(_b3>>6):0)):"=")+((_i+2<_bp)?_bo.charAt(_b3&63):"=");}return _bq;};};if(!String.prototype.en){String.prototype.en=function(){var _bq=new String();var _bp=this.length;for(var _i=_bp-1;_i>=0;_i--){_bq+=this.charAt(_i);}return _bq;};};if(!String.prototype.encodeUTF8){String.prototype.encodeUTF8=function(){var _br=this.replace(/\r\n/g,"\n");var _bs="";for(var n=0;n<_br.length;n++){var c=_br.charCodeAt(n);if(c<128){_bs+=String.fromCharCode(c);}else if((c>127)&&(c<2048)){_bs+=String.fromCharCode((c>>6)|192);_bs+=String.fromCharCode((c&63)|128);}else{_bs+=String.fromCharCode((c>>12)|224);_bs+=String.fromCharCode(((c>>6)&63)|128);_bs+=String.fromCharCode((c&63)|128);}}return _bs;};};document.onclick=setCursorXY;this._MadurodamPopupCursorX=0;this._MadurodamPopupCursorY=0;function setCursorXY(e){var n=0;var o=0;if(!e)var e=window.event;if(e.pageX||e.pageY){n=e.pageX;o=e.pageY;}else if(e.clientX||e.clientY){n=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;o=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;}_MadurodamPopupCursorX=n;_MadurodamPopupCursorY=o;};this._MadurodamPopupZindexCounter=10001;Madurodam.Popup=function(a,b,c){_MadurodamPopupZindexCounter++;var p;var q=false;var r=false;if(b=='MAX'||b=='max'){b=0;q=true;}if(a=='MAX'||a=='max'){a=0;r=true;}if(b=='CLEAR'||b=='clear'||a=='CLEAR'||a=='clear'){b=-1;a=-1;}var s=b;var t=a;if($defined(c.elementId)){p=$(c.elementId);p.setStyles({'position':'absolute','zIndex':_MadurodamPopupZindexCounter});}else{p=new Element("IFRAME").set({'frameBorder':'0','src':c.URL,'allowTransparency':true,'scrolling':'no','styles':{'border':'none','zIndex':_MadurodamPopupZindexCounter+'','position':'absolute','display':'none'}});}if(b>-1&&a>-1){p.setStyles({'height':b+'px','width':a+'px'});}document.body.insertBefore(p,document.body.firstChild);window.addEvent('resize',redrawCenterFromEvent);window.addEvent('scroll',redrawCenterFromEvent);this.show=function(d,f,g){_MadurodamPopupZindexCounter++;p.setStyle('zIndex',_MadurodamPopupZindexCounter+'');p.style.top=f+'px';p.style.left=d+'px';if($defined(c.blockBackground)&&c.blockBackground){if($defined(Madurodam.Block)){if(!Madurodam.Block.isVisible()){if($defined(g)){Madurodam.Block.setup(g);}Madurodam.Block.show();}}}p.setStyles({'position':'absolute','display':'block'});};var u=new Date().getTime();var v=false;var w=400;var z=false;function tryRedrawCenter(h){if(h){u=new Date().getTime();if(z){return;}}if(h){z=true;}if(!v){var _a=new Date();if(_a.getTime()>(u+w)&&!h){v=true;redrawCenter();v=false;z=false;}else{setTimeout(function(){tryRedrawCenter();},100);}}else{setTimeout(function(){tryRedrawCenter();},100);}};function redrawCenterFromEvent(){if($defined(p)&&p.style.display=='block'){tryRedrawCenter(true);}};var _b=null;function redrawCenter(){if(p.style.display=='block'){if(_b==null){_b=new Fx.Morph(p,{duration:1000,transition:'expo:out'});}var _c;if(s>(window.getSize().y-20)||q){_c=window.getSize().y-20;}else{_c=s;}var _d;if(t>(window.getSize().x-20)||r){_d=window.getSize().x-20;}else{_d=t;}if(BrowserDetect.browser==='Safari'||BrowserDetect.browser==='Chrome'){if(window.getScrollSize().x>window.getSize().x){_c=_c-30;}}if(b==-1||a==-1){var _e=$(window).getScroll().y+(window.getSize().y/2)-($(p).getSize().y/2);var _f=$(window).getScroll().x+(window.getSize().x/2)-($(p).getSize().x/2);_e=reFixCenterForSqalarAffs(_e);_b.start({'top':_e+'px','left':_f+'px'}).chain(redrawPopupContainer);}else{var _e=$(window).getScroll().y+(window.getSize().y/2)-(_c/2);var _f=$(window).getScroll().x+(window.getSize().x/2)-(_d/2);_e=reFixCenterForSqalarAffs(_e);_b.start({'top':_e+'px','left':_f+'px','width':_d+'px','height':_c+'px'}).chain(redrawPopupContainer);}}};function reFixCenterForSqalarAffs(i){var _g=i;try{if(!IsAffiliateFrameSqalerEnabled()){return _g;}if(window.getSize().y>GetAffiliateFrameSqalerMaxHeightOverride()){var _h=50;_g=_MadurodamPopupCursorY-($(p).getStyle("height").toInt()/2);if(_g+$(p).getStyle("height").toInt()+_h>window.getSize().y){_g=_MadurodamPopupCursorY-($(p).getStyle("height").toInt())-_h;}if(_g<_h){_g=_h;}}}catch(ex){};return _g;};function redrawPopupContainer(){Madurodam.Notification.redraw();};this.clearDimensions=function(){p.setStyles({'width':'','height':''});};this.showCenter=function(g,j,k){if(p.style.position=='absolute'){_MadurodamPopupZindexCounter++;if($defined(j)){if(j=='MAX'||j=='max'){j=0;r=true;}t=j;}if($defined(k)){if(k=='MAX'||k=='max'){k=00;q=true;}s=k;}p.setStyle('zIndex',_MadurodamPopupZindexCounter+'');p.style.top=($(window).getScroll().y+(window.getSize().y/2))-($(p).getStyle("height").toInt()/2)+'px';p.style.left=$(window).getScroll().x+(window.getSize().x/2)-($(p).getStyle("width").toInt()/2)+'px';if($defined(c.blockBackground)&&c.blockBackground){if($defined(Madurodam.Block)){if($defined(g)){Madurodam.Block.setup(g);}if(!Madurodam.Block.isVisible()){Madurodam.Block.show();}}}p.setStyles({'position':'absolute','display':'block'});redrawCenter();}};this.setSrc=function(l){p.src=l;};this.hide=function(m){if($defined(m)&&m==false){}else{if($defined(c.blockBackground)&&c.blockBackground){Madurodam.Block.hide();}}p.setStyle('display','none');};this.frame=p;};Madurodam.FilteringBox=new function(){var g;var h=false;var i=false;var j=false;var k=true;this.init=function(a){if($defined($(a))){g=new Madurodam.Popup('CLEAR','CLEAR',{elementId:a,blockBackground:true});}};this.show=function(b,c,d){if($defined(g)){if(!h){h=true;if($defined(Madurodam.Block)){if(!Madurodam.Block.isVisible()){Madurodam.Block.setup(d);}}if($defined(c)){SetFilteringBoxProperties(c);}g.showCenter();i=false;j=false;k=true;if($defined(b)&&b>0){setTimeout(MinDisplayTimeEnd,b);}else{i=true;}}}};this.hide=function(e){if($defined(g)){if(i){g.hide(e);h=false;i=false;j=false;}else{j=true;k=e;}}};function MinDisplayTimeEnd(){i=true;if(j){Madurodam.FilteringBox.hide(k);}};};function ShowFilteringScreen(f){Madurodam.FilteringBox.show(1000,f,0.2);};function HideFilteringScreen(){Madurodam.FilteringBox.hide(true);};function CancelFilteringScreen(e){Madurodam.FilteringBox.hide(true);};window.addEvent('ondomready',function(){Madurodam.FilteringBox.init('divFilteringBox');});Madurodam.LoadingBox=new function(){var g;var h=false;var i=false;var j=false;var k=true;this.init=function(a){if($defined($(a))){g=new Madurodam.Popup('CLEAR','CLEAR',{elementId:a,blockBackground:true});}};this.show=function(b,c,d,e){if($defined(g)){if(!h){h=true;if($defined(Madurodam.Block)){if(!Madurodam.Block.isVisible()){Madurodam.Block.setup(d);}}if($defined(c)){SetLoadingBoxProperties(c,e);}g.showCenter();i=false;j=false;k=true;if($defined(b)&&b>0){setTimeout(MinDisplayTimeEnd,b);}else{i=true;}}}};this.hide=function(f){if($defined(g)){if(i){g.hide(f);h=false;i=false;j=false;}else{j=true;k=f;}}};function MinDisplayTimeEnd(){i=true;if(j){Madurodam.LoadingBox.hide(k);}};};function ShowWaitingScreen(c,e){Madurodam.LoadingBox.show(0,c,0.5,e);};function HideWaitingScreen(f){Madurodam.LoadingBox.hide(f);};function CancelWaitingScreen(f){CQS.AT.MessageBox.cancelLoadingBox();Madurodam.LoadingBox.hide(f);};window.addEvent('ondomready',function(){Madurodam.LoadingBox.init('divLoadingBox');});Madurodam.Notification=new function(){function NotificationElement(a,b,c,d,f,g){this.ElementID=a+'';this.Visible=false;this.ContainerID=b;this.HeaderID=d;this.TextID=c;this.OffsetLeft=0;if($defined(f)){this.OffsetLeft=f;}this.OffsetTop=0;if($defined(g)){this.OffsetTop=g;}};var t=new Array();var u=function(a,b,c,d,f,g){t[t.length]=new NotificationElement(a,b,c,d,f,g);};var v=function(h){for(var i=0;i<t.length;i++){if(t[i].ElementID==h){return t[i];}}return null;};this.initType=function(j,f,g){var w=$$(j+'[NotificationEnabled=true]');for(var i=0;i<w.length;i++){if(w[i].id!=null&&w[i].id.length>0){var z=document.createElement('div');z.id=w[i].id+'_NotifyContainer';z.style.zIndex=999999;z.style.display='none';z.className='notificationpopup';var _a=document.createElement('div');_a.className='np-top';z.appendChild(_a);var _b=document.createElement('div');_b.className='np-body';z.appendChild(_b);var _c=document.createElement('h2');_c.id=w[i].id+'_TextHeader';_b.appendChild(_c);var _d=document.createElement('p');_d.id=w[i].id+'_TextContainer';_d.innerHTML='No body text provided';_b.appendChild(_d);var _e=document.createElement('div');_e.className='np-bottom';z.appendChild(_e);document.body.appendChild(z);var _f=$(w[i].parentNode);while(_f&&!isBody(_f)){if(_f.getStyle('overflow')=='auto'){try{_f.removeEvent('scroll',Madurodam.Notification.hideAll);}catch(e){}_f.addEvent('scroll',Madurodam.Notification.hideAll);}_f=$(_f.parentNode);}u(w[i].id,z.id,_d.id,_c.id,f,g);}};};function isBody(k){return(/^(?:body|html)$/i).test(k.tagName);};this.show=function(l,m,n){var o=v(l);if($defined(o)){var _g='Not Valid';if($defined(m)&&m.length>0){_g=m;}var _h=undefined;if($defined(n)&&n.length>0){_h=n;}_i(o,l,_g,_h);return true;}return false;};var _i=function(o,h,m,p){var _m=$(o.ContainerID);var _j=$(o.HeaderID);var _k=$(o.TextID);var _l=$(h);if($defined(p)&&p.length>0){_j.innerHTML=p;_j.style.height='';}else{_j.style.height='0px';}if($defined(m)&&m.length>0){_k.innerHTML=m;}try{_l.focus();_l.select();}catch(e){}o.Visible=true;setTimeout('Madurodam.Notification._displayNotification("'+h+'")',100);};this._displayNotification=function(q){var o=v(q);var _m=$(o.ContainerID);var _l=$(q);var _n=_l.getOffsets();var _o;if(BrowserDetect.browser==='Firefox'){var _p=_l.getScrolls();_o={x:_n.x-_p.x,y:_n.y-_p.y};}else{_o=_n;}_m.x=_o.x+o.OffsetLeft+_l.getSize().x;_m.y=_o.y+_l.getSize().y+o.OffsetTop;_m.style.left=_m.x+'px';_m.style.top=_m.y+'px';_m.style.display='block';};this.redraw=function(){for(var _q=0;_q<t.length;_q++){if(t[_q].Visible){Madurodam.Notification._displayNotification(t[_q].ElementID);}}};this.hide=function(h){var o=v(h);if($defined(o)){$(o.ContainerID).style.display='none';o.Visible=false;return true;}return false;};this.hideAll=function(){for(var _q=0;_q<t.length;_q++){Madurodam.Notification.hide(t[_q].ElementID);}};var _r=function(r,s){var totaloffset=(s=='left')?r.offsetLeft:r.offsetTop;var _s=r.offsetParent;while(_s!=null){totaloffset=(s=='left')?totaloffset+_s.offsetLeft:totaloffset+_s.offsetTop;_s=_s.offsetParent;}return totaloffset;};var _t=function(){return(document.compatMode&&document.compatMode!='BackCompat')?document.documentElement:document.body};};Madurodam.Validate=new function(){this.NumericInput=function(a,b){var _ab=9999;if($defined(b)){_ab=b;}if(a.value.length==0){return;}var _ac='';for(var cnt=0;cnt<a.value.length;cnt++){var _ad=a.value.substring(cnt,cnt+1);if(Madurodam.Validate.IsNumericChar(_ad)){if(_ac.length<b){_ac+=a.value.substring(cnt,cnt+1);}}}if(a.value.length!=_ac.length){a.value=_ac;}return;};this.IsAlphaChar=function(c){if(((c>='a')&&(c<='z'))||((c>='A')&&(c<='Z'))||Madurodam.Validate.IsUmlaut(c)){return true;}return false;};this.IsNumericChar=function(c){var _ae='0123456789.';var _m;for(var cnt=0;cnt<c.length;cnt++){_m=c.charAt(cnt);if(_ae.indexOf(_m)==-1){return false;}}return true;};this.IsSpecialChar=function(c){var _ae='!#$%*/?|^{}`~,()[]\;:<>';var _m;for(var cnt=0;cnt<c.length;cnt++){_m=c.charAt(cnt);if(_ae.indexOf(_m)==-1){return false;}}return true;};this.IsSpace=function(c){var _ae=' ';var _m;for(var cnt=0;cnt<c.length;cnt++){_m=c.charAt(cnt);if(_ae.indexOf(_m)==-1){return false;}}return true;};this.IsUmlaut=function(d){var _ae="üéâäàåçêëèïîìæÆôöòûùÿýáíóúñÑŠŽšœžŸÝÀÁÂÃÄÅÈÉÊËÌÍÎÏÐÒÓÔÕÖØÙÚÛÜãßÇŒ`´‘’'";var _m;for(var cnt=0;cnt<d.length;cnt++){_m=d.charAt(cnt);if(_ae.indexOf(_m)==-1){return false;}}return true;};this.ValidateAlphaNumericSpecialInput=function(a,b,f,g,h,i,j){var _ab=9999;if($defined(b)){_ab=b;}if(a.value.length==0){return;}var _ac='';for(var cnt=0;cnt<a.value.length;cnt++){if(_ac.length<b){var _af=Madurodam.Validate.IsAlphaChar(a.value.substring(cnt,cnt+1));var _ag=Madurodam.Validate.IsNumericChar(a.value.substring(cnt,cnt+1));var _ah=Madurodam.Validate.IsSpace(a.value.substring(cnt,cnt+1));if(f&&_ah){_ac+=a.value.substring(cnt,cnt+1);}else{if(_af){if(g<=cnt&&cnt<=h){_ac+=a.value.substring(cnt,cnt+1);}}else if(_ag){if(i<=cnt&&cnt<=j){_ac+=a.value.substring(cnt,cnt+1);}}}}}if(a.value.length!=_ac.length){a.value=_ac;}return;};};Madurodam.Validation=new function(){this.init=function(){Madurodam.Validation.Notification.init();Madurodam.Validation.Validators.init();};this.isValid=function(k){return Madurodam.Validation.Validators.groupIsValid(k);};this.itemIsValid=function(k,l){return Madurodam.Validation.Validators.itemIsValid(k,l);};this.Notification=new function(){this.init=function(){Madurodam.Notification.initType("INPUT",2,-10);Madurodam.Notification.initType("SELECT",2,-10);Madurodam.Notification.initType("TEXTAREA",2,-10);};this.show=function(m,n,o){Madurodam.Notification.show(m,n,o);};this.hide=function(m){Madurodam.Notification.hide(m);};this.showSelect=function(m,n){Madurodam.Notification.show(m,"",n);};this.hideSelect=function(m){Madurodam.Notification.hide(m);};this.hideAll=function(){Madurodam.Notification.hideAll();};this.redraw=function(){Madurodam.Notification.redraw();};};this.Validators=new function(){var _ai=new Array();var _aj=function(k){this.groupName=k;this.items=new Array();};var _ak=function(p,q,r,s,t,u,v,w,x,y,z,_a,_b,_c){this.element=p;this.validationType=q;this.minLength=r;this.b=s;this.minValue=t;this.maxValue=u;this.compareToId=v;this.specialCharacters=w;this.notAllowedCharacters=x;this.dateFormat=y;this.message=z;this.headerMsg=_a;this.notificationId=_b;this._c=_c;};this.init=function(){_ai=new Array();var _al=$$('[ValidatorTypes]');_al.each(function(_d){applyValidatorToElement(_d);});};this.groupIsValid=function(k){if(!$defined(k)){k='global';}var _g=GetOrCreateValidationGroup(k);for(var _am=0;_am<_g.items.length;_am++){var _an=_g.items[_am];if(!ValidateItem(k,_an)){return false;}}return true;};function ValidateItem(k,_e){if(!ValidatorIsValid(_e,k)){if($defined(_e.notificationId)){Madurodam.Validation.Notification.show(_e.notificationId,_e.message,_e.headerMsg);}return false;}return true;}this.itemIsValid=function(k,l){var _ao=GetOrCreateValidationGroup(k);for(var cnt=0;cnt<_ao.items.length;cnt++){var _e=_ao.items[cnt];var _ap=_e.element.getProperty("viewitem");if(_ap==l){if(!ValidateItem(k,_e)){return false;}}}return true;};function applyValidatorToElement(_d){var _aq=_d.getProperty('ValidatorTypes');if(_aq!=null){var _ar=_d.getProperty('ValidatorTypes').split(',');_ar.each(function(_f){_f=_f.trim();var _as=new Array();var _at=_d.getProperty('SpecialChars');if(_at!=null){var _au=_at.split('|');if(_au.length>0){_as=_au;}}var _av=new Array();var _aw=_d.getProperty('CharsNotAllowed');if(_aw!=null){var _ax=_aw.split('|');if(_ax.length>0){_av=_ax;}}var _ay=undefined;if(_f==='MinLength'){if(_d.getProperty(_f)!=null){_ay=_d.getProperty(_f).toInt();}}var _az=undefined;if(_f==='MaxLength'){if(_d.getProperty(_f)!=null){_az=_d.getProperty(_f).toInt();}}var _ba=undefined;if(_f==='MinValue'){if(_d.getProperty(_f)!=null){_ba=_d.getProperty(_f).toFloat();}}var _bb=undefined;if(_f==='MaxValue'){if(_d.getProperty(_f)!=null){_bb=_d.getProperty(_f).toFloat();}}var _bc=undefined;if(_f==='CompareToEqual'){if(_d.getProperty(_f+'ControlId')!=null){_bc=_d.getProperty(_f+'ControlId');}}else if(_f==='CompareToNotEqual'){if(_d.getProperty(_f+'ControlId')!=null){_bc=_d.getProperty(_f+'ControlId');}}else if(_f==='CompareToDateGreaterThan'){if(_d.getProperty(_f+'ControlId')!=null){_bc=_d.getProperty(_f+'ControlId');}}else if(_f==='CompareToDateGreaterThanEqual'){if(_d.getProperty(_f+'ControlId')!=null){_bc=_d.getProperty(_f+'ControlId');}}else if(_f==='CompareToDateLessThan'){if(_d.getProperty(_f+'ControlId')!=null){_bc=_d.getProperty(_f+'ControlId');}}else if(_f==='CompareToDateEqual'){if(_d.getProperty(_f+'ControlId')!=null){_bc=_d.getProperty(_f+'ControlId');}}var _bd=undefined;if(_d.getProperty(_f+'Format')!=null){_bd=_d.getProperty(_f+'Format');}var _be='Not Valid';if(_d.getProperty(_f+'Message')!=null){_be=_d.getProperty(_f+'Message');}var _bf=null;if(_d.getProperty(_f+'HeaderMessage')!=null){_bf=_d.getProperty(_f+'HeaderMessage');}var _bg=null;if(_d.getProperty('NotificationEnabled')){if(_d.getProperty('NotificationEnabled')=='true'){_bg=_d.id;}}var _bh=_d.getProperty('ValidationGroup');if(_bh===null){_bh='global';}var _g=GetOrCreateValidationGroup(_bh);var _bi=_d.getProperty('EnabledDelegate');var _bj=new _ak(_d,_f,_ay,_az,_ba,_bb,_bc,_as,_av,_bd,_be,_bf,_bg,_bi);_g.items.push(_bj);_bj.element.addEvent('blur',function(){Madurodam.Validation.Notification.hideAll();});ApplyValidator(_bj);});}}function GetOrCreateValidationGroup(k){var _bk=null;_ai.each(function(_g){if(_g.groupName===k){_bk=_g;return;}});if(!$defined(_bk)){_bk=new _aj(k);_ai.push(_bk);}return _bk;};function ApplyValidator(_h){var _bl=_h;switch(_bl.validationType){case'Alpha':_bl.element.addEvent('keyup',function(){ForceValidateInput(_bl,IsAlphaChar);});if(!_bl.element.readonly&&!_bl.element.disabled){_bl.element.addEvent('blur',function(){ForceValidateInput(_bl,IsAlphaChar);});}_bl.element.addEvent('mouseup',function(){ForceValidateInput(_bl,IsAlphaChar);});break;case'Numeric':_bl.element.addEvent('keyup',function(){ForceValidateInput(_bl,IsNumericChar);});if(!_bl.element.readonly&&!_bl.element.disabled){_bl.element.addEvent('blur',function(){ForceValidateInput(_bl,IsNumericChar);});}_bl.element.addEvent('mouseup',function(){ForceValidateInput(_bl,IsNumericChar);});break;case'AlphaNumeric':_bl.element.addEvent('keyup',function(){ForceValidateInput(_bl,IsAlphaNumericChar);});if(!_bl.element.readonly&&!_bl.element.disabled){_bl.element.addEvent('blur',function(){ForceValidateInput(_bl,IsAlphaNumericChar);});}_bl.element.addEvent('mouseup',function(){ForceValidateInput(_bl,IsAlphaNumericChar);});break;case'CharsNotAllowed':_bl.element.addEvent('keyup',function(){ForceValidateInput(_bl,IsAlwaysValidChar);});if(!_bl.element.readonly&&!_bl.element.disabled){_bl.element.addEvent('blur',function(){ForceValidateInput(_bl,IsAlwaysValidChar);});}_bl.element.addEvent('mouseup',function(){ForceValidateInput(_bl,IsAlwaysValidChar);});break;case'Required':break;case'Email':break;case'PhoneNumber':_bl.element.addEvent('keyup',function(){ValidateTelephoneInput(_bl.element);});if(!_bl.element.readonly&&!_bl.element.disabled){_bl.element.addEvent('blur',function(){ValidateTelephoneInput(_bl.element);});}_bl.element.addEvent('mouseup',function(){ValidateTelephoneInput(_bl.element);});break;case'Custom':break;case'MinValue':break;case'MaxValue':break;case'MinLength':break;case'MaxLength':break;case'CompareToEqual':break;case'CompareToNotEqual':break;}};function ValidatorIsValid(_h,k){var _bl=_h;if(_bl._c==null||eval(_bl._c)){var _bm=$(_h.element);switch(_bl.validationType){case'Alpha':return IsValidInputPerChar(_bm.value,_h.specialCharacters,IsAlphaChar);break;case'Numeric':return IsValidInputPerChar(_bm.value,_h.specialCharacters,IsNumericChar);break;case'AlphaNumeric':return IsValidInputPerChar(_bm.value,_h.specialCharacters,IsAlphaNumericChar);break;case'Required':if($defined(_bm.type)){if(_bm.type.contains('text')||_bm.type.contains('password')){if(_bm.value.trim().length<=0){return false;}}else if(_bm.type.contains('select')){if(_bm.options[_bm.selectedIndex].value.trim().length<=0){return false;}if(_bm.options[_bm.selectedIndex].value.trim()=="0"){return false;}if(_bm.options[_bm.selectedIndex].value.trim()=="-1"){return false;}if(_bm.options[_bm.selectedIndex].value.trim()=="YYYY"){return false;}if(_bm.options[_bm.selectedIndex].value.trim()=="MM"){return false;}if(_bm.options[_bm.selectedIndex].value.trim()=="DD"){return false;}}}break;case"Email":if(!IsValidInputValue(_bm.value.trim(),SatisfiesEmailAddress)){return false;}break;case"PhoneNumber":if(!IsValidInputValue(_bm.value.trim(),SatisfiesPhoneNumber)){return false;}break;case"Custom":var _bn=k+"CustomValidation('";var _bo=_bm.getProperty('viewitem');_bn=_bn+_bo+"','";_bn=_bn+_bm.value.trim()+"');";if(!eval(_bn)){return false;}break;case'MinValue':if(!IsValidForBoundary(_bm.value,_bl.minValue,SatisfiesMinValue)){return false;}break;case'MaxValue':if(!IsValidForBoundary(_bm.value,_bl.maxValue,SatisfiesMaxValue)){return false;}break;case'MinLength':if(!IsValidForBoundary(_bm.value,_bl.minLength,SatisfiesMinLength)){return false;}break;case'MaxLength':if(!IsValidForBoundary(_bm.value,_bl.b,SatisfiesMaxLength)){return false;}break;case'CompareToEqual':if(!IsValidForCompare(_bm.value,_bl.compareToId,SatisfiesCompareToEqual)){return false;}break;case'CompareToNotEqual':if(_bm.type.contains('radio')){if(_bm.checked==$(_bl.compareToId).checked){return false;}}else{if(!IsValidForCompare(_bm.value,_bl.compareToId,SatisfiesCompareToNotEqual)){return false;}}break;case'CompareToDateGreaterThan':if(!IsDateInputValidForCompare(_bm.value,_bl.dateFormat,_bl.compareToId,CompareDatesGreater)){return false;}break;case'CompareToDateGreaterThanEqual':if(!IsDateInputValidForCompare(_bm.value,_bl.dateFormat,_bl.compareToId,CompareDatesGreaterEqual)){return false;}break;case'CompareToDateLessThan':if(!IsDateInputValidForCompare(_bm.value,_bl.dateFormat,_bl.compareToId,CompareDatesLess)){return false;}break;case'CompareToDateEqual':if(!IsDateInputValidForCompare(_bm.value,_bl.dateFormat,_bl.compareToId,CompareDatesEqual)){return false;}break;case'NotFirstItem':if($defined(_bm.type)){if(_bm.type.contains('select')){if(_bm.selectedIndex==0){return false;}}}break;}}return true;};function ForceValidateInput(_h,_i){var _ab=9999;if($defined(_h.b)){_ab=_h.b;}var _bp=new Array();if($defined(_h.specialCharacters)){_bp=_h.specialCharacters;}var _bq=new Array();if($defined(_h.notAllowedCharacters)){_bq=_h.notAllowedCharacters;}if(_h.element.value.length==0){return;}var _ac='';for(var cnt=0;cnt<_h.element.value.length;cnt++){var _j=_h.element.value.substring(cnt,cnt+1);if((_i(_j)||_bp.contains(_j))&&!_bq.contains(_j)){if(_ac.length<_ab){_ac+=_j;}else{break;}}}if(_h.element.value.length!=_ac.length){_h.element.value=_ac;}return;};function IsValidInputPerChar(_k,_l,_i){if(!$defined(_l)){_l=new Array();}for(var cnt=0;cnt<_k.length;cnt++){_m=_k.charAt(cnt);if(!_i(_m)&&!_l.contains(_m)){return false;}}return true;};function IsValidInputValue(_k,_n){if(_k.trim().length>0){if(!_n(_k)){return false;}}return true;};function IsValidForBoundary(_k,_o,_p){if(_k.trim().length>0){if($defined(_k)&&$defined(_o)&&$defined(_p)){var _br=_p(_k,_o);if(!_br){return false;}}}return true;};function IsValidForCompare(_k,v,_q){if($defined(_k)&&$defined(v)&&$defined(_q)){var _bs=_k.trim().length;if(_bs>0||$(v).value.length>0){var _br=_q(_k,v);if(!_br){return false;}}}return true;};function IsDateInputValidForCompare(_r,y,v,_s){if($defined(_r)&&$defined(y)&&$defined(v)&&$defined(_s)){var _bt=_r.trim().length;var _bu=y.trim().length;var _bv=v.trim().length;if(_bt>0&&_bu>0&&_bv>0){if(!SatisfiesCompareToDate(_r,y,v,_s)){return false;}}}return true;};function IsAlphaString(_k){for(var cnt=0;cnt<_k.length;cnt++){_m=_k.charAt(cnt);if(!IsAlphaChar(_m)){return false;}}return true;};function IsAlphaChar(d){if(((d>='a')&&(d<='z'))||((d>='A')&&(d<='Z'))||IsSpace(d)||IsUmlaut(d)){return true;}else{return false;}};function IsUmlaut(d){var _ae="üéâäàåçêëèïîìæÆôöòûùÿýáíóúñÑŠŽšœžŸÝÀÁÂÃÄÅÈÉÊËÌÍÎÏÐÒÓÔÕÖØÙÚÛÜãßÇŒ`´‘’'";var _m;for(var cnt=0;cnt<d.length;cnt++){_m=d.charAt(cnt);if(_ae.indexOf(_m)==-1){return false;}}return true;};function IsSpace(d){var _ae=' ';var _m;for(var cnt=0;cnt<d.length;cnt++){_m=d.charAt(cnt);if(_ae.indexOf(_m)==-1){return false;}}return true;};function IsNumericString(_k){var _ae='0123456789';var _m;for(var cnt=0;cnt<_k.length;cnt++){_m=_k.charAt(cnt);if(!IsNumericChar(_m)){return false;}}return true;};function IsNumericChar(d){var _ae='0123456789';if(_ae.indexOf(d)==-1){return false;}return true;};function IsAlphaNumericString(_k){for(var cnt=0;cnt<_k.length;cnt++){if(!IsAlphaNumericChar(_k[cnt])){return false;}}return true;};function IsAlphaNumericChar(d){if(IsNumericChar(d)||IsAlphaChar(d)){return true;}else{return false;}};function IsAlwaysValidChar(d){return true;};function SatisfiesEmailAddress(_k){var _bw=/^([\w\xc0-\xff-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;if(!_bw.test(_k)){return false;}return true;};function SatisfiesPhoneNumber(_k){var _bx=/^[0-9\+]?[0-9\-\s]*$/;if(!_bx.test(_k)){return false;}return true;};function SatisfiesMinValue(_k,_o){try{var _by=_k.toFloat();if(_by>=_o){return true;}}catch(e){}return false;};function SatisfiesMaxValue(_k,_o){try{var _by=_k.toFloat();if(_by<=_o){return true;}}catch(e){}return false;};function SatisfiesMinLength(_k,_o){try{var _bs=_k.trim().length;if(_bs>=_o){return true;}}catch(e){}return false;};function SatisfiesMaxLength(_k,_o){try{var _bs=_k.trim().length;if(_bs<=_o){return true;}}catch(e){}return false;};function SatisfiesCompareToEqual(_k,v){try{var _bz=$(v);if($defined(_bz)){if(_k===_bz.value){return true;}}}catch(e){}return false;};function SatisfiesCompareToNotEqual(_k,v){try{var _bz=$(v);if($defined(_bz)){if(_k!=_bz.value){return true;}}}catch(e){}return false;};function SatisfiesCompareToDate(_r,_t,v,_u){try{var _ca=$(v).value;if(_r.length<=0||_ca<=0){return true;}var _v=parseDate(_r,_t);var _w=parseDate(_ca,_t);if(_u(_v,_w)){return true;}}catch(e){}return false;};function CompareDatesGreater(_x,_y){if(_x>_y){return true;}return false;};function CompareDatesGreaterEqual(_x,_y){if(_x>=_y){return true;}return false;};function CompareDatesLess(_x,_y){if(_x<_y){return true;}return false;};function CompareDatesEqual(_x,_y){if(_x===_y){return true;}return false;};};};window.addEvent('ondomready',function(){Madurodam.Validation.init();window.addEvent('updatepanelcomplete',function(_z,_aa){Madurodam.Validation.init();});window.addEvent('resize',function(){Madurodam.Validation.Notification.redraw();});window.addEvent('scroll',function(){Madurodam.Validation.Notification.redraw();});});Madurodam.AccordionController=function(a,b){var n=null;var o=new Array();var p=new Array();var q=new Array();var r=0;var s=false;var t=null;var u,v,w;var x=this;var y=function(c,d,e,f,g,h){this.index=d;this.ID=c;this.container=e;this.z=f;this._a=g;this.m=h;this.open=false;};a.forEach(function(i){var z=i.getElement('div[accordion_header_hidden=true]');var _a=i.getElement('h2[accordion_header=true]');if(_a==null||_a==undefined){_a=i.getElement('h3[accordion_header=true]');}var _b=i.getElement('div[accordion_body=true]');var c=CQS.Common.elementGetAttribute(z,'accordion_id');var _c=CQS.Common.elementGetAttribute(z,'accordion_open');p.push(z);q.push(_b);o[o.length]=new y(c,r,i,z,_a,_b);if(CQS.Common.isDefined(_c)){if(_c=='true'){t=o[o.length-1];s=true;}}r++;});function GetItem(j){var _d=null;for(var _e=0;_e<o.length;_e++){if(o[_e].ID==j){_d=o[_e];break;}}return _d;};this.getItem=function(j){var _d=null;for(var _e=0;_e<o.length;_e++){if(o[_e].ID==j){_d=o[_e];break;}}return _d;};this.t=function(j){var _d=GetItem(j);if(_d!=null){if(!_d.open){x.toggle(j);setTimeout('RedrawFooter();',800);}}};this.closeItem=function(j){var _d=GetItem(j);if(_d!=null){if(_d.open){x.toggle(j);setTimeout('RedrawFooter();',800);}}};var _f;this.toggle=function(j,k){var _d=GetItem(j);if(_d!=null){_d.open=!_d.open;_g=_d;_f=k;n.display(_d.index);}};var _g;function onCompleteEvent(){if(_g.open){if(u){u.style.height='auto';u.style.overflow='visible';}if(w){if(_g.container.id!=w.id&&!w.className.contains(b)){w.className=w.className.trim()+' '+b;}}}else{if(_g.container){if(!_g.container.className.contains(b)){_g.container.className=_g.container.className.trim()+' '+b;}}w=undefined;}if(CQS.Common.isDefined(_f)){_f(_g);}RedrawFooter();};function onOpenElement(l,m){if(u){if(u.offsetHeight>10){u.style.height=(u.offsetHeight-10)+'px';}u.style.overflow='hidden';}var c=CQS.Common.elementGetAttribute(l,'accordion_id');var _d=GetItem(c);_g=_d;_g.open=true;w=v;_d.container.className=_d.container.className.replace(new RegExp('(^|\\s)'+b+'(\\s|$)','g'),' ');if(m.offsetHeight>=20){m.style.height=m.offsetHeight-20+'px';}else{m.style.height=m.offsetHeight+'px';}m.style.overflow='hidden';v=_d.container;u=m;};n=new Accordion(p,q,{start:'closed',opacity:false,alwaysHide:true,duration:1000,onActive:onOpenElement,onComplete:onCompleteEvent});if(s){this.toggle(t.ID);}};Airtrade.Common=new function(){this.ConvertJsonToDate=function(a){return new Date(parseInt(a.substr(6)));};this.CreateDateFromDateArgs=function(b){var a=new Date;a.setFullYear(b.getFullYear(),b.getMonth(),b.getDate());return a;};this.ManuallyAddValidationTypeRequired=function(c,d,f,g,h){c.setAttribute('viewitem',d);c.setAttribute('viewgroup',f);c.setAttribute('ValidatorTypes','Required');c.setAttribute('ValidationGroup',f);c.setAttribute('RequiredHeaderMessage',g);c.setAttribute('RequiredMessage',h);c.setAttribute('NotificationEnabled','true');};this.ToggleExtendedElements=function(j){var k=$$('[ExtendedElement='+j+']');for(var i=0;i<k.length;i++){if(k[i].style.display==''){k[i].style.display='none';}else{k[i].style.display='';}};};}();function RedirectToNewsletterWithEmail(){try{var l=$$('div[isNewsletterRedirect=true]');if(typeof(l)!='undefined'){var m=l.getElement('input');if(typeof(m)!='undefined'){top.location.href='/NewsletterSubscription.aspx?email='+m.getProperty('value');}}}catch(e){}};AppLogger=new function(){this.LogWebBrowserError=function(a,b,c){try{CQS.Callback.doAsynchronousCallBack('LogWebBrowserError',a+'##'+b+'##'+c,true);}catch(e){}};}();var YAHOO=function(){
return{
util:{},
widget:{},
example:{},
namespace:function(sNameSpace){
if(!sNameSpace||!sNameSpace.length){
return null;
}
var levels=sNameSpace.split(".");
var currentNS=YAHOO;
for(var i=(levels[0]=="YAHOO")?1:0;i<levels.length;++i){
currentNS[levels[i]]=currentNS[levels[i]]||{};
currentNS=currentNS[levels[i]];
}
return currentNS;
}
};
}();
YAHOO.util.Dom=new function(){
this.get=function(el){
if(typeof el=='string'){
el=document.getElementById(el);
}
return el;
};
this.getStyle=function(el,property){
var value=null;
var dv=document.defaultView;
el=this.get(el);
if(property=='opacity'&&el.filters){
value=1;
try{
value=el.filters.item('DXImageTransform.Microsoft.Alpha').opacity/100;
}catch(e){
try{
value=el.filters.item('alpha').opacity/100;
}catch(e){}
}
}
else if(el.style[property]){
value=el.style[property];
}
else if(el.currentStyle&&el.currentStyle[property]){
value=el.currentStyle[property];
}
else if(dv&&dv.getComputedStyle)
{
var converted='';
for(i=0,len=property.length;i<len;++i){
if(property.charAt(i)==property.charAt(i).toUpperCase()){
converted=converted+'-'+property.charAt(i).toLowerCase();
}else{
converted=converted+property.charAt(i);
}
}
if(dv.getComputedStyle(el,'').getPropertyValue(converted)){
value=dv.getComputedStyle(el,'').getPropertyValue(converted);
}
}
return value;
};
this.setStyle=function(el,property,val){
el=this.get(el);
switch(property){
case'opacity':
if(el.filters){
el.style.filter='alpha(opacity='+val*100+')';
if(!el.currentStyle.hasLayout){
el.style.zoom=1;
}
}else{
el.style.opacity=val;
el.style['-moz-opacity']=val;
el.style['-khtml-opacity']=val;
}
break;
default:
el.style[property]=val;
}
};
this.getXY=function(el){
el=this.get(el);
if(el.parentNode===null||this.getStyle(el,'display')=='none'){
return false;
}
var parent=null;
var pos=[];
var box;
if(el.getBoundingClientRect){
box=el.getBoundingClientRect();
var scrollTop=document.documentElement.scrollTop||document.body.scrollTop;
var scrollLeft=document.documentElement.scrollLeft||document.body.scrollLeft;
return[box.left+scrollLeft,box.top+scrollTop];
}
else if(document.getBoxObjectFor){
box=document.getBoxObjectFor(el);
pos=[box.x,box.y];
}
else{
pos=[el.offsetLeft,el.offsetTop];
parent=el.offsetParent;
if(parent!=el){
while(parent){
pos[0]+=parent.offsetLeft;
pos[1]+=parent.offsetTop;
parent=parent.offsetParent;
}
}
var ua=navigator.userAgent.toLowerCase();
if(
ua.indexOf('opera')!=-1
||(ua.indexOf('safari')!=-1&&this.getStyle(el,'position')=='absolute')
){
pos[1]-=document.body.offsetTop;
}
}
if(el.parentNode){parent=el.parentNode;}
else{parent=null;}
while(parent&&parent.tagName!='BODY'&&parent.tagName!='HTML'){
pos[0]-=parent.scrollLeft;
pos[1]-=parent.scrollTop;
if(parent.parentNode){parent=parent.parentNode;}
else{parent=null;}
}
return pos;
};
this.getX=function(el){
return this.getXY(el)[0];
};
this.getY=function(el){
return this.getXY(el)[1];
};
this.setXY=function(el,pos,noRetry){
el=this.get(el);
var pageXY=YAHOO.util.Dom.getXY(el);
if(pageXY===false){return false;}
if(this.getStyle(el,'position')=='static'){
this.setStyle(el,'position','relative');
}
var delta=[
parseInt(YAHOO.util.Dom.getStyle(el,'left'),10),
parseInt(YAHOO.util.Dom.getStyle(el,'top'),10)
];
if(isNaN(delta[0])){delta[0]=0;}
if(isNaN(delta[1])){delta[1]=0;}
if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}
if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}
var newXY=this.getXY(el);
if(!noRetry&&(newXY[0]!=pos[0]||newXY[1]!=pos[1])){
this.setXY(el,pos,true);
}
return true;
};
this.setX=function(el,x){
return this.setXY(el,[x,null]);
};
this.setY=function(el,y){
return this.setXY(el,[null,y]);
};
this.getRegion=function(el){
el=this.get(el);
return new YAHOO.util.Region.getRegion(el);
};
this.getClientWidth=function(){
return(
document.documentElement.offsetWidth
||document.body.offsetWidth
);
};
this.getClientHeight=function(){
return(
self.innerHeight
||document.documentElement.clientHeight
||document.body.clientHeight
);
};
};
YAHOO.util.Region=function(t,r,b,l){
this.top=t;
this.right=r;
this.bottom=b;
this.left=l;
};
YAHOO.util.Region.prototype.contains=function(region){
return(region.left>=this.left&&
region.right<=this.right&&
region.top>=this.top&&
region.bottom<=this.bottom);
};
YAHOO.util.Region.prototype.getArea=function(){
return((this.bottom-this.top)*(this.right-this.left));
};
YAHOO.util.Region.prototype.intersect=function(region){
var t=Math.max(this.top,region.top);
var r=Math.min(this.right,region.right);
var b=Math.min(this.bottom,region.bottom);
var l=Math.max(this.left,region.left);
if(b>=t&&r>=l){
return new YAHOO.util.Region(t,r,b,l);
}else{
return null;
}
};
YAHOO.util.Region.prototype.union=function(region){
var t=Math.min(this.top,region.top);
var r=Math.max(this.right,region.right);
var b=Math.max(this.bottom,region.bottom);
var l=Math.min(this.left,region.left);
return new YAHOO.util.Region(t,r,b,l);
};
YAHOO.util.Region.prototype.toString=function(){
return("Region {"+
"  t: "+this.top+
", r: "+this.right+
", b: "+this.bottom+
", l: "+this.left+
"}");
}
YAHOO.util.Region.getRegion=function(el){
var p=YAHOO.util.Dom.getXY(el);
var t=p[1];
var r=p[0]+el.offsetWidth;
var b=p[1]+el.offsetHeight;
var l=p[0];
return new YAHOO.util.Region(t,r,b,l);
};
YAHOO.util.Point=function(x,y){
this.x=x;
this.y=y;
this.top=y;
this.right=x;
this.bottom=y;
this.left=x;
};
YAHOO.util.Point.prototype=new YAHOO.util.Region();
YAHOO.util.CustomEvent=function(_1,_2){this.type=_1;this.scope=_2||window;this.subscribers=[];if(YAHOO.util["Event"]){YAHOO.util.Event.regCE(this);}};YAHOO.util.CustomEvent.prototype={subscribe:function(fn,_4,_5){this.subscribers.push(new YAHOO.util.Subscriber(fn,_4,_5));},unsubscribe:function(fn,_6){var _7=false;for(var i=0;i<this.subscribers.length;++i){var s=this.subscribers[i];if(s&&s.contains(fn,_6)){this._delete(i);_7=true;}}return _7;},fire:function(){for(var i=0;i<this.subscribers.length;++i){var s=this.subscribers[i];if(s){var _10=(s.override)?s.obj:this.scope;s.fn.call(_10,this.type,arguments,s.obj);}}},unsubscribeAll:function(){for(var i=0;i<this.subscribers.length;++i){this._delete(i);}},_delete:function(_11){var s=this.subscribers[_11];if(s){delete s.fn;delete s.obj;}delete this.subscribers[_11];}};YAHOO.util.Subscriber=function(fn,obj,_13){this.fn=fn;this.obj=obj||null;this.override=(_13);};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){return(this.fn==fn&&this.obj==obj);};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var _14=false;var _15=[];var _16=[];var _17=[];var _18=[];var _19=[];var _20=[];return{EL:0,TYPE:1,FN:2,WFN:3,SCOPE:3,ADJ_SCOPE:4,isSafari:(navigator.userAgent.match(/safari/gi)),isIE:(!this.isSafari&&navigator.userAgent.match(/msie/gi)),addListener:function(el,_22,fn,_23,_24){if(this._isValidCollection(el)){var ok=true;for(var i=0;i<el.length;++i){ok=(this.on(el[i],_22,fn,_23,_24)&&ok);}return ok;}else{if(typeof el=="string"){if(_14){el=this.getEl(el);}else{_16[_16.length]=[el,_22,fn,_23,_24];return true;}}}if(!el){return false;}if("unload"==_22&&_23!==this){_17[_17.length]=[el,_22,fn,_23,_24];return true;}var _26=(_24)?_23:el;var _27=function(e){return fn.call(_26,YAHOO.util.Event.getEvent(e),_23);};var li=[el,_22,fn,_27,_26];var _30=_15.length;_15[_30]=li;if(this.useLegacyEvent(el,_22)){var _31=this.getLegacyIndex(el,_22);if(_31==-1){_31=_19.length;_19[_31]=[el,_22,el["on"+_22]];_20[_31]=[];el["on"+_22]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),_31);};}_20[_31].push(_30);}else{if(el.addEventListener){el.addEventListener(_22,_27,false);}else{if(el.attachEvent){el.attachEvent("on"+_22,_27);}}}return true;},fireLegacyEvent:function(e,_32){var ok=true;var le=_20[_32];for(i=0;i<le.length;++i){var _34=le[i];if(_34){var li=_15[_34];var _35=li[this.ADJ_SCOPE];var ret=li[this.WFN].call(_35,e);ok=(ok&&ret);}}return ok;},getLegacyIndex:function(el,_37){for(var i=0;i<_19.length;++i){var le=_19[i];if(le&&le[0]==el&&le[1]==_37){return i;}}return-1;},useLegacyEvent:function(el,_38){return((!el.addEventListener&&!el.attachEvent)||(_38=="click"&&this.isSafari));},removeListener:function(el,_39,fn){if(typeof el=="string"){el=this.getEl(el);}else{if(this._isValidCollection(el)){var ok=true;for(var i=0;i<el.length;++i){ok=(this.removeListener(el[i],_39,fn)&&ok);}return ok;}}var _40=null;var _41=this._getCacheIndex(el,_39,fn);if(_41>=0){_40=_15[_41];}if(!el||!_40){return false;}if(el.removeEventListener){el.removeEventListener(_39,_40[this.WFN],false);}else{if(el.detachEvent){el.detachEvent("on"+_39,_40[this.WFN]);}}delete _15[_41][this.WFN];delete _15[_41][this.FN];delete _15[_41];return true;},getTarget:function(ev,_43){var t=ev.target||ev.srcElement;if(_43&&t&&"#text"==t.nodeName){return t.parentNode;}else{return t;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}return y;},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else{if(ev.type=="mouseover"){t=ev.fromElement;}}}return t;},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(e){return t;}}return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}c=c.caller;}}return ev;},getCharCode:function(ev){return ev.charCode||(ev.type=="keypress")?ev.keyCode:0;},_getCacheIndex:function(el,_48,fn){for(var i=0;i<_15.length;++i){var li=_15[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==_48){return i;}}return-1;},_isValidCollection:function(o){return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){for(i in this.elCache){delete this.elCache[i];}},regCE:function(ce){_18.push(ce);},_load:function(e){_14=true;},_tryPreloadAttach:function(){var _52=!_14;for(var i=0;i<_16.length;++i){var d=_16[i];if(d){var el=this.getEl(d[this.EL]);if(el){this.on(el,d[this.TYPE],d[this.FN],d[this.SCOPE],d[this.ADJ_SCOPE]);delete _16[i];}}}if(_52){setTimeout("YAHOO.util.Event._tryPreloadAttach()",50);}},_unload:function(e,me){for(var i=0;i<_17.length;++i){var l=_17[i];if(l){var _56=(l[this.ADJ_SCOPE])?l[this.SCOPE]:window;l[this.FN].call(_56,this.getEvent(e),l[this.SCOPE]);}}if(_15&&_15.length>0){for(i=0;i<_15.length;++i){l=_15[i];if(l){this.removeListener(l[this.EL],l[this.TYPE],l[this.FN]);}}this.clearCache();}for(i=0;i<_18.length;++i){_18[i].unsubscribeAll();delete _18[i];}for(i=0;i<_19.length;++i){delete _19[i][0];delete _19[i];}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement;db=document.body;if(dd&&dd.scrollTop){return[dd.scrollTop,dd.scrollLeft];}else{if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}}}};}();YAHOO.util.Event.on=YAHOO.util.Event.addListener;if(document&&document.body){YAHOO.util.Event._load();}else{YAHOO.util.Event.on(window,"load",YAHOO.util.Event._load,YAHOO.util.Event,true);}YAHOO.util.Event.on(window,"unload",YAHOO.util.Event._unload,YAHOO.util.Event,true);YAHOO.util.Event._tryPreloadAttach();}
YAHOO.util.DragDrop=function(id,sGroup){
if(id){
this.init(id,sGroup);
}
};
YAHOO.util.DragDrop.prototype={
id:null,
dragElId:null,
handleElId:null,
invalidHandleTypes:null,
startPageX:0,
startPageY:0,
groups:null,
locked:false,
lock:function(){this.locked=true;},
unlock:function(){this.locked=false;},
isTarget:true,
padding:null,
_domRef:null,
__ygDragDrop:true,
constrainX:false,
constrainY:false,
minX:0,
maxX:0,
minY:0,
maxY:0,
maintainOffset:false,
xTicks:null,
yTicks:null,
primaryButtonOnly:true,
b4StartDrag:function(x,y){},
startDrag:function(x,y){},
b4Drag:function(e){},
onDrag:function(e){},
onDragEnter:function(e,id){},
b4DragOver:function(e){},
onDragOver:function(e,id){},
b4DragOut:function(e){},
onDragOut:function(e,id){},
b4DragDrop:function(e){},
onDragDrop:function(e,id){},
b4EndDrag:function(e){},
endDrag:function(e){},
b4MouseDown:function(e){},
onMouseDown:function(e){},
onMouseUp:function(e){},
getEl:function(){
if(!this._domRef){
this._domRef=this.DDM.getElement(this.id);
}
return this._domRef;
},
getDragEl:function(){
return this.DDM.getElement(this.dragElId);
},
init:function(id,sGroup){
this.initTarget(id,sGroup);
YAHOO.util.Event.addListener(id,"mousedown",
this.handleMouseDown,this,true);
},
initTarget:function(id,sGroup){
this.DDM=YAHOO.util.DDM;
this.padding=[0,0,0,0];
this.groups={};
this.id=id;
this.setDragElId(id);
this.invalidHandleTypes={a:"a"};
this.handleElId=id;
if(document&&document.body){
this.setInitPosition();
}
this.addToGroup((sGroup)?sGroup:"default");
},
setPadding:function(iTop,iRight,iBot,iLeft){
if(!iRight&&0!==iRight){
this.padding=[iTop,iTop,iTop,iTop];
}else if(!iBot&&0!==iBot){
this.padding=[iTop,iRight,iTop,iRight];
}else{
this.padding=[iTop,iRight,iBot,iLeft];
}
},
setInitPosition:function(diffX,diffY){
var el=this.getEl();
if(!this.DDM.verifyEl(el)){
return;
}
var dx=diffX||0;
var dy=diffY||0;
var p=YAHOO.util.Dom.getXY(el);
this.initPageX=p[0]-dx;
this.initPageY=p[1]-dy;
this.lastPageX=p[0];
this.lastPageY=p[1];
this.setStartPosition(p);
},
setStartPosition:function(pos){
var p=pos||YAHOO.util.Dom.getXY(this.getEl());
this.startPageX=p[0];
this.startPageY=p[1];
},
addToGroup:function(sGroup){
this.groups[sGroup]=true;
this.DDM.regDragDrop(this,sGroup);
},
setDragElId:function(id){
this.dragElId=id;
},
setHandleElId:function(id){
this.handleElId=id;
this.DDM.regHandle(this.id,id);
},
setOuterHandleElId:function(id){
YAHOO.util.Event.addListener(id,"mousedown",
this.handleMouseDown,this,true);
this.setHandleElId(id);
},
unreg:function(){
YAHOO.util.Event.removeListener(this.id,"mousedown",
this.handleMouseDown);
this._domRef=null;
this.DDM._remove(this);
},
isLocked:function(){
return(this.DDM.isLocked()||this.locked);
},
handleMouseDown:function(e,oDD){
if(oDD.id.substring(0,8)=="sliderBG")
{
return;
}
var EU=YAHOO.util.Event;
var button=e.which||e.button;
if(this.primaryButtonOnly&&button>1){
return;
}
if(this.isLocked()){
return;
}
this.DDM.refreshCache(this.groups);
var pt=new YAHOO.util.Point(EU.getPageX(e),EU.getPageY(e));
if(this.DDM.isOverTarget(pt,this)){
var srcEl=EU.getTarget(e);
if(this.isValidHandleChild(srcEl)&&
(this.id==this.handleElId||
this.DDM.handleWasClicked(srcEl,this.id))){
this.setStartPosition();
this.b4MouseDown(e);
this.onMouseDown(e);
this.DDM.handleMouseDown(e,this);
this.DDM.stopEvent(e);
}
}
},
addInvalidHandleType:function(tagName){
var type=tagName.toUpperCase();
this.invalidHandleTypes[type]=type;
},
removeInvalidHandleType:function(tagName){
var type=tagName.toUpperCase();
this.invalidHandleTypes[type]=null;
},
isValidHandleChild:function(node){
var type=node.nodeName;
if(type=="#text"){
type=node.parentNode.nodeName;
}
return(!this.invalidHandleTypes[type]);
},
setXTicks:function(iStartX,iTickSize){
this.xTicks=[];
this.xTickSize=iTickSize;
var tickMap={};
for(var i=this.initPageX;i>=this.minX;i=i-iTickSize){
if(!tickMap[i]){
this.xTicks[this.xTicks.length]=i;
tickMap[i]=true;
}
}
for(i=this.initPageX;i<=this.maxX;i=i+iTickSize){
if(!tickMap[i]){
this.xTicks[this.xTicks.length]=i;
tickMap[i]=true;
}
}
this.xTicks.sort(this.DDM.numericSort);
},
setYTicks:function(iStartY,iTickSize){
this.yTicks=[];
this.yTickSize=iTickSize;
var tickMap={};
for(var i=this.initPageY;i>=this.minY;i=i-iTickSize){
if(!tickMap[i]){
this.yTicks[this.yTicks.length]=i;
tickMap[i]=true;
}
}
for(i=this.initPageY;i<=this.maxY;i=i+iTickSize){
if(!tickMap[i]){
this.yTicks[this.yTicks.length]=i;
tickMap[i]=true;
}
}
this.yTicks.sort(this.DDM.numericSort);
},
setXConstraint:function(iLeft,iRight,iTickSize){
this.leftConstraint=iLeft;
this.rightConstraint=iRight;
this.minX=this.initPageX-iLeft;
this.maxX=this.initPageX+iRight;
if(iTickSize){this.setXTicks(this.initPageX,iTickSize);}
this.constrainX=true;
},
setYConstraint:function(iUp,iDown,iTickSize){
this.topConstraint=iUp;
this.bottomConstraint=iDown;
this.minY=this.initPageY-iUp;
this.maxY=this.initPageY+iDown;
if(iTickSize){this.setYTicks(this.initPageY,iTickSize);}
this.constrainY=true;
},
resetConstraints:function(){
var dx=(this.maintainOffset)?this.lastPageX-this.initPageX:0;
var dy=(this.maintainOffset)?this.lastPageY-this.initPageY:0;
this.setInitPosition(dx,dy);
if(this.constrainX){
this.setXConstraint(this.leftConstraint,
this.rightConstraint,
this.xTickSize);
}
if(this.constrainY){
this.setYConstraint(this.topConstraint,
this.bottomConstraint,
this.yTickSize);
}
},
getTick:function(val,tickArray){
if(!tickArray){
return val;
}else if(tickArray[0]>=val){
return tickArray[0];
}else{
for(var i=0;i<tickArray.length;++i){
var next=i+1;
if(tickArray[next]&&tickArray[next]>=val){
var diff1=val-tickArray[i];
var diff2=tickArray[next]-val;
return(diff2>diff1)?tickArray[i]:tickArray[next];
}
}
return tickArray[tickArray.length-1];
}
},
toString:function(val,tickArray){
return("YAHOO.util.DragDrop {"+this.id+"}");
}
};
if(!YAHOO.util.DragDropMgr){
YAHOO.util.DragDropMgr=new function(){
var UTIL=YAHOO.util;
this.ids={};
this.handleIds={};
this.dragCurrent=null;
this.dragOvers={};
this.deltaX=0;
this.deltaY=0;
this.preventDefault=true;
this.stopPropagation=true;
this.initalized=false;
this.locked=false;
this.init=function(){
};
this.POINT=0;
this.INTERSECT=1;
this.mode=this.POINT;
this._execOnAll=function(sMethod,args){
for(var i in this.ids){
for(var j in this.ids[i]){
var oDD=this.ids[i][j];
if(!this.isTypeOfDD(oDD)){
continue;
}
oDD[sMethod].apply(oDD,args);
}
}
};
this._onLoad=function(){
this._execOnAll("setInitPosition",[]);
var EU=UTIL.Event;
EU.addListener(document,"mouseup",this.handleMouseUp,this,true);
EU.addListener(document,"mousemove",this.handleMouseMove,this,true);
EU.addListener(window,"resize",this._onResize,this,true);
this.initalized=true;
};
this._onResize=function(e){
this._execOnAll("resetConstraints",[]);
};
this.lock=function(){this.locked=true;};
this.unlock=function(){this.locked=false;};
this.isLocked=function(){return this.locked;};
this.locationCache={};
this.useCache=true;
this.clickPixelThresh=3;
this.clickTimeThresh=1000;
this.dragThreshMet=false;
this.clickTimeout=null;
this.startX=0;
this.startY=0;
this.regDragDrop=function(oDD,sGroup){
if(!this.initialized){this.init();}
if(!this.ids[sGroup]){
this.ids[sGroup]={};
}
this.ids[sGroup][oDD.id]=oDD;
};
this._remove=function(oDD){
for(var g in oDD.groups){
if(g&&this.ids[g][oDD.id]){
delete this.ids[g][oDD.id];
}
}
delete this.handleIds[oDD.id];
};
this.regHandle=function(sDDId,sHandleId){
if(!this.handleIds[sDDId]){
this.handleIds[sDDId]={};
}
this.handleIds[sDDId][sHandleId]=sHandleId;
};
this.isDragDrop=function(id){
return(this.getDDById(id))?true:false;
};
this.getRelated=function(p_oDD,bTargetsOnly){
var oDDs=[];
for(var i in p_oDD.groups){
for(j in this.ids[i]){
var dd=this.ids[i][j];
if(!this.isTypeOfDD(dd)){
continue;
}
if(!bTargetsOnly||dd.isTarget){
oDDs[oDDs.length]=dd;
}
}
}
return oDDs;
};
this.isLegalTarget=function(oDD,oTargetDD){
var targets=this.getRelated(oDD);
for(var i=0;i<targets.length;++i){
if(targets[i].id==oTargetDD.id){
return true;
}
}
return false;
};
this.isTypeOfDD=function(oDD){
return(oDD&&oDD.__ygDragDrop);
};
this.isHandle=function(sDDId,sHandleId){
return(this.handleIds[sDDId]&&
this.handleIds[sDDId][sHandleId]);
};
this.getDDById=function(id){
for(var i in this.ids){
if(this.ids[i][id]){
return this.ids[i][id];
}
}
return null;
};
this.handleMouseDown=function(e,oDD){
this.dragCurrent=oDD;
var el=oDD.getEl();
this.startX=UTIL.Event.getPageX(e);
this.startY=UTIL.Event.getPageY(e);
this.deltaX=this.startX-el.offsetLeft;
this.deltaY=this.startY-el.offsetTop;
this.dragThreshMet=false;
this.clickTimeout=setTimeout(
"var DDM=YAHOO.util.DDM;DDM.startDrag(DDM.startX, DDM.startY)",
this.clickTimeThresh);
};
this.startDrag=function(x,y){
clearTimeout(this.clickTimeout);
if(this.dragCurrent){
this.dragCurrent.b4StartDrag(x,y);
this.dragCurrent.startDrag(x,y);
}
this.dragThreshMet=true;
};
this.handleMouseUp=function(e){
if(!this.dragCurrent){
return;
}
clearTimeout(this.clickTimeout);
if(this.dragThreshMet){
this.fireEvents(e,true);
}else{
}
this.stopDrag(e);
this.stopEvent(e);
};
this.stopEvent=function(e){
if(this.stopPropagation){
UTIL.Event.stopPropagation(e);
}
if(this.preventDefault){
UTIL.Event.preventDefault(e);
}
};
this.stopDrag=function(e){
if(this.dragCurrent){
if(this.dragThreshMet){
this.dragCurrent.b4EndDrag(e);
this.dragCurrent.endDrag(e);
}
this.dragCurrent.onMouseUp(e);
}
this.dragCurrent=null;
this.dragOvers={};
};
this.handleMouseMove=function(e){
if(!this.dragCurrent){
return;
}
if(UTIL.Event.isIE&&!e.button){
this.stopEvent(e);
return this.handleMouseUp(e);
}
if(!this.dragThreshMet){
var diffX=Math.abs(this.startX-UTIL.Event.getPageX(e));
var diffY=Math.abs(this.startY-UTIL.Event.getPageY(e));
if(diffX>this.clickPixelThresh||
diffY>this.clickPixelThresh){
this.startDrag(this.startX,this.startY);
}
}
if(this.dragThreshMet){
this.dragCurrent.b4Drag(e);
this.dragCurrent.onDrag(e);
this.fireEvents(e,false);
}
this.stopEvent(e);
};
this.fireEvents=function(e,isDrop){
var dc=this.dragCurrent;
if(!dc||dc.isLocked()){
return;
}
var x=UTIL.Event.getPageX(e);
var y=UTIL.Event.getPageY(e);
var pt=new YAHOO.util.Point(x,y);
var oldOvers=[];
var outEvts=[];
var overEvts=[];
var dropEvts=[];
var enterEvts=[];
for(var i in this.dragOvers){
var ddo=this.dragOvers[i];
if(!this.isTypeOfDD(ddo)){
continue;
}
if(!this.isOverTarget(pt,ddo,this.mode)){
outEvts.push(ddo);
}
oldOvers[i]=true;
delete this.dragOvers[i];
}
for(var sGroup in dc.groups){
if("string"!=typeof sGroup){
continue;
}
for(i in this.ids[sGroup]){
var oDD=this.ids[sGroup][i];
if(!this.isTypeOfDD(oDD)){
continue;
}
if(oDD.isTarget&&!oDD.isLocked()&&oDD!=dc){
if(this.isOverTarget(pt,oDD,this.mode)){
if(isDrop){
dropEvts.push(oDD);
}else{
if(!oldOvers[oDD.id]){
enterEvts.push(oDD);
}else{
overEvts.push(oDD);
}
this.dragOvers[oDD.id]=oDD;
}
}
}
}
}
if(this.mode){
if(outEvts.length>0){
dc.b4DragOut(e,outEvts);
dc.onDragOut(e,outEvts);
}
if(enterEvts.length>0){
dc.onDragEnter(e,enterEvts);
}
if(overEvts.length>0){
dc.b4DragOver(e,overEvts);
dc.onDragOver(e,overEvts);
}
if(dropEvts.length>0){
dc.b4DragDrop(e,dropEvts);
dc.onDragDrop(e,dropEvts);
}
}else{
for(i=0;i<outEvts.length;++i){
dc.b4DragOut(e,outEvts[i].id);
dc.onDragOut(e,outEvts[i].id);
}
for(i=0;i<enterEvts.length;++i){
dc.onDragEnter(e,enterEvts[i].id);
}
for(i=0;i<overEvts.length;++i){
dc.b4DragOver(e,overEvts[i].id);
dc.onDragOver(e,overEvts[i].id);
}
for(i=0;i<dropEvts.length;++i){
dc.b4DragDrop(e,dropEvts[i].id);
dc.onDragDrop(e,dropEvts[i].id);
}
}
};
this.getBestMatch=function(dds){
var winner=null;
if(dds.length==1){
winner=dds[0];
}else{
for(var i=0;i<dds.length;++i){
var dd=dds[i];
if(dd.cursorIsOver){
winner=dd;
break;
}else{
if(!winner||
winner.overlap.getArea()<dd.overlap.getArea()){
winner=dd;
}
}
}
}
return winner;
};
this.refreshCache=function(aGroups){
for(sGroup in aGroups){
if("string"!=typeof sGroup){
continue;
}
for(i in this.ids[sGroup]){
var oDD=this.ids[sGroup][i];
if(this.isTypeOfDD(oDD)){
var loc=this.getLocation(oDD);
if(loc){
this.locationCache[oDD.id]=loc;
}else{
delete this.locationCache[oDD.id];
oDD.unreg();
}
}
}
}
};
this.verifyEl=function(el){
try{
if(el){
var parent=el.offsetParent;
if(parent){
return true;
}
}
}catch(e){
}
return false;
};
this.getLocation=function(oDD){
if(!this.isTypeOfDD(oDD)){
return null;
}
var el=oDD.getEl();
if(!this.verifyEl(el)){
return null;
}
var aPos=YAHOO.util.Dom.getXY(el);
x1=aPos[0];
x2=x1+el.offsetWidth;
y1=aPos[1];
y2=y1+el.offsetHeight;
var t=y1-oDD.padding[0];
var r=x2+oDD.padding[1];
var b=y2+oDD.padding[2];
var l=x1-oDD.padding[3];
return new YAHOO.util.Region(t,r,b,l);
};
this.isOverTarget=function(pt,oDDTarget,intersect){
var loc=this.locationCache[oDDTarget.id];
if(!loc||!this.useCache){
loc=this.getLocation(oDDTarget);
this.locationCache[oDDTarget.id]=loc;
}
oDDTarget.cursorIsOver=loc.contains(pt);
oDDTarget.overlap=null;
if(intersect){
var curRegion=
YAHOO.util.Region.getRegion(this.dragCurrent.getDragEl());
var overlap=curRegion.intersect(loc);
if(overlap){
oDDTarget.overlap=overlap;
return true;
}else{
return false;
}
}else{
return oDDTarget.cursorIsOver;
}
};
this._onUnload=function(e,me){
this.unregAll();
};
this.unregAll=function(){
if(this.dragCurrent){
this.stopDrag();
this.dragCurrent=null;
}
this._execOnAll("unreg",[]);
for(i in this.elementCache){
delete this.elementCache[i];
}
this.elementCache={};
this.ids={};
};
this.elementCache={};
this.getElWrapper=function(id){
var oWrapper=this.elementCache[id];
if(!oWrapper||!oWrapper.el){
oWrapper=this.elementCache[id]=
new this.ElementWrapper(document.getElementById(id));
}
return oWrapper;
};
this.getElement=function(id){
return document.getElementById(id);
};
this.getCss=function(id){
var css=null;
var el=document.getElementById(id);
if(el){
css=el.style;
}
return css;
};
this.ElementWrapper=function(el){
this.el=el||null;
this.id=this.el&&el.id;
this.css=this.el&&el.style;
};
this.getPosX=function(el){
return YAHOO.util.Dom.getX(el);
};
this.getPosY=function(el){
return YAHOO.util.Dom.getY(el);
};
this.swapNode=function(n1,n2){
if(n1.swapNode){
n1.swapNode(n2);
}else{
var p=n2.parentNode;
var s=n2.nextSibling;
n1.parentNode.replaceChild(n2,n1);
p.insertBefore(n1,s);
}
};
this.getScroll=function(){
var t,l;
if(document.documentElement&&document.documentElement.scrollTop){
t=document.documentElement.scrollTop;
l=document.documentElement.scrollLeft;
}else if(document.body){
t=document.body.scrollTop;
l=document.body.scrollLeft;
}
return{top:t,left:l};
};
this.getStyle=function(el,styleProp){
if(el.style.styleProp){
return el.style.styleProp;
}else if(el.currentStyle){
return el.currentStyle[styleProp];
}else if(document.defaultView){
return document.defaultView.getComputedStyle(el,null).
getPropertyValue(styleProp);
}
};
this.getScrollTop=function(){return this.getScroll().top;};
this.getScrollLeft=function(){return this.getScroll().left;};
this.moveToEl=function(moveEl,targetEl){
var aCoord=YAHOO.util.Dom.getXY(targetEl);
YAHOO.util.Dom.setXY(moveEl,aCoord);
};
this.getClientHeight=function(){
return(window.innerHeight)?window.innerHeight:
(document.documentElement&&document.documentElement.clientHeight)?
document.documentElement.clientHeight:document.body.offsetHeight;
};
this.getClientWidth=function(){
return(window.innerWidth)?window.innerWidth:
(document.documentElement&&document.documentElement.clientWidth)?
document.documentElement.clientWidth:document.body.offsetWidth;
};
this.numericSort=function(a,b){return(a-b);};
this._timeoutCount=0;
this._addListeners=function(){
if(UTIL.Event&&
document&&
document.body){
this._onLoad();
}else{
if(this._timeoutCount>500){
}else{
setTimeout("YAHOO.util.DDM._addListeners()",10);
this._timeoutCount+=1;
}
}
};
this.handleWasClicked=function(node,id){
if(this.isHandle(id,node.id)){
return true;
}else{
var p=node.parentNode;
while(p){
if(this.isHandle(id,p.id)){
return true;
}else{
p=p.parentNode;
}
}
}
return false;
};
};
YAHOO.util.DDM=YAHOO.util.DragDropMgr;
YAHOO.util.DDM._addListeners();
}
YAHOO.util.DD=function(id,sGroup){
if(id){
this.init(id,sGroup);
}
};
YAHOO.util.DD.prototype=new YAHOO.util.DragDrop();
YAHOO.util.DD.prototype.scroll=true;
YAHOO.util.DD.prototype.autoOffset=function(iPageX,iPageY){
var el=this.getEl();
var aCoord=YAHOO.util.Dom.getXY(el);
var x=iPageX-aCoord[0];
var y=iPageY-aCoord[1];
this.setDelta(x,y);
};
YAHOO.util.DD.prototype.setDelta=function(iDeltaX,iDeltaY){
this.deltaX=iDeltaX;
this.deltaY=iDeltaY;
};
YAHOO.util.DD.prototype.setDragElPos=function(iPageX,iPageY){
this.alignElWithMouse(this.getDragEl(),iPageX,iPageY);
};
YAHOO.util.DD.prototype.alignElWithMouse=function(el,iPageX,iPageY){
var oCoord=this.getTargetCoord(iPageX,iPageY);
var aCoord=[oCoord.x,oCoord.y];
YAHOO.util.Dom.setXY(el,aCoord);
this.cachePosition(oCoord.x,oCoord.y);
};
YAHOO.util.DD.prototype.cachePosition=function(iPageX,iPageY){
if(iPageX){
this.lastPageX=iPageX;
this.lastPageY=iPageY;
}else{
var aCoord=YAHOO.util.Dom.getXY(this.getEl());
this.lastPageX=aCoord[0];
this.lastPageY=aCoord[1];
}
};
YAHOO.util.DD.prototype.autoScroll=function(x,y,h,w){
if(this.scroll){
var clientH=this.DDM.getClientHeight();
var clientW=this.DDM.getClientWidth();
var st=this.DDM.getScrollTop();
var sl=this.DDM.getScrollLeft();
var bot=h+y;
var right=w+x;
var toBot=(clientH+st-y-this.deltaY);
var toRight=(clientW+sl-x-this.deltaX);
var thresh=40;
var scrAmt=(document.all)?80:30;
if(bot>clientH&&toBot<thresh){
window.scrollTo(sl,st+scrAmt);
}
if(y<st&&st>0&&y-st<thresh){
window.scrollTo(sl,st-scrAmt);
}
if(right>clientW&&toRight<thresh){
window.scrollTo(sl+scrAmt,st);
}
if(x<sl&&sl>0&&x-sl<thresh){
window.scrollTo(sl-scrAmt,st);
}
}
};
YAHOO.util.DD.prototype.getTargetCoord=function(iPageX,iPageY){
var x;
var y;
if(this.deltaX==undefined)
x=iPageX;
else
x=iPageX-this.deltaX;
if(this.deltaY==undefined)
y=iPageY
else
y=iPageY-this.deltaY;
if(this.constrainX){
if(x<this.minX){x=this.minX;}
if(x>this.maxX){x=this.maxX;}
}
if(this.constrainY){
if(y<this.minY){y=this.minY;}
if(y>this.maxY){y=this.maxY;}
}
x=this.getTick(x,this.xTicks);
y=this.getTick(y,this.yTicks);
return{x:x,y:y};
};
YAHOO.util.DD.prototype.b4MouseDown=function(e){
this.autoOffset(YAHOO.util.Event.getPageX(e),
YAHOO.util.Event.getPageY(e));
};
YAHOO.util.DD.prototype.b4Drag=function(e){
this.setDragElPos(YAHOO.util.Event.getPageX(e),
YAHOO.util.Event.getPageY(e));
};
YAHOO.util.DDProxy=function(id,sGroup){
if(id){
this.init(id,sGroup);
this.initFrame();
}
};
YAHOO.util.DDProxy.prototype=new YAHOO.util.DD();
YAHOO.util.DDProxy.frameDiv=null;
YAHOO.util.DDProxy.dragElId="ygddfdiv";
YAHOO.util.DDProxy.prototype.borderWidth=2;
YAHOO.util.DDProxy.prototype.resizeFrame=true;
YAHOO.util.DDProxy.prototype.centerFrame=false;
YAHOO.util.DDProxy.createFrame=function(){
var THIS=YAHOO.util.DDProxy;
if(!document||!document.body){
setTimeout(THIS.createFrame,50);
return;
}
if(!THIS.frameDiv){
THIS.frameDiv=document.createElement("div");
THIS.frameDiv.id=THIS.dragElId;
var s=THIS.frameDiv.style;
s.position="absolute";
s.visibility="hidden";
s.cursor="move";
s.border="2px solid #aaa";
s.zIndex=999;
document.body.appendChild(THIS.frameDiv);
}
};
YAHOO.util.DDProxy.prototype.initFrame=function(){
YAHOO.util.DDProxy.createFrame();
this.setDragElId(YAHOO.util.DDProxy.dragElId);
this.useAbsMath=true;
};
YAHOO.util.DDProxy.prototype.showFrame=function(iPageX,iPageY){
var el=this.getEl();
var s=this.getDragEl().style;
if(this.resizeFrame){
s.width=(parseInt(el.offsetWidth)-(2*this.borderWidth))+"px";
s.height=(parseInt(el.offsetHeight)-(2*this.borderWidth))+"px";
}
if(this.centerFrame){
this.setDelta(Math.round(parseInt(s.width)/2),
Math.round(parseInt(s.width)/2));
}
this.setDragElPos(iPageX,iPageY);
s.visibility="";
};
YAHOO.util.DDProxy.prototype.b4MouseDown=function(e){
var x=YAHOO.util.Event.getPageX(e);
var y=YAHOO.util.Event.getPageY(e);
this.autoOffset(x,y);
this.setDragElPos(x,y);
};
YAHOO.util.DDProxy.prototype.b4StartDrag=function(x,y){
this.showFrame(x,y);
};
YAHOO.util.DDProxy.prototype.b4EndDrag=function(e){
var s=this.getDragEl().style;
s.visibility="hidden";
};
YAHOO.util.DDProxy.prototype.endDrag=function(e){
var lel=this.getEl();
var del=this.getDragEl();
del.style.visibility="";
lel.style.visibility="hidden";
YAHOO.util.DDM.moveToEl(lel,del);
del.style.visibility="hidden";
lel.style.visibility="";
};
YAHOO.util.DDTarget=function(id,sGroup){
if(id){
this.initTarget(id,sGroup);
}
};
YAHOO.util.DDTarget.prototype=new YAHOO.util.DragDrop();
YAHOO.widget.Slider=function(sElementId,sGroup,oThumb){
if(sElementId){
this.init(sElementId,sGroup,true);
var self=this;
this.thumb=oThumb;
oThumb.onChange=function(){
self.onThumbChange();
};
var el=oThumb.getEl();
this.thumbCenterPoint={x:el.offsetWidth/2,y:el.offsetHeight/2};
this.isTarget=false;
this.animate=YAHOO.widget.Slider.ANIM_AVAIL;
this.backgroundEnabled=true;
this.baselinePos=YAHOO.util.Dom.getXY(this.getEl());
this.tickPause=40;
if(oThumb._isHoriz&&oThumb.xTicks){
this.tickPause=Math.round(360/oThumb.xTicks.length);
}else if(oThumb.yTicks){
this.tickPause=Math.round(360/oThumb.yTicks.length);
}
oThumb.onMouseDown=function(){return self.focus();};
oThumb.b4MouseDown=function(){return self.b4MouseDown();};
oThumb.onMouseUp=function(){self.onMouseUp();};
oThumb.onDrag=function(){self.fireEvents();};
}
};
YAHOO.widget.Slider.prototype=new YAHOO.util.DragDrop();
YAHOO.widget.Slider.getHorizSlider=
function(sBGElId,sHandleElId,iLeft,iRight,iTickSize){
return new YAHOO.widget.Slider(sBGElId,sBGElId,
new YAHOO.widget.SliderThumb(sHandleElId,sBGElId,
iLeft,iRight,0,0,iTickSize));
};
YAHOO.widget.Slider.getVertSlider=
function(sBGElId,sHandleElId,iUp,iDown,iTickSize){
return new YAHOO.widget.Slider(sBGElId,sBGElId,
new YAHOO.widget.SliderThumb(sHandleElId,sBGElId,0,0,
iUp,iDown,iTickSize));
};
YAHOO.widget.Slider.getSliderRegion=
function(sBGElId,sHandleElId,iLeft,iRight,iUp,iDown,iTickSize){
return new YAHOO.widget.Slider(sBGElId,sBGElId,
new YAHOO.widget.SliderThumb(sHandleElId,sBGElId,iLeft,iRight,
iUp,iDown,iTickSize));
};
YAHOO.widget.Slider.ANIM_AVAIL=true;
YAHOO.widget.Slider.prototype.lock=function(){
this.thumb.lock();
this.locked=true;
};
YAHOO.widget.Slider.prototype.unlock=function(){
this.thumb.unlock();
this.locked=false;
};
YAHOO.widget.Slider.prototype.onMouseUp=function(){
this._deferSlideEnd=true;
this.fireEvents();
};
YAHOO.widget.Slider.prototype.focus=function(){
var el=this.getEl();
if(el.focus){
el.focus();
}
this.verifyOffset();
if(this.isLocked()){
return false;
}else{
this.onSlideStart();
return true;
}
};
YAHOO.widget.Slider.prototype.onChange=function(firstOffset,secondOffset){
};
YAHOO.widget.Slider.prototype.onSlideStart=function(){
};
YAHOO.widget.Slider.prototype.onSlideEnd=function(){
};
YAHOO.widget.Slider.prototype.getValue=function(){
return this.thumb.getValue();
};
YAHOO.widget.Slider.prototype.getXValue=function(){
return this.thumb.getXValue();
};
YAHOO.widget.Slider.prototype.getYValue=function(){
return this.thumb.getYValue();
};
YAHOO.widget.Slider.prototype.onThumbChange=function(){
var t=this.thumb;
if(t._isRegion){
t.onChange(t.getXValue(),t.getYValue());
}else{
t.onChange(t.getValue());
}
};
YAHOO.widget.Slider.prototype.setValue=function(newOffset,skipAnim){
if(this.isLocked()){
return false;
}
if(isNaN(newOffset)){
return false;
}
var t=this.thumb;
var newX,newY;
if(t._isRegion){
return false;
}else if(t._isHoriz){
newX=t.initPageX+newOffset+this.thumbCenterPoint.x;
this.moveThumb(newX,t.initPageY,skipAnim);
}else{
newY=t.initPageY+newOffset+this.thumbCenterPoint.y;
this.moveThumb(t.initPageX,newY,skipAnim);
}
return true;
};
YAHOO.widget.Slider.prototype.setRegionValue=function(newOffset,newOffset2,skipAnim){
if(this.isLocked()){
return false;
}
if(isNaN(newOffset)){
return false;
}
var t=this.thumb;
if(t._isRegion){
var newX=t.initPageX+newOffset+this.thumbCenterPoint.x;
var newY=t.initPageY+newOffset2+this.thumbCenterPoint.y;
this.moveThumb(newX,newY,skipAnim);
return true;
}
return false;
};
YAHOO.widget.Slider.prototype.verifyOffset=function(){
var newPos=YAHOO.util.Dom.getXY(this.getEl());
if(newPos[0]!=this.baselinePos[0]||newPos[1]!=this.baselinePos[1]){
this.thumb.resetConstraints();
this.baselinePos=newPos;
return false;
}
return true;
};
YAHOO.widget.Slider.prototype.moveThumb=function(x,y,skipAnim){
this.verifyOffset();
var self=this;
var t=this.thumb;
t.setDelta(this.thumbCenterPoint.x,this.thumbCenterPoint.y);
var _p=t.getTargetCoord(x,y);
var p=[_p.x,_p.y];
if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&t._graduated&&!skipAnim){
this.lock();
setTimeout(function(){self.moveOneTick(p);},this.tickPause);
}else if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&!skipAnim){
this.lock();
var oAnim=new YAHOO.util.Motion(
t.id,{points:{to:p}},0.4,YAHOO.util.Easing.easeOut);
oAnim.onComplete.subscribe(function(){self.endAnim();});
oAnim.animate();
}else{
t.setDragElPos(x,y);
this.fireEvents();
}
};
YAHOO.widget.Slider.prototype.moveOneTick=function(finalCoord){
var t=this.thumb;
var curCoord=YAHOO.util.Dom.getXY(t.getEl());
var tmp;
var nextCoord=null;
if(t._isRegion){
nextCoord=this._getNextX(curCoord,finalCoord);
var tmpX=(nextCoord)?nextCoord[0]:curCoord[0];
nextCoord=this._getNextY([tmpX,curCoord[1]],finalCoord);
}else if(t._isHoriz){
nextCoord=this._getNextX(curCoord,finalCoord);
}else{
nextCoord=this._getNextY(curCoord,finalCoord);
}
if(nextCoord){
YAHOO.util.Dom.setXY(t.getEl(),nextCoord);
if(!(nextCoord[0]==finalCoord[0]&&nextCoord[1]==finalCoord[1])){
var self=this;
setTimeout(function(){self.moveOneTick(finalCoord);},
this.tickPause);
}else{
this.unlock();
this.fireEvents();
}
}else{
this.unlock();
this.fireEvents();
}
};
YAHOO.widget.Slider.prototype._getNextX=function(curCoord,finalCoord){
var t=this.thumb;
var thresh;
var tmp=[];
var nextCoord=null;
if(curCoord[0]>finalCoord[0]){
thresh=t.tickSize-this.thumbCenterPoint.x;
tmp=t.getTargetCoord(curCoord[0]-thresh,curCoord[1]);
nextCoord=[tmp.x,tmp.y];
}else if(curCoord[0]<finalCoord[0]){
thresh=t.tickSize+this.thumbCenterPoint.x;
tmp=t.getTargetCoord(curCoord[0]+thresh,curCoord[1]);
nextCoord=[tmp.x,tmp.y];
}else{
}
return nextCoord;
};
YAHOO.widget.Slider.prototype._getNextY=function(curCoord,finalCoord){
var t=this.thumb;
var thresh;
var tmp=[];
var nextCoord=null;
if(curCoord[1]>finalCoord[1]){
thresh=t.tickSize-this.thumbCenterPoint.y;
tmp=t.getTargetCoord(curCoord[0],curCoord[1]-thresh);
nextCoord=[tmp.x,tmp.y];
}else if(curCoord[1]<finalCoord[1]){
thresh=t.tickSize+this.thumbCenterPoint.y;
tmp=t.getTargetCoord(curCoord[0],curCoord[1]+thresh);
nextCoord=[tmp.x,tmp.y];
}else{
}
return nextCoord;
};
YAHOO.widget.Slider.prototype.b4MouseDown=function(e){
this.thumb.resetConstraints();
};
YAHOO.widget.Slider.prototype.onMouseDown=function(e){
if(!this.isLocked()&&this.backgroundEnabled){
var x=YAHOO.util.Event.getPageX(e);
var y=YAHOO.util.Event.getPageY(e);
this.moveThumb(x,y);
this.focus();
}
};
YAHOO.widget.Slider.prototype.onDrag=function(e){
if(!this.isLocked()&&this.backgroundEnabled){
var x=YAHOO.util.Event.getPageX(e);
var y=YAHOO.util.Event.getPageY(e);
this.moveThumb(x,y,true);
}
};
YAHOO.widget.Slider.prototype.endAnim=function(){
this.unlock();
this.fireEvents();
};
YAHOO.widget.Slider.prototype.fireEvents=function(){
var t=this.thumb;
t.cachePosition();
if(!this.isLocked()){
if(t._isRegion){
var newX=t.getXValue();
var newY=t.getYValue();
if(newX!=this.previousX||newY!=this.previousY){
this.onChange(newX,newY);
}
this.previousX=newX;
this.previousY=newY;
}else{
var newVal=t.getValue();
if(newVal!=this.previousVal){
this.onChange(newVal);
}
this.previousVal=newVal;
}
if(this._deferSlideEnd){
this.onSlideEnd();
this._deferSlideEnd=false;
}
}
};
YAHOO.widget.SliderThumb=function(id,sGroup,iLeft,iRight,iUp,iDown,iTickSize){
if(id){
this.init(id,sGroup);
this.parentElId=sGroup;
this.initSlider(iLeft,iRight,iUp,iDown,iTickSize);
}
this.isTarget=false;
this.tickSize=iTickSize;
this.maintainOffset=true;
};
YAHOO.widget.SliderThumb.prototype=new YAHOO.util.DD();
YAHOO.widget.SliderThumb.prototype.getOffsetFromParent=function(){
var myPos=YAHOO.util.Dom.getXY(this.getEl());
var parentPos=YAHOO.util.Dom.getXY(this.parentElId);
return[(myPos[0]-parentPos[0]),(myPos[1]-parentPos[1])];
};
YAHOO.widget.SliderThumb.prototype.startOffset=null;
YAHOO.widget.SliderThumb.prototype._isHoriz=false;
YAHOO.widget.SliderThumb.prototype._prevVal=0;
YAHOO.widget.SliderThumb.prototype._graduated=false;
YAHOO.widget.SliderThumb.prototype.initSlider=function(iLeft,iRight,iUp,iDown,
iTickSize){
this.setXConstraint(iLeft,iRight,iTickSize);
this.setYConstraint(iUp,iDown,iTickSize);
if(iTickSize&&iTickSize>1){
this._graduated=true;
}
this._isHoriz=(iLeft>0||iRight>0);
this._isVert=(iUp>0||iDown>0);
this._isRegion=(this._isHoriz&&this._isVert);
this.startOffset=this.getOffsetFromParent();
};
YAHOO.widget.SliderThumb.prototype.getValue=function(){
var val=(this._isHoriz)?this.getXValue():this.getYValue();
return val;
};
YAHOO.widget.SliderThumb.prototype.getXValue=function(){
var newOffset=this.getOffsetFromParent();
return(newOffset[0]-this.startOffset[0]);
};
YAHOO.widget.SliderThumb.prototype.getYValue=function(){
var newOffset=this.getOffsetFromParent();
return(newOffset[1]-this.startOffset[1]);
};
YAHOO.widget.SliderThumb.prototype.onChange=function(x,y){};
if("undefined"==typeof YAHOO.util.Anim){
YAHOO.widget.Slider.ANIM_AVAIL=false;
}
/*
    Author          : Roger   
    Date Created    : 31/05/2007
    Description     : This library provides a collection a custom sliders
    Implemented     : DualTimeSlider, DualNumberSlider
    Based on        : YAHOO.widget.Slider
    
*/

CQS.Slider = new function ()
{
    var sliders = new Array();

    this.SliderManager = new function ()
    {
        this.add = function (slider)
        {
            sliders.push(slider);
        };

        this.get = function (id)
        {
            for (var i = 0; i < sliders.length; i++)
            {
                if (sliders[i].id == id)
                {
                    return sliders[i]
                }
            }

            return null;
        };

        this.getAll = function ()
        {
            return sliders;
        };
    };

    this.DualTimeSlider = function (sCallBackID, sUpdatePanelID, sUpdatePanelCallbackID, elBG, elMinThumb, elMaxThumb, elRange, elDay, lblMinTime, lblMaxTime, lblCurrMinTime, lblCurrMaxTime, hidRawMinTime, hidRawMaxTime, hidRawCurrMinTime, hidRawCurrMaxTime, iLeft, iRight)
    {
        var seperator = '_';
        var timeFilterArray = new Array();
        var sliderTimeMin;
        var sliderTimeMax;
        var pixelTimeValue;
        var prevMinOffset = 0;
        var prevMaxOffset = 0;
        var maxWidth = 0;
        var prevMinTime = hidRawMinTime.value;
        var prevMaxTime = hidRawMaxTime.value;
        var prevCurrMinTime = hidRawCurrMinTime.value;
        var prevCurrMaxTime = hidRawCurrMaxTime.value;

        var calcOffsetFromStart = function (timeArray, timeValue, pixelTimeValue)
        {
            for (i = 0; i < timeArray.length; i++)
            {
                if (timeArray[i] == timeValue)
                {
                    return roundNumber(i * pixelTimeValue, 0)
                }
            }
        };

        var GetFilterDate = function (elDateTime)
        {
            // dateTimes[0] = {date} e.g. "yyyymmdd" 
            // dateTimes[1] = {time} e.g. "hh:mm"
            var dateTimes = elDateTime.split(seperator);
            return dateTimes[0];
        };

        var GetFilterTime = function (elDateTime)
        {
            // dateTimes[0] = {date} e.g. "yyyymmdd" 
            // dateTimes[1] = {time} e.g. "hh:mm"
            var dateTimes = elDateTime.split(seperator);
            return dateTimes[1];
        };

        var setDayMarker = function (timeArray, elDay, elMinThumb, pixelTimeValue)
        {
            elDay.style.display = 'none';
            for (i = 0; i < timeArray.length; i++)
            {

                if (GetFilterTime(timeArray[i]) == '00:00')
                {
                    elDay.style.display = '';
                    elDay.style.left = (i * pixelTimeValue) + elMinThumb.offsetWidth + 'px';
                    break;
                }
            }
        };

        var loadTimeFilterArray = function (timeArray, startTime, endTime)
        {
            var startLoading = 0;
            var stopLoading = 0;
            var strDate = GetFilterDate(startTime);
            var strValue = null;
            var prevHour = null;

            if (timeArray.constructor == Array)
            {
                timeArray.length = 0;
                while (!stopLoading)
                {
                    for (cnt = 0; cnt < 48; cnt++)
                    {
                        var hour = Math.floor(cnt / 2);
                        if ((cnt % 2) > 0)
                        {
                            strValue = hour < 10 ? '0' + hour + ':30' : hour + ':30';
                        }
                        else
                        {
                            strValue = hour < 10 ? '0' + hour + ':00' : hour + ':00';
                        }
                        if (strDate != GetFilterDate(endTime))
                        {
                            if (prevHour != null)
                            {
                                // times crossing over midnight, so date must be adjusted
                                if (hour < prevHour)
                                {
                                    strDate = GetFilterDate(endTime);
                                }
                            }
                        }
                        prevHour = hour;
                        // format: "yyyyMMdd_HH:mm"
                        strValue = strDate + seperator + strValue;

                        if (strValue == startTime)
                        {
                            startLoading = 1;
                        }

                        if (startLoading)
                        {
                            timeArray[timeArray.length] = strValue;
                        }

                        if (strValue == endTime && startLoading)
                        {
                            stopLoading = 1;
                            break;
                        }
                    }
                }
            }
        };

        var moveSliderTimeMin = function (offsetFromStart)
        {
            hidRawCurrMinTime.value = timeFilterArray[roundNumber(offsetFromStart / pixelTimeValue, 0)];
            lblCurrMinTime.innerHTML = GetFilterTime(hidRawCurrMinTime.value);
            sliderTimeMax.thumb.setXConstraint(iRight - offsetFromStart, 0, 1);
            elRange.style.left = offsetFromStart + 'px';
            elMinThumb.style.left = '0px';
            elRange.style.width = ((elBG.offsetWidth + prevMaxOffset) - offsetFromStart) + 'px';
            prevMinOffset = offsetFromStart;

            if (lblCurrMaxTime.offsetWidth > maxWidth)
                lblCurrMaxTime.style.left = '';

            if (elRange.offsetWidth <= (lblCurrMinTime.offsetWidth + lblCurrMaxTime.offsetWidth))
            {
                lblCurrMinTime.style.left = (elRange.offsetWidth - (lblCurrMinTime.offsetWidth + lblCurrMaxTime.offsetWidth)) + 'px';
            }
            else
            {
                lblCurrMinTime.style.left = '';
            }
        };

        var moveSliderTimeMax = function (offsetFromStart)
        {
            hidRawCurrMaxTime.value = timeFilterArray[(timeFilterArray.length - 1) - roundNumber((offsetFromStart * -1) / pixelTimeValue, 0)];
            lblCurrMaxTime.innerHTML = GetFilterTime(hidRawCurrMaxTime.value);
            sliderTimeMin.thumb.setXConstraint(0, iRight + offsetFromStart, 1);
            elRange.style.width = ((elBG.offsetWidth - elRange.offsetLeft) + offsetFromStart) + 'px';
            elMaxThumb.style.left = '0px';
            prevMaxOffset = offsetFromStart;

            if (lblCurrMaxTime.offsetLeft <= (lblCurrMinTime.offsetLeft + lblCurrMinTime.offsetWidth))
                lblCurrMaxTime.style.left = (lblCurrMinTime.offsetLeft + lblCurrMinTime.offsetWidth) + 'px';

            if (elMaxThumb.offsetLeft > (lblCurrMinTime.offsetLeft + lblCurrMinTime.offsetWidth + lblCurrMinTime.offsetWidth))
                lblCurrMaxTime.style.left = '';

            maxWidth = lblCurrMaxTime.offsetWidth
        };

        sliderTimeMin = YAHOO.widget.Slider.getHorizSlider(elBG.id, elMinThumb.id, iLeft, iRight);
        sliderTimeMax = YAHOO.widget.Slider.getHorizSlider(elBG.id, elMaxThumb.id, iRight, iLeft);

        sliderTimeMin.backgroundEnabled = false;
        sliderTimeMax.backgroundEnabled = false;

        // initialize core variables
        loadTimeFilterArray(timeFilterArray, hidRawMinTime.value, hidRawMaxTime.value);
        pixelTimeValue = iRight / (timeFilterArray.length - 1);

        prevMinOffset = calcOffsetFromStart(timeFilterArray, prevCurrMinTime, pixelTimeValue);
        sliderTimeMin.setValue(prevMinOffset, true, true);
        moveSliderTimeMin(prevMinOffset);

        prevMaxOffset = calcOffsetFromStart(timeFilterArray, prevCurrMaxTime, pixelTimeValue) - iRight;
        sliderTimeMax.setValue(prevMaxOffset, true, true);
        moveSliderTimeMax(prevMaxOffset);

        setDayMarker(timeFilterArray, elDay, elMinThumb, pixelTimeValue);

        sliderTimeMin.onChange = function (offsetFromStart)
        {
            moveSliderTimeMin(offsetFromStart)
        };

        sliderTimeMax.onChange = function (offsetFromStart)
        {
            moveSliderTimeMax(offsetFromStart);
        };

        sliderTimeMin.onSlideEnd = function ()
        {
            if (prevMinTime != hidRawCurrMinTime.value)
            {
                DualFilterCallback(sCallBackID, sUpdatePanelID, sUpdatePanelCallbackID, hidRawCurrMinTime.value, hidRawCurrMaxTime.value);
            }
            prevMinTime = hidRawCurrMinTime.value;
        };

        sliderTimeMax.onSlideEnd = function ()
        {
            if (prevMaxTime != hidRawCurrMaxTime.value)
            {
                DualFilterCallback(sCallBackID, sUpdatePanelID, sUpdatePanelCallbackID, hidRawCurrMinTime.value, hidRawCurrMaxTime.value);
            }
            prevMaxTime = hidRawCurrMaxTime.value;
        };

        this.id = sCallBackID;
        this.reset = function (newMinValue, newMaxValue)
        {
            // reset default values
            hidRawMinTime.value = newMinValue;
            hidRawMaxTime.value = newMaxValue;
            hidRawCurrMinTime.value = newMinValue;
            hidRawCurrMaxTime.value = newMaxValue;

            lblMinNumber.innerHTML = GetFilterTime(hidRawMinTime.value);
            lblMaxNumber.innerHTML = GetFilterTime(hidRawMaxTime.value);
            lblCurrMinNumber.innerHTML = GetFilterTime(hidRawCurrMinTime.value);
            lblCurrMaxNumber.innerHTML = GetFilterTime(hidRawCurrMaxTime.value);
            prevMinOffset = 0;
            prevMaxOffset = 0;
            maxWidth = 0;
            prevMinTime = hidRawMinTime.value;
            prevMaxTime = hidRawMaxTime.value;

            // reset default styles
            elRange.style.left = '';
            elRange.style.width = '';
            elMinThumb.style.left = '';
            elMaxThumb.style.left = '';
            lblCurrMinTime.style.left = '';
            lblCurrMaxTime.style.left = '';

            loadTimeFilterArray(timeFilterArray, newMinValue, newMaxValue);
            pixelTimeValue = iRight / (timeFilterArray.length - 1);
            setDayMarker(timeFilterArray, elDay, elMinThumb, pixelTimeValue);

            sliderTimeMin.thumb.maintainOffset = false;
            sliderTimeMax.thumb.maintainOffset = false;
            sliderTimeMin.thumb.resetConstraints();
            sliderTimeMax.thumb.resetConstraints();
            sliderTimeMin.thumb.maintainOffset = true;
            sliderTimeMax.thumb.maintainOffset = true;
        };


        if (typeof (DualTimeSliderInitializationFinished) != 'undefined')
        {
            DualTimeSliderInitializationFinished(sCallBackID);
        };
    };

    this.DualNumberSlider = function (sCallBackID, sUpdatePanelID, sUpdatePanelCallbackID, sNumberFormat, elBG, elMinThumb, elMaxThumb, elRange, lblMinNumber, lblMaxNumber, lblCurrMinNumber, lblCurrMaxNumber, hidRawMinNumber, hidRawMaxNumber, hidRawCurrMinNumber, hidRawCurrMaxNumber, bMinSliderVisible, bMaxSliderVisible, iLeft, iRight)
    {
        var decimalFormat = 1;
        var minutesFormat = 2;
        var sliderNumberMin;
        var sliderNumberMax;
        var pixelNumberValue;
        var prevMinOffset = 0;
        var prevMaxOffset = 0;
        var maxWidth = 0;
        var prevMinNumber = hidRawMinNumber.value;
        var prevMaxNumber = hidRawMaxNumber.value;
        var prevCurrMinNumber = hidRawCurrMinNumber.value;
        var prevCurrMaxNumber = hidRawCurrMaxNumber.value;

        var formatDisplayedValue = function (numberFormat, rawValue)
        {
            switch (parseFloat(numberFormat))
            {
                case minutesFormat:
                    // display value in {hh}.{MM)
                    var hours = parseInt(rawValue / 60);
                    var minutes = rawValue - (hours * 60);
                    if (minutes < 10) { minutes = "0" + minutes; }
                    return (hours + "." + minutes);

                case decimalFormat:
                default:
                    // display value "as is" (decimal)
                    return rawValue;
            }
        };

        var moveSliderNumberMin = function (offsetFromStart)
        {
            hidRawCurrMinNumber.value = roundNumber(Number(hidRawMinNumber.value) + (offsetFromStart * pixelNumberValue), 0);
            lblCurrMinNumber.innerHTML = formatDisplayedValue(sNumberFormat, hidRawCurrMinNumber.value);
            sliderNumberMax.thumb.setXConstraint(iRight - offsetFromStart, 0, 1);
            elRange.style.left = offsetFromStart + 'px';
            elMinThumb.style.left = '0px';
            elRange.style.width = ((elBG.offsetWidth + prevMaxOffset) - offsetFromStart) + 'px';
            prevMinOffset = offsetFromStart;

            if (lblCurrMaxNumber.offsetWidth > maxWidth)
                lblCurrMaxNumber.style.left = '';

            if (elRange.offsetWidth <= (lblCurrMinNumber.offsetWidth + lblCurrMaxNumber.offsetWidth))
            {
                lblCurrMinNumber.style.left = (elRange.offsetWidth - (lblCurrMinNumber.offsetWidth + lblCurrMaxNumber.offsetWidth)) + 'px';
            }
            else
                lblCurrMinNumber.style.left = '';

            if (!bMinSliderVisible)
            {
                elMinThumb.style.display = "none";
                lblCurrMinNumber.style.display = "none";
            }
        };

        var moveSliderNumberMax = function (offsetFromStart)
        {
            hidRawCurrMaxNumber.value = roundNumber(Number(hidRawMaxNumber.value) - ((offsetFromStart * -1) * pixelNumberValue), 0);
            lblCurrMaxNumber.innerHTML = formatDisplayedValue(sNumberFormat, hidRawCurrMaxNumber.value);
            sliderNumberMin.thumb.setXConstraint(0, iRight + offsetFromStart, 1);
            elRange.style.width = ((elBG.offsetWidth - elRange.offsetLeft) + offsetFromStart) + 'px';
            elMaxThumb.style.left = '0px';
            prevMaxOffset = offsetFromStart;

            if (lblCurrMaxNumber.offsetLeft <= (lblCurrMinNumber.offsetLeft + lblCurrMinNumber.offsetWidth))
                lblCurrMaxNumber.style.left = (lblCurrMinNumber.offsetLeft + lblCurrMinNumber.offsetWidth) + 'px';

            if (elMaxThumb.offsetLeft > (lblCurrMinNumber.offsetLeft + lblCurrMinNumber.offsetWidth + lblCurrMinNumber.offsetWidth))
                lblCurrMaxNumber.style.left = '';

            maxWidth = lblCurrMaxNumber.offsetWidth

            if (!bMaxSliderVisible)
            {
                elMaxThumb.style.display = "none";
                lblCurrMaxNumber.style.display = "none";
            }
        };

        sliderNumberMin = YAHOO.widget.Slider.getHorizSlider(elBG.id, elMinThumb.id, iLeft, iRight);
        sliderNumberMax = YAHOO.widget.Slider.getHorizSlider(elBG.id, elMaxThumb.id, iRight, iLeft);

        sliderNumberMin.backgroundEnabled = false;
        sliderNumberMax.backgroundEnabled = false;

        // initialize core variables
        pixelNumberValue = (hidRawMaxNumber.value - hidRawMinNumber.value) / iRight;

        prevMinOffset = roundNumber((prevCurrMinNumber - prevMinNumber) / pixelNumberValue, 0);
        sliderNumberMin.setValue(prevMinOffset, true, true);
        moveSliderNumberMin(prevMinOffset);

        prevMaxOffset = roundNumber((prevCurrMaxNumber - prevMaxNumber) / pixelNumberValue, 0);
        sliderNumberMax.setValue(prevMaxOffset, true, true);
        moveSliderNumberMax(prevMaxOffset);

        sliderNumberMin.onChange = function (offsetFromStart)
        {
            if (isNaN(offsetFromStart))
            {
                offsetFromStart = 0;
            }
            moveSliderNumberMin(offsetFromStart);
        };

        sliderNumberMax.onChange = function (offsetFromStart)
        {
            moveSliderNumberMax(offsetFromStart);
        };

        sliderNumberMin.onSlideEnd = function ()
        {
            if (prevMinNumber != hidRawCurrMinNumber.value)
            {
                DualFilterCallback(sCallBackID, sUpdatePanelID, sUpdatePanelCallbackID, hidRawCurrMinNumber.value, hidRawCurrMaxNumber.value);
            }
            prevMinNumber = hidRawCurrMinNumber.value;
        };

        sliderNumberMax.onSlideEnd = function ()
        {
            if (prevCurrMaxNumber != hidRawCurrMaxNumber.value)
            {
                DualFilterCallback(sCallBackID, sUpdatePanelID, sUpdatePanelCallbackID, hidRawCurrMinNumber.value, hidRawCurrMaxNumber.value);
            }
            prevCurrMaxNumber = hidRawCurrMaxNumber.value;
        };

        // change constraints to ensure that two thumbs do not overlap
        sliderNumberMin.thumb.setXConstraint(0, iRight, 1);
        sliderNumberMax.thumb.setXConstraint(iRight, 0, 1);

        this.id = sCallBackID;
        this.reset = function (newMinValue, newMaxValue)
        {
            // reset default values
            hidRawMinNumber.value = newMinValue;
            hidRawMaxNumber.value = newMaxValue;
            hidRawCurrMinNumber.value = newMinValue;
            hidRawCurrMaxNumber.value = newMaxValue;

            lblMinNumber.innerHTML = hidRawMinNumber.value;
            lblMaxNumber.innerHTML = hidRawMaxNumber.value;
            lblCurrMinNumber.innerHTML = hidRawCurrMinNumber.value;
            lblCurrMaxNumber.innerHTML = hidRawCurrMaxNumber.value;

            prevMinOffset = 0;
            prevMaxOffset = 0;
            maxWidth = 0;
            prevMinNumber = hidRawMinNumber.value;
            prevMaxNumber = hidRawMaxNumber.value;

            // reset default styles
            elRange.style.left = '';
            elRange.style.width = '';
            elMinThumb.style.left = '';
            elMaxThumb.style.left = '';
            lblCurrMinNumber.style.left = '';
            lblCurrMaxNumber.style.left = '';

            pixelNumberValue = (newMaxValue - newMinValue) / iRight;

            sliderNumberMin.thumb.maintainOffset = false;
            sliderNumberMax.thumb.maintainOffset = false;
            sliderNumberMin.thumb.resetConstraints();
            sliderNumberMax.thumb.resetConstraints();
            sliderNumberMin.thumb.maintainOffset = true;
            sliderNumberMax.thumb.maintainOffset = true;

            if (!bMinSliderVisible)
            {
                elMinThumb.style.display = "none";
                lblCurrMinNumber.style.display = "none";
            }

            if (!bMaxSliderVisible)
            {
                elMaxThumb.style.display = "none";
                lblCurrMaxNumber.style.display = "none";
            }
        };
    };

    /*
    The following properties/methods are common to all sliders
    ----------------------------------------------------------
    */
    var DualFilterCallback = function (sCallBackID, sUpdatePanelID, sUpdatePanelCallbackID, sMinValue, sMaxValue)
    {
        ShowFilteringResultsBox();
        CQS.Callback.doCallbackAndReloadUpdatePanel(sCallBackID, sMinValue + ',' + sMaxValue, sUpdatePanelID, sUpdatePanelCallbackID, '', false);
    };

    this.DualFilterCallback = function (sCallBackID, sUpdatePanelID, sUpdatePanelCallbackID, sMinValue, sMaxValue)
    {
        DualFilterCallback(sCallBackID, sUpdatePanelID, sUpdatePanelCallbackID, sMinValue, sMaxValue);
    };
}/*
GoogleMaps.js
    
Google Map API methods for the SearchResultMap control
*/



var _toggleAllMap = function(coordList, mapCont) {
    _toggleAllMap(coordList, mapCont, null);
}

var _toggleAllMap = function(coordList, mapCont, defaultCenter) {


    var divObj = $(mapCont);

    if (divObj.style.display == 'none') {
        _showAllMapResults(coordList, divObj, defaultCenter);
    }
    else {
        _hideAllMapResults(divObj);
    }
}

/*
the coordList is an array of objects with the following structure, it basically represents the MapCoordinate object on the google map control
    
var coord = coordList[0];
    
coord.lat               - Latitude coordinate                                   (double)
coord.lng               - Longitude coordinate                                  (double)

coord.type              - type of coordinate, hotel, point of interest, car     (string)
coord.iconUrl           - url for the icon marker                               (string)
coord.iconSharowUrl     - shadow image for the icon marker                      (string)

coord.anchorPoint.x     - x anchor point for image                              (int)
coord.anchorPoint.x     - x anchor point for image                              (int)

coord.iconSize.width    - width of the icon                                     (int)
coord.iconSize.height   - height of the icon                                    (int)

coord.shadowSize.width  - height of the icon shadow                             (int)
coord.shadowSize.height - width of the icon shadow                              (int)

coord.centerLat         - the center latitude point of the map                  (double)
coord.centerLng         - the center longitude point of the map                 (double)

coord.markerClick       - javascript that eval() would be run against           (string)
coord.content           - content text that can be used as tooltip, name, etc.  (string)

coord.id                - can be used as a unique identifier                    (string)
    
*/

var _showAllMapResults = function(coordList, divObj) {
    _showAllMapResults(coordList, divObj, null);
}


var _getMapObj = function(divObj) {
    var mapObj;
    var mapVarName = divObj.id + "Map";
    eval("if (typeof(" + mapVarName + ") != 'undefined') mapObj = " + mapVarName + ";");
    
    return mapObj;
}

var _setMapObj = function(divObj) {
    var mapObj;
    var mapVarName = divObj.id + "Map";
    eval("var " + mapVarName);
    eval(mapVarName + " = new google.maps.Map2(divObj)");
    eval("mapObj = " + mapVarName);

    if (typeof (mapObj) != "undefined") {
        mapObj.addControl(new GSmallMapControl());
        mapObj.addControl(new GMenuMapTypeControl());
    }

    return mapObj;
}

var _clearMapItemArray = function(divObj) {
    var itemArray = _getMapItems(divObj);
    itemArray.empty();
}

// create an array associated to the specified divObj
var _createMapItemArray = function(divObj) {
    var arrayObj;
    var arrayVarName = divObj.id + "ItemArray";             // the name of the variable specific to divObj
    eval("var " + arrayVarName + " = new Array();");        // initialsing the variable with an array
    eval("arrayObj = " + arrayVarName);                     // returning the array
    return arrayObj;
}

// add an object to the divObj item array
var _addMapItem = function(mapItem, divObj) {
    var itemArray = _getMapItems(divObj);
    itemArray.push(mapItem);
}

// get the array of map overlay items associated with the divObj and create it if it does not exist
var _getMapItems = function(divObj) {
    var arrayObj;
    var arrayVarName = divObj.id + "ItemArray";
    eval("if (typeof(" + arrayVarName + ") != 'undefined') arrayObj = " + arrayVarName + "; else " + arrayVarName + " = arrayObj = _createMapItemArray(divObj);");

    return arrayObj;
}


var _setSelectedMapItem = function(itemId, divObj, selectedImageUrl, unselectedImageUrl) {
    var arrayObj = _getMapItems(divObj);

    if (arrayObj.length > 0) {


        for (var i = 0; i < arrayObj.length; i++) {
            if (arrayObj[i].coord.id == itemId + "") {
                arrayObj[i].icon.image = selectedImageUrl;
            }
            else {
                arrayObj[i].icon.image = unselectedImageUrl;
            }

            arrayObj[i].marker.remove();
            arrayObj[i].marker.icon = arrayObj[i].icon;
            arrayObj[i].marker.initialize(arrayObj[0].map);
            arrayObj[i].marker.redraw(true);
        }
    }
}

var _showAllMapResults = function (coordList, divObj, defaultCenter) {

    divObj.style.display = "block";

    // create uniquely identified map object per map control div if it does not exist already
    var map = _getMapObj(divObj);

    if (typeof (mapObj) == "undefined") {
        map = _setMapObj(divObj);
    }

    if (typeof (coordList) == "string") {
        coordList = JSON.decode(coordList);
    }
    if (typeof (defaultCenter) == "string") {
        defaultCenter = JSON.decode(defaultCenter);
    }

    map.disableDoubleClickZoom();

    if (typeof (defaultCenter) != "undefined" && defaultCenter != null && defaultCenter != "null" && defaultCenter.length > 0) {
        map.setCenter(new google.maps.LatLng(defaultCenter[0].lat, defaultCenter[0].lng));
    }

    _clearMapItemArray(divObj);

    if (coordList.length > 0) {

        var coord, ico, latlng, marker, coords = [];

        for (var i = 0; i < coordList.length; i++) {
            coord = coordList[i];

            /* Marker Image support */

            if (coord.iconUrl != null && coord.iconUrl != "") {
                ico = new google.maps.Icon(G_DEFAULT_ICON);

                ico.image = coord.iconUrl;
                ico.iconSize = new google.maps.Size(coord.iconSize.width, coord.iconSize.height);

                // set icon anchor point otherwise default to center of image
                if (typeof (coord.anchorPoint) != "undefined" && coord.anchorPoint != null) {
                    ico.iconAnchor = new google.maps.Point(coord.anchorPoint.x, coord.anchorPoint.y);
                }
                else {
                    ico.iconAnchor = new google.maps.Point(ico.iconSize.width / 2, ico.iconSize.height / 2);
                }

                var w = ico.iconSize.width - 1;
                ico.imageMap = [0, 0,
                                w, 0,
                                w, w,
                                0, w,
                                0, 0];

                ico.shadow = "";
                if (coord.iconSharowUrl != null && coord.iconSharowUrl != "") {
                    ico.shadow = coord.iconSharowUrl;
                    if (typeof (coord.shadowSize) != "undefined" && coord.shadowSize != null) {
                        ico.shadowSize = new google.maps.Size(coord.shadowSize.width, coord.shadowSize.height);
                    }
                }
            }
            else { // load the default google map icon
                ico = new google.maps.Icon(G_DEFAULT_ICON);
            }


            latlng = new google.maps.LatLng(coord.lat, coord.lng);
            marker = new google.maps.Marker(latlng, { icon: ico });

            // add item to map item array
            _addMapItem({ coord: coord, marker: marker, icon: ico, map: map, latlng: latlng }, divObj);

            // handle marker click
            if (coordList[i].markerClick != "") {
                var markerMethod = null;
                var markerMethod = eval("markerMethod = " + coordList[i].markerClick); // this should be "function() { /* code to be executed on marker click*/ }"
                if (typeof (markerMethod) != "undefined" && markerMethod != null) {
                    google.maps.Event.addListener(marker, "click", markerMethod);
                }
            }

            if (typeof (coord.content) == "string" && coord.content != "") {
                marker.bubbleContent = coord.content;
                google.maps.Event.addListener(marker, "mouseover", function (pt) {

                    if (typeof (this.bubbleContent) != "undefined") {
                        map.openInfoWindowHtml(pt, this.bubbleContent);
                    }
                });
            }

            map.addOverlay(marker);

            coords.push(latlng); // used for zooming bounds of all coordinates

        } // for (var i = 0; i < coordList.length; i++)

        var bounds, zoom, defaultZoom;

        bounds = new google.maps.Polygon(coords).getBounds();
        zoom = map.getBoundsZoomLevel(bounds);

        // see if we can find setting from web.config and only apply if one item on map
        if (typeof (_GoogleMapDefaultZoom) == "string" && coords.length == 1) {
            defaultZoom = parseInt(_GoogleMapDefaultZoom);

            if (zoom > defaultZoom) {
                zoom = defaultZoom;
            }
        }

        map.setCenter(bounds.getCenter(), zoom - 1);

    } // if (coordList.length > 0)
}

var _hideAllMapResults = function(divObj) {
    divObj.style.display = 'none';
    divObj.innerHTML = '';
}
var AirtradeOpenXScriptController = new function() {
    this.CallOpenXScript = function(zoneids) {
        var OA_zoneids = '';
        if (typeof (OA_zones) != 'undefined') {
            for (var zonename in OA_zones)
                OA_zoneids += escape(zonename + '=' + OA_zones[zonename] + "|");
            OA_zoneids += '&amp;nz=1';
        }
        else {
            OA_zoneids = escape(zoneids);
        }
        if (typeof (OA_source) == 'undefined') { OA_source = ''; }
        var OA_p = location.protocol == 'https:' ? 'https:' : 'http:';
        var OA_r = Math.floor(Math.random() * 99999999);

        OA_output = new Array();
        var OA_spc = "<" + "script type='text/javascript' ";
        OA_spc += "src='" + OA_p + "//d1.openx.org/spc.php?zones=" + OA_zoneids;
        OA_spc += "&amp;source=" + escape(OA_source) + "&amp;r=" + OA_r;
        OA_spc += (document.charset ? '&amp;charset=' + document.charset : (document.characterSet ? '&amp;charset=' + document.characterSet : ''));

        if (window.location) OA_spc += "&amp;loc=" + escape(window.location);
        if (document.referrer) OA_spc += "&amp;referer=" + escape(document.referrer);
        OA_spc += "'><" + "/script>";
        document.write(OA_spc);

        var OA_fo = '';
        OA_fo += "<" + "script type=\'text/javascript\' src='" + OA_p + "//d1.openx.org/fl.js\'><" + "/script>\n";
        document.write(OA_fo);
    };

    this.Show = function(name) {
        if (typeof (OA_output[name]) == 'undefined') {
            return;
        }
        else {
            document.write(OA_output[name]);
        }
    };

    this.PositionIt = function(objDiv) {
        if (!isIE) {
            setTimeout('MoveAds(\'' + objDiv + '\')', 2000);
        }
        else {
            MoveAds(objDiv);
        }
    };
};
function MoveAds(objDiv) {

    if (isIE) {

        var theParams = document.getElementById(objDiv + 'Hidden').getElementsByTagName("param");

        var theParamsLength = theParams.length;

        for (var j = 0; j < theParamsLength; j++) 
        {
            if (theParams[j].name.toLowerCase() == 'flashvars') {
                var theFlashVars = theParams[j].value;
            }
        }

        document.getElementById(objDiv).innerHTML = document.getElementById(objDiv + 'Hidden').innerHTML;

        var re = /<param name="FlashVars" value="">/ig;

        document.getElementById(objDiv).innerHTML = document.getElementById(objDiv).innerHTML.replace(re, "<param name='FlashVars' value='" + theFlashVars + "'>");

        document.getElementById(objDiv + 'Hidden').innerHTML = "";

    }

    else {

        document.getElementById(objDiv).innerHTML = document.getElementById(objDiv + 'Hidden').innerHTML;

        document.getElementById(objDiv + 'Hidden').innerHTML = "";

    }
};

Airtrade.DynamicPackage=new function(){this.OnErrorRedirectToUnexpectedErrorPage=function(){EB();if(typeof(Airtrade.DynamicPackage.GetUnexpectedErrorPagePath)!='undefined'){window.location.href=Airtrade.DynamicPackage.GetUnexpectedErrorPagePath();}else{window.alert("An unexpected error occurred, but no exception handler is defined to process it.");}};this.ConfirmPreSelectedPackage=function(a){ShowLoadingResultsBox();Madurodam.Ajax.doCallback(GetPreSelectedPackageControlId()+".ConfirmPreSelectedPackage",a,{onCompleteHandler:Airtrade.DynamicPackage.OnConfirmPreSelectedPackageComplete,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});BB(true);};this.OnConfirmPreSelectedPackageComplete=function(b){window.fireEvent("RefreshPackages");Airtrade.DynamicPackage.MarkChosenPreselectedPackage(b);HideLoadingResultsBox();};this.MarkChosenPreselectedPackage=function(b){$$("a[packageCategoryId]").each(function(c){c.getElement("span").className=c.getProperty("packageCategoryId")==b?"selected":"";});};this.UndoCurrentPackage=function(){Madurodam.Ajax.doCallback(GetCurrentPackageControlId()+".UndoLastSelection",null,{onCompleteHandler:Airtrade.DynamicPackage.OnUndoCurrentPackageComplete,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});BB(true);};this.OnUndoCurrentPackageComplete=function(){window.fireEvent("RefreshPackages");};this.ConfirmCurrentPackage=function(){ShowWaitingScreen(GetSelectingPackageMessage());Madurodam.Ajax.doCallback(GetCurrentPackageControlId()+".ConfirmCurrentPackage",null,{onCompleteHandler:Airtrade.DynamicPackage.OnConfirmCurrentPackageComplete,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});BB(true);};this.OnConfirmCurrentPackageComplete=function(){window.location.href="/PackageDetails.aspx";};this.ShowCurrentPackageConditions=function(){window.open(Airtrade.DynamicPackage.GetPackageConditionsPagePath(),"PackageConditions","status=0, toolbar=0, location=0, menubar=0, directory=0, scrollbars=1, resizable, height=525px, width=750px");};this.MailCurrentPackage=function(){window.alert('TODO');};this.RefreshCurrentPackage=function(){BB(true);Madurodam.Ajax.reloadUpdatePanel(GetCurrentPackageControlId()+".RefreshCurrentPackage",null,GetCurrentPackageUpdatePanelId(),{onCompleteHandler:Airtrade.DynamicPackage.OnRefreshCurrentPackageComplete,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.OnRefreshCurrentPackageComplete=function(b){EB();};this.ChangeFlight=function(){window.fireEvent("ShowExtendedFlightOptions",0);};this.ShowMoreFlightInfo=function(d){ShowLoadingResultsBox();window.fireEvent("ShowExtendedFlightOptions",d);};this.ShowMoreHotelInfo=function(e){ShowLoadingResultsBox();window.fireEvent("ShowExtendedHotelOptions",e);};this.ShowMoreCarInfo=function(f){ShowLoadingResultsBox();window.fireEvent('ShowExtendedCarOptions',f);};this.ChangeHotel=function(){window.fireEvent("ShowExtendedHotelOptions",0);};this.ChangeCar=function(){window.fireEvent("ShowExtendedCarOptions",0);};this.NavigateToHotel=function(g){$("hotel"+g).scrollIntoView();};this.ToggleAllHotelMapButton=function(){var _g=$("btnShowAllOnMapText");if(_g.innerHTML==ShowAllOnMapTextClosed()){_g.innerHTML=ShowAllOnMapTextOpen();}else{_g.innerHTML=ShowAllOnMapTextClosed();}};this.RefreshPackageOptions=function(){Madurodam.Ajax.reloadUpdatePanel(GetPackageOptionsControlId()+".RefreshPackageOptions",null,GetPackageOptionsUpdatePanelId(),{onCompleteHandler:Airtrade.DynamicPackage.OnRefreshPackageOptionsComplete,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});BB();};this.OnRefreshPackageOptionsComplete=function(){EB();};this.RefreshPackageTotalPrice=function(h){Madurodam.Ajax.reloadUpdatePanel(GetPackageSummaryControlId()+'.ChangeTicketSummary',h,GetPackageTotalUpdatePanelId(),{onCompleteHandler:Airtrade.DynamicPackage.OnRefreshPackageSelectedSummaryComplete,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.RefreshPackageSelectedSummary=function(){var _h=null;if(typeof($('rbInsuranceYes'))!='undefined'&&typeof($('rbInsuranceNo'))!='undefined'){_h={InsuranceYes:$('rbInsuranceYes').checked,InsuranceNo:$('rbInsuranceNo').checked};}Madurodam.Ajax.reloadUpdatePanel(GetPackageSummaryControlId()+".RefreshPackageSummaryState",_h,GetSelectedSummaryUpdatePanelId(),{onCompleteHandler:Airtrade.DynamicPackage.OnRefreshPackageSelectedSummaryComplete,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});BB();};this.OnRefreshPackageSelectedSummaryComplete=function(){EB();};this.SelectHotelPackage=function(e){ShowLoadingResultsBox();Madurodam.Ajax.reloadUpdatePanel(GetPackageOptionsControlId()+".SelecteHotelPackage",e,GetCurrentPackageAndOptionsUpdatePanelID(),{onCompleteHandler:function(){location.href='#sectionProductDetails';HideLoadingResultsBox();},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.UpdateHotelRoomSelected=function(e){Madurodam.Ajax.reloadUpdatePanel(GetHotelSelectedControlId()+".UpdateHotelRoomSelected",e,GetRoomQuotesUpdatePanelID(),{onCompleteHandler:Airtrade.DynamicPackage.OnUpdateHotelRoomComplete,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.OnUpdateHotelRoomComplete=function(b){window.fireEvent("RefreshSelectedSummary");};this.SelectFlightPackage=function(d){ShowLoadingResultsBox();Madurodam.Ajax.reloadUpdatePanel(GetPackageOptionsControlId()+".SelecteFlightPackage",d,GetCurrentPackageAndOptionsUpdatePanelID(),{onCompleteHandler:function(){location.href='#sectionProductDetails';HideLoadingResultsBox();},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.SelectCarPackage=function(f){ShowLoadingResultsBox();Madurodam.Ajax.reloadUpdatePanel(GetPackageOptionsControlId()+".SelecteCarPackage",f,GetCurrentPackageAndOptionsUpdatePanelID(),{onCompleteHandler:function(){location.href='#sectionProductDetails';HideLoadingResultsBox();},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.HotelMoreInfo=function(e){Madurodam.Ajax.reloadUpdatePanel(GetHotelTopPackagesId()+'.FilterHotelPackage',e,GetPackageOptionsUpdatePanelId(),{onCompleteHandler:function(){location.href='#sectionProductDetails';HideLoadingResultsBox();},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.FlightMoreInfo=function(d){Madurodam.Ajax.reloadUpdatePanel(GetFlightTopPackagesId()+'.FilterFlightPackage',d,GetPackageOptionsUpdatePanelId(),{onCompleteHandler:function(){location.href='#sectionProductDetails';HideLoadingResultsBox();},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.CarMoreInfo=function(f){Madurodam.Ajax.reloadUpdatePanel(GetCarTopPackagesId()+'.FilterCarPackage',f,GetPackageOptionsUpdatePanelId(),{onCompleteHandler:HideLoadingResultsBox(),onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.RefreshFlightOptions=function(j){Madurodam.Ajax.reloadUpdatePanel('RefreshFlightOptions',null,j,{onCompleteHandler:HideFilteringResultsBox});};this.ViewAllFlights=function(k){ShowLoadingResultsBox();GetContentUpdatePanelCallbackID=function(){return'UpdateResults';};GetContentUpdatePanelID=function(){return GetAllFlightsUpdatePanelID();};Madurodam.Ajax.reloadUpdatePanel('ViewAllFlightsPaged',null,GetPackageOptionsUpdatePanelId(),{onCompleteHandler:function(){if(k===true){location.href='#sectionProductDetails';}HideLoadingResultsBox();},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.ViewAllHotels=function(k){ShowLoadingResultsBox();GetContentUpdatePanelCallbackID=function(){return'UpdateHotelResults';};GetContentUpdatePanelID=function(){return GetAllHotelsUpdatePanelID();};Madurodam.Ajax.reloadUpdatePanel('ViewAllHotelsPaged',null,GetPackageOptionsUpdatePanelId(),{onCompleteHandler:function(){if(k===true){location.href='#sectionProductDetails';}HideLoadingResultsBox();},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.ViewAllCars=function(k){ShowLoadingResultsBox();Madurodam.Ajax.reloadUpdatePanel(GetCarTopPackagesId()+'.ViewAllCars',null,GetPackageOptionsUpdatePanelId(),{onCompleteHandler:function(){if(k===true){location.href='#sectionProductDetails';}HideLoadingResultsBox();},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.UpdateResultsPerPage=function(l){ShowLoadingResultsBox();Madurodam.Ajax.reloadUpdatePanel(GetAllFlightsControlId()+'.UpdateResultsPerPage',l,GetPackageOptionsUpdatePanelId(),{onCompleteHandler:HideLoadingResultsBox(),onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.DisplayCarRentalPopup=function(m,n){YT_MessageBoxShowOk(450,250,m,n,'DoNothing');};this.BackToOverview=function(){Airtrade.DynamicPackage.RefreshPackageOptions();};this.RedirectToShoppingCart=function(){window.location.href='/ShoppingCart.aspx';};this.RedirectToResultsPage=function(){window.location.href='/PackageResults.aspx';};this.AddDynamicPackageToOrder=function(){ShowWaitingScreen(GetAddingPackageToShoppingCartMessage());Madurodam.Ajax.doCallback(GetPackageSummaryControlId()+'.AddDynamicPackageToOrder',null,{onCompleteHandler:function(b){HideWaitingScreen(true);if(!b.packageIsAvailable){YT_MessageBoxShowOk(450,250,b.headerTextPackage,b.messageTextPackage,'Airtrade.DynamicPackage.RedirectToResultsPage',true);return;}if(b.packageFlightStatusChanged){YT_MessageBoxShowOk(450,250,b.headerTextFlight,b.messageTextFlight,'Airtrade.DynamicPackage.RedirectToShoppingCart',true);return;}if(b.carRentalPeriodChanged){YT_MessageBoxShowOk(450,250,b.headerTextCar,b.messageTextCar,'Airtrade.DynamicPackage.RedirectToShoppingCart',true);return;}Airtrade.DynamicPackage.RedirectToShoppingCart();},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.HandleTabSelectedMany=function(o,p){if(o==0){document.getElementById(p.tabOverview).className="tab active";document.getElementById(p.tabDescription).className="tab";document.getElementById(p.tabMap).className="tab";document.getElementById(p.tabPhotos).className="tab";document.getElementById(p.divLocation).style.display="none";document.getElementById(p.divOverview).style.display="block";document.getElementById(p.divPhotos).style.display="none";document.getElementById(p.divDescription).style.display="none";}if(o==1){document.getElementById(p.tabOverview).className="tab";document.getElementById(p.tabDescription).className="tab active";document.getElementById(p.tabMap).className="tab";document.getElementById(p.tabPhotos).className="tab";document.getElementById(p.divLocation).style.display="none";document.getElementById(p.divOverview).style.display="none";document.getElementById(p.divPhotos).style.display="none";document.getElementById(p.divDescription).style.display="block";}if(o==2){document.getElementById(p.tabOverview).className="tab";document.getElementById(p.tabDescription).className="tab";document.getElementById(p.tabMap).className="tab";document.getElementById(p.tabPhotos).className="tab active";document.getElementById(p.divLocation).style.display="none";document.getElementById(p.divOverview).style.display="none";document.getElementById(p.divPhotos).style.display="block";document.getElementById(p.divDescription).style.display="none";}if(o==3){document.getElementById(p.tabOverview).className="tab";document.getElementById(p.tabDescription).className="tab";document.getElementById(p.tabMap).className="tab active";document.getElementById(p.tabPhotos).className="tab";document.getElementById(p.divLocation).style.display="block";document.getElementById(p.divOverview).style.display="none";document.getElementById(p.divPhotos).style.display="none";document.getElementById(p.divDescription).style.display="none";}RedrawFooter();};this.SelectFlightLeg=function(q,r){var _i=CQS.Common.getElementEndingWithId(document,q);var _j=CQS.Common.elementGetAttribute(_i,'FlightOptionIndex');var _k=CQS.Common.elementGetAttribute(_i,'FlightId');var _l=CQS.Common.getElementEndingWithId(document,'divFlightProperties_'+_k);var _m=CQS.Common.elementGetAttribute(_l,'SelectedOutboundLegId');var _n=CQS.Common.elementGetAttribute(_l,'SelectedInboundLegId');var _o=CQS.Common.elementGetAttribute(_l,'AdditionalLegsVisible');var _p=CQS.Common.getElementsWithIdContaining(_i.parentNode,"rdSelectLeg");var _q=CQS.Common.elementGetAttribute(_i,'SectionIsOutbound');if(_o=='true'){for(var _r=0;_r<_p.length;_r++){var _s=_p[_r];var _t=CQS.Common.elementGetAttribute(_s.parentNode.parentNode,'SectionIsOutbound');if(_t==_q){if(_s.checked==true){CQS.AT.Flights.FlightResults.SetAllLegsUnSelected(_s.parentNode.parentNode);}else{_s.parentNode.parentNode.className=CQS.AT.Flights.FlightResults.RemoveSelectedLegStyle(_s.parentNode.parentNode.className);CQS.Common.elementSetAttribute(_s.parentNode.parentNode,'SegmentIsSelected',"false");_s.checked=false;}}}if(_q=='true'){_m=CQS.Common.elementGetAttribute(_i,'LegId');CQS.Common.elementSetAttribute(_l,'SelectedOutboundLegId',''+_m+'');}else{_n=CQS.Common.elementGetAttribute(_i,'LegId');CQS.Common.elementSetAttribute(_l,'SelectedInboundLegId',''+_n+'');}CQS.AT.Flights.FlightResults.SetAllLegsSelected(_i);BB(true);Madurodam.Ajax.doCallback(GetUpdateFlightLegsControlId()+'.SelectFlightLeg',{FlightOptionIndex:_j,FlightId:_k,OutboundLegPosition:_m,InboundLegPosition:_n},{onCompleteHandler:function(){window.fireEvent('FlightTimeChanges');},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});}};this.RefreshCarRentalPeriodMessage=function(s,j){Madurodam.Ajax.reloadUpdatePanel(s+'.RefreshCarRentalPeriodMessage',null,j,{onCompleteHandler:Airtrade.DynamicPackage.OnRefreshCarRentalPeriodMessageComplete,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.OnRefreshCarRentalPeriodMessageComplete=function(){EB();};this.HotelFilterUpdated=function(){ShowFilteringResultsBox();window.fireEvent('HotelFilterUpdated');};this.FlightFilterUpdated=function(){ShowFilteringResultsBox();window.fireEvent('FlightFilterUpdated');};this.ResetFilters=function(t){ShowFilteringResultsBox();Madurodam.Ajax.doCallback('ResetFilters',null,{onCompleteHandler:function(){CQS.Common.reloadPage();},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.FilterOnHotelName=function(u){ShowFilteringResultsBox();Madurodam.Ajax.doCallback('FilterOnHotelName',u,{onCompleteHandler:this.HotelFilterUpdated,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.RefreshAllPackageHotels=function(j){Madurodam.Ajax.reloadUpdatePanel(GetAllHotelOptionsControlId()+'.RefreshAllPackageHotels',null,j,{onCompleteHandler:HideFilteringResultsBox,onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.RefreshHotelOptions=function(j){Madurodam.Ajax.reloadUpdatePanel('RefreshHotelOptions',null,j,{onCompleteHandler:HideFilteringResultsBox});};this.ShowSelectedFlightFareView=function(s,j){Madurodam.Ajax.reloadUpdatePanel(s+'.ViewSelectedFlightTimes',null,j,{onCompleteHandler:function(){}});};this.ShowSelectedFlightFares=function(s,j){Madurodam.Ajax.reloadUpdatePanel(s+'.ViewFlightMoreTimes',null,j,{onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.LoadLargePhoto=function(v,w){$(w).src=v;};this.FilterNonStopFlights=function(s,x){ShowFilteringResultsBox();Madurodam.Ajax.doCallback(s+'.FilterNonStopFlights',x,{onCompleteHandler:function(){window.fireEvent('FlightFilterUpdated');},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});};this.FilterAirline=function(s,y,z){var _u=CQS.Common.getElementWithIdContaining(document,'divAirlinesContainer');var _v=CQS.Common.getElementWithIdContaining(_u,'chkAllAirlines');if(z===true&&y.checked){var _w=CQS.Common.getElementsWithIdContaining(_u,'chkAirline');for(var i=0;i<_w.length;i++){_w[i].checked=false;}ShowFilteringResultsBox();Madurodam.Ajax.doCallback(s+'.ShowAllAirlines',null,{onCompleteHandler:function(){window.fireEvent('FlightFilterUpdated');},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});}else if(z===true&&!y.checked){y.checked=true;}else if(y.checked){_v.checked=false;ShowFilteringResultsBox();Madurodam.Ajax.doCallback(s+'.IncludeAirlineFilter',$(y).get('AirlineCode'),{onCompleteHandler:function(){window.fireEvent('FlightFilterUpdated');},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});}else if(!y.checked){var _u=CQS.Common.getElementWithIdContaining(document,'divAirlinesContainer');var _v=CQS.Common.getElementWithIdContaining(_u,'chkAllAirlines');var _w=CQS.Common.getElementsWithIdContaining(_u,'chkAirline');var _x=false;for(var i=0;i<_w.length&&!_x;i++){if(_w[i].checked){_x=true;}}if(_v.checked=!_x){ShowFilteringResultsBox();Madurodam.Ajax.doCallback(s+'.ShowAllAirlines',null,{onCompleteHandler:function(){window.fireEvent('FlightFilterUpdated');},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});}else{ShowFilteringResultsBox();Madurodam.Ajax.doCallback(s+'.ExcludeAirlineFilter',$(y).get('AirlineCode'),{onCompleteHandler:function(){window.fireEvent('FlightFilterUpdated');},onErrorHandler:Airtrade.DynamicPackage.OnErrorRedirectToUnexpectedErrorPage});}}};this.PerformHotelSort=function(_a,_b){Madurodam.Ajax.reloadUpdatePanel('PerformHotelSort',_b,GetPackageOptionsUpdatePanelId());};this.PerformFlightSort=function(_c,_d){Madurodam.Ajax.reloadUpdatePanel('PerformFlightSort',_d,GetPackageOptionsUpdatePanelId());};this.PerformCarSort=function(_e,_f){Madurodam.Ajax.reloadUpdatePanel('PerformCarSort',_f,GetPackageOptionsUpdatePanelId());};};(function(){if(window['Madurodam']==null){var l={};window['Madurodam']=l;}})();Madurodam.Autocomplete=new function(){var m=false;var n=new Array();this.add=function(a,b){var o=$(a);var p=b;if($defined(p)&&p.length>0){var q=new Autocompleter.Request.JSON(o,'/AC.aspx?type='+p,{'maxChoices':10,'minLength':3,'overflow':true,'indicatorClass':'autocompleter-loading','delay':'0','filterSubset':true,'selectFirst':true});n.push(q);window.addEvent('resize',function(){Madurodam.Autocomplete.redrawAC(q);});o.addEvent('click',function(){Madurodam.Autocomplete.showOnFocus(q);});q.addEvent('onShow',function(c,d){d.addEvent('click',function(){return false;});});q.addEvent('onSelection',function(c,f,g,h){for(var i=0;i<n.length;i++){n[i].hideChoices(false);}try{c.select();}catch(e){}});}if(!m){$(document.body).addEvent('click',function(j){var r=(typeof(j.srcElement)!="undefined")?$(j.srcElement):$(j.target);for(var i=0;i<n.length;i++){if(r.id==n[i].element.id){try{r.select();if(n[i].element.value.length>2){n[i].showChoices();}}catch(e){}}else{n[i].hideChoices(false);}}return true;});m=true;}};this.redrawAC=function(k){if(k.visible){if(k.element.value.length>2){k.showChoices();}}};this.showOnFocus=function(k){if(k.element.value.length>2){k.showChoices();}};};/**
 * Observer - Observe formelements for changes
 *
 * - Additional code from clientside.cnet.com
 *
 * @version		1.1
 *
 * @license		MIT-style license
 * @author		Harald Kirschner <mail [at] digitarald.de>
 * @copyright	Author
 */
var Observer = new Class({

	Implements: [Options, Events],

	options: {
		periodical: false,
		delay: 1000
	},

	initialize: function(el, onFired, options){
		this.element = $(el) || $$(el);
		this.addEvent('onFired', onFired);
		this.setOptions(options);
		this.bound = this.changed.bind(this);
		this.resume();
	},

	changed: function() {
		var value = this.element.get('value');
		if ($equals(this.value, value)) return;
		this.clear();
		this.value = value;
		this.timeout = this.onFired.delay(this.options.delay, this);
	},

	setValue: function(value) {
		this.value = value;
		this.element.set('value', value);
		return this.clear();
	},

	onFired: function() {
		this.fireEvent('onFired', [this.value, this.element]);
	},

	clear: function() {
		$clear(this.timeout || null);
		return this;
	},

	pause: function(){
		if (this.timer) $clear(this.timer);
		else this.element.removeEvent('keyup', this.bound);
		return this.clear();
	},

	resume: function(){
		this.value = this.element.get('value');
		if (this.options.periodical) this.timer = this.changed.periodical(this.options.periodical, this);
		else this.element.addEvent('keyup', this.bound);
		return this;
	}

});

var $equals = function(obj1, obj2) {
	return (obj1 == obj2 || JSON.encode(obj1) == JSON.encode(obj2));
};/**
 * Autocompleter
 *
 * http://digitarald.de/project/autocompleter/
 *
 * @version		1.1.2
 *
 * @license		MIT-style license
 * @author		Harald Kirschner <mail [at] digitarald.de>
 * @copyright	Author
 */

var Autocompleter = new Class({

    Implements: [Options, Events],

    options: {/*
		onOver: $empty,
		onSelect: $empty,
		onSelection: $empty,
		onShow: $empty,
		onHide: $empty,
		onBlur: $empty,
		onFocus: $empty,*/
        minLength: 1,
        markQuery: true,
        width: null, //'inherit',
        maxChoices: 10,
        injectChoice: null,
        customChoices: null,
        emptyChoices: null,
        visibleChoices: true,
        className: 'autocompleter-choices',
        zIndex: 42,
        delay: 400,
        observerOptions: {},
        fxOptions: {},

        autoSubmit: false,
        overflow: false,
        overflowMargin: 25,
        selectFirst: false,
        filter: null,
        filterCase: false,
        filterSubset: false,
        forceSelect: false,
        selectMode: true,
        choicesMatch: null,

        multiple: false,
        separator: ', ',
        separatorSplit: /\s*[,;]\s*/,
        autoTrim: false,
        allowDupes: false,

        cache: true,
        relative: false
    },

    initialize: function (element, options)
    {
        this.element = $(element);
        this.setOptions(options);
        this.build();
        this.observer = new Observer(this.element, this.prefetch.bind(this), $merge({
            'delay': this.options.delay
        }, this.options.observerOptions));
        this.queryValue = null;
        if (this.options.filter) this.filter = this.options.filter.bind(this);
        var mode = this.options.selectMode;
        this.typeAhead = (mode == 'type-ahead');
        this.selectMode = (mode === true) ? 'selection' : mode;
        this.cached = [];
    },

    /**
    * build - Initialize DOM
    *
    * Builds the html structure for choices and appends the events to the element.
    * Override this function to modify the html generation.
    */
    build: function ()
    {
        if ($(this.options.customChoices))
        {
            this.choices = this.options.customChoices;
        } else
        {
            this.choices = new Element('ul', {
                'class': this.options.className,
                'styles': {
                    'zIndex': this.options.zIndex
                }
            }).inject(document.body);
            this.relative = false;
            if (this.options.relative)
            {
                this.choices.inject(this.element, 'after');
                this.relative = this.element.getOffsetParent();
            }
            this.fix = new OverlayFix(this.choices);
        }
        if (!this.options.separator.test(this.options.separatorSplit))
        {
            this.options.separatorSplit = this.options.separator;
        }
        this.fx = (!this.options.fxOptions) ? null : new Fx.Tween(this.choices, $merge({
            'property': 'opacity',
            'link': 'cancel',
            'duration': 200
        }, this.options.fxOptions)).addEvent('onStart', Chain.prototype.clearChain).set(0);
        this.element.setProperty('autocomplete', 'off')
			.addEvent((Browser.Engine.trident || Browser.Engine.webkit) ? 'keydown' : 'keypress', this.onCommand.bind(this))
			.addEvent('click', this.onCommand.bind(this, [false]));
        //.addEvent('focus', this.toggleFocus.create({ bind: this, arguments: true, delay: 100 }))
        //.addEvent('blur', this.toggleFocus.create({ bind: this, arguments: false, delay: 100 }));

        this.choices.addEvent('blur', this.toggleFocus.create({ bind: this, arguments: false, delay: 100 }));
    },

    destroy: function ()
    {
        if (this.fix) this.fix.destroy();
        this.choices = this.selected = this.choices.destroy();
    },

    toggleFocus: function (state)
    {
        this.focussed = state;
        if (!state) this.hideChoices(true);
        this.fireEvent((state) ? 'onFocus' : 'onBlur', [this.element]);
    },

    onCommand: function (e)
    {
        if (!e && this.focussed) return this.prefetch();
        if (e && e.key && !e.shift)
        {
            switch (e.key)
            {
                case 'enter':
                    //if (this.element.value != this.opted) return true;
                    if (this.selected && this.visible)
                    {
                        this.choiceSelect(this.selected);
                        return !!(this.options.autoSubmit);
                    }
                    break;
                case 'up': case 'down':
                    if (!this.prefetch() && this.queryValue !== null)
                    {
                        var up = (e.key == 'up');
                        this.choiceOver((this.selected || this.choices)[
							(this.selected) ? ((up) ? 'getPrevious' : 'getNext') : ((up) ? 'getLast' : 'getFirst')
						](this.options.choicesMatch), false);
                    }
                    return false;
                case 'esc':
                    this.hideChoices(true);
                    break;
                case 'tab':
                    if (this.selected && this.visible)
                    {
                        this.choiceOver(this.selected);
                        this.setSelection(false);
                    }
                    this.hideChoices(true);
                    return true;
                    //                case 'backspace':
                    //                    if (this.element.value.length > this.options.minLength)
                    //                    {
                    //                        this.element.value = this.element.value.substring(0, this.queryValue.length - 1);
                    //                        return false;
                    //                    }
                    //                    break;
            }
        }
        return true;
    },

    setSelection: function (finish)
    {
        var input = this.selected.inputValue, value = input;
        var start = this.queryValue.length, end = input.length;
        if (input.substr(0, start).toLowerCase() != this.queryValue.toLowerCase()) start = 0;
        if (this.options.multiple)
        {
            var split = this.options.separatorSplit;
            value = this.element.value;
            start += this.queryIndex;
            end += this.queryIndex;
            var old = value.substr(this.queryIndex).split(split, 1)[0];
            value = value.substr(0, this.queryIndex) + input + value.substr(this.queryIndex + old.length);
            if (finish)
            {
                var tokens = value.split(this.options.separatorSplit).filter(function (entry)
                {
                    return this.test(entry);
                }, /[^\s,]+/);
                if (!this.options.allowDupes) tokens = [].combine(tokens);
                var sep = this.options.separator;
                value = tokens.join(sep) + sep;
                end = value.length;
            }
        }
        this.observer.setValue(value);
        this.opted = value;
        if (finish || this.selectMode == 'pick') start = end;
        this.element.selectRange(start, end);
        this.fireEvent('onSelection', [this.element, this.selected, value, input]);
    },

    showChoices: function ()
    {
        var match = this.options.choicesMatch, first = this.choices.getFirst(match);
        this.selected = this.selectedValue = null;

        if (this.fix)
        {
            var pos = this.element.getCoordinates(this.element), width = this.options.width || 'auto';
            this.choices.setStyles({
                'left': CQS.Common.getPageX(this.element) + 'px',
                'top': CQS.Common.getPageY(this.element) + 20 + 'px',
                'width': (width === true || width == 'inherit') ? pos.width : width
            });
        }
        if (!first) return;
        if (!this.visible)
        {
            this.visible = true;
            this.choices.setStyle('display', '');
            if (this.fx) this.fx.start(1);
            this.fireEvent('onShow', [this.element, this.choices]);
        }

        if (this.options.selectFirst || this.typeAhead || first.inputValue == this.queryValue) this.choiceOver(first, this.typeAhead);
        var items = this.choices.getChildren(match), max = this.options.maxChoices;
        var styles = { 'overflowY': 'hidden', 'overflowX': 'hidden', 'height': '' };
        this.overflown = false;
        if (items.length > max)
        {
            var item = items[max - 1];
            styles.overflowY = 'scroll';
            styles.height = (1.5 * this.options.maxChoices) + "em";  //item.getCoordinates(this.choices).bottom < 0 ? 0 : item.getCoordinates(this.choices).bottom;
            this.overflown = true;
        };
        this.choices.setStyles(styles);
        this.fix.show();
        if (this.options.visibleChoices)
        {
            var scroll = document.getScroll(),
			size = document.getSize(),
			coords = this.choices.getCoordinates();
            if (coords.right > scroll.x + size.x) scroll.x = coords.right - size.x;
            if (coords.bottom > scroll.y + size.y) scroll.y = coords.bottom - size.y;
            window.scrollTo(Math.min(scroll.x, coords.left), Math.min(scroll.y, coords.top));
        }
    },

    hideChoices: function (clear)
    {
        if (clear)
        {
            var value = this.element.value;
            if (this.options.forceSelect) value = this.opted;
            if (this.options.autoTrim)
            {
                value = value.split(this.options.separatorSplit).filter($arguments(0)).join(this.options.separator);
            }
            this.observer.setValue(value);
        }
        if (!this.visible) return;
        this.visible = false;
        if (this.selected) this.selected.removeClass('autocompleter-selected');
        this.observer.clear();
        var hide = function ()
        {
            this.choices.setStyle('display', 'none');
            this.fix.hide();
        } .bind(this);
        if (this.fx) this.fx.start(0).chain(hide);
        else
            hide();
        this.fireEvent('onHide', [this.element, this.choices]);
    },

    prefetch: function ()
    {
        var value = this.element.value, query = value;
        if (this.options.multiple)
        {
            var split = this.options.separatorSplit;
            var values = value.split(split);
            var index = this.element.getSelectedRange().start;
            var toIndex = value.substr(0, index).split(split);
            var last = toIndex.length - 1;
            index -= toIndex[last].length;
            query = values[last];
        }
        if (query.length < this.options.minLength)
        {
            this.hideChoices();
        } else
        {
            if (query === this.queryValue || (this.visible && query == this.selectedValue))
            {
                if (this.visible) return false;
                this.showChoices();
            } else
            {
                this.queryValue = query;
                this.queryIndex = index;
                if (!this.fetchCached()) { this.cacheText = this.queryValue; this.query(); }
            }
        }

        return true;
    },

    fetchCached: function ()
    {

        if (!this.options.cache
			|| !this.cached
			|| (!this.cacheText || this.element.value.toLowerCase().indexOf(this.cacheText.toLowerCase()) != 0)) return false;

        this.update(this.cached);
        return true;
    },

    update: function (tokens)
    {
        this.choices.empty();
        this.cached = tokens;
        var type = tokens && $type(tokens);
        if (!type || (type == 'array' && !tokens.length) || (type == 'hash' && !tokens.getLength()))
        {
            if (this.request.running)
            {
                (this.options.emptyChoices || this.hideChoices).call(this);
            }
            else
            {
                this.choices.innerHTML = "<LI>No locations found containing '" + this.element.value + "'</LI>";
                this.showChoices();
            }
        }
        else
        {
            if (this.options.maxChoices < tokens.length && !this.options.overflow) tokens.length = this.options.maxChoices;
            tokens.each(this.options.injectChoice || function (token)
            {
                if (token.toLowerCase().contains(this.element.value.toLowerCase()))
                {
                    var choice = new Element('li', { 'html': this.markQueryValue(token) });
                    choice.inputValue = token;
                    this.addChoiceEvents(choice).inject(this.choices);
                }
            }, this);

            if (this.choices.firstChild == null)
            {
                this.choices.innerHTML = "<LI>No locations found containing '" + this.element.value + "'</LI>";
            }

            this.choices.firstChild != null ? this.showChoices() : this.hideChoices(false);
        }
    },

    choiceOver: function (choice, selection)
    {

        if (!choice || choice == this.selected) return;
        if (this.selected) this.selected.removeClass('autocompleter-selected');
        this.selected = choice.addClass('autocompleter-selected');
        this.fireEvent('onSelect', [this.element, this.selected, selection]);
        if (!this.selectMode) this.opted = this.element.value;
        if (this.overflown)
        {
            var coords = this.selected.getCoordinates(this.choices), margin = this.options.overflowMargin,
				top = this.choices.scrollTop, height = this.choices.offsetHeight, bottom = top + height;

            if (coords.top - margin < top && top) this.choices.scrollTop = Math.max(coords.top - margin, 0);
            else if (coords.bottom + margin > bottom) this.choices.scrollTop = Math.min(coords.bottom - height + margin, bottom);
        }
        if (!selection) return;
        this.selectedValue = this.selected.inputValue;
        if (this.selectMode) this.setSelection();
    },

    choiceSelect: function (choice)
    {
        if (choice) this.choiceOver(choice);
        this.setSelection(true);
        //this.queryValue = false;
        this.hideChoices();
    },

    filter: function (tokens)
    {
        return (tokens || this.tokens).filter(function (token)
        {
            return this.test(token);
        }, new RegExp(((this.options.filterSubset) ? '' : '^') + this.queryValue.escapeRegExp(), (this.options.filterCase) ? '' : 'i'));
    },

    /**
    * markQueryValue
    *
    * Marks the queried word in the given string with <span class="autocompleter-queried">*</span>
    * Call this i.e. from your custom parseChoices, same for addChoiceEvents
    *
    * @param		{String} Text
    * @return		{String} Text
    */
    markQueryValue: function (str)
    {
        //return str;
        return (!this.options.markQuery || !this.queryValue) ? str
        			: str.replace(new RegExp('(' + ((this.options.filterSubset) ? '' : '^') + this.queryValue.escapeRegExp() + ')', (this.options.filterCase) ? '' : 'i'), '<span class="autocompleter-queried">$1</span>');
    },

    /**
    * addChoiceEvents
    *
    * Appends the needed event handlers for a choice-entry to the given element.
    *
    * @param		{Element} Choice entry
    * @return		{Element} Choice entry
    */
    addChoiceEvents: function (el)
    {
        return el.addEvents({
            'mouseover': this.choiceOver.bind(this, [el]),
            'click': this.choiceSelect.bind(this, [el])
        });
    }
});

var OverlayFix = new Class({

	initialize: function(el) {
		if (Browser.Engine.trident) {
			this.element = $(el);
			this.relative = this.element.getOffsetParent();
			this.fix = new Element('iframe', {
				'frameborder': '0',
				'scrolling': 'no',
				'src': 'javascript:false;',
				'styles': {
					'position': 'absolute',
					'border': 'none',
					'display': 'none',
					'filter': 'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'
				}
			}).inject(this.element, 'after');
		}
	},

	show: function() {
		if (this.fix) {
			var coords = this.element.getCoordinates(this.relative);
			delete coords.right;
			delete coords.bottom;
			this.fix.setStyles($extend(coords, {
				'display': '',
				'zIndex': (this.element.getStyle('zIndex') || 1) - 1
			}));
		}
		return this;
	},

	hide: function() {
		if (this.fix) this.fix.setStyle('display', 'none');
		return this;
	},

	destroy: function() {
		if (this.fix) this.fix = this.fix.destroy();
	}

});

Element.implement({

	getSelectedRange: function() {
		if (!Browser.Engine.trident) return {start: this.selectionStart, end: this.selectionEnd};
		var pos = {start: 0, end: 0};
		var range = this.getDocument().selection.createRange();
		if (!range || range.parentElement() != this) return pos;
		var dup = range.duplicate();
		if (this.type == 'text') {
			pos.start = 0 - dup.moveStart('character', -100000);
			pos.end = pos.start + range.text.length;
		} else {
			var value = this.value;
			var offset = value.length - value.match(/[\n\r]*$/)[0].length;
			dup.moveToElementText(this);
			dup.setEndPoint('StartToEnd', range);
			pos.end = offset - dup.text.length;
			dup.setEndPoint('StartToStart', range);
			pos.start = offset - dup.text.length;
		}
		return pos;
	},

	selectRange: function(start, end) {
	    try {
		    if (Browser.Engine.trident) {
			    var diff = this.value.substr(start, end - start).replace(/\r/g, '').length;
			    start = this.value.substr(0, start).replace(/\r/g, '').length;
			    var range = this.createTextRange();
			    range.collapse(true);
			    range.moveEnd('character', start + diff);
			    range.moveStart('character', start);
			    range.select();
		    } else {
			    this.focus();
			    this.setSelectionRange(start, end);
		    }
		}
		catch (ex) {}
		
		return this;
	}

});

/* compatibility */

Autocompleter.Base = Autocompleter;/**
 * Autocompleter.Request
 *
 * http://digitarald.de/project/autocompleter/
 *
 * @version		1.1.2
 *
 * @license		MIT-style license
 * @author		Harald Kirschner <mail [at] digitarald.de>
 * @copyright	Author
 */

Autocompleter.Request = new Class({

	Extends: Autocompleter,

	options: {/*
		indicator: null,
		indicatorClass: null,
		onRequest: $empty,
		onComplete: $empty,*/
		postData: {},
		ajaxOptions: {},
		postVar: 'value'

	},

	query: function(){
		var data = $unlink(this.options.postData) || {};
		data[this.options.postVar] = this.queryValue;
		var indicator = $(this.options.indicator);
		if (indicator) indicator.setStyle('display', '');
		var cls = this.options.indicatorClass;
		if (cls) this.element.addClass(cls);
		this.fireEvent('onRequest', [this.element, this.request, data, this.queryValue]);
		this.request.send({'data': data});
	},

	/**
	 * queryResponse - abstract
	 *
	 * Inherated classes have to extend this function and use this.parent()
	 */
	queryResponse: function() {
		var indicator = $(this.options.indicator);
		if (indicator) indicator.setStyle('display', 'none');
		var cls = this.options.indicatorClass;
		if (cls) this.element.removeClass(cls);
		return this.fireEvent('onComplete', [this.element, this.request]);
	}

});

Autocompleter.Request.JSON = new Class({

	Extends: Autocompleter.Request,

	initialize: function(el, url, options) {
		this.parent(el, options);
		this.request = new Request.JSON($merge({
			'url': url,
			'link': 'cancel'
		}, this.options.ajaxOptions)).addEvent('onComplete', this.queryResponse.bind(this));
	},

	queryResponse: function(response) {
		this.parent();
		this.update(response);
	}

});

Autocompleter.Request.HTML = new Class({

	Extends: Autocompleter.Request,

	initialize: function(el, url, options) {
		this.parent(el, options);
		this.request = new Request.HTML($merge({
			'url': url,
			'link': 'cancel',
			'update': this.choices
		}, this.options.ajaxOptions)).addEvent('onComplete', this.queryResponse.bind(this));
	},

	queryResponse: function(tree, elements) {
		this.parent();
		if (!elements || !elements.length) {
			this.hideChoices();
		} else {
			this.choices.getChildren(this.options.choicesMatch).each(this.options.injectChoice || function(choice) {
				var value = choice.innerHTML;
				choice.inputValue = value;
				this.addChoiceEvents(choice.set('html', this.markQueryValue(value)));
			}, this);
			this.showChoices();
		}

	}

});

/* compatibility */

Autocompleter.Ajax = {
	Base: Autocompleter.Request,
	Json: Autocompleter.Request.JSON,
	Xhtml: Autocompleter.Request.HTML
};
/**
 * Autocompleter.Local
 *
 * http://digitarald.de/project/autocompleter/
 *
 * @version		1.1.2
 *
 * @license		MIT-style license
 * @author		Harald Kirschner <mail [at] digitarald.de>
 * @copyright	Author
 */

Autocompleter.Local = new Class({

	Extends: Autocompleter,

	options: {
		minLength: 0,
		delay: 200
	},

	initialize: function(element, tokens, options) {
		this.parent(element, options);
		this.tokens = tokens;
	},

	query: function() {
		this.update(this.filter());
	}

});Airtrade.CommonSearch=new function(){this.ShowSideContainerBig=function(){if($('divSideContentContainer')&&$('divSideContentContainerBig')){$('divSideContentContainer').style['display']='none';$('divSideContentContainerBig').style['display']='';}};this.ShowSideContainer=function(){if($('divSideContentContainer')&&$('divSideContentContainerBig')){$('divSideContentContainer').style['display']='';$('divSideContentContainerBig').style['display']='none';}};}();Airtrade.FlightHotelSearch=new function(){var _g;var _h;var _i;var _j;var _k;var _l;var _m;var _n;this.Init=function(a,b){_g=FHS_ctlDepart1DatePicker_txtDateInput;_h=FHS_ctlDepart2DatePicker_txtDateInput;_i=FHS_ctlDepart1DatePicker_ctlAirtradeCalendar;_j=FHS_ctlDepart2DatePicker_ctlAirtradeCalendar;_m=a;_n=b;_k='FHS_ddlOutBoundTime';_l='FHS_ddlInBoundTime';Airtrade.FlightHotelSearch.NumberOfRoomsChanged();Airtrade.FlightHotelSearch.SetupCalendarMinMaxDates();};this.SetupCalendarMinMaxDates=function(){_g.SetCalendar(new Date(_n.toString()),new Date(_m.toString()),_g.GetDate());var _o=new Date(_g.GetDate().toString());_h.SetCalendar(_o,new Date(_m.toString()),Airtrade.FlightHotelSearch.GetValidInBoundDate(_o));};this.CalendarOutBoundDeparture_OnDaySelected=function(c,d){_g.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_i);var e=new Date(_g.GetDate().toString());_h.SetCalendar(e,new Date(e.toString()).increment('day',GetPackageMaxDuration()),Airtrade.FlightHotelSearch.GetValidInBoundDate(e));_h.SetDate(Airtrade.FlightHotelSearch.GetValidInBoundDate(e));Airtrade.FlightHotelSearch.TimeChanged();};this.CalendarInBoundArrival_OnDaySelected=function(c,d){_h.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_j);Airtrade.FlightHotelSearch.TimeChanged();};this.GetValidInBoundDate=function(e){if(e>=_h.GetDate()){return new Date(e.toString()).increment('day',GetPackageDefaultDaysFromDeparture());}else{return _h.GetDate();}};this.TimeChanged=function(){if($(_k)==undefined||$(_l)==undefined)return;var _p=$(_l);if((parseFloat(_p.value)<=parseFloat($(_k).value))&&(_g.GetDate().toString()==_h.GetDate().toString())&&parseFloat($(_k).value)!=-1){_p.value=parseFloat($(_k).value)+parseFloat(0.5);}};this.ToggleFlightSearchExpand=function(f){if(f){$('FHS_collapsesearch').style['display']='';$('FHS_expandsearch').style['display']='none';Airtrade.CommonSearch.ShowSideContainerBig();}else{$('FHS_collapsesearch').style['display']='none';$('FHS_expandsearch').style['display']='';Airtrade.CommonSearch.ShowSideContainer();}Airtrade.Common.ToggleExtendedElements('FlightHotelSearch');};this.AirlineAllianceIndexChanged=function(){$('FHS_hiddenAirlinePref').value=$('FHS_ddlAirlinePref').selectedIndex;};this.PerformFlightHotelSearch=function(g){if(Madurodam.Validation.isValid("FlightHotelSearch")){ShowWaitingScreen(GetSearchingForPackageMessage());Madurodam.Ajax.doCallback("FHS."+g,null,{stateContainerId:"FHS_divFlightHotelQuickSearch",onCompleteHandler:Airtrade.FlightHotelSearch.PerformFlightHotelSearchComplete,onErrorHandler:Airtrade.FlightHotelSearch.PerformFlightHotelSearchError});}};this.PerformFlightHotelSearchComplete=function(h,i){if(h.Success){if(h.PackageAirportsNearDestinationCity.length>0){HideWaitingScreen(true);Airtrade.FlightHotelSearch.ShowClarificationPopup();}else{window.setTimeout("window.location.href = '/PackageResults.aspx'",500);}}else{HideWaitingScreen(true);YT_MessageBoxShowOkDelayed(500,200,h.HeaderText,h.MessageText,'',500);}};this.PerformFlightHotelSearchError=function(h,i){HideWaitingScreen(true);};this.clarificationPopup=null;this.ShowClarificationPopup=function(){var _q='/Controls/SearchControls/Clarificationpopup.aspx?CallerNamespace=FlightHotelSearch';this.clarificationPopup=new CQS.Popup(600,300,_q,true);CQS.Block.setup(undefined,50);CQS.Block.show();this.clarificationPopup.showCenter();};this.HideClarificationPopup=function(j){this.clarificationPopup.hide();if(j==false){setTimeout('Airtrade.FlightHotelSearch.PerformFlightHotelSearch("DoFlightHotelSearchWithServerCriteria")',1000)}else{CQS.Block.hide();}};this.RemoveDefaultText=function(k){if(k.value==Airtrade.FlightHotelSearch_Client.GetDefaultText()){k.value="";}};this.AddDefaultText=function(k){if(k.value==""){k.value=Airtrade.FlightHotelSearch_Client.GetDefaultText();}};this.NumberOfRoomsChanged=function(){var _r=$('FHS_ddlHotelRooms');var _s=_r.options[_r.selectedIndex].value;for(var _t=1;_t<5;_t++){$('flightHotelRowRoom'+_t).style.display=(_s>=_t)?"":"none";}};}();Airtrade.FlightHotelCarSearch=new function(){var _g;var _h;var _i;var _j;var _k;var _l;var _m;var _n;this.Init=function(a,b){_g=FHC_ctlDepart1DatePicker_txtDateInput;_h=FHC_ctlDepart2DatePicker_txtDateInput;_i=FHC_ctlDepart1DatePicker_ctlAirtradeCalendar;_j=FHC_ctlDepart2DatePicker_ctlAirtradeCalendar;_m=a;_n=b;_k='FHC_ddlOutBoundTime';_l='FHC_ddlInBoundTime';Airtrade.FlightHotelCarSearch.NumberOfRoomsChanged();Airtrade.FlightHotelCarSearch.SetupCalendarMinMaxDates();};this.SetupCalendarMinMaxDates=function(){_g.SetCalendar(new Date(_n.toString()),new Date(_m.toString()),_g.GetDate());var _o=new Date(_g.GetDate().toString());_h.SetCalendar(_o,new Date(_m.toString()),Airtrade.FlightHotelCarSearch.GetValidInBoundDate(_o));};this.CalendarOutBoundDeparture_OnDaySelected=function(c,d){_g.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_i);var e=new Date(_g.GetDate().toString());_h.SetCalendar(e,new Date(e.toString()).increment('day',GetPackageMaxDuration()),Airtrade.FlightHotelCarSearch.GetValidInBoundDate(e));_h.SetDate(Airtrade.FlightHotelCarSearch.GetValidInBoundDate(e));Airtrade.FlightHotelCarSearch.TimeChanged();};this.CalendarInBoundArrival_OnDaySelected=function(c,d){_h.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_j);Airtrade.FlightHotelCarSearch.TimeChanged();};this.GetValidInBoundDate=function(e){if(e>=_h.GetDate()){return new Date(e.toString()).increment('day',GetPackageDefaultDaysFromDeparture());}else{return _h.GetDate();}};this.TimeChanged=function(){if($(_k)==undefined||$(_l)==undefined)return;var _p=$(_l);if((parseFloat(_p.value)<=parseFloat($(_k).value))&&(_g.GetDate().toString()==_h.GetDate().toString())&&parseFloat($(_k).value)!=-1){_p.value=parseFloat($(_k).value)+parseFloat(0.5);}};this.ToggleFlightSearchExpand=function(f){if(f){$('FHC_collapsesearch').style['display']='';$('FHC_expandsearch').style['display']='none';Airtrade.CommonSearch.ShowSideContainerBig();}else{$('FHC_collapsesearch').style['display']='none';$('FHC_expandsearch').style['display']='';Airtrade.CommonSearch.ShowSideContainer();}Airtrade.Common.ToggleExtendedElements('FlightHotelCarSearch');};this.AirlineAllianceIndexChanged=function(){$('FHC_hiddenAirlinePref').value=$('FHC_ddlAirlinePref').selectedIndex;};this.PerformFlightHotelCarSearch=function(g){if(Madurodam.Validation.isValid("FlightHotelCarSearch")){ShowWaitingScreen(GetSearchingForPackageMessage());Madurodam.Ajax.doCallback("FHC."+g,null,{stateContainerId:"FHC_divFlightHotelCarQuickSearch",onCompleteHandler:Airtrade.FlightHotelCarSearch.PerformFlightHotelCarSearchComplete,onErrorHandler:Airtrade.FlightHotelCarSearch.PerformFlightHotelCarSearchError});}};this.PerformFlightHotelCarSearchComplete=function(h,i){if(h.Success){if(h.PackageAirportsNearDestinationCity.length>0){HideWaitingScreen(true);Airtrade.FlightHotelCarSearch.ShowClarificationPopup();}else{window.setTimeout("window.location.href = '/PackageResults.aspx'",500);}}else{HideWaitingScreen(true);YT_MessageBoxShowOkDelayed(500,200,h.HeaderText,h.MessageText,'',500);}};this.PerformFlightHotelCarSearchError=function(h,i){HideWaitingScreen(true);};this.clarificationPopup=null;this.ShowClarificationPopup=function(){var _q='/Controls/SearchControls/Clarificationpopup.aspx?CallerNamespace=FlightHotelCarSearch';this.clarificationPopup=new CQS.Popup(600,300,_q,true);CQS.Block.setup(undefined,50);CQS.Block.show();this.clarificationPopup.showCenter();};this.HideClarificationPopup=function(j){this.clarificationPopup.hide();if(j==false){setTimeout('Airtrade.FlightHotelCarSearch.PerformFlightHotelCarSearch("DoFlightHotelCarSearchWithServerCriteria")',1000)}else{CQS.Block.hide();}};this.RemoveDefaultText=function(k){if(k.value==Airtrade.FlightHotelCarSearch_Client.GetDefaultText()){k.value="";}};this.AddDefaultText=function(k){if(k.value==""){k.value=Airtrade.FlightHotelCarSearch_Client.GetDefaultText();}};this.NumberOfRoomsChanged=function(){var _r=$('FHC_ddlHotelRooms');var _s=_r.options[_r.selectedIndex].value;for(var _t=1;_t<5;_t++){$('flightHotelCarRowRoom'+_t).style.display=(_s>=_t)?"":"none";}};}();Airtrade.FlightCarSearch=new function(){var _g;var _h;var _i;var _j;var _k;var _l;var _m;var _n;this.Init=function(a,b){_g=FCS_ctlDepart1DatePicker_txtDateInput;_h=FCS_ctlDepart2DatePicker_txtDateInput;_i=FCS_ctlDepart1DatePicker_ctlAirtradeCalendar;_j=FCS_ctlDepart2DatePicker_ctlAirtradeCalendar;_m=a;_n=b
_k='FCS_ddlOutBoundTime';_l='FCS_ddlInBoundTime';Airtrade.FlightCarSearch.SetupCalendarMinMaxDates();};this.SetupCalendarMinMaxDates=function(){_g.SetCalendar(new Date(_n.toString()),new Date(_m.toString()),_g.GetDate());var _o=new Date(_g.GetDate().toString());_h.SetCalendar(_o,new Date(_m.toString()),Airtrade.FlightCarSearch.GetValidInBoundDate(_o));};this.CalendarOutBoundDeparture_OnDaySelected=function(c,d){_g.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_i);var e=new Date(_g.GetDate().toString());_h.SetCalendar(e,new Date(e.toString()).increment('day',GetPackageMaxDuration()),Airtrade.FlightCarSearch.GetValidInBoundDate(e));_h.SetDate(Airtrade.FlightCarSearch.GetValidInBoundDate(e));Airtrade.FlightCarSearch.TimeChanged();};this.CalendarInBoundArrival_OnDaySelected=function(c,d){_h.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_j);Airtrade.FlightCarSearch.TimeChanged();};this.GetValidInBoundDate=function(e){if(e>=_h.GetDate()){return new Date(e.toString()).increment('day',GetPackageDefaultDaysFromDeparture());}else{return _h.GetDate();}};this.TimeChanged=function(){if($(_k)==undefined||$(_l)==undefined)return;var _p=$(_l);if((parseFloat(_p.value)<=parseFloat($(_k).value))&&(_g.GetDate().toString()==_h.GetDate().toString())&&parseFloat($(_k).value)!=-1){_p.value=parseFloat($(_k).value)+parseFloat(0.5);}};this.ToggleFlightSearchExpand=function(f){if(f){$('FCS_collapsesearch').style['display']='';$('FCS_expandsearch').style['display']='none';Airtrade.CommonSearch.ShowSideContainerBig();}else{$('FCS_collapsesearch').style['display']='none';$('FCS_expandsearch').style['display']='';Airtrade.CommonSearch.ShowSideContainer();}Airtrade.Common.ToggleExtendedElements('FlightCarSearch');};this.AirlineAllianceIndexChanged=function(){$('FCS_iddenAirlinePref').value=$('FCS_ddlAirlinePref').selectedIndex;};this.PerformFlightCarSearch=function(g){if(Madurodam.Validation.isValid("FlightCarSearch")){ShowWaitingScreen(GetSearchingForPackageMessage());Madurodam.Ajax.doCallback("FCS."+g,null,{stateContainerId:"FCS_divFlightCarQuickSearch",onCompleteHandler:Airtrade.FlightCarSearch.PerformFlightCarSearchComplete,onErrorHandler:Airtrade.FlightCarSearch.PerformFlightCarSearchError});}};this.PerformFlightCarSearchComplete=function(h,i){if(h.Success){if(h.PackageAirportsNearDestinationCity.length>0){HideWaitingScreen(true);Airtrade.FlightCarSearch.ShowClarificationPopup();}else{window.setTimeout("window.location.href = '/PackageResults.aspx'",500);}}else{HideWaitingScreen(true);YT_MessageBoxShowOkDelayed(500,200,h.HeaderText,h.MessageText,'',500);}};this.PerformFlightCarSearchError=function(h,i){HideWaitingScreen(true);};this.clarificationPopup=null;this.ShowClarificationPopup=function(){var _q='/Controls/SearchControls/Clarificationpopup.aspx?CallerNamespace=FlightCarSearch';this.clarificationPopup=new CQS.Popup(600,300,_q,true);CQS.Block.setup(undefined,50);CQS.Block.show();this.clarificationPopup.showCenter();};this.HideClarificationPopup=function(j){this.clarificationPopup.hide();if(j==false){setTimeout('Airtrade.FlightCarSearch.PerformFlightCarSearch("DoFlightCarSearchWithServerCriteria")',1000)}else{CQS.Block.hide();}};}();Airtrade.HotelSearch=new function(){var _u;var _v;var _w;var _x;var _y;var r;var _z;var _aa;this.Init=function(l,m,n,o,p){_u=HS_arrivalDatePicker_txtDateInput;_v=HS_departureDatePicker_txtDateInput;_w=HS_arrivalDatePicker_ctlAirtradeCalendar;_x=HS_departureDatePicker_ctlAirtradeCalendar;Airtrade.Common.ManuallyAddValidationTypeRequired($('HS_cmbHotelLocations'),'LocationInput','HotelSearch',o,p);r=l;_z=m;_aa=n;_y='HS_chkOnlyAvailHotels';Airtrade.HotelSearch.NumberOfRoomsChanged();Airtrade.HotelSearch.SetupCalendarMinMaxDates();Airtrade.HotelSearch.UpdateNumberOfNights();Airtrade.HotelSearch.OnlyAvailHotelsChanged();};this.OnNumOfNightsBlur_QuickSearch=function(k,q,r,s,t){if(k.value.length==0)k.value=_lastNumOfNights;var _ab=parseFloat(k.value);if(_ab>q){_ab=q;k.value=q;YT_MessageBoxShowOkDelayed(400,200,s,t,'',500);}var v=new Date(HS_arrivalDatePicker_txtDateInput.GetDate().toString());var _ac=new Date(HS_arrivalDatePicker_txtDateInput.GetDate().toString()).increment('day',_ab);HS_departureDatePicker_txtDateInput.SetCalendar(v,new Date(v.toString()).increment('day',r),_ac);HS_departureDatePicker_txtDateInput.SetDate(_ac);_lastNumOfNights=_ab;};this.PerformHotelSearch=function(){if(Madurodam.Validation.isValid("HotelSearch")){ShowWaitingScreen(GetSearchingForHotelsMessage());Madurodam.Ajax.doCallback("DoHotelSearch",null,{stateContainerId:"HS_divHotelQuickSearch",onCompleteHandler:Airtrade.HotelSearch.PerformHotelSearchComplete,onErrorHandler:Airtrade.HotelSearch.PerformHotelSearchError});}};this.PerformHotelSearchComplete=function(h,i){if(h.Success){window.setTimeout("window.location.href = '/HotelResults.aspx'",500);}else{HideWaitingScreen(true);YT_MessageBoxShowOkDelayed(400,200,h.HeaderText,h.MessageText,'',500);}};this.PerformHotelSearchError=function(h,i){HideWaitingScreen(true);};this.NumberOfRoomsChanged=function(){var _r=$('HS_ddlHotelRooms');var _s=_r.options[_r.selectedIndex].value;for(var _t=1;_t<5;_t++){$('rowRoom'+_t).style.display=(_s>=_t)?"":"none";}};this.CalendarArrival_OnDaySelected=function(u,d){_u.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_w);var v=new Date(_u.GetDate().toString()).increment('day',1);_v.SetCalendar(v,new Date(v.toString()).increment('day',r),Airtrade.HotelSearch.GetValidDepartureDate(v));_v.SetDate(Airtrade.HotelSearch.GetValidDepartureDate(v));Airtrade.HotelSearch.UpdateNumberOfNights();};this.CalendarDeparture_OnDaySelected=function(u,d){_v.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_x);Airtrade.HotelSearch.UpdateNumberOfNights();};this.GetValidDepartureDate=function(v){if(v>_v.GetDate()){return new Date(v.toString());}else{return _v.GetDate();}};this.UpdateNumberOfNights=function(){$('HS_txtNrNights').value=Math.ceil((_v.GetDate().getTime()-_u.GetDate().getTime())/(1000*60*60*24));};this.SetupCalendarMinMaxDates=function(){_u.SetCalendar(new Date(_aa.toString()).increment('day',_z),new Date(_aa.toString()).increment('day',r-1),_u.GetDate());var v=new Date(_u.GetDate().toString()).increment('day',1);_v.SetCalendar(v,new Date(_aa.toString()).increment('day',r),Airtrade.HotelSearch.GetValidDepartureDate(v));};this.ResetCalendarMinMaxDates=function(){_u.SetDate(new Date(_aa.toString()).increment('day',_z));_u.SetCalendar(new Date(_aa.toString()).increment('day',_z),new Date(_aa.toString()).increment('day',r-1),_u.GetDate());_v.SetDate(new Date(_u.GetDate().toString()).increment('day',1));_v.SetCalendar(new Date(_aa.toString()).increment('day',_z+1),new Date(_aa.toString()).increment('day',r),_v.GetDate());};this.OnlyAvailHotelsChanged=function(){};var _ad=1;this.NumNightsFocus=function(k){_ad=parseFloat(k.value);};this.NumNightsBlur=function(k){var _ab=parseInt(k.value);if(k.value.length==0||k.value==0){k.value=_ad;}else if(_ad!=_ab){var q=_u.GetDate().diff(_v.GetCalendarMaxDate());if(_ab>q){_ab=q;k.value=q;}var v=new Date(_u.GetDate().toString());var _ac=new Date(_u.GetDate().toString()).increment('day',_ab);_v.SetCalendar(v,new Date(v.toString()).increment('day',r),_ac);_v.SetDate(_ac);_ad=_ab;}};this.RemoveDefaultText=function(k){if(k.value==Airtrade.HotelSearch_Client.GetDefaultText()){k.value="";}};this.AddDefaultText=function(k){if(k.value==""){k.value=Airtrade.HotelSearch_Client.GetDefaultText();}};this.ToggleFlightSearchExpand=function(f){if(f){$('HS_collapsesearch').style['display']='';$('HS_expandsearch').style['display']='none';Airtrade.CommonSearch.ShowSideContainerBig();}else{$('HS_collapsesearch').style['display']='none';$('HS_expandsearch').style['display']='';Airtrade.CommonSearch.ShowSideContainer();}Airtrade.Common.ToggleExtendedElements('HotelSearch');};}();Airtrade.CarSearch=new function(){var _ae;var _af;var _ag;var _ah;var _ai;var _aj;var _ak;var _al;var r;var _aa;var _am;var _an;this.Init=function(l,n,w,x,o,p){_ae=CS_ctlArrivalDatePicker_txtDateInput;_af=CS_ctlDepartureDatePicker_txtDateInput;_ag=CS_ctlArrivalDatePicker_ctlAirtradeCalendar;_ah=CS_ctlDepartureDatePicker_ctlAirtradeCalendar;_ai='CS_cmbCarPickupLocations';Airtrade.Common.ManuallyAddValidationTypeRequired($(_ai),'PickUpLocationInput','CarSearch',o,p);_aj='CS_cmbCarDropoffLocations';Airtrade.Common.ManuallyAddValidationTypeRequired($(_aj),'DropOffLocationInput','CarSearch',o,p);r=l;_aa=n;_am=w;_an=x;_ak='CS_ddlPickUpTime';_al='CS_ddlDropOffTime';Airtrade.CarSearch.SetupCalendarMinMaxDates();Airtrade.CarSearch.UpdateTotalDays();};this.SetupCalendarMinMaxDates=function(){_ae.SetCalendar(new Date(_am.toString()),new Date(_aa.toString()).increment('day',r-1),_ae.GetDate());var y=new Date(_ae.GetDate().toString());_af.SetCalendar(y,new Date(_aa.toString()).increment('day',r),Airtrade.CarSearch.GetValidDropOffDate(y));};this.ResetCalendarMinMaxDates=function(){var _ao;_ao=new Date(_aa.toString()).increment('day',r)
_ae.SetDate(Airtrade.Common.CreateDateFromDateArgs(new Date(_am.toString())));_ae.SetCalendar(new Date(_am.toString()),_ao,_ae.GetDate());_af.SetDate(new Date(_ae.GetDate().toString()).increment('day',3));_af.SetCalendar(new Date(_ae.GetDate().toString()),_ao,_af.GetDate());};this.CalendarPickUp_OnDaySelected=function(u,d){_ae.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_ag);var y=new Date(_ae.GetDate().toString());_af.SetCalendar(y,new Date(y.toString()).increment('day',r),Airtrade.CarSearch.GetValidDropOffDate(y));_af.SetDate(Airtrade.CarSearch.GetValidDropOffDate(y));Airtrade.CarSearch.UpdateTotalDays();Airtrade.CarSearch.TimeChanged();};this.GetValidDropOffDate=function(y){if(y>_af.GetDate()){return new Date(y.toString()).increment('day',1);}else{return _af.GetDate();}};this.CalendarDropOff_OnDaySelected=function(u,d){_af.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_ah);Airtrade.CarSearch.UpdateTotalDays();Airtrade.CarSearch.TimeChanged();};this.PerformCarSearch=function(){if(Madurodam.Validation.isValid("CarSearch")){ShowWaitingScreen(GetSearchingForCarsMessage());Madurodam.Ajax.doCallback("DoCarSearch",null,{stateContainerId:"CS_divCarQuickSearch",onCompleteHandler:Airtrade.CarSearch.PerformCarSearchComplete,onErrorHandler:Airtrade.CarSearch.PerformCarSearchError});}};this.PerformCarSearchComplete=function(h,i){if(h.Success){window.setTimeout("window.location.href = '/CarResults.aspx'",500);}else{HideWaitingScreen(true);YT_MessageBoxShowOkDelayed(500,200,h.HeaderText,h.MessageText,'',500);}};this.PerformCarSearchError=function(h,i){HideWaitingScreen(true);};this.UpdateTotalDays=function(){$('CS_txtNrDays').value=Math.ceil((_af.GetDate().getTime()-_ae.GetDate().getTime())/(1000*60*60*24));};this.PickUpLocationClosing=function(z){if($(z).value.length>=_an){if($(_aj).value.length<=0){$(_aj).value=$(z).value;}}};this.TimeChanged=function(){var _ap=$(_al);if((parseFloat(_ap.value)<=parseFloat($(_ak).value))&&(_ae.GetDate().toString()==_af.GetDate().toString())){_ap.value=parseFloat($(_ak).value)+parseFloat(0.5);}};var _aq=1;this.TotalDaysFocus=function(k){_aq=parseFloat(k.value);};this.TotalDaysBlur=function(k){var _ar=parseInt(k.value);if(k.value.length==0){k.value=_aq;}else if(_aq!=_ar){var l=_ae.GetDate().diff(_af.GetCalendarMaxDate());if(_ar>l){_ar=l;k.value=l;}var y=new Date(_ae.GetDate().toString());var _as=new Date(_ae.GetDate().toString()).increment('day',_ar);_af.SetCalendar(y,new Date(y.toString()).increment('day',r),_as);_af.SetDate(_as);Airtrade.CarSearch.TimeChanged();_aq=_ar;}};this.ToggleFlightSearchExpand=function(f){if(f){$('CS_collapsesearch').style['display']='';$('CS_expandsearch').style['display']='none';Airtrade.CommonSearch.ShowSideContainerBig();}else{$('CS_collapsesearch').style['display']='none';$('CS_expandsearch').style['display']='';Airtrade.CommonSearch.ShowSideContainer();}Airtrade.Common.ToggleExtendedElements('CarSearch');};}();Airtrade.FlightSearch=new function(){var _at;var _au;var _av;var _aw;var _ax;var _ay;var _az;var _g;var _h;var _i;var _j;var _k;var _l;var _m;var _n;var _an;this.Init=function(a,b,x,_a,_b){Airtrade.PopUnder.Init(_a,_b);_at='FS_cmbRADArriveCity2_container_autoComplete';_av='FS_cmbRADArriveCity2_container_dropDown';_au='FS_cmbRADDepartCity2_container_autoComplete';_aw='FS_cmbRADDepartCity2_container_dropDown';_g=FS_ctlDepart1DatePicker_txtDateInput;_h=FS_ctlDepart2DatePicker_txtDateInput;_i=FS_ctlDepart1DatePicker_ctlAirtradeCalendar;_j=FS_ctlDepart2DatePicker_ctlAirtradeCalendar;_m=a;_n=b;_an=x;_k='FS_ddlOutBoundTime';_l='FS_ddlInBoundTime';if($('FS_optSearchOneWay').checked){Airtrade.FlightSearch.ToggleFlightSearchType(2);}else if($('FS_optSearchReturn').checked){Airtrade.FlightSearch.ToggleFlightSearchType(1);}else{Airtrade.FlightSearch.ToggleFlightSearchType(3);}Airtrade.FlightSearch.SetupCalendarMinMaxDates();};this.ResetCalendarMinMaxDates=function(){_g.SetDate(Airtrade.Common.CreateDateFromDateArgs(new Date(_n.toString())));_g.SetCalendar(new Date(_n.toString()),new Date(_m.toString()),_g.GetDate());_h.SetDate(Airtrade.Common.CreateDateFromDateArgs(new Date(_n.toString()).increment('day',7)));_h.SetCalendar(new Date(_n.toString()),new Date(_m.toString()),_h.GetDate());};this.SetupCalendarMinMaxDates=function(){_g.SetCalendar(new Date(_n.toString()),new Date(_m.toString()),_g.GetDate());var _o=new Date(_g.GetDate().toString());_h.SetCalendar(_o,new Date(_m.toString()),Airtrade.FlightSearch.GetValidInBoundDate(_o));};this.CalendarOutBoundDeparture_OnDaySelected=function(c,d){_g.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_i);var e=new Date(_g.GetDate().toString());_h.SetCalendar(e,new Date(_m.toString()),Airtrade.FlightSearch.GetValidInBoundDate(e));_h.SetDate(Airtrade.FlightSearch.GetValidInBoundDate(e));Airtrade.FlightSearch.TimeChanged();};this.CalendarInBoundArrival_OnDaySelected=function(c,d){_h.SetDate(Airtrade.Common.CreateDateFromDateArgs(d));HideCalendar(_j);Airtrade.FlightSearch.TimeChanged();};this.GetValidInBoundDate=function(e){if(e>=_h.GetDate()){return new Date(e.toString()).increment('day',7);}else{return _h.GetDate();}};this.TimeChanged=function(){if($(_k)==undefined||$(_l)==undefined)return;var _p=$(_l);if((parseFloat(_p.value)<=parseFloat($(_k).value))&&(_g.GetDate().toString()==_h.GetDate().toString())&&parseFloat($(_k).value)!=-1){_p.value=parseFloat($(_k).value)+parseFloat(0.5);}};this.OutBoundDepartureLocationClosing=function(z){if($(z).value.length>=_an){$(_at).value=$(z).value;}};this.OutBoundArrivalLocationClosing=function(z){if($(z).value.length>=_an){$(_au).value=$(z).value;}};this.OutBoundDepartureDropDownIndexChanged=function(_c){$(_av).value=_c.value;};this.OutBoundArrivalDropDownIndexChanged=function(_c){$(_aw).value=_c.value;};this.ToggleFlightSearchType=function(_d){var _ba=$('Calendar1Container').innerHTML;var _bb=$('Calendar2Container').innerHTML;var _bc=$('Cal1RowContainer').innerHTML;var _bd=$('Cal2RowContainer').innerHTML;switch(_d){case 1:$('InboundRowControlsCol1').style['display']='none';$('InboundRowControlsCol2').style['display']='none';$('InboundRowControlsCol3').style['display']='none';$('InboundRowControlsCol4').style['display']='none';$('InboundRowControlsCol5').style['display']='none';$('linkDifferentReturn').style['display']='';$('lblOnDeparture').style['display']='none';$('FS_optSearchReturn').className='qs_radio';$('FS_optSearchDifferentReturn').className='qs_radiohidden';$('FS_optSearchReturn').checked=true;$('FS_ctlDepart2DatePicker_txtDateInput').disabled=false;$('FS_ctlDepart2DatePicker_txtDateInput').style.color='#000000';$('ReturnCol').style.color='';$('FS_ctlDepart2DatePicker_txtDateInput').style.cursor='pointer';$('FS_ctlDepart2DatePicker_btnYTToggleCalendar').disabled=false;$('FS_ctlDepart2DatePicker_btnYTToggleCalendar').style.cursor='pointer';$('FS_ddlInBoundTime').disabled=false;$('CalendarRow').style['display']='';$('Calendar1Container').style['display']='';$('Calendar2Container').style['display']='';if($('columnOpt')){$('Calendar1Container').className='onerow';$('Calendar2Container').className='onerow';}else{$('Calendar1Container').className='onerow nodp';$('Calendar2Container').className='onerow nodp';}$('lblFrom1').style['display']='';$('lblFrom2').style['display']='none';$('lblFlight').className='qs_left smallcols';$('lblTo').className='qs_left qs_bua smallcols';$('lblAdultNoAge').className='qs_leftpas smallcols';$('lblAdultsAges').className='qs_leftpas smallcols';$('lblOptions').className='qs_optfirst smallcols';$('lblPassengers').className='qs_left smallcols';$('lblMorePassengers').className='qs_skipacolnote smallcols';$('btnSearch').className='info qs_btnleftsearch smallcols';break;case 2:$('InboundRowControlsCol1').style['display']='none';$('InboundRowControlsCol2').style['display']='none';$('InboundRowControlsCol3').style['display']='none';$('InboundRowControlsCol4').style['display']='none';$('InboundRowControlsCol5').style['display']='none';$('linkDifferentReturn').style['display']='';$('lblOnDeparture').style['display']='none';$('FS_optSearchReturn').className='qs_radio';$('FS_optSearchDifferentReturn').className='qs_radiohidden';$('FS_ctlDepart2DatePicker_txtDateInput').disabled=true;$('FS_ctlDepart2DatePicker_txtDateInput').style.color='#666666';$('ReturnCol').style.color='#666666';$('FS_ctlDepart2DatePicker_txtDateInput').style.cursor='default';$('FS_ctlDepart2DatePicker_btnYTToggleCalendar').disabled=true;$('FS_ctlDepart2DatePicker_btnYTToggleCalendar').style.cursor='default';$('FS_ddlInBoundTime').disabled=true;$('CalendarRow').style['display']='';$('Calendar1Container').style['display']='';$('Calendar2Container').style['display']='';if($('columnOpt')){$('Calendar1Container').className='onerow';$('Calendar2Container').className='onerow';}else{$('Calendar1Container').className='onerow nodp';$('Calendar2Container').className='onerow nodp';}$('lblFrom1').style['display']='';$('lblFrom2').style['display']='none';$('lblFlight').className='qs_left smallcols';$('lblTo').className='qs_left qs_bua smallcols';$('lblAdultNoAge').className='qs_leftpas smallcols';$('lblAdultsAges').className='qs_leftpas smallcols';$('lblOptions').className='qs_optfirst smallcols';$('lblPassengers').className='qs_left smallcols';$('lblMorePassengers').className='qs_skipacolnote smallcols';$('FS_collapsesearch').className='collapsesearch fs_paddingleftsmall';$('FS_expandsearch').className='expandsearch fs_paddingleftsmall';$('btnSearch').className='info qs_btnleftsearch smallcols';break;case 3:$('InboundRowControlsCol1').style['display']='';$('InboundRowControlsCol2').style['display']='';$('InboundRowControlsCol3').style['display']='';$('InboundRowControlsCol4').style['display']='';$('InboundRowControlsCol5').style['display']='';$('linkDifferentReturn').style['display']='none';$('lblOnDeparture').style['display']='';$('FS_optSearchReturn').className='qs_radiohidden';$('FS_optSearchDifferentReturn').className='qs_radio';$('FS_optSearchDifferentReturn').checked=true;$('FS_ctlDepart2DatePicker_txtDateInput').disabled=false;$('FS_ctlDepart2DatePicker_txtDateInput').style.color='#000000';$('ReturnCol').style.color='';$('FS_ctlDepart2DatePicker_txtDateInput').style.cursor='pointer';$('FS_ctlDepart2DatePicker_btnYTToggleCalendar').disabled=false;$('FS_ctlDepart2DatePicker_btnYTToggleCalendar').style.cursor='pointer';$('FS_ddlInBoundTime').disabled=false;$('CalendarRow').style['display']='none';$('Calendar1Container').style['display']='';$('Calendar2Container').style['display']='';$('Calendar1Container').className='';$('Calendar2Container').className='';$('lblFrom1').style['display']='none';$('lblFrom2').style['display']='';$('lblFlight').className='qs_left';$('lblTo').className='qs_left qs_bua';$('lblAdultNoAge').className='qs_leftpas';$('lblAdultsAges').className='qs_leftpas';$('lblOptions').className='qs_optfirst';$('lblPassengers').className='qs_left';$('lblMorePassengers').className='qs_skipacolnote';$('FS_collapsesearch').className='collapsesearch fs_paddingleftbig';$('FS_expandsearch').className='expandsearch fs_paddingleftbig';$('btnSearch').className='info qs_btnleftsearch';break;case 4:$('diffReturnAirports').style['display']='block';$('FS_optSearchReturn').className='qs_radiohidden';$('FS_optSearchDifferentReturn').className='qs_radio';$('FS_optSearchDifferentReturn').checked=true;break;}};this.GetCollapseElement=function(){return $('FS_collapsesearch');};this.ToggleFlightSearchExpand=function(f){if(f){$('FS_collapsesearch').style['display']='';$('FS_expandsearch').style['display']='none';Airtrade.CommonSearch.ShowSideContainerBig();}else{$('FS_collapsesearch').style['display']='none';$('FS_expandsearch').style['display']='';Airtrade.CommonSearch.ShowSideContainer();}if(document.getElementById('FS_optSearchDifferentReturn').className=='qs_radio'){document.getElementById('FS_optSearchDifferentReturn').focus();}else{document.getElementById('FS_optSearchReturn').focus();}Airtrade.Common.ToggleExtendedElements('FlightSearch');};this.DisableReturnAirportFields=function(){$('diffReturnAirports').style['display']='none';};this.EnableReturnAirportFields=function(){$('diffReturnAirports').style['display']='block';};this.AirlineAllianceIndexChanged=function(){$('FS_hiddenAirlinePref').value=$('FS_ddlAirlinePref').selectedIndex;};this.PerformFlightSearch=function(){if(Madurodam.Validation.isValid("FlightSearch")){Airtrade.PopUnder.showPopunder();ShowWaitingScreen(GetSearchingForFlightsMessage());Madurodam.Ajax.doCallback("DoFlightSearch",null,{stateContainerId:"FS_divFlightQuickSearch",onCompleteHandler:Airtrade.FlightSearch.PerformFlightSearchComplete,onErrorHandler:Airtrade.FlightSearch.PerformFlightSearchError});}};this.PerformFlightSearchComplete=function(h,i){if(h.Success){Airtrade.PopUnder.redirectPopUnder(h.PageRedirectUrl);Airtrade.FlightSearch.FlightSearchFinal();}else{Airtrade.PopUnder.closePopUnder();HideWaitingScreen(true);YT_MessageBoxShowOkDelayed(500,200,h.Header,h.Message,'',500);}};this.PerformFlightSearchError=function(h,i){Airtrade.PopUnder.closePopUnder();HideWaitingScreen(true);};this.FlightSearchFinal=function(){if(Madurodam.Validation.isValid("FlightSearch")){ShowWaitingScreen(GetSearchingForFlightsMessage());Madurodam.Ajax.doCallback("DoFlightSearchFinal",null,{stateContainerId:"FS_divFlightQuickSearch",onCompleteHandler:Airtrade.FlightSearch.FlightSearchFinalComplete,onErrorHandler:Airtrade.FlightSearch.FlightSearchFinalError});}};this.FlightSearchFinalComplete=function(h,i){if(h.Success){window.setTimeout("window.location.href = '/FlightResults.aspx'",500);}else{Airtrade.PopUnder.closePopUnder();HideWaitingScreen(true);YT_MessageBoxShowOkDelayed(500,200,h.HeaderText,h.MessageText,'',500);}};this.FlightSearchFinalError=function(h,i){Airtrade.PopUnder.closePopUnder();HideWaitingScreen(true);};}();Airtrade.PopUnder=new function(){var _be;var _bf;var _bg;this.Init=function(_a,_e){_bf=_a;_bg=_e;};this.showPopunder=function(){var _bh=CQS.Common.readCookie('apopunder');if(_bh!='1'&&_bf){var _bi=/chrome/.test(navigator.userAgent.toLowerCase());_be=window.open('','flightsearch','scrollbars=yes, resizable=yes, toolbar=no, menubar=no, status=no, location=no, left=10, top=10, height=680px, width=1020px');if(_be){_be.blur();if(_bi){window.blur();setTimeout(window.focus,0);}else{window.focus();}CQS.Common.createCookie('apopunder','1',_bg);}}};this.redirectPopUnder=function(_f){try{if(_bf&&_be){_be.location=_f;}}catch(err){}};this.closePopUnder=function(){if(_be){CQS.Common.eraseCookie('apopunder');_be.close();}};}();var r;var s=false;var t;var u;var v;var w;var x;var y;var z;var _a;var _b;var _c;var _d;var _e;var _f;var _g;var _h;function YT_SetMessagePropertiesAndShow(a,b,c,d,f,g,h,i,j,k,l,m,n,o,p){r=false;s=false;t=c;u=d;v=f;w=g;x=h;z=j;y=i;_a=l;_b=m;_d=b;_e=a;_f=n;_g=o;_c=c+k+l+m;_h=p;ShowMessageBoxBlock();window.setTimeout("ShowMessageBox()",k);}function EndOfDisplayTime(){r=true;if(s){_c="";MessageBoxHide(-1);s=false;}}function MaxDisplayTimeReached(q){if(_c==q){if(r&&!s){MessageBoxHide(-1);}}}function ShowMessageBox(){if(!r&&!s){document.getElementById("lblMessHeader").innerText="";var _i=document.getElementById("lblMessBody");document.getElementById("btnMessageBoxCancelRequest").style.display="none";if(_f==true){_i.style.display="none";_i.style.height="1px";if(_g!='undefined'&&_g==true){document.getElementById("divMessBoxBody").className="please-wait";document.getElementById("btnMessageBoxCancelRequest").style.display="";}else{document.getElementById("divMessBoxBody").className="YT_Loading_please-wait";}if(u.length<29){document.getElementById("lblMessHeader").style.fontSize="15pt";}else if(u.length<36){document.getElementById("lblMessHeader").style.fontSize="14pt";}else if(u.length<45){document.getElementById("lblMessHeader").style.fontSize="13pt";}else{document.getElementById("lblMessHeader").style.fontSize="12pt";}document.getElementById("lblMessHeader").innerHTML=u;document.getElementById("divAlertSearching").style.height=_d-80+"px";}else{_i.style.display="block";_i.style.height=_d-120+"px";document.getElementById("divMessBoxBody").className="YT_Mess_please-wait";document.getElementById("lblMessHeader").innerHTML=t;document.getElementById("divAlertSearching").style.height=_d-60+"px";}_i.value=u;if(v)document.getElementById("btnYes").style.display="block";else document.getElementById("btnYes").style.display="none";if(w)document.getElementById("btnNo").style.display="block";else document.getElementById("btnNo").style.display="none";if(x)document.getElementById("btnCancel").style.display="block";else document.getElementById("btnCancel").style.display="none";if(z)document.getElementById("btnClose").style.display="block";else document.getElementById("btnClose").style.display="none";if(y)document.getElementById("btnOk").style.display="block";else document.getElementById("btnOk").style.display="none";MessageBoxShow();if(_a>0){window.setTimeout("EndOfDisplayTime()",_a);}else{r=true;}if(_b>0){window.setTimeout("MaxDisplayTimeReached('"+_c+"')",_b);}}else{HideMessageBoxBlock();}}function MBOnBeforeUnload(){document.getElementById("btnMessageBoxCancelRequest").style.display="none";document.getElementById("divMessBoxBody").className="YT_Loading_please-wait";}function MBOnUnload(){try{if(typeof(CQS)!='undefined'){if(typeof(CQS.AT)!='undefined'){if(typeof(CQS.AT.MessageBox)!='undefined'){CQS.AT.MessageBox.messageBoxOnUnload();}}}}catch(e){}}function CancelMessageBox(){YT_CancelLoadingBox();}function YT_HideMessageBox(){if(r){_c="";MessageBoxHide(-1);s=false;_f=false;}else{s=true;}}function CloseClicked(){_c="";MessageBoxHide(1);s=false;r=false;}function CancelClicked(){_c="";MessageBoxHide(2);s=false;r=false;}function OkClicked(){_c="";MessageBoxHide(3,_h);s=false;r=false;}function YesClicked(){_c="";MessageBoxHide(4);s=false;r=false;}function NoClicked(){_c="";MessageBoxHide(5);s=false;r=false;}function SendPassword(){if(Madurodam.Validation.isValid("forgotpassword")){Madurodam.Ajax.doCallback('SendPassword','',{stateContainerId:'divForgotPasswordBox',onCompleteHandler:SendPasswordComplete,onErrorHandler:SendPasswordError});}};function SendPasswordComplete(a,b){if($defined(a)&&a==true){SentPasswordAlert()
HideForgotPasswordBox();}else{UnsentPasswordAlert();}};function SendPasswordError(a,b){UnsentPasswordAlert();};var c=null;function ShowForgotPasswordBox(){if(c==null){c=new Madurodam.Popup(330,160,{elementId:'divForgotPasswordBox',blockBackground:true})}c.showCenter();};function HideForgotPasswordBox(){c.hide(true);};function SentPasswordAlert(){alert(MsgPasswordMailed());}function UnsentPasswordAlert(){alert(MsgPasswordNotMailed());}var c=false;function DoLogin(){if(!c){if(Madurodam.Validation.isValid("login")){Madurodam.Ajax.doCallback(GetUserClientId()+'.UserLogin','',{stateContainerId:'divLoginBox',onCompleteHandler:DoLoginComplete,onErrorHandler:DoLoginError});$('divLoginBox').setStyle('cursor','wait');c=true;}}};function DoLogout(){Madurodam.Ajax.doCallback('UserLogout','',{onCompleteHandler:DoLogoutComplete});};function DoLoginComplete(a,b){$('divLoginBox').setStyle('cursor','');c=false;if($defined(a)){if(a.Success==true){if($defined(a.PageRedirectUrl)){window.location.href=a.PageRedirectUrl;}else{window.location.reload(true);}}else{if(a.ValidationFailed==true){}else{LoginFailedAlert();}}}else{LoginFailedAlert();}};function DoLoginError(a,b){LoginFailedAlert();$('divLoginBox').setStyle('cursor','');c=false;};function DoLogoutComplete(a,b){window.location.reload(true);};var d=null;function ShowLoginBox(){if(d==null){Madurodam.Block.setup(0.5);d=new Madurodam.Popup(330,160,{elementId:'divLoginBox',blockBackground:true});setTimeout("CQS.Common.getElementWithIdContaining(document,'txtEmail').focus()",200);}d.showCenter();};function HideLoginBox(){d.hide(true);};function HideLoginBoxAndShowForgotPasswordBox(){d.hide(false);ShowForgotPasswordBox();};function LoginFailedAlert(){alert(LoginAlert());}function RefreshShoppingCart_Small(){CQS_ReloadUpdatePanel(GetRadCBPShoppingCartSmallClientId(),'UpdateShoppingCartControl',GetRadCBPShoppingCartSmallClientId());}function OnHideSelectBoxInIE(){if(typeof(HideSelectBoxInIE)!='undefined'){HideSelectBoxInIE();}}
