if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]]}}return E};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C)}else{return false}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]}}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B)}if(E){E.VERSION=H;E.BUILD=G}else{YAHOO.log("mainClass is undefined for module "+A,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple"}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0]}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0]}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0]}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1])}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1])}}}}}return C}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break}}if(D){A.push(B)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var A=YAHOO.lang,C=["toString","valueOf"],B={isArray:function(D){if(D){return A.isNumber(D.length)&&A.isFunction(D.splice)}return false},isBoolean:function(D){return typeof D==="boolean"},isFunction:function(D){return typeof D==="function"},isNull:function(D){return D===null},isNumber:function(D){return typeof D==="number"&&isFinite(D)},isObject:function(D){return(D&&(typeof D==="object"||A.isFunction(D)))||false},isString:function(D){return typeof D==="string"},isUndefined:function(D){return typeof D==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(F,E){for(var D=0;D<C.length;D=D+1){var H=C[D],G=E[H];if(A.isFunction(G)&&G!=Object.prototype[H]){F[H]=G}}}:function(){},extend:function(H,I,G){if(!I||!H){throw new Error("extend failed, please check that all dependencies are included.")}var E=function(){};E.prototype=I.prototype;H.prototype=new E();H.prototype.constructor=H;H.superclass=I.prototype;if(I.prototype.constructor==Object.prototype.constructor){I.prototype.constructor=I}if(G){for(var D in G){if(A.hasOwnProperty(G,D)){H.prototype[D]=G[D]}}A._IEEnumFix(H.prototype,G)}},augmentObject:function(H,G){if(!G||!H){throw new Error("Absorb failed, verify dependencies.")}var D=arguments,F,I,E=D[2];if(E&&E!==true){for(F=2;F<D.length;F=F+1){H[D[F]]=G[D[F]]}}else{for(I in G){if(E||!(I in H)){H[I]=G[I]}}A._IEEnumFix(H,G)}},augmentProto:function(G,F){if(!F||!G){throw new Error("Augment failed, verify dependencies.")}var D=[G.prototype,F.prototype];for(var E=2;E<arguments.length;E=E+1){D.push(arguments[E])}A.augmentObject.apply(this,D)},dump:function(D,I){var F,H,K=[],L="{...}",E="f(){...}",J=", ",G=" => ";if(!A.isObject(D)){return D+""}else{if(D instanceof Date||("nodeType" in D&&"tagName" in D)){return D}else{if(A.isFunction(D)){return E}}}I=(A.isNumber(I))?I:3;if(A.isArray(D)){K.push("[");for(F=0,H=D.length;F<H;F=F+1){if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L)}else{K.push(D[F])}K.push(J)}if(K.length>1){K.pop()}K.push("]")}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L)}else{K.push(D[F])}K.push(J)}}if(K.length>1){K.pop()}K.push("}")}return K.join("")},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break}H=S.indexOf(Q,I);if(I+1>=H){break}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G)}P=E[O];if(L){P=L(O,P,R)}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10))}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4)}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10))}else{P=P.toString()}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F}}S=S.substring(0,I)+P+S.substring(H+1)}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g")}return S},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"")}catch(E){return D}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F<D;F=F+1){A.augmentObject(G,E[F],true)}return G},later:function(K,E,L,G,H){K=K||0;E=E||{};var F=L,J=G,I,D;if(A.isString(L)){F=E[L]}if(!F){throw new TypeError("method undefined")}if(!A.isArray(J)){J=[G]}I=function(){F.apply(E,J)};D=(H)?setInterval(I,K):setTimeout(I,K);return{interval:H,cancel:function(){if(this.interval){clearInterval(D)}else{clearTimeout(D)}}}},isValue:function(D){return(A.isObject(D)||A.isString(D)||A.isNumber(D)||A.isBoolean(D))}};A.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(D,E){return D&&D.hasOwnProperty(E)}:function(D,E){return !A.isUndefined(D[E])&&D.constructor.prototype[E]!==D[E]};B.augmentObject(A,B,true);YAHOO.util.Lang=A;A.augment=A.augmentProto;YAHOO.augment=A.augmentProto;YAHOO.extend=A.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.5.2",build:"1076"});(function(){var B=YAHOO.util,K,I,J={},F={},M=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var N=function(P){if(!E.HYPHEN.test(P)){return P}if(J[P]){return J[P]}var Q=P;while(E.HYPHEN.exec(Q)){Q=Q.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase())}J[P]=Q;return Q};var O=function(Q){var P=F[Q];if(!P){P=new RegExp("(?:^|\\s+)"+Q+"(?:\\s+|$)");F[Q]=P}return P};if(M.defaultView&&M.defaultView.getComputedStyle){K=function(P,S){var R=null;if(S=="float"){S="cssFloat"}var Q=P.ownerDocument.defaultView.getComputedStyle(P,"");if(Q){R=Q[N(S)]}return P.style[S]||R}}else{if(M.documentElement.currentStyle&&G){K=function(P,R){switch(N(R)){case"opacity":var T=100;try{T=P.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(S){try{T=P.filters("alpha").opacity}catch(S){}}return T/100;case"float":R="styleFloat";default:var Q=P.currentStyle?P.currentStyle[R]:null;return(P.style[R]||Q)}}}else{K=function(P,Q){return P.style[Q]}}}if(G){I=function(P,Q,R){switch(Q){case"opacity":if(YAHOO.lang.isString(P.style.filter)){P.style.filter="alpha(opacity="+R*100+")";if(!P.currentStyle||!P.currentStyle.hasLayout){P.style.zoom=1}}break;case"float":Q="styleFloat";default:P.style[Q]=R}}}else{I=function(P,Q,R){if(Q=="float"){Q="cssFloat"}P.style[Q]=R}}var D=function(P,Q){return P&&P.nodeType==1&&(!Q||Q(P))};YAHOO.util.Dom={get:function(R){if(R&&(R.nodeType||R.item)){return R}if(YAHOO.lang.isString(R)||!R){return M.getElementById(R)}if(R.length!==undefined){var S=[];for(var Q=0,P=R.length;Q<P;++Q){S[S.length]=B.Dom.get(R[Q])}return S}return R},getStyle:function(P,R){R=N(R);var Q=function(S){return K(S,R)};return B.Dom.batch(P,Q,B.Dom,true)},setStyle:function(P,R,S){R=N(R);var Q=function(T){I(T,R,S)};B.Dom.batch(P,Q,B.Dom,true)},getXY:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false}return H(R)};return B.Dom.batch(P,Q,B.Dom,true)},getX:function(P){var Q=function(R){return B.Dom.getXY(R)[0]};return B.Dom.batch(P,Q,B.Dom,true)},getY:function(P){var Q=function(R){return B.Dom.getXY(R)[1]};return B.Dom.batch(P,Q,B.Dom,true)},setXY:function(P,S,R){var Q=function(V){var U=this.getStyle(V,"position");if(U=="static"){this.setStyle(V,"position","relative");U="relative"}var X=this.getXY(V);if(X===false){return false}var W=[parseInt(this.getStyle(V,"left"),10),parseInt(this.getStyle(V,"top"),10)];if(isNaN(W[0])){W[0]=(U=="relative")?0:V.offsetLeft}if(isNaN(W[1])){W[1]=(U=="relative")?0:V.offsetTop}if(S[0]!==null){V.style.left=S[0]-X[0]+W[0]+"px"}if(S[1]!==null){V.style.top=S[1]-X[1]+W[1]+"px"}if(!R){var T=this.getXY(V);if((S[0]!==null&&T[0]!=S[0])||(S[1]!==null&&T[1]!=S[1])){this.setXY(V,S,true)}}};B.Dom.batch(P,Q,B.Dom,true)},setX:function(Q,P){B.Dom.setXY(Q,[P,null])},setY:function(P,Q){B.Dom.setXY(P,[null,Q])},getRegion:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false}var S=B.Region.getRegion(R);return S};return B.Dom.batch(P,Q,B.Dom,true)},getClientWidth:function(){return B.Dom.getViewportWidth()},getClientHeight:function(){return B.Dom.getViewportHeight()},getElementsByClassName2:function(T,X,U,V){X=X||"*";U=(U)?B.Dom.get(U):null||M;if(!U){return[]}var Q=[],P=U.getElementsByTagName(X),W=O(T);for(var R=0,S=P.length;R<S;++R){if(W.test(P[R].className)){Q[Q.length]=P[R];if(V){V.call(P[R],P[R])}}}return Q},hasClass:function(R,Q){var P=O(Q);var S=function(T){return P.test(T.className)};return B.Dom.batch(R,S,B.Dom,true)},addClass:function(Q,P){var R=function(S){if(this.hasClass(S,P)){return false}S.className=YAHOO.lang.trim([S.className,P].join(" "));return true};return B.Dom.batch(Q,R,B.Dom,true)},removeClass:function(R,Q){var P=O(Q);var S=function(T){if(!Q||!this.hasClass(T,Q)){return false}var U=T.className;T.className=U.replace(P," ");if(this.hasClass(T,Q)){this.removeClass(T,Q)}T.className=YAHOO.lang.trim(T.className);return true};return B.Dom.batch(R,S,B.Dom,true)},replaceClass:function(S,Q,P){if(!P||Q===P){return false}var R=O(Q);var T=function(U){if(!this.hasClass(U,Q)){this.addClass(U,P);return true}U.className=U.className.replace(R," "+P+" ");if(this.hasClass(U,Q)){this.replaceClass(U,Q,P)}U.className=YAHOO.lang.trim(U.className);return true};return B.Dom.batch(S,T,B.Dom,true)},generateId:function(P,R){R=R||"yui-gen";var Q=function(S){if(S&&S.id){return S.id}var T=R+YAHOO.env._id_counter++;if(S){S.id=T}return T};return B.Dom.batch(P,Q,B.Dom,true)||Q.apply(B.Dom,arguments)},isAncestor:function(P,Q){P=B.Dom.get(P);Q=B.Dom.get(Q);if(!P||!Q){return false}if(P.contains&&Q.nodeType&&!L){return P.contains(Q)}else{if(P.compareDocumentPosition&&Q.nodeType){return !!(P.compareDocumentPosition(Q)&16)}else{if(Q.nodeType){return !!this.getAncestorBy(Q,function(R){return R==P})}}}return false},inDocument:function(P){return this.isAncestor(M.documentElement,P)},getElementsBy:function(W,Q,R,T){Q=Q||"*";R=(R)?B.Dom.get(R):null||M;if(!R){return[]}var S=[],V=R.getElementsByTagName(Q);for(var U=0,P=V.length;U<P;++U){if(W(V[U])){S[S.length]=V[U];if(T){T(V[U])}}}return S},batch:function(T,W,V,R){T=(T&&(T.tagName||T.item))?T:B.Dom.get(T);if(!T||!W){return false}var S=(R)?V:window;if(T.tagName||T.length===undefined){return W.call(S,T,V)}var U=[];for(var Q=0,P=T.length;Q<P;++Q){U[U.length]=W.call(S,T[Q],V)}return U},getDocumentHeight:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollHeight:M.documentElement.scrollHeight;var P=Math.max(Q,B.Dom.getViewportHeight());return P},getDocumentWidth:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollWidth:M.documentElement.scrollWidth;var P=Math.max(Q,B.Dom.getViewportWidth());return P},getViewportHeight:function(){var P=self.innerHeight;var Q=M.compatMode;if((Q||G)&&!C){P=(Q=="CSS1Compat")?M.documentElement.clientHeight:M.body.clientHeight}return P},getViewportWidth:function(){var P=self.innerWidth;var Q=M.compatMode;if(Q||G){P=(Q=="CSS1Compat")?M.documentElement.clientWidth:M.body.clientWidth}return P},getAncestorBy:function(P,Q){while(P=P.parentNode){if(D(P,Q)){return P}}return null},getAncestorByClassName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null}var R=function(S){return B.Dom.hasClass(S,P)};return B.Dom.getAncestorBy(Q,R)},getAncestorByTagName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null}var R=function(S){return S.tagName&&S.tagName.toUpperCase()==P.toUpperCase()};return B.Dom.getAncestorBy(Q,R)},getPreviousSiblingBy:function(P,Q){while(P){P=P.previousSibling;if(D(P,Q)){return P}}return null},getPreviousSibling:function(P){P=B.Dom.get(P);if(!P){return null}return B.Dom.getPreviousSiblingBy(P)},getNextSiblingBy:function(P,Q){while(P){P=P.nextSibling;if(D(P,Q)){return P}}return null},getNextSibling:function(P){P=B.Dom.get(P);if(!P){return null}return B.Dom.getNextSiblingBy(P)},getFirstChildBy:function(P,R){var Q=(D(P.firstChild,R))?P.firstChild:null;return Q||B.Dom.getNextSiblingBy(P.firstChild,R)},getFirstChild:function(P,Q){P=B.Dom.get(P);if(!P){return null}return B.Dom.getFirstChildBy(P)},getLastChildBy:function(P,R){if(!P){return null}var Q=(D(P.lastChild,R))?P.lastChild:null;return Q||B.Dom.getPreviousSiblingBy(P.lastChild,R)},getLastChild:function(P){P=B.Dom.get(P);return B.Dom.getLastChildBy(P)},getChildrenBy:function(Q,S){var R=B.Dom.getFirstChildBy(Q,S);var P=R?[R]:[];B.Dom.getNextSiblingBy(R,function(T){if(!S||S(T)){P[P.length]=T}return false});return P},getChildren:function(P){P=B.Dom.get(P);if(!P){}return B.Dom.getChildrenBy(P)},getDocumentScrollLeft:function(P){P=P||M;return Math.max(P.documentElement.scrollLeft,P.body.scrollLeft)},getDocumentScrollTop:function(P){P=P||M;return Math.max(P.documentElement.scrollTop,P.body.scrollTop)},insertBefore:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null}return P.parentNode.insertBefore(Q,P)},insertAfter:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null}if(P.nextSibling){return P.parentNode.insertBefore(Q,P.nextSibling)}else{return P.parentNode.appendChild(Q)}},getClientRegion:function(){var R=B.Dom.getDocumentScrollTop(),Q=B.Dom.getDocumentScrollLeft(),S=B.Dom.getViewportWidth()+Q,P=B.Dom.getViewportHeight()+R;return new B.Region(R,S,P,Q)}};var H=function(){if(M.documentElement.getBoundingClientRect){return function(Q){var R=Q.getBoundingClientRect();var P=Q.ownerDocument;return[R.left+B.Dom.getDocumentScrollLeft(P),R.top+B.Dom.getDocumentScrollTop(P)]}}else{return function(R){var S=[R.offsetLeft,R.offsetTop];var Q=R.offsetParent;var P=(L&&B.Dom.getStyle(R,"position")=="absolute"&&R.offsetParent==R.ownerDocument.body);if(Q!=R){while(Q){S[0]+=Q.offsetLeft;S[1]+=Q.offsetTop;if(!P&&L&&B.Dom.getStyle(Q,"position")=="absolute"){P=true}Q=Q.offsetParent}}if(P){S[0]-=R.ownerDocument.body.offsetLeft;S[1]-=R.ownerDocument.body.offsetTop}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(Q.scrollTop||Q.scrollLeft){if(!E.OP_SCROLL.test(B.Dom.getStyle(Q,"display"))){if(!C||B.Dom.getStyle(Q,"overflow")!=="visible"){S[0]-=Q.scrollLeft;S[1]-=Q.scrollTop}}}Q=Q.parentNode}return S}}}()})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B)}else{return null}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B)};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}")};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B)};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0]}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.2",build:"1076"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A)}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A))},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll()}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true}}return E},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0]}try{G=M.fn.call(L,B,M.obj)}catch(F){this.lastError=F;if(A){throw F}}}else{try{G=M.fn.call(L,this.type,I,M.obj)}catch(H){this.lastError=H;if(A){throw H}}}if(false===G){if(!this.silent){}break}}}return(G!==false)},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A)}this.subscribers=[];return A},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj}this.subscribers.splice(A,1)},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj}else{return this.override}}return A};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B)}else{return(this.fn==A)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach()};this._interval=setInterval(L,this.POLL_INTERVAL)}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N})}C=this.POLL_RETRYS;this.startInterval()},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true)},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M}else{N=L}}K.call(N,"DOMReady",[],M)},0)}else{this.DOMReadyEvent.subscribe(K,M,L)}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W}return W}else{if(YAHOO.lang.isString(M)){var P=this.getEl(M);if(P){M=P}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L)});return true}}}if(!M){return false}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true}var Y=M;if(L){if(L===true){Y=Q}else{Y=L}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q)};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O)}}E[O].push(X)}else{try{this._simpleAdd(M,K,N,false)}catch(U){this.lastError=U;this.removeListener(M,K,V);return false}}return true},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M].slice();for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P)}}K=G[M];if(K&&K[2]){K[2](O)}return Q},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return -1}else{return B[K]}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true}}return false},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L)}else{if(this._isValidCollection(L)){var U=true;for(O=L.length-1;O>-1;O--){U=(this.removeListener(L[O],K,T)&&U)}return U}}if(!T||!T.call){return this.purgeElement(L,false,K)}if("unload"==K){for(O=J.length-1;O>-1;O--){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J.splice(O,1);return true}}return false}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T)}if(Q>=0){P=I[Q]}if(!L||!P){return false}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M.splice(O,1);break}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false)}catch(S){this.lastError=S;return false}}delete I[Q][this.WFN];delete I[Q][this.FN];I.splice(Q,1);return true},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K)},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode}}catch(K){}return L},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft()}}return K},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop()}}return L},getXY:function(K){return[this.getPageX(K),this.getPageY(K)]},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement}else{if(L.type=="mouseover"){K=L.fromElement}}}return this.resolveTextNode(K)},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L}catch(K){this.lastError=K;return L}}return M.time},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K)},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation()}else{K.cancelBubble=true}},preventDefault:function(K){if(K.preventDefault){K.preventDefault()}else{K.returnValue=false}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break}N=N.caller}}return L},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K]}return K},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;M=M+1){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M}}return -1},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L}return L},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined")}catch(K){return false}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach()}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready)}},_tryPreloadAttach:function(){if(F.length===0){C=0;clearInterval(this._interval);this._interval=null;return }if(this.locked){return }if(this.isIE){if(!this.DOMReady){this.startInterval();return }}this.locked=true;var Q=!H;if(!Q){Q=(C>0&&F.length>0)}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj}else{S=U.override}}U.fn.call(S,U.obj)};var L,K,O,N,M=[];for(L=0,K=F.length;L<K;L=L+1){O=F[L];if(O){N=this.getEl(O.id);if(N){if(O.checkReady){if(H||N.nextSibling||!Q){M.push(O);F[L]=null}}else{R(N,O);F[L]=null}}else{P.push(O)}}}for(L=0,K=M.length;L<K;L=L+1){O=M[L];R(this.getEl(O.id),O)}C--;if(Q){for(L=F.length-1;L>-1;L--){O=F[L];if(!O||!O.id){F.splice(L,1)}}this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn)}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R)}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J]}else{if(K==="unload"){L=[J]}else{L=[I]}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q})}}}}return(P.length)?P:null},_unload:function(Q){var K=YAHOO.util.Event,N,M,L,P,O,R=J.slice();for(N=0,P=J.length;N<P;++N){L=R[N];if(L){var S=window;if(L[K.ADJ_SCOPE]){if(L[K.ADJ_SCOPE]===true){S=L[K.UNLOAD_OBJ]}else{S=L[K.ADJ_SCOPE]}}L[K.FN].call(S,K.getEvent(Q,L[K.EL]),L[K.UNLOAD_OBJ]);R[N]=null;L=null;S=null}}J=null;if(I){for(M=I.length-1;M>-1;M--){L=I[M];if(L){K.removeListener(L[K.EL],L[K.TYPE],L[K.FN],M)}}L=null}G=null;K._simpleRemove(window,"unload",K._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft]}else{if(L){return[L.scrollTop,L.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K))}}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K))}}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K)}}else{return function(){}}}}()}}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null}catch(ex){}},EU.POLL_INTERVAL)}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready()}},EU.POLL_INTERVAL)}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready)}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E)}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[]}B[A].push({fn:C,obj:F,override:E})}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G)}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G)}}return B}return false},unsubscribeAll:function(A){return this.unsubscribe(A)},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override)}}}return I[G]},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F])}return G.fire.apply(G,B)},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true}}return false}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A)}if(typeof B=="function"){D.subscribe(B)}else{D.subscribe(B.fn,B.scope,B.correctScope)}function E(J,I){if(!F.shift){F.shift=false}if(!F.alt){F.alt=false}if(!F.ctrl){F.ctrl=false}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break}else{if(G==J.keyCode){D.fire(J.keyCode,J);break}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J)}else{if(G==J.keyCode){D.fire(J.keyCode,J)}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F)}this.enabled=true};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F)}this.enabled=false};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"")}};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.5.2",build:"1076"});YAHOO.util.Get=function(){var M={},L=0,Q=0,E=false,N=YAHOO.env.ua,R=YAHOO.lang;var J=function(V,S,W){var T=W||window,X=T.document,Y=X.createElement(V);for(var U in S){if(S[U]&&YAHOO.lang.hasOwnProperty(S,U)){Y.setAttribute(U,S[U])}}return Y};var H=function(S,T,V){var U=V||"utf-8";return J("link",{id:"yui__dyn_"+(Q++),type:"text/css",charset:U,rel:"stylesheet",href:S},T)};var O=function(S,T,V){var U=V||"utf-8";return J("script",{id:"yui__dyn_"+(Q++),type:"text/javascript",charset:U,src:S},T)};var A=function(S,T){return{tId:S.tId,win:S.win,data:S.data,nodes:S.nodes,msg:T,purge:function(){D(this.tId)}}};var B=function(S,V){var T=M[V],U=(R.isString(S))?T.win.document.getElementById(S):S;if(!U){P(V,"target node not found: "+S)}return U};var P=function(V,U){var S=M[V];if(S.onFailure){var T=S.scope||S.win;S.onFailure.call(T,A(S,U))}};var C=function(V){var S=M[V];S.finished=true;if(S.aborted){var U="transaction "+V+" was aborted";P(V,U);return }if(S.onSuccess){var T=S.scope||S.win;S.onSuccess.call(T,A(S))}};var G=function(U,Y){var T=M[U];if(T.aborted){var W="transaction "+U+" was aborted";P(U,W);return }if(Y){T.url.shift();if(T.varName){T.varName.shift()}}else{T.url=(R.isString(T.url))?[T.url]:T.url;if(T.varName){T.varName=(R.isString(T.varName))?[T.varName]:T.varName}}var e=T.win,c=e.document,Z=c.getElementsByTagName("head")[0],V;if(T.url.length===0){if(T.type==="script"&&N.webkit&&N.webkit<420&&!T.finalpass&&!T.varName){var X=O(null,T.win,T.charset);X.innerHTML='YAHOO.util.Get._finalize("'+U+'");';T.nodes.push(X);Z.appendChild(X)}else{C(U)}return }var S=T.url[0];if(T.type==="script"){V=O(S,e,T.charset)}else{V=H(S,e,T.charset)}F(T.type,V,U,S,e,T.url.length);T.nodes.push(V);if(T.insertBefore){var f=B(T.insertBefore,U);if(f){f.parentNode.insertBefore(V,f)}}else{Z.appendChild(V)}if((N.webkit||N.gecko)&&T.type==="css"){G(U,S)}};var K=function(){if(E){return }E=true;for(var S in M){var T=M[S];if(T.autopurge&&T.finished){D(T.tId);delete M[S]}}E=false};var D=function(Z){var W=M[Z];if(W){var Y=W.nodes,S=Y.length,X=W.win.document,V=X.getElementsByTagName("head")[0];if(W.insertBefore){var U=B(W.insertBefore,Z);if(U){V=U.parentNode}}for(var T=0;T<S;T=T+1){V.removeChild(Y[T])}}W.nodes=[]};var I=function(T,S,U){var W="q"+(L++);U=U||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K()}M[W]=R.merge(U,{tId:W,type:T,url:S,finished:false,nodes:[]});var V=M[W];V.win=V.win||window;V.scope=V.scope||V.win;V.autopurge=("autopurge" in V)?V.autopurge:(T==="script")?true:false;R.later(0,V,G,W);return{tId:W}};var F=function(d,W,V,T,X,Y,c){var Z=c||G;if(N.ie){W.onreadystatechange=function(){var e=this.readyState;if("loaded"===e||"complete"===e){Z(V,T)}}}else{if(N.webkit){if(d==="script"){if(N.webkit>=420){W.addEventListener("load",function(){Z(V,T)})}else{var S=M[V];if(S.varName){var U=YAHOO.util.Get.POLL_FREQ;S.maxattempts=YAHOO.util.Get.TIMEOUT/U;S.attempts=0;S._cache=S.varName[0].split(".");S.timer=R.later(U,S,function(p){var g=this._cache,f=g.length,e=this.win,m;for(m=0;m<f;m=m+1){e=e[g[m]];if(!e){this.attempts++;if(this.attempts++>this.maxattempts){var n="Over retry limit, giving up";S.timer.cancel();P(V,n)}else{}return }}S.timer.cancel();Z(V,T)},null,true)}else{R.later(YAHOO.util.Get.POLL_FREQ,null,Z,[V,T])}}}}else{W.onload=function(){Z(V,T)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(S){R.later(0,null,C,S)},abort:function(T){var U=(R.isString(T))?T:T.tId;var S=M[U];if(S){S.aborted=true}},script:function(S,T){return I("script",S,T)},css:function(S,T){return I("css",S,T)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.5.2",build:"1076"});(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F)};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames)},setAttribute:function(C,E,D){if(this.patterns.noNegatives.test(C)){E=(E>0)?E:0}B.Dom.setStyle(this.getEl(),C,E+D)},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G)}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)]}else{G=0}return G},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px"}return""},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined")};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"]}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1}}else{E=I+F[D]["by"]*1}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M)};this.getEl=function(){return E};this.isAnimated=function(){return D};this.getStartTime=function(){return F};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1}B.AnimMgr.registerElement(this);return true};this.stop=function(M){if(!this.isAnimated()){return false}if(M){this.currentFrame=this.totalFrames;this._onTween.fire()}B.AnimMgr.stop(this)};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M)}D=true;H=0;F=new Date()};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame)};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit)}H+=1};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps)};D=false;H=0;this.onComplete.fire(N)};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G)}};B.Anim=A})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start()};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop()}return true};this.start=function(){if(C===null){C=setInterval(this.run,this.delay)}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0)}B=[];C=null;A=0}else{this.unRegister(H)}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G)}G._onTween.fire()}else{YAHOO.util.AnimMgr.stop(G,H)}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G}}return -1};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame)}else{K=J-(I+1)}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1)}G.currentFrame+=K}}};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]]}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1]}}return[C[0][0],C[0][1]]}};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H)};A.NAME="ColorAnim";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)]}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)]}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)]}return null};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var H=YAHOO.util.Dom.getStyle(G,E);if(this.patterns.transparent.test(H)){var F=G.parentNode;H=C.Dom.getStyle(F,E);while(F&&this.patterns.transparent.test(H)){F=F.parentNode;H=C.Dom.getStyle(F,E);if(F.tagName.toUpperCase()=="HTML"){H="#fff"}}}}else{H=D.getAttribute.call(this,E)}return H};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H])}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")"}else{I=D.doMethod.call(this,F,J,G)}return I};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I]}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G}};C.ColorAnim=A})();
/*
TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A},easeIn:function(B,A,D,C){return D*(B/=C)*B+A},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A}return -D/2*((--B)*(B-2)-1)+A},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A}return -D/2*((B-=2)*B*B*B-2)+A},elasticIn:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A},elasticOut:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F/2)==2){return A+G}if(!E){E=F*(0.3*1.5)}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*(B/=D)*B*((C+1)*B-C)+A},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J)}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H)}else{F.setAttribute.call(this,G,I,H)}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")]}else{H=F.getAttribute.call(this,G)}return H};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I)}else{J=F.doMethod.call(this,G,K,H)}return J};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J.points["control"]||[];var I;var M,O;if(L.length>0&&!(L[0] instanceof Array)){L=[L]}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M]}L=K}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative")}if(D(J.points["from"])){E.Dom.setXY(H,J.points["from"])}else{E.Dom.setXY(H,E.Dom.getXY(H))}G=this.getAttribute("points");if(D(J.points["to"])){I=B.call(this,J.points["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G)}}else{if(D(J.points["by"])){I=[G[0]+J.points["by"][0],G[1]+J.points["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]]}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L)}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I}else{F.setRuntimeAttribute.call(this,P)}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G};var D=function(G){return(typeof G!=="undefined")};E.Motion=A})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H)}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)]}else{G=C.doMethod.call(this,E,H,F)}return G};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop]}else{G=C.getAttribute.call(this,E)}return G};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1]}else{C.setAttribute.call(this,E,H,G)}};B.Scroll=D})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.5.2",build:"1076"});(function(){YAHOO.util.Config=function(D){if(D){this.init(D)}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE)},checkNumber:function(D){return(!isNaN(D))},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F)}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner)}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value)}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value}}return D},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value}else{return undefined}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true}}else{return false}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G])}return true}}else{return false}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false}else{if(!B.isUndefined(P)){R.value=P}else{P=R.value}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P])}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break}}}}}return true}else{return false}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D)}else{this.fireEvent(D,E.value)}}},applyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F]}}this.initialConfig=E}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F])}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D)}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D)}return true}else{return false}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G)}else{return false}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]"}return D},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", "}}return D},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true}}while(G--)}return false};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P)}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={BEFORE_INIT:"beforeInit",INIT:"init",APPEND:"append",BEFORE_RENDER:"beforeRender",RENDER:"render",CHANGE_HEADER:"changeHeader",CHANGE_BODY:"changeBody",CHANGE_FOOTER:"changeFooter",CHANGE_CONTENT:"changeContent",DESTORY:"destroy",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE:"beforeHide",HIDE:"hide"},I={VISIBLE:{key:"visible",value:true,validator:YAHOO.lang.isBoolean},EFFECT:{key:"effect",suppressEvent:true,supercedes:["visible"]},MONITOR_RESIZE:{key:"monitorresize",value:true},APPEND_TO_DOCUMENT_BODY:{key:"appendtodocumentbody",value:false}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=('<div class="'+G.CSS_HEADER+'"></div><div class="'+G.CSS_BODY+'"></div><div class="'+G.CSS_FOOTER+'"></div>');O=H.firstChild;N=O.nextSibling;E=N.nextSibling}return H}function J(){if(!O){K()}return(O.cloneNode(false))}function B(){if(!N){K()}return(N.cloneNode(false))}function C(){if(!E){K()}return(E.cloneNode(false))}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND);this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P},platform:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows"}else{if(P.indexOf("macintosh")!=-1){return"mac"}else{return false}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera"}else{if(P.indexOf("msie 7")!=-1){return"ie7"}else{if(P.indexOf("msie")!=-1){return"ie"}else{if(P.indexOf("safari")!=-1){return"safari"}else{if(P.indexOf("gecko")!=-1){return"gecko"}else{return false}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_BODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value})},init:function(U,T){var R,V;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL}if(typeof U=="string"){R=U;U=document.getElementById(U);if(!U){U=(K()).cloneNode(false);U.id=R}}this.element=U;if(U.id){this.id=U.id}V=this.element.firstChild;if(V){var Q=false,P=false,S=false;do{if(1==V.nodeType){if(!Q&&F.hasClass(V,G.CSS_HEADER)){this.header=V;Q=true}else{if(!P&&F.hasClass(V,G.CSS_BODY)){this.body=V;P=true}else{if(!S&&F.hasClass(V,G.CSS_FOOTER)){this.footer=V;S=true}}}}}while((V=V.nextSibling))}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(T){this.cfg.applyConfig(T,true)}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(G)},initResizeMonitor:function(){var Q=(YAHOO.env.ua.gecko&&this.platform=="windows");if(Q){var P=this;setTimeout(function(){P._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){var P,R,T;function V(){G.textResizeEvent.fire()}if(!YAHOO.env.ua.opera){R=F.get("_yuiResizeMonitor");var U=this._supportsCWResize();if(!R){R=document.createElement("iframe");if(this.isSecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){R.src=G.RESIZE_MONITOR_SECURE_URL}if(!U){T=["<html><head><script ",'type="text/javascript">',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/script></head>","<body></body></html>"].join("");R.src="data:text/html;charset=utf-8,"+encodeURIComponent(T)}R.id="_yuiResizeMonitor";R.style.position="absolute";R.style.visibility="hidden";var Q=document.body,S=Q.firstChild;if(S){Q.insertBefore(R,S)}else{Q.appendChild(R)}R.style.width="10em";R.style.height="10em";R.style.top=(-1*R.offsetHeight)+"px";R.style.left=(-1*R.offsetWidth)+"px";R.style.borderWidth="0";R.style.visibility="visible";if(YAHOO.env.ua.webkit){P=R.contentWindow.document;P.open();P.close()}}if(R&&R.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(U){if(!M.on(R.contentWindow,"resize",V)){M.on(R,"resize",V)}}G.textResizeInitialized=true}this.resizeMonitor=R}}},_supportsCWResize:function(){var P=true;if(YAHOO.env.ua.gecko&&YAHOO.env.ua.gecko<=1.8){P=false}return P},onDomResize:function(S,R){var Q=-1*this.resizeMonitor.offsetWidth,P=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=P+"px";this.resizeMonitor.style.left=Q+"px"},setHeader:function(Q){var P=this.header||(this.header=J());if(Q.nodeName){P.innerHTML="";P.appendChild(Q)}else{P.innerHTML=Q}this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire()},appendToHeader:function(Q){var P=this.header||(this.header=J());P.appendChild(Q);this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire()},setBody:function(Q){var P=this.body||(this.body=B());if(Q.nodeName){P.innerHTML="";P.appendChild(Q)}else{P.innerHTML=Q}this.changeBodyEvent.fire(Q);this.changeContentEvent.fire()},appendToBody:function(Q){var P=this.body||(this.body=B());P.appendChild(Q);this.changeBodyEvent.fire(Q);this.changeContentEvent.fire()},setFooter:function(Q){var P=this.footer||(this.footer=C());if(Q.nodeName){P.innerHTML="";P.appendChild(Q)}else{P.innerHTML=Q}this.changeFooterEvent.fire(Q);this.changeContentEvent.fire()},appendToFooter:function(Q){var P=this.footer||(this.footer=C());P.appendChild(Q);this.changeFooterEvent.fire(Q);this.changeContentEvent.fire()},render:function(R,P){var S=this,T;function Q(U){if(typeof U=="string"){U=document.getElementById(U)}if(U){S._addToParent(U,S.element);S.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!P){P=this.element}if(R){Q(R)}else{if(!F.inDocument(this.element)){return false}}if(this.header&&!F.inDocument(this.header)){T=P.firstChild;if(T){P.insertBefore(this.header,T)}else{P.appendChild(this.header)}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){P.insertBefore(this.body,this.footer)}else{P.appendChild(this.body)}}if(this.footer&&!F.inDocument(this.footer)){P.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var P,Q;if(this.element){M.purgeElement(this.element,true);P=this.element.parentNode}if(P){P.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(Q in this){if(Q instanceof L){Q.unsubscribeAll()}}},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(Q,P,R){var S=P[0];if(S){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(R,Q,S){var P=Q[0];if(P){this.initResizeMonitor()}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(P,Q){if(!this.cfg.getProperty("appendtodocumentbody")&&P===document.body&&P.firstChild){P.insertBefore(Q,P.firstChild)}else{P.appendChild(Q)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(L,K){YAHOO.widget.Overlay.superclass.constructor.call(this,L,K)};var F=YAHOO.lang,I=YAHOO.util.CustomEvent,E=YAHOO.widget.Module,J=YAHOO.util.Event,D=YAHOO.util.Dom,C=YAHOO.util.Config,B=YAHOO.widget.Overlay,G,A={BEFORE_MOVE:"beforeMove",MOVE:"move"},H={X:{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},Y:{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},XY:{key:"xy",suppressEvent:true,supercedes:["iframe"]},CONTEXT:{key:"context",suppressEvent:true,supercedes:["iframe"]},FIXED_CENTER:{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},WIDTH:{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},HEIGHT:{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},ZINDEX:{key:"zindex",value:null},CONSTRAIN_TO_VIEWPORT:{key:"constraintoviewport",value:false,validator:F.isBoolean,supercedes:["iframe","x","y","xy"]},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.VIEWPORT_OFFSET=10;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.windowScrollEvent=new I("windowScroll");B.windowResizeEvent=new I("windowResize");B.windowScrollHandler=function(K){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire()},1)}else{B.windowScrollEvent.fire()}};B.windowResizeHandler=function(K){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire()},100)}else{B.windowResizeEvent.fire()}};B._initialized=null;if(B._initialized===null){J.on(window,"scroll",B.windowScrollHandler);J.on(window,"resize",B.windowResizeHandler);B._initialized=true}YAHOO.extend(B,E,{init:function(L,K){B.superclass.init.call(this,L);this.beforeInitEvent.fire(B);D.addClass(this.element,B.CSS_OVERLAY);if(K){this.cfg.applyConfig(K,true)}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!C.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!C.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(B)},initEvents:function(){B.superclass.initEvents.call(this);var K=I.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=K;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=K},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.X.key,{handler:this.configX,validator:H.X.validator,suppressEvent:H.X.suppressEvent,supercedes:H.X.supercedes});this.cfg.addProperty(H.Y.key,{handler:this.configY,validator:H.Y.validator,suppressEvent:H.Y.suppressEvent,supercedes:H.Y.supercedes});this.cfg.addProperty(H.XY.key,{handler:this.configXY,suppressEvent:H.XY.suppressEvent,supercedes:H.XY.supercedes});this.cfg.addProperty(H.CONTEXT.key,{handler:this.configContext,suppressEvent:H.CONTEXT.suppressEvent,supercedes:H.CONTEXT.supercedes});this.cfg.addProperty(H.FIXED_CENTER.key,{handler:this.configFixedCenter,value:H.FIXED_CENTER.value,validator:H.FIXED_CENTER.validator,supercedes:H.FIXED_CENTER.supercedes});this.cfg.addProperty(H.WIDTH.key,{handler:this.configWidth,suppressEvent:H.WIDTH.suppressEvent,supercedes:H.WIDTH.supercedes});this.cfg.addProperty(H.HEIGHT.key,{handler:this.configHeight,suppressEvent:H.HEIGHT.suppressEvent,supercedes:H.HEIGHT.supercedes});this.cfg.addProperty(H.ZINDEX.key,{handler:this.configzIndex,value:H.ZINDEX.value});this.cfg.addProperty(H.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:H.CONSTRAIN_TO_VIEWPORT.value,validator:H.CONSTRAIN_TO_VIEWPORT.validator,supercedes:H.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(H.IFRAME.key,{handler:this.configIframe,value:H.IFRAME.value,validator:H.IFRAME.validator,supercedes:H.IFRAME.supercedes})},moveTo:function(K,L){this.cfg.setProperty("xy",[K,L])},hideMacGeckoScrollbars:function(){D.removeClass(this.element,"show-scrollbars");D.addClass(this.element,"hide-scrollbars")},showMacGeckoScrollbars:function(){D.removeClass(this.element,"hide-scrollbars");D.addClass(this.element,"show-scrollbars")},configVisible:function(N,K,T){var M=K[0],O=D.getStyle(this.element,"visibility"),U=this.cfg.getProperty("effect"),R=[],Q=(this.platform=="mac"&&YAHOO.env.ua.gecko),d=C.alreadySubscribed,S,L,c,Y,X,W,Z,V,P;if(O=="inherit"){c=this.element.parentNode;while(c.nodeType!=9&&c.nodeType!=11){O=D.getStyle(c,"visibility");if(O!="inherit"){break}c=c.parentNode}if(O=="inherit"){O="visible"}}if(U){if(U instanceof Array){V=U.length;for(Y=0;Y<V;Y++){S=U[Y];R[R.length]=S.effect(this,S.duration)}}else{R[R.length]=U.effect(this,U.duration)}}if(M){if(Q){this.showMacGeckoScrollbars()}if(U){if(M){if(O!="visible"||O===""){this.beforeShowEvent.fire();P=R.length;for(X=0;X<P;X++){L=R[X];if(X===0&&!d(L.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){L.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}L.animateIn()}}}}else{if(O!="visible"||O===""){this.beforeShowEvent.fire();D.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire()}}}else{if(Q){this.hideMacGeckoScrollbars()}if(U){if(O=="visible"){this.beforeHideEvent.fire();P=R.length;for(W=0;W<P;W++){Z=R[W];if(W===0&&!d(Z.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){Z.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}Z.animateOut()}}else{if(O===""){D.setStyle(this.element,"visibility","hidden")}}}else{if(O=="visible"||O===""){this.beforeHideEvent.fire();D.setStyle(this.element,"visibility","hidden");this.hideEvent.fire()}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center()}},configFixedCenter:function(O,M,P){var Q=M[0],L=C.alreadySubscribed,N=B.windowResizeEvent,K=B.windowScrollEvent;if(Q){this.center();if(!L(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center)}if(!L(N,this.doCenterOnDOMEvent,this)){N.subscribe(this.doCenterOnDOMEvent,this,true)}if(!L(K,this.doCenterOnDOMEvent,this)){K.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);N.unsubscribe(this.doCenterOnDOMEvent,this);K.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(N,L,O){var K=L[0],M=this.element;D.setStyle(M,"height",K);this.cfg.refireEvent("iframe")},configWidth:function(N,K,O){var M=K[0],L=this.element;D.setStyle(L,"width",M);this.cfg.refireEvent("iframe")},configzIndex:function(M,K,N){var O=K[0],L=this.element;if(!O){O=D.getStyle(L,"zIndex");if(!O||isNaN(O)){O=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(O<=0){O=1}}D.setStyle(L,"zIndex",O);this.cfg.setProperty("zIndex",O,true);if(this.iframe){this.stackIframe()}},configXY:function(M,L,N){var P=L[0],K=P[0],O=P[1];this.cfg.setProperty("x",K);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O])},configX:function(M,L,N){var K=L[0],O=this.cfg.getProperty("y");this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setX(this.element,K,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O])},configY:function(M,L,N){var K=this.cfg.getProperty("x"),O=L[0];this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setY(this.element,O,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O])},showIframe:function(){var L=this.iframe,K;if(L){K=this.element.parentNode;if(K!=L.parentNode){this._addToParent(K,L)}L.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var K=this.iframe,M=this.element,O=B.IFRAME_OFFSET,L=(O*2),N;if(K){K.style.width=(M.offsetWidth+L+"px");K.style.height=(M.offsetHeight+L+"px");N=this.cfg.getProperty("xy");if(!F.isArray(N)||(isNaN(N[0])||isNaN(N[1]))){this.syncPosition();N=this.cfg.getProperty("xy")}D.setXY(K,[(N[0]-O),(N[1]-O)])}},stackIframe:function(){if(this.iframe){var K=D.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(K)&&!isNaN(K)){D.setStyle(this.iframe,"zIndex",(K-1))}}},configIframe:function(N,M,O){var K=M[0];function P(){var R=this.iframe,S=this.element,T;if(!R){if(!G){G=document.createElement("iframe");if(this.isSecure){G.src=B.IFRAME_SRC}if(YAHOO.env.ua.ie){G.style.filter="alpha(opacity=0)";G.frameBorder=0}else{G.style.opacity="0"}G.style.position="absolute";G.style.border="none";G.style.margin="0";G.style.padding="0";G.style.display="none"}R=G.cloneNode(false);T=S.parentNode;var Q=T||document.body;this._addToParent(Q,R);this.iframe=R}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function L(){P.call(this);this.beforeShowEvent.unsubscribe(L);this._iframeDeferred=false}if(K){if(this.cfg.getProperty("visible")){P.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(L);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(L,K,M){var N=K[0];if(N){if(!C.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!C.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(M,L,O){var Q=L[0],N,P,K;if(Q){N=Q[0];P=Q[1];K=Q[2];if(N){if(typeof N=="string"){this.cfg.setProperty("context",[document.getElementById(N),P,K],true)}if(P&&K){this.align(P,K)}}}},align:function(L,K){var Q=this.cfg.getProperty("context"),P=this,O,N,R;function M(S,T){switch(L){case B.TOP_LEFT:P.moveTo(T,S);break;case B.TOP_RIGHT:P.moveTo((T-N.offsetWidth),S);break;case B.BOTTOM_LEFT:P.moveTo(T,(S-N.offsetHeight));break;case B.BOTTOM_RIGHT:P.moveTo((T-N.offsetWidth),(S-N.offsetHeight));break}}if(Q){O=Q[0];N=this.element;P=this;if(!L){L=Q[1]}if(!K){K=Q[2]}if(N&&O){R=D.getRegion(O);switch(K){case B.TOP_LEFT:M(R.top,R.left);break;case B.TOP_RIGHT:M(R.top,R.right);break;case B.BOTTOM_LEFT:M(R.bottom,R.left);break;case B.BOTTOM_RIGHT:M(R.bottom,R.right);break}}}},enforceConstraints:function(L,K,M){var O=K[0];var N=this.getConstrainedXY(O[0],O[1]);this.cfg.setProperty("x",N[0],true);this.cfg.setProperty("y",N[1],true);this.cfg.setProperty("xy",N,true)},getConstrainedXY:function(V,T){var N=B.VIEWPORT_OFFSET,U=D.getViewportWidth(),Q=D.getViewportHeight(),M=this.element.offsetHeight,S=this.element.offsetWidth,Y=D.getDocumentScrollLeft(),W=D.getDocumentScrollTop();var P=V;var L=T;if(S+N<U){var R=Y+N;var X=Y+U-S-N;if(V<R){P=R}else{if(V>X){P=X}}}else{P=N+Y}if(M+N<Q){var O=W+N;var K=W+Q-M-N;if(T<O){L=O}else{if(T>K){L=K}}}else{L=N+W}return[P,L]},center:function(){var N=B.VIEWPORT_OFFSET,O=this.element.offsetWidth,M=this.element.offsetHeight,L=D.getViewportWidth(),P=D.getViewportHeight(),K,Q;if(O<L){K=(L/2)-(O/2)+D.getDocumentScrollLeft()}else{K=N+D.getDocumentScrollLeft()}if(M<P){Q=(P/2)-(M/2)+D.getDocumentScrollTop()}else{Q=N+D.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(K,10),parseInt(Q,10)]);this.cfg.refireEvent("iframe")},syncPosition:function(){var K=D.getXY(this.element);this.cfg.setProperty("x",K[0],true);this.cfg.setProperty("y",K[1],true);this.cfg.setProperty("xy",K,true)},onDomResize:function(M,L){var K=this;B.superclass.onDomResize.call(this,M,L);setTimeout(function(){K.syncPosition();K.cfg.refireEvent("iframe");K.cfg.refireEvent("context")},0)},bringToTop:function(){var O=[],N=this.element;function R(V,U){var X=D.getStyle(V,"zIndex"),W=D.getStyle(U,"zIndex"),T=(!X||isNaN(X))?0:parseInt(X,10),S=(!W||isNaN(W))?0:parseInt(W,10);if(T>S){return -1}else{if(T<S){return 1}else{return 0}}}function M(U){var S=D.hasClass(U,B.CSS_OVERLAY),T=YAHOO.widget.Panel;if(S&&!D.isAncestor(N,S)){if(T&&D.hasClass(U,T.CSS_PANEL)){O[O.length]=U.parentNode}else{O[O.length]=U}}}D.getElementsBy(M,"DIV",document.body);O.sort(R);var K=O[0],Q;if(K){Q=D.getStyle(K,"zIndex");if(!isNaN(Q)){var P=false;if(K!=N){P=true}else{if(O.length>1){var L=D.getStyle(O[1],"zIndex");if(!isNaN(L)&&(Q==L)){P=true}}}if(P){this.cfg.setProperty("zindex",(parseInt(Q,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.superclass.destroy.call(this)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G)};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true)}this.cfg.fireQueue();var H=null;this.getActive=function(){return H};this.focus=function(J){var K=this.find(J);if(K){if(H!=K){if(H){H.blur()}this.bringToTop(K);H=K;E.addClass(H.element,A.CSS_FOCUSED);K.focusEvent.fire()}}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setProperty("manager",null)}M.focusEvent.unsubscribeAll();M.blurEvent.unsubscribeAll();M.focusEvent=null;M.blurEvent=null;M.focus=null;M.blur=null}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur()}while(J--)}};this._onOverlayBlur=function(K,J){H=null};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(H,G,I){this.remove(I)},register:function(G){var K=this,L,I,H,J;if(G instanceof D){G.cfg.addProperty("manager",{value:this});G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focus=function(){K.focus(this)};G.blur=function(){if(K.getActive()==this){E.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire()}};G.blurEvent.subscribe(K._onOverlayBlur);G.hideEvent.subscribe(G.blur);G.destroyEvent.subscribe(this._onOverlayDestroy,G,this);C.on(G.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,G);L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){G.cfg.setProperty("zIndex",parseInt(L,10))}else{G.cfg.setProperty("zIndex",0)}this.overlays.push(G);this.bringToTop(G);return true}else{if(G instanceof Array){I=0;J=G.length;for(H=0;H<J;H++){if(this.register(G[H])){I++}}if(I>0){return true}}else{return false}}},bringToTop:function(M){var I=this.find(M),L,G,J;if(I){J=this.overlays;J.sort(this.compareZIndexDesc);G=J[0];if(G){L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){var K=false;if(G!==I){K=true}else{if(J.length>1){var H=E.getStyle(J[1].element,"zIndex");if(!isNaN(H)&&(L==H)){K=true}}}if(K){I.cfg.setProperty("zindex",(parseInt(L,10)+2))}}J.sort(this.compareZIndexDesc)}}},find:function(G){var I=this.overlays,J=I.length,H;if(J>0){H=J-1;if(G instanceof D){do{if(I[H]==G){return I[H]}}while(H--)}else{if(typeof G=="string"){do{if(I[H].id==G){return I[H]}}while(H--)}}return null}},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0}else{if(H===null){return 1}else{if(G===null){return -1}else{if(H>G){return -1}else{if(H<G){return 1}else{return 0}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].show()}while(G--)}},hideAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].hide()}while(G--)}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(N,M){YAHOO.widget.Tooltip.superclass.constructor.call(this,N,M)};var E=YAHOO.lang,L=YAHOO.util.Event,K=YAHOO.util.CustomEvent,C=YAHOO.util.Dom,G=YAHOO.widget.Tooltip,F,H={PREVENT_OVERLAP:{key:"preventoverlap",value:true,validator:E.isBoolean,supercedes:["x","y","xy"]},SHOW_DELAY:{key:"showdelay",value:200,validator:E.isNumber},AUTO_DISMISS_DELAY:{key:"autodismissdelay",value:5000,validator:E.isNumber},HIDE_DELAY:{key:"hidedelay",value:250,validator:E.isNumber},TEXT:{key:"text",suppressEvent:true},CONTAINER:{key:"container"},DISABLED:{key:"disabled",value:false,suppressEvent:true}},A={CONTEXT_MOUSE_OVER:"contextMouseOver",CONTEXT_MOUSE_OUT:"contextMouseOut",CONTEXT_TRIGGER:"contextTrigger"};G.CSS_TOOLTIP="yui-tt";function I(N,M,O){var R=O[0],P=O[1],Q=this.cfg,S=Q.getProperty("width");if(S==P){Q.setProperty("width",R)}this.unsubscribe("hide",this._onHide,O)}function D(N,M){var O=document.body,S=this.cfg,R=S.getProperty("width"),P,Q;if((!R||R=="auto")&&(S.getProperty("container")!=O||S.getProperty("x")>=C.getViewportWidth()||S.getProperty("y")>=C.getViewportHeight())){Q=this.element.cloneNode(true);Q.style.visibility="hidden";Q.style.top="0px";Q.style.left="0px";O.appendChild(Q);P=(Q.offsetWidth+"px");O.removeChild(Q);Q=null;S.setProperty("width",P);S.refireEvent("xy");this.subscribe("hide",I,[(R||""),P])}}function B(N,M,O){this.render(O)}function J(){L.onDOMReady(B,this.cfg.getProperty("container"),this)}YAHOO.extend(G,YAHOO.widget.Overlay,{init:function(N,M){G.superclass.init.call(this,N);this.beforeInitEvent.fire(G);C.addClass(this.element,G.CSS_TOOLTIP);if(M){this.cfg.applyConfig(M,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("beforeShow",D);this.subscribe("init",J);this.subscribe("render",this.onRender);this.initEvent.fire(G)},initEvents:function(){G.superclass.initEvents.call(this);var M=K.LIST;this.contextMouseOverEvent=this.createEvent(A.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=M;this.contextMouseOutEvent=this.createEvent(A.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=M;this.contextTriggerEvent=this.createEvent(A.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=M},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.PREVENT_OVERLAP.key,{value:H.PREVENT_OVERLAP.value,validator:H.PREVENT_OVERLAP.validator,supercedes:H.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(H.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:H.SHOW_DELAY.validator});this.cfg.addProperty(H.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:H.AUTO_DISMISS_DELAY.value,validator:H.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(H.HIDE_DELAY.key,{handler:this.configHideDelay,value:H.HIDE_DELAY.value,validator:H.HIDE_DELAY.validator});this.cfg.addProperty(H.TEXT.key,{handler:this.configText,suppressEvent:H.TEXT.suppressEvent});this.cfg.addProperty(H.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(H.DISABLED.key,{handler:this.configContainer,value:H.DISABLED.value,supressEvent:H.DISABLED.suppressEvent})},configText:function(N,M,O){var P=M[0];if(P){this.setBody(P)}},configContainer:function(O,N,P){var M=N[0];if(typeof M=="string"){this.cfg.setProperty("container",document.getElementById(M),true)}},_removeEventListeners:function(){var P=this._context,M,O,N;if(P){M=P.length;if(M>0){N=M-1;do{O=P[N];L.removeListener(O,"mouseover",this.onContextMouseOver);L.removeListener(O,"mousemove",this.onContextMouseMove);L.removeListener(O,"mouseout",this.onContextMouseOut)}while(N--)}}},configContext:function(R,N,S){var Q=N[0],T,M,P,O;if(Q){if(!(Q instanceof Array)){if(typeof Q=="string"){this.cfg.setProperty("context",[document.getElementById(Q)],true)}else{this.cfg.setProperty("context",[Q],true)}Q=this.cfg.getProperty("context")}this._removeEventListeners();this._context=Q;T=this._context;if(T){M=T.length;if(M>0){O=M-1;do{P=T[O];L.on(P,"mouseover",this.onContextMouseOver,this);L.on(P,"mousemove",this.onContextMouseMove,this);L.on(P,"mouseout",this.onContextMouseOut,this)}while(O--)}}}},onContextMouseMove:function(N,M){M.pageX=L.getPageX(N);M.pageY=L.getPageY(N)},onContextMouseOver:function(O,N){var M=this;if(M.title){N._tempTitle=M.title;M.title=""}if(N.fireEvent("contextMouseOver",M,O)!==false&&!N.cfg.getProperty("disabled")){if(N.hideProcId){clearTimeout(N.hideProcId);N.hideProcId=null}L.on(M,"mousemove",N.onContextMouseMove,N);N.showProcId=N.doShow(O,M)}},onContextMouseOut:function(O,N){var M=this;if(N._tempTitle){M.title=N._tempTitle;N._tempTitle=null}if(N.showProcId){clearTimeout(N.showProcId);N.showProcId=null}if(N.hideProcId){clearTimeout(N.hideProcId);N.hideProcId=null}N.fireEvent("contextMouseOut",M,O);N.hideProcId=setTimeout(function(){N.hide()},N.cfg.getProperty("hidedelay"))},doShow:function(O,M){var P=25,N=this;if(YAHOO.env.ua.opera&&M.tagName&&M.tagName.toUpperCase()=="A"){P+=12}return setTimeout(function(){var Q=N.cfg.getProperty("text");if(N._tempTitle&&(Q===""||YAHOO.lang.isUndefined(Q)||YAHOO.lang.isNull(Q))){N.setBody(N._tempTitle)}else{N.cfg.refireEvent("text")}N.moveTo(N.pageX,N.pageY+P);if(N.cfg.getProperty("preventoverlap")){N.preventOverlap(N.pageX,N.pageY)}L.removeListener(M,"mousemove",N.onContextMouseMove);N.contextTriggerEvent.fire(M);N.show();N.hideProcId=N.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var M=this;return setTimeout(function(){M.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(Q,P){var M=this.element.offsetHeight,O=new YAHOO.util.Point(Q,P),N=C.getRegion(this.element);N.top-=5;N.left-=5;N.right+=5;N.bottom+=5;if(N.contains(O)){this.cfg.setProperty("y",(P-M-5))}},onRender:function(Q,P){function R(){var U=this.element,T=this._shadow;if(T){T.style.width=(U.offsetWidth+6)+"px";T.style.height=(U.offsetHeight+1)+"px"}}function N(){C.addClass(this._shadow,"yui-tt-shadow-visible")}function M(){C.removeClass(this._shadow,"yui-tt-shadow-visible")}function S(){var V=this._shadow,U,T,X,W;if(!V){U=this.element;T=YAHOO.widget.Module;X=YAHOO.env.ua.ie;W=this;if(!F){F=document.createElement("div");F.className="yui-tt-shadow"}V=F.cloneNode(false);U.appendChild(V);this._shadow=V;N.call(this);this.subscribe("beforeShow",N);this.subscribe("beforeHide",M);if(X==6||(X==7&&document.compatMode=="BackCompat")){window.setTimeout(function(){R.call(W)},0);this.cfg.subscribeToConfigEvent("width",R);this.cfg.subscribeToConfigEvent("height",R);this.subscribe("changeContent",R);T.textResizeEvent.subscribe(R,this,true);this.subscribe("destroy",function(){T.textResizeEvent.unsubscribe(R,this)})}}}function O(){S.call(this);this.unsubscribe("beforeShow",O)}if(this.cfg.getProperty("visible")){S.call(this)}else{this.subscribe("beforeShow",O)}},destroy:function(){this._removeEventListeners();G.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(R,Q){YAHOO.widget.Panel.superclass.constructor.call(this,R,Q)};var I=YAHOO.lang,E=YAHOO.util.DD,F=YAHOO.util.Dom,P=YAHOO.util.Event,B=YAHOO.widget.Overlay,O=YAHOO.util.CustomEvent,C=YAHOO.util.Config,N=YAHOO.widget.Panel,H,L,D,A={SHOW_MASK:"showMask",HIDE_MASK:"hideMask",DRAG:"drag"},J={CLOSE:{key:"close",value:true,validator:I.isBoolean,supercedes:["visible"]},DRAGGABLE:{key:"draggable",value:(E?true:false),validator:I.isBoolean,supercedes:["visible"]},DRAG_ONLY:{key:"dragonly",value:false,validator:I.isBoolean,supercedes:["draggable"]},UNDERLAY:{key:"underlay",value:"shadow",supercedes:["visible"]},MODAL:{key:"modal",value:false,validator:I.isBoolean,supercedes:["visible","zindex"]},KEY_LISTENERS:{key:"keylisteners",suppressEvent:true,supercedes:["visible"]}};N.CSS_PANEL="yui-panel";N.CSS_PANEL_CONTAINER="yui-panel-container";N.FOCUSABLE=["a","button","select","textarea","input"];function M(R,Q){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function K(R,Q,S){var V=S[0],T=S[1],U=this.cfg,W=U.getProperty("width");if(W==T){U.setProperty("width",V)}this.unsubscribe("hide",K,S)}function G(R,Q){var V=YAHOO.env.ua.ie,U,T,S;if(V==6||(V==7&&document.compatMode=="BackCompat")){U=this.cfg;T=U.getProperty("width");if(!T||T=="auto"){S=(this.element.offsetWidth+"px");U.setProperty("width",S);this.subscribe("hide",K,[(T||""),S])}}}YAHOO.extend(N,B,{init:function(R,Q){N.superclass.init.call(this,R);this.beforeInitEvent.fire(N);F.addClass(this.element,N.CSS_PANEL);this.buildWrapper();if(Q){this.cfg.applyConfig(Q,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",M);this.initEvent.fire(N)},_onElementFocus:function(Q){this.blur()},_addFocusHandlers:function(Y,S){var V=this,Z="focus",U="hidden";function X(c){if(c.type!==U&&!F.isAncestor(V.element,c)){P.on(c,Z,V._onElementFocus);return true}return false}var W=N.FOCUSABLE,Q=W.length,T=[];for(var R=0;R<Q;R++){T=T.concat(F.getElementsBy(X,W[R]))}this.focusableElements=T},_removeFocusHandlers:function(T,S){var V=this.focusableElements,Q=V.length,R="focus";if(V){for(var U=0;U<Q;U++){P.removeListener(V[U],R,this._onElementFocus)}}},initEvents:function(){N.superclass.initEvents.call(this);var Q=O.LIST;this.showMaskEvent=this.createEvent(A.SHOW_MASK);this.showMaskEvent.signature=Q;this.hideMaskEvent=this.createEvent(A.HIDE_MASK);this.hideMaskEvent.signature=Q;this.dragEvent=this.createEvent(A.DRAG);this.dragEvent.signature=Q},initDefaultConfig:function(){N.superclass.initDefaultConfig.call(this);this.cfg.addProperty(J.CLOSE.key,{handler:this.configClose,value:J.CLOSE.value,validator:J.CLOSE.validator,supercedes:J.CLOSE.supercedes});this.cfg.addProperty(J.DRAGGABLE.key,{handler:this.configDraggable,value:J.DRAGGABLE.value,validator:J.DRAGGABLE.validator,supercedes:J.DRAGGABLE.supercedes});this.cfg.addProperty(J.DRAG_ONLY.key,{value:J.DRAG_ONLY.value,validator:J.DRAG_ONLY.validator,supercedes:J.DRAG_ONLY.supercedes});this.cfg.addProperty(J.UNDERLAY.key,{handler:this.configUnderlay,value:J.UNDERLAY.value,supercedes:J.UNDERLAY.supercedes});this.cfg.addProperty(J.MODAL.key,{handler:this.configModal,value:J.MODAL.value,validator:J.MODAL.validator,supercedes:J.MODAL.supercedes});this.cfg.addProperty(J.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:J.KEY_LISTENERS.suppressEvent,supercedes:J.KEY_LISTENERS.supercedes})},configClose:function(S,Q,U){var V=Q[0],R=this.close;function T(X,W){W.hide()}if(V){if(!R){if(!D){D=document.createElement("span");D.innerHTML="&#160;";D.className="container-close"}R=D.cloneNode(true);this.innerElement.appendChild(R);P.on(R,"click",T,this);this.close=R}else{R.style.display="block"}}else{if(R){R.style.display="none"}}},configDraggable:function(R,Q,S){var T=Q[0];if(T){if(!E){this.cfg.setProperty("draggable",false);return }if(this.header){F.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",G)}else{if(this.dd){this.dd.unreg()}if(this.header){F.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",G)}},configUnderlay:function(d,c,V){var Z=YAHOO.env.ua,X=(this.platform=="mac"&&Z.gecko),Y=(Z.ie==6||(Z.ie==7&&document.compatMode=="BackCompat")),e=c[0].toLowerCase(),R=this.underlay,S=this.element;function f(){var g=this.underlay;F.addClass(g,"yui-force-redraw");window.setTimeout(function(){F.removeClass(g,"yui-force-redraw")},0)}function T(){var g=false;if(!R){if(!L){L=document.createElement("div");L.className="underlay"}R=L.cloneNode(false);this.element.appendChild(R);this.underlay=R;if(Y){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true)}if(Z.webkit&&Z.webkit<420){this.changeContentEvent.subscribe(f)}g=true}}function W(){var g=T.call(this);if(!g&&Y){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(W)}function U(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(W);this._underlayDeferred=false}if(R){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(f);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(R);this.underlay=null}}switch(e){case"shadow":F.removeClass(S,"matte");F.addClass(S,"shadow");break;case"matte":if(!X){U.call(this)}F.removeClass(S,"shadow");F.addClass(S,"matte");break;default:if(!X){U.call(this)}F.removeClass(S,"shadow");F.removeClass(S,"matte");break}if((e=="shadow")||(X&&!R)){if(this.cfg.getProperty("visible")){var Q=T.call(this);if(!Q&&Y){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(W);this._underlayDeferred=true}}}},configModal:function(R,Q,T){var S=Q[0];if(S){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);B.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask()}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);B.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var R=this.mask,Q;if(R){this.hideMask();Q=R.parentNode;if(Q){Q.removeChild(R)}this.mask=null}},configKeyListeners:function(T,Q,W){var S=Q[0],V,U,R;if(S){if(S instanceof Array){U=S.length;for(R=0;R<U;R++){V=S[R];if(!C.alreadySubscribed(this.showEvent,V.enable,V)){this.showEvent.subscribe(V.enable,V,true)}if(!C.alreadySubscribed(this.hideEvent,V.disable,V)){this.hideEvent.subscribe(V.disable,V,true);this.destroyEvent.subscribe(V.disable,V,true)}}}else{if(!C.alreadySubscribed(this.showEvent,S.enable,S)){this.showEvent.subscribe(S.enable,S,true)}if(!C.alreadySubscribed(this.hideEvent,S.disable,S)){this.hideEvent.subscribe(S.disable,S,true);this.destroyEvent.subscribe(S.disable,S,true)}}}},configHeight:function(T,R,U){var Q=R[0],S=this.innerElement;F.setStyle(S,"height",Q);this.cfg.refireEvent("iframe")},configWidth:function(T,Q,U){var S=Q[0],R=this.innerElement;F.setStyle(R,"width",S);this.cfg.refireEvent("iframe")},configzIndex:function(R,Q,T){N.superclass.configzIndex.call(this,R,Q,T);if(this.mask||this.cfg.getProperty("modal")===true){var S=F.getStyle(this.element,"zIndex");if(!S||isNaN(S)){S=0}if(S===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var S=this.element.parentNode,Q=this.element,R=document.createElement("div");R.className=N.CSS_PANEL_CONTAINER;R.id=Q.id+"_c";if(S){S.insertBefore(R,Q)}R.appendChild(Q);this.element=R;this.innerElement=Q;F.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var R=this.underlay,Q;if(R){Q=this.element;R.style.width=Q.offsetWidth+"px";R.style.height=Q.offsetHeight+"px"}},registerDragDrop:function(){var R=this;if(this.header){if(!E){return }var Q=(this.cfg.getProperty("dragonly")===true);this.dd=new E(this.element.id,this.id,{dragOnly:Q});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var T,V,S,Y,X,W;if(YAHOO.env.ua.ie==6){F.addClass(R.element,"drag")}if(R.cfg.getProperty("constraintoviewport")){var U=B.VIEWPORT_OFFSET;T=R.element.offsetHeight;V=R.element.offsetWidth;S=F.getViewportWidth();Y=F.getViewportHeight();X=F.getDocumentScrollLeft();W=F.getDocumentScrollTop();if(T+U<Y){this.minY=W+U;this.maxY=W+Y-T-U}else{this.minY=W+U;this.maxY=W+U}if(V+U<S){this.minX=X+U;this.maxX=X+S-V-U}else{this.minX=X+U;this.maxX=X+U}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}R.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){R.syncPosition();R.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}R.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){F.removeClass(R.element,"drag")}R.dragEvent.fire("endDrag",arguments);R.moveEvent.fire(R.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var Q=this.mask;if(!Q){if(!H){H=document.createElement("div");H.className="mask";H.innerHTML="&#160;"}Q=H.cloneNode(true);Q.id=this.id+"_mask";document.body.insertBefore(Q,document.body.firstChild);this.mask=Q;if(YAHOO.env.ua.gecko&&this.platform=="mac"){F.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();F.removeClass(document.body,"masked")}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){F.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){this.mask.style.height=F.getDocumentHeight()+"px";this.mask.style.width=F.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var Q=F.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(Q)&&!isNaN(Q)){F.setStyle(this.mask,"zIndex",Q-1)}}},render:function(Q){return N.superclass.render.call(this,Q,this.innerElement)},destroy:function(){B.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){P.purgeElement(this.close)}N.superclass.destroy.call(this)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(L,K){YAHOO.widget.Dialog.superclass.constructor.call(this,L,K)};var J=YAHOO.util.Event,I=YAHOO.util.CustomEvent,D=YAHOO.util.Dom,B=YAHOO.util.KeyListener,H=YAHOO.util.Connect,F=YAHOO.widget.Dialog,E=YAHOO.lang,A={BEFORE_SUBMIT:"beforeSubmit",SUBMIT:"submit",MANUAL_SUBMIT:"manualSubmit",ASYNC_SUBMIT:"asyncSubmit",FORM_SUBMIT:"formSubmit",CANCEL:"cancel"},G={POST_METHOD:{key:"postmethod",value:"async"},BUTTONS:{key:"buttons",value:"none"},HIDEAFTERSUBMIT:{key:"hideaftersubmit",value:true}};F.CSS_DIALOG="yui-dialog";function C(){var N=this._aButtons,L,M,K;if(E.isArray(N)){L=N.length;if(L>0){K=L-1;do{M=N[K];if(YAHOO.widget.Button&&M instanceof YAHOO.widget.Button){M.destroy()}else{if(M.tagName.toUpperCase()=="BUTTON"){J.purgeElement(M);J.purgeElement(M,false)}}}while(K--)}}}YAHOO.extend(F,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(G.POST_METHOD.key,{handler:this.configPostMethod,value:G.POST_METHOD.value,validator:function(K){if(K!="form"&&K!="async"&&K!="none"&&K!="manual"){return false}else{return true}}});this.cfg.addProperty(G.HIDEAFTERSUBMIT.key,{value:G.HIDEAFTERSUBMIT.value});this.cfg.addProperty(G.BUTTONS.key,{handler:this.configButtons,value:G.BUTTONS.value})},initEvents:function(){F.superclass.initEvents.call(this);var K=I.LIST;this.beforeSubmitEvent=this.createEvent(A.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=K;this.submitEvent=this.createEvent(A.SUBMIT);this.submitEvent.signature=K;this.manualSubmitEvent=this.createEvent(A.MANUAL_SUBMIT);this.manualSubmitEvent.signature=K;this.asyncSubmitEvent=this.createEvent(A.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=K;this.formSubmitEvent=this.createEvent(A.FORM_SUBMIT);this.formSubmitEvent.signature=K;this.cancelEvent=this.createEvent(A.CANCEL);this.cancelEvent.signature=K},init:function(L,K){F.superclass.init.call(this,L);this.beforeInitEvent.fire(F);D.addClass(this.element,F.CSS_DIALOG);this.cfg.setProperty("visible",false);if(K){this.cfg.applyConfig(K,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(F)},doSubmit:function(){var Q=this.form,O=false,N=false,P,K,M,L;switch(this.cfg.getProperty("postmethod")){case"async":P=Q.elements;K=P.length;if(K>0){M=K-1;do{if(P[M].type=="file"){O=true;break}}while(M--)}if(O&&YAHOO.env.ua.ie&&this.isSecure){N=true}L=(Q.getAttribute("method")||"POST").toUpperCase();H.setForm(Q,O,N);H.asyncRequest(L,Q.getAttribute("action"),this.callback);this.asyncSubmitEvent.fire();break;case"form":Q.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},registerForm:function(){var M=this.element.getElementsByTagName("form")[0],L=this,K,N;if(this.form){if(this.form==M&&D.isAncestor(this.element,this.form)){return }else{J.purgeElement(this.form);this.form=null}}if(!M){M=document.createElement("form");M.name="frm_"+this.id;this.body.appendChild(M)}if(M){this.form=M;J.on(M,"submit",function(O){J.stopEvent(O);this.submit();this.form.blur()},this,true);this.firstFormElement=function(){var Q,P,O=M.elements.length;for(Q=0;Q<O;Q++){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P}}return null}();this.lastFormElement=function(){var Q,P,O=M.elements.length;for(Q=O-1;Q>=0;Q--){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P}}return null}();if(this.cfg.getProperty("modal")){K=this.firstFormElement||this.firstButton;if(K){this.preventBackTab=new B(K,{shift:true,keys:9},{fn:L.focusLast,scope:L,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true)}N=this.lastButton||this.lastFormElement;if(N){this.preventTabOut=new B(N,{shift:false,keys:9},{fn:L.focusFirst,scope:L,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true)}}}},configClose:function(M,K,N){var O=K[0];function L(Q,P){P.cancel()}if(O){if(!this.close){this.close=document.createElement("div");D.addClass(this.close,"container-close");this.close.innerHTML="&#160;";this.innerElement.appendChild(this.close);J.on(this.close,"click",L,this)}else{this.close.style.display="block"}}else{if(this.close){this.close.style.display="none"}}},configButtons:function(U,T,O){var P=YAHOO.widget.Button,W=T[0],M=this.innerElement,V,R,L,S,Q,K,N;C.call(this);this._aButtons=null;if(E.isArray(W)){Q=document.createElement("span");Q.className="button-group";S=W.length;this._aButtons=[];for(N=0;N<S;N++){V=W[N];if(P){L=new P({label:V.text,container:Q});R=L.get("element");if(V.isDefault){L.addClass("default");this.defaultHtmlButton=R}if(E.isFunction(V.handler)){L.set("onclick",{fn:V.handler,obj:this,scope:this})}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){L.set("onclick",{fn:V.handler.fn,obj:((!E.isUndefined(V.handler.obj))?V.handler.obj:this),scope:(V.handler.scope||this)})}}this._aButtons[this._aButtons.length]=L}else{R=document.createElement("button");R.setAttribute("type","button");if(V.isDefault){R.className="default";this.defaultHtmlButton=R}R.innerHTML=V.text;if(E.isFunction(V.handler)){J.on(R,"click",V.handler,this,true)}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){J.on(R,"click",V.handler.fn,((!E.isUndefined(V.handler.obj))?V.handler.obj:this),(V.handler.scope||this))}}Q.appendChild(R);this._aButtons[this._aButtons.length]=R}V.htmlButton=R;if(N===0){this.firstButton=R}if(N==(S-1)){this.lastButton=R}}this.setFooter(Q);K=this.footer;if(D.inDocument(this.element)&&!D.isAncestor(M,K)){M.appendChild(K)}this.buttonSpan=Q}else{Q=this.buttonSpan;K=this.footer;if(Q&&K){K.removeChild(Q);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay")},getButtons:function(){var K=this._aButtons;if(K){return K}},focusFirst:function(N,L,P){var M=this.firstFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K)}}if(M){try{M.focus()}catch(O){}}else{this.focusDefaultButton()}},focusLast:function(N,L,P){var Q=this.cfg.getProperty("buttons"),M=this.lastFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K)}}if(Q&&E.isArray(Q)){this.focusLastButton()}else{if(M){try{M.focus()}catch(O){}}}},focusDefaultButton:function(){var K=this.defaultHtmlButton;if(K){try{K.focus()}catch(L){}}},blurButtons:function(){var P=this.cfg.getProperty("buttons"),M,O,L,K;if(P&&E.isArray(P)){M=P.length;if(M>0){K=(M-1);do{O=P[K];if(O){L=O.htmlButton;if(L){try{L.blur()}catch(N){}}}}while(K--)}}},focusFirstButton:function(){var N=this.cfg.getProperty("buttons"),M,K;if(N&&E.isArray(N)){M=N[0];if(M){K=M.htmlButton;if(K){try{K.focus()}catch(L){}}}}},focusLastButton:function(){var O=this.cfg.getProperty("buttons"),L,N,K;if(O&&E.isArray(O)){L=O.length;if(L>0){N=O[(L-1)];if(N){K=N.htmlButton;if(K){try{K.focus()}catch(M){}}}}}},configPostMethod:function(L,K,M){this.registerForm()},validate:function(){return true},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide()}return true}else{return false}},cancel:function(){this.cancelEvent.fire();this.hide()},getData:function(){var c=this.form,M,T,W,O,U,R,Q,L,X,N,Y,d,K,P,e,Z,V;function S(g){var f=g.tagName.toUpperCase();return((f=="INPUT"||f=="TEXTAREA"||f=="SELECT")&&g.name==O)}if(c){M=c.elements;T=M.length;W={};for(Z=0;Z<T;Z++){O=M[Z].name;U=D.getElementsBy(S,"*",c);R=U.length;if(R>0){if(R==1){U=U[0];Q=U.type;L=U.tagName.toUpperCase();switch(L){case"INPUT":if(Q=="checkbox"){W[O]=U.checked}else{if(Q!="radio"){W[O]=U.value}}break;case"TEXTAREA":W[O]=U.value;break;case"SELECT":X=U.options;N=X.length;Y=[];for(V=0;V<N;V++){d=X[V];if(d.selected){K=d.value;if(!K||K===""){K=d.text}Y[Y.length]=K}}W[O]=Y;break}}else{Q=U[0].type;switch(Q){case"radio":for(V=0;V<R;V++){P=U[V];if(P.checked){W[O]=P.value;break}}break;case"checkbox":Y=[];for(V=0;V<R;V++){e=U[V];if(e.checked){Y[Y.length]=e.value}}W[O]=Y;break}}}}}return W},destroy:function(){C.call(this);this._aButtons=null;var K=this.element.getElementsByTagName("form"),L;if(K.length>0){L=K[0];if(L){J.purgeElement(L);if(L.parentNode){L.parentNode.removeChild(L)}this.form=null}}F.superclass.destroy.call(this)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(E,D){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,E,D)};var C=YAHOO.util.Dom,B=YAHOO.widget.SimpleDialog,A={ICON:{key:"icon",value:"none",suppressEvent:true},TEXT:{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};B.ICON_BLOCK="blckicon";B.ICON_ALARM="alrticon";B.ICON_HELP="hlpicon";B.ICON_INFO="infoicon";B.ICON_WARN="warnicon";B.ICON_TIP="tipicon";B.ICON_CSS_CLASSNAME="yui-icon";B.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(B,YAHOO.widget.Dialog,{initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(A.ICON.key,{handler:this.configIcon,value:A.ICON.value,suppressEvent:A.ICON.suppressEvent});this.cfg.addProperty(A.TEXT.key,{handler:this.configText,value:A.TEXT.value,suppressEvent:A.TEXT.suppressEvent,supercedes:A.TEXT.supercedes})},init:function(E,D){B.superclass.init.call(this,E);this.beforeInitEvent.fire(B);C.addClass(this.element,B.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(D){this.cfg.applyConfig(D,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(B)},registerForm:function(){B.superclass.registerForm.call(this);this.form.innerHTML+='<input type="hidden" name="'+this.id+'" value=""/>'},configIcon:function(F,E,J){var K=E[0],D=this.body,I=B.ICON_CSS_CLASSNAME,H,G;if(K&&K!="none"){H=C.getElementsByClassName(I,"*",D);if(H){G=H.parentNode;if(G){G.removeChild(H);H=null}}if(K.indexOf(".")==-1){H=document.createElement("span");H.className=(I+" "+K);H.innerHTML="&#160;"}else{H=document.createElement("img");H.src=(this.imageRoot+K);H.className=I}if(H){D.insertBefore(H,D.firstChild)}}},configText:function(E,D,F){var G=D[0];if(G){this.setBody(G);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(F,I,H,E,G){if(!G){G=YAHOO.util.Anim}this.overlay=F;this.attrIn=I;this.attrOut=H;this.targetElement=E||F.element;this.animClass=G};var B=YAHOO.util.Dom,D=YAHOO.util.CustomEvent,C=YAHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(E,G){var I={attributes:{opacity:{from:0,to:1}},duration:G,method:C.easeIn};var F={attributes:{opacity:{to:0}},duration:G,method:C.easeOut};var H=new A(E,I,F,E.element);H.handleUnderlayStart=function(){var K=this.overlay.underlay;if(K&&YAHOO.env.ua.ie){var J=(K.filters&&K.filters.length>0);if(J){B.addClass(E.element,"yui-effect-fade")}}};H.handleUnderlayComplete=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){B.removeClass(E.element,"yui-effect-fade")}};H.handleStartAnimateIn=function(K,J,L){B.addClass(L.overlay.element,"hide-select");if(!L.overlay.underlay){L.overlay.cfg.refireEvent("underlay")}L.handleUnderlayStart();B.setStyle(L.overlay.element,"visibility","visible");B.setStyle(L.overlay.element,"opacity",0)};H.handleCompleteAnimateIn=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null}L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateInCompleteEvent.fire()};H.handleStartAnimateOut=function(K,J,L){B.addClass(L.overlay.element,"hide-select");L.handleUnderlayStart()};H.handleCompleteAnimateOut=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null}B.setStyle(L.overlay.element,"visibility","hidden");B.setStyle(L.overlay.element,"opacity",1);L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateOutCompleteEvent.fire()};H.init();return H};A.SLIDE=function(G,I){var F=G.cfg.getProperty("x")||B.getX(G.element),K=G.cfg.getProperty("y")||B.getY(G.element),J=B.getClientWidth(),H=G.element.offsetWidth,E=new A(G,{attributes:{points:{to:[F,K]}},duration:I,method:C.easeIn},{attributes:{points:{to:[(J+25),K]}},duration:I,method:C.easeOut},G.element,YAHOO.util.Motion);E.handleStartAnimateIn=function(M,L,N){N.overlay.element.style.left=((-25)-H)+"px";N.overlay.element.style.top=K+"px"};E.handleTweenAnimateIn=function(O,N,P){var Q=B.getXY(P.overlay.element),M=Q[0],L=Q[1];if(B.getStyle(P.overlay.element,"visibility")=="hidden"&&M<F){B.setStyle(P.overlay.element,"visibility","visible")}P.overlay.cfg.setProperty("xy",[M,L],true);P.overlay.cfg.refireEvent("iframe")};E.handleCompleteAnimateIn=function(M,L,N){N.overlay.cfg.setProperty("xy",[F,K],true);N.startX=F;N.startY=K;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire()};E.handleStartAnimateOut=function(M,L,P){var N=B.getViewportWidth(),Q=B.getXY(P.overlay.element),O=Q[1];P.animOut.attributes.points.to=[(N+25),O]};E.handleTweenAnimateOut=function(N,M,O){var Q=B.getXY(O.overlay.element),L=Q[0],P=Q[1];O.overlay.cfg.setProperty("xy",[L,P],true);O.overlay.cfg.refireEvent("iframe")};E.handleCompleteAnimateOut=function(M,L,N){B.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[F,K]);N.animateOutCompleteEvent.fire()};E.init();return E};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=D.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=D.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=D.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=D.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(F,E,G){},handleTweenAnimateIn:function(F,E,G){},handleCompleteAnimateIn:function(F,E,G){},handleStartAnimateOut:function(F,E,G){},handleTweenAnimateOut:function(F,E,G){},handleCompleteAnimateOut:function(F,E,G){},toString:function(){var E="ContainerEffect";if(this.overlay){E+=" ["+this.overlay.toString()+"]"}return E}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.5.2",build:"1076"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(B){var A=YAHOO.util.Event.getTarget(B);if(A.nodeName.toLowerCase()=="input"&&(A.type&&A.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(A.name)+"="+encodeURIComponent(A.value)}});return true}return false})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A)},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A}else{if(typeof A=="boolean"){this._use_default_post_header=A}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A}else{this._use_default_xhr_header=A}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A}},createXhrObject:function(E){var D,A;try{A=new XMLHttpRequest();D={conn:A,tId:E}}catch(C){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);D={conn:A,tId:E};break}catch(C){}}}finally{return D}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D)}else{C={};C.tId=D;C.isUpload=true}if(C){this._transaction_id++}}catch(B){}finally{return C}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){return null}else{if(E&&E.customevents){this.initCustomEvents(D,E)}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString()}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true)}}if((F.toUpperCase()=="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header)}if(this._has_default_headers||this._has_http_headers){this.setHeader(D)}this.handleReadyState(D,E);D.conn.send(A||"");if(this._isFormSubmit===true){this.resetFormState()}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B)}return D}},initCustomEvents:function(A,C){for(var B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B])}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true)},D.timeout)}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId]}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A)}B.handleTransactionResponse(C,D)}},this._polling_interval)},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status}else{D=13030}}catch(E){D=13030}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C)}else{G.success.apply(G.scope,[C])}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C)}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C)}}this.releaseObject(F);C=null},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2)}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G}return D},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B}else{E.status=F;E.statusText=G}if(D){E.argument=D}return E},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true}else{this._has_http_headers=true}},setHeader:function(A){if(this._has_default_headers){for(var B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B])}}}if(this._has_http_headers){for(var B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B])}}delete this._http_headers;this._http_headers={};this._has_http_headers=false}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false},setForm:function(K,E,B){this.resetFormState();var J;if(typeof K=="string"){J=(document.getElementById(K)||document.forms[K])}else{if(typeof K=="object"){J=K}else{return }}if(E){var F=this.createFrame((window.location.href.toLowerCase().indexOf("https")===0||B)?true:false);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=J;return }var A,I,G,L;var H=false;for(var D=0;D<J.elements.length;D++){A=J.elements[D];L=A.disabled;I=A.name;G=A.value;if(!L&&I){switch(A.type){case"select-one":case"select-multiple":for(var C=0;C<A.options.length;C++){if(A.options[C].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].attributes.value.specified?A.options[C].value:A.options[C].text)+"&"}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].hasAttribute("value")?A.options[C].value:A.options[C].text)+"&"}}}break;case"radio":case"checkbox":if(A.checked){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&"}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(H===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&"}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&"}H=true}break;default:this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&"}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);this.initHeader("Content-Type",this._default_form_header);return this._sFormData},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData=""},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(window.ActiveXObject){C=document.createElement('<iframe id="'+B+'" name="'+B+'" />');if(typeof A=="boolean"){C.src="javascript:false"}}else{C=document.createElement("iframe");C.id=B;C.name=B}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C)},appendPostData:function(A){var D=[];var B=A.split("&");for(var C=0;C<B.length;C++){var E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=B[C].substring(0,E);D[C].value=B[C].substring(E+1);this._formNode.appendChild(D[C])}}return D},uploadFile:function(D,M,E,C){var N=this;var H="yuiIO"+D.tId;var I="multipart/form-data";var K=document.getElementById(H);var J=(M&&M.argument)?M.argument:null;var B={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",H);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",I)}else{this._formNode.setAttribute("enctype",I)}if(C){var L=this.appendPostData(C)}this._formNode.submit();this.startEvent.fire(D,J);if(D.startEvent){D.startEvent.fire(D,J)}if(M&&M.timeout){this._timeOut[D.tId]=window.setTimeout(function(){N.abort(D,M,true)},M.timeout)}if(L&&L.length>0){for(var G=0;G<L.length;G++){this._formNode.removeChild(L[G])}}for(var A in B){if(YAHOO.lang.hasOwnProperty(B,A)){if(B[A]){this._formNode.setAttribute(A,B[A])}else{this._formNode.removeAttribute(A)}}}this.resetFormState();var F=function(){if(M&&M.timeout){window.clearTimeout(N._timeOut[D.tId]);delete N._timeOut[D.tId]}N.completeEvent.fire(D,J);if(D.completeEvent){D.completeEvent.fire(D,J)}var P={};P.tId=D.tId;P.argument=M.argument;try{P.responseText=K.contentWindow.document.body?K.contentWindow.document.body.innerHTML:K.contentWindow.document.documentElement.textContent;P.responseXML=K.contentWindow.document.XMLDocument?K.contentWindow.document.XMLDocument:K.contentWindow.document}catch(O){}if(M&&M.upload){if(!M.scope){M.upload(P)}else{M.upload.apply(M.scope,[P])}}N.uploadEvent.fire(P);if(D.uploadEvent){D.uploadEvent.fire(P)}YAHOO.util.Event.removeListener(K,"load",F);setTimeout(function(){document.body.removeChild(K);N.releaseObject(D)},100)};YAHOO.util.Event.addListener(K,"load",F)},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{D=false}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B)}this.handleTransactionResponse(E,G,true)}return D},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false}else{return false}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.5.2",build:"1076"});(function(){YAHOO.namespace("YAHOO.EU.Shopping.Flags")})();YAHOO.widget.AutoComplete=function(G,B,J,C){if(G&&B&&J){if(J instanceof YAHOO.widget.DataSource){this.dataSource=J}else{return }if(YAHOO.util.Dom.inDocument(G)){if(YAHOO.lang.isString(G)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+G;this._elTextbox=document.getElementById(G)}else{this._sName=(G.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+G.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._elTextbox=G}YAHOO.util.Dom.addClass(this._elTextbox,"yui-ac-input")}else{return }if(YAHOO.util.Dom.inDocument(B)){if(YAHOO.lang.isString(B)){this._elContainer=document.getElementById(B)}else{this._elContainer=B}if(this._elContainer.style.display=="none"){}var D=this._elContainer.parentNode;var A=D.tagName.toLowerCase();if(A=="div"){YAHOO.util.Dom.addClass(D,"yui-ac")}else{}}else{return }if(C&&(C.constructor==Object)){for(var I in C){if(I){this[I]=C[I]}}}this._initContainer();this._initProps();this._initList();this._initContainerHelpers();var H=this;var F=this._elTextbox;var E=this._elContent;YAHOO.util.Event.addListener(F,"keyup",H._onTextboxKeyUp,H);YAHOO.util.Event.addListener(F,"keydown",H._onTextboxKeyDown,H);YAHOO.util.Event.addListener(F,"focus",H._onTextboxFocus,H);YAHOO.util.Event.addListener(F,"blur",H._onTextboxBlur,H);YAHOO.util.Event.addListener(E,"mouseover",H._onContainerMouseover,H);YAHOO.util.Event.addListener(E,"mouseout",H._onContainerMouseout,H);YAHOO.util.Event.addListener(E,"scroll",H._onContainerScroll,H);YAHOO.util.Event.addListener(E,"resize",H._onContainerResize,H);YAHOO.util.Event.addListener(F,"keypress",H._onTextboxKeyPress,H);YAHOO.util.Event.addListener(window,"unload",H._onWindowUnload,H);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.containerExpandEvent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);F.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++}else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this._bContainerOpen};YAHOO.widget.AutoComplete.prototype.getListItems=function(){return this._aListItems};YAHOO.widget.AutoComplete.prototype.getListItemData=function(A){if(A._oResultData){return A._oResultData}else{return false}};YAHOO.widget.AutoComplete.prototype.setHeader=function(B){if(this._elHeader){var A=this._elHeader;if(B){A.innerHTML=B;A.style.display="block"}else{A.innerHTML="";A.style.display="none"}}};YAHOO.widget.AutoComplete.prototype.setFooter=function(B){if(this._elFooter){var A=this._elFooter;if(B){A.innerHTML=B;A.style.display="block"}else{A.innerHTML="";A.style.display="none"}}};YAHOO.widget.AutoComplete.prototype.setBody=function(A){if(this._elBody){var B=this._elBody;if(A){B.innerHTML=A;B.style.display="block";B.style.display="block"}else{B.innerHTML="";B.style.display="none"}this._maxResultsDisplayed=0}};YAHOO.widget.AutoComplete.prototype.formatResult=function(B,C){var A=B[0];if(A){return A}else{return""}};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(D,A,C,B){return true};YAHOO.widget.AutoComplete.prototype.sendQuery=function(A){this._sendQuery(A)};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return A};YAHOO.widget.AutoComplete.prototype.destroy=function(){var B=this.toString();var A=this._elTextbox;var D=this._elContainer;this.textboxFocusEvent.unsubscribeAll();this.textboxKeyEvent.unsubscribeAll();this.dataRequestEvent.unsubscribeAll();this.dataReturnEvent.unsubscribeAll();this.dataErrorEvent.unsubscribeAll();this.containerExpandEvent.unsubscribeAll();this.typeAheadEvent.unsubscribeAll();this.itemMouseOverEvent.unsubscribeAll();this.itemMouseOutEvent.unsubscribeAll();this.itemArrowToEvent.unsubscribeAll();this.itemArrowFromEvent.unsubscribeAll();this.itemSelectEvent.unsubscribeAll();this.unmatchedItemSelectEvent.unsubscribeAll();this.selectionEnforceEvent.unsubscribeAll();this.containerCollapseEvent.unsubscribeAll();this.textboxBlurEvent.unsubscribeAll();YAHOO.util.Event.purgeElement(A,true);YAHOO.util.Event.purgeElement(D,true);D.innerHTML="";for(var C in this){if(YAHOO.lang.hasOwnProperty(this,C)){this[C]=null}}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete._nIndex=0;YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._elTextbox=null;YAHOO.widget.AutoComplete.prototype._elContainer=null;YAHOO.widget.AutoComplete.prototype._elContent=null;YAHOO.widget.AutoComplete.prototype._elHeader=null;YAHOO.widget.AutoComplete.prototype._elBody=null;YAHOO.widget.AutoComplete.prototype._elFooter=null;YAHOO.widget.AutoComplete.prototype._elShadow=null;YAHOO.widget.AutoComplete.prototype._elIFrame=null;YAHOO.widget.AutoComplete.prototype._bFocused=true;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._aListItems=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._maxResultsDisplayed=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sSavedQuery=null;YAHOO.widget.AutoComplete.prototype._oCurItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var B=this.minQueryLength;if(!YAHOO.lang.isNumber(B)){this.minQueryLength=1}var D=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(D)||(D<1)){this.maxResultsDisplayed=10}var E=this.queryDelay;if(!YAHOO.lang.isNumber(E)||(E<0)){this.queryDelay=0.2}var A=this.delimChar;if(YAHOO.lang.isString(A)&&(A.length>0)){this.delimChar=[A]}else{if(!YAHOO.lang.isArray(A)){this.delimChar=null}}var C=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(C)||(C<0)){this.animSpeed=0.3}if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._elContent,{},this.animSpeed)}else{this._oAnim.duration=this.animSpeed}}if(this.forceSelection&&A){}};YAHOO.widget.AutoComplete.prototype._initContainerHelpers=function(){if(this.useShadow&&!this._elShadow){var A=document.createElement("div");A.className="yui-ac-shadow";this._elShadow=this._elContainer.appendChild(A)}if(this.useIFrame&&!this._elIFrame){var B=document.createElement("iframe");B.src=this._iFrameSrc;B.frameBorder=0;B.scrolling="no";B.style.position="absolute";B.style.width="100%";B.style.height="100%";B.tabIndex=-1;this._elIFrame=this._elContainer.appendChild(B)}};YAHOO.widget.AutoComplete.prototype._initContainer=function(){YAHOO.util.Dom.addClass(this._elContainer,"yui-ac-container");if(!this._elContent){var C=document.createElement("div");C.className="yui-ac-content";C.style.display="none";this._elContent=this._elContainer.appendChild(C);var B=document.createElement("div");B.className="yui-ac-hd";B.style.display="none";this._elHeader=this._elContent.appendChild(B);var D=document.createElement("div");D.className="yui-ac-bd";this._elBody=this._elContent.appendChild(D);var A=document.createElement("div");A.className="yui-ac-ft";A.style.display="none";this._elFooter=this._elContent.appendChild(A)}else{}};YAHOO.widget.AutoComplete.prototype._initList=function(){this._aListItems=[];while(this._elBody.hasChildNodes()){var B=this.getListItems();if(B){for(var A=B.length-1;A>=0;A--){B[A]=null}}this._elBody.innerHTML=""}var E=document.createElement("ul");E=this._elBody.appendChild(E);for(var C=0;C<this.maxResultsDisplayed;C++){var D=document.createElement("li");D=E.appendChild(D);this._aListItems[C]=D;this._initListItem(D,C)}this._maxResultsDisplayed=this.maxResultsDisplayed};YAHOO.widget.AutoComplete.prototype._initListItem=function(C,B){var A=this;C.style.display="none";C._nItemIndex=B;C.mouseover=C.mouseout=C.onclick=null;YAHOO.util.Event.addListener(C,"mouseover",A._onItemMouseover,A);YAHOO.util.Event.addListener(C,"mouseout",A._onItemMouseout,A);YAHOO.util.Event.addListener(C,"click",A._onItemMouseclick,A)};YAHOO.widget.AutoComplete.prototype._onIMEDetected=function(A){A._enableIntervalDetection()};YAHOO.widget.AutoComplete.prototype._enableIntervalDetection=function(){var A=this._elTextbox.value;var B=this._sLastTextboxValue;if(A!=B){this._sLastTextboxValue=A;this._sendQuery(A)}};YAHOO.widget.AutoComplete.prototype._cancelIntervalDetection=function(A){if(A._queryInterval){clearInterval(A._queryInterval)}};YAHOO.widget.AutoComplete.prototype._isIgnoreKey=function(A){if((A==9)||(A==13)||(A==16)||(A==17)||(A>=18&&A<=20)||(A==27)||(A>=33&&A<=35)||(A>=36&&A<=40)||(A>=44&&A<=45)){return true}return false};YAHOO.widget.AutoComplete.prototype._sendQuery=function(G){if(this.minQueryLength==-1){this._toggleContainer(false);return }var C=(this.delimChar)?this.delimChar:null;if(C){var E=-1;for(var B=C.length-1;B>=0;B--){var F=G.lastIndexOf(C[B]);if(F>E){E=F}}if(C[B]==" "){for(var A=C.length-1;A>=0;A--){if(G[E-1]==C[A]){E--;break}}}if(E>-1){var D=E+1;while(G.charAt(D)==" "){D+=1}this._sSavedQuery=G.substring(0,D);G=G.substr(D)}else{if(G.indexOf(this._sSavedQuery)<0){this._sSavedQuery=null}}}if((G&&(G.length<this.minQueryLength))||(!G&&this.minQueryLength>0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID)}this._toggleContainer(false);return }G=encodeURIComponent(G);this._nDelayID=-1;G=this.doBeforeSendQuery(G);this.dataRequestEvent.fire(this,G);this.dataSource.getResults(this._populateList,G,this)};YAHOO.widget.AutoComplete.prototype._populateList=function(K,L,I){if(L===null){I.dataErrorEvent.fire(I,K)}if(!I._bFocused||!L){return }var A=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);var O=I._elContent.style;O.width=(!A)?null:"";O.height=(!A)?null:"";var H=decodeURIComponent(K);I._sCurQuery=H;I._bItemSelected=false;if(I._maxResultsDisplayed!=I.maxResultsDisplayed){I._initList()}var C=Math.min(L.length,I.maxResultsDisplayed);I._nDisplayedItems=C;if(C>0){I._initContainerHelpers();var D=I._aListItems;for(var G=C-1;G>=0;G--){var N=D[G];var B=L[G];N.innerHTML=I.formatResult(B,H);N.style.display="list-item";N._sResultKey=B[0];N._oResultData=B}for(var F=D.length-1;F>=C;F--){var M=D[F];M.innerHTML=null;M.style.display="none";M._sResultKey=null;M._oResultData=null}var J=I.doBeforeExpandContainer(I._elTextbox,I._elContainer,K,L);I._toggleContainer(J);if(I.autoHighlight){var E=D[0];I._toggleHighlight(E,"to");I.itemArrowToEvent.fire(I,E);I._typeAhead(E,K)}else{I._oCurItem=null}}else{I._toggleContainer(false)}I.dataReturnEvent.fire(I,K,L)};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var C=this._elTextbox.value;var B=(this.delimChar)?this.delimChar[0]:null;var A=(B)?C.lastIndexOf(B,C.length-2):-1;if(A>-1){this._elTextbox.value=C.substring(0,A)}else{this._elTextbox.value=""}this._sSavedQuery=this._elTextbox.value;this.selectionEnforceEvent.fire(this)};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var D=null;for(var A=this._nDisplayedItems-1;A>=0;A--){var C=this._aListItems[A];var B=C._sResultKey.toLowerCase();if(B==this._sCurQuery.toLowerCase()){D=C;break}}return(D)};YAHOO.widget.AutoComplete.prototype._typeAhead=function(D,G){if(!this.typeAhead||(this._nKeyCode==8)){return }var F=this._elTextbox;var E=this._elTextbox.value;if(!F.setSelectionRange&&!F.createTextRange){return }var B=E.length;this._updateValue(D);var C=F.value.length;this._selectText(F,B,C);var A=F.value.substr(B,C);this.typeAheadEvent.fire(this,G,A)};YAHOO.widget.AutoComplete.prototype._selectText=function(D,A,B){if(D.setSelectionRange){D.setSelectionRange(A,B)}else{if(D.createTextRange){var C=D.createTextRange();C.moveStart("character",A);C.moveEnd("character",B-D.value.length);C.select()}else{D.select()}}};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(B){var D=false;var C=this._elContent.offsetWidth+"px";var A=this._elContent.offsetHeight+"px";if(this.useIFrame&&this._elIFrame){D=true;if(B){this._elIFrame.style.width=C;this._elIFrame.style.height=A}else{this._elIFrame.style.width=0;this._elIFrame.style.height=0}}if(this.useShadow&&this._elShadow){D=true;if(B){this._elShadow.style.width=C;this._elShadow.style.height=A}else{this._elShadow.style.width=0;this._elShadow.style.height=0}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(K){var E=this._elContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return }if(!K){this._elContent.scrollTop=0;var C=this._aListItems;if(C&&(C.length>0)){for(var H=C.length-1;H>=0;H--){C[H].style.display="none"}}if(this._oCurItem){this._toggleHighlight(this._oCurItem,"from")}this._oCurItem=null;this._nDisplayedItems=0;this._sCurQuery=null}if(!K&&!this._bContainerOpen){this._elContent.style.display="none";return }var B=this._oAnim;if(B&&B.getEl()&&(this.animHoriz||this.animVert)){if(!K){this._toggleContainerHelpers(K)}if(B.isAnimated()){B.stop()}var I=this._elContent.cloneNode(true);E.appendChild(I);I.style.top="-9000px";I.style.display="block";var G=I.offsetWidth;var D=I.offsetHeight;var A=(this.animHoriz)?0:G;var F=(this.animVert)?0:D;B.attributes=(K)?{width:{to:G},height:{to:D}}:{width:{to:A},height:{to:F}};if(K&&!this._bContainerOpen){this._elContent.style.width=A+"px";this._elContent.style.height=F+"px"}else{this._elContent.style.width=G+"px";this._elContent.style.height=D+"px"}E.removeChild(I);I=null;var J=this;var L=function(){B.onComplete.unsubscribeAll();if(K){J.containerExpandEvent.fire(J)}else{J._elContent.style.display="none";J.containerCollapseEvent.fire(J)}J._toggleContainerHelpers(K)};this._elContent.style.display="block";B.onComplete.subscribe(L);B.animate();this._bContainerOpen=K}else{if(K){this._elContent.style.display="block";this.containerExpandEvent.fire(this)}else{this._elContent.style.display="none";this.containerCollapseEvent.fire(this)}this._toggleContainerHelpers(K);this._bContainerOpen=K}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(A,C){var B=this.highlightClassName;if(this._oCurItem){YAHOO.util.Dom.removeClass(this._oCurItem,B)}if((C=="to")&&B){YAHOO.util.Dom.addClass(A,B);this._oCurItem=A}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(A,C){if(A==this._oCurItem){return }var B=this.prehighlightClassName;if((C=="mouseover")&&B){YAHOO.util.Dom.addClass(A,B)}else{YAHOO.util.Dom.removeClass(A,B)}};YAHOO.widget.AutoComplete.prototype._updateValue=function(E){var F=this._elTextbox;var D=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var B=this._sSavedQuery;var C=E._sResultKey;F.focus();F.value="";if(D){if(B){F.value=B}F.value+=C+D;if(D!=" "){F.value+=" "}}else{F.value=C}if(F.type=="textarea"){F.scrollTop=F.scrollHeight}var A=F.value.length;this._selectText(F,A,A);this._oCurItem=E};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._cancelIntervalDetection(this);this.itemSelectEvent.fire(this,A,A._oResultData);this._toggleContainer(false)};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._oCurItem){this._selectItem(this._oCurItem)}else{this._toggleContainer(false)}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(G){if(this._bContainerOpen){var E=this._oCurItem;var F=-1;if(E){F=E._nItemIndex}var D=(G==40)?(F+1):(F-1);if(D<-2||D>=this._nDisplayedItems){return }if(E){this._toggleHighlight(E,"from");this.itemArrowFromEvent.fire(this,E)}if(D==-1){if(this.delimChar&&this._sSavedQuery){if(!this._textMatchesOption()){this._elTextbox.value=this._sSavedQuery}else{this._elTextbox.value=this._sSavedQuery+this._sCurQuery}}else{this._elTextbox.value=this._sCurQuery}this._oCurItem=null;return }if(D==-2){this._toggleContainer(false);return }var C=this._aListItems[D];var A=this._elContent;var B=((YAHOO.util.Dom.getStyle(A,"overflow")=="auto")||(YAHOO.util.Dom.getStyle(A,"overflowY")=="auto"));if(B&&(D>-1)&&(D<this._nDisplayedItems)){if(G==40){if((C.offsetTop+C.offsetHeight)>(A.scrollTop+A.offsetHeight)){A.scrollTop=(C.offsetTop+C.offsetHeight)-A.offsetHeight}else{if((C.offsetTop+C.offsetHeight)<A.scrollTop){A.scrollTop=C.offsetTop}}}else{if(C.offsetTop<A.scrollTop){this._elContent.scrollTop=C.offsetTop}else{if(C.offsetTop>(A.scrollTop+A.offsetHeight)){this._elContent.scrollTop=(C.offsetTop+C.offsetHeight)-A.offsetHeight}}}}this._toggleHighlight(C,"to");this.itemArrowToEvent.fire(this,C);if(this.typeAhead){this._updateValue(C)}}};YAHOO.widget.AutoComplete.prototype._onItemMouseover=function(A,B){if(B.prehighlightClassName){B._togglePrehighlight(this,"mouseover")}else{B._toggleHighlight(this,"to")}B.itemMouseOverEvent.fire(B,this)};YAHOO.widget.AutoComplete.prototype._onItemMouseout=function(A,B){if(B.prehighlightClassName){B._togglePrehighlight(this,"mouseout")}else{B._toggleHighlight(this,"from")}B.itemMouseOutEvent.fire(B,this)};YAHOO.widget.AutoComplete.prototype._onItemMouseclick=function(A,B){B._toggleHighlight(this,"to");B._selectItem(this)};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,B){B._bOverContainer=true};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,B){B._bOverContainer=false;if(B._oCurItem){B._toggleHighlight(B._oCurItem,"to")}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,B){B._elTextbox.focus()};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(A,B){B._toggleContainerHelpers(B._bContainerOpen)};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(A,B){var C=A.keyCode;switch(C){case 9:if((navigator.userAgent.toLowerCase().indexOf("mac")==-1)){if(B._oCurItem){if(B.delimChar&&(B._nKeyCode!=C)){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A)}}B._selectItem(B._oCurItem)}else{B._toggleContainer(false)}}break;case 13:if((navigator.userAgent.toLowerCase().indexOf("mac")==-1)){if(B._oCurItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A)}}B._selectItem(B._oCurItem)}else{B._toggleContainer(false)}}break;case 27:B._toggleContainer(false);return ;case 39:B._jumpSelection();break;case 38:YAHOO.util.Event.stopEvent(A);B._moveSelection(C);break;case 40:YAHOO.util.Event.stopEvent(A);B._moveSelection(C);break;default:break}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(A,B){var C=A.keyCode;if((navigator.userAgent.toLowerCase().indexOf("mac")!=-1)){switch(C){case 9:if(B._oCurItem){if(B.delimChar&&(B._nKeyCode!=C)){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A)}}B._selectItem(B._oCurItem)}else{B._toggleContainer(false)}break;case 13:if(B._oCurItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A)}}B._selectItem(B._oCurItem)}else{B._toggleContainer(false)}break;default:break}}else{if(C==229){B._queryInterval=setInterval(function(){B._onIMEDetected(B)},500)}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(B,D){D._initProps();var E=B.keyCode;D._nKeyCode=E;var C=this.value;if(D._isIgnoreKey(E)||(C.toLowerCase()==D._sCurQuery)){return }else{D._bItemSelected=false;YAHOO.util.Dom.removeClass(D._oCurItem,D.highlightClassName);D._oCurItem=null;D.textboxKeyEvent.fire(D,E)}if(D.queryDelay>0){var A=setTimeout(function(){D._sendQuery(C)},(D.queryDelay*1000));if(D._nDelayID!=-1){clearTimeout(D._nDelayID)}D._nDelayID=A}else{D._sendQuery(C)}};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,B){B._elTextbox.setAttribute("autocomplete","off");B._bFocused=true;if(!B._bItemSelected){B.textboxFocusEvent.fire(B)}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,B){if(!B._bOverContainer||(B._nKeyCode==9)){if(!B._bItemSelected){var C=B._textMatchesOption();if(!B._bContainerOpen||(B._bContainerOpen&&(C===null))){if(B.forceSelection){B._clearSelection()}else{B.unmatchedItemSelectEvent.fire(B)}}else{if(B.forceSelection){B._selectItem(C)}}}if(B._bContainerOpen){B._toggleContainer(false)}B._cancelIntervalDetection(B);B._bFocused=false;B.textboxBlurEvent.fire(B)}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(A,B){if(B&&B._elTextbox&&B.allowBrowserAutocomplete){B._elTextbox.setAttribute("autocomplete","on")}};YAHOO.widget.DataSource=function(){};YAHOO.widget.DataSource.ERROR_DATANULL="Response data was null";YAHOO.widget.DataSource.ERROR_DATAPARSE="Response data could not be parsed";YAHOO.widget.DataSource.prototype.maxCacheEntries=15;YAHOO.widget.DataSource.prototype.queryMatchContains=false;YAHOO.widget.DataSource.prototype.queryMatchSubset=false;YAHOO.widget.DataSource.prototype.queryMatchCase=false;YAHOO.widget.DataSource.prototype.toString=function(){return"DataSource "+this._sName};YAHOO.widget.DataSource.prototype.getResults=function(A,D,B){var C=this._doQueryCache(A,D,B);if(C.length===0){this.queryEvent.fire(this,B,D);this.doQuery(A,D,B)}};YAHOO.widget.DataSource.prototype.doQuery=function(A,C,B){};YAHOO.widget.DataSource.prototype.flushCache=function(){if(this._aCache){this._aCache=[]}if(this._aCacheHelper){this._aCacheHelper=[]}this.cacheFlushEvent.fire(this)};YAHOO.widget.DataSource.prototype.queryEvent=null;YAHOO.widget.DataSource.prototype.cacheQueryEvent=null;YAHOO.widget.DataSource.prototype.getResultsEvent=null;YAHOO.widget.DataSource.prototype.getCachedResultsEvent=null;YAHOO.widget.DataSource.prototype.dataErrorEvent=null;YAHOO.widget.DataSource.prototype.cacheFlushEvent=null;YAHOO.widget.DataSource._nIndex=0;YAHOO.widget.DataSource.prototype._sName=null;YAHOO.widget.DataSource.prototype._aCache=null;YAHOO.widget.DataSource.prototype._init=function(){var A=this.maxCacheEntries;if(!YAHOO.lang.isNumber(A)||(A<0)){A=0}if(A>0&&!this._aCache){this._aCache=[]}this._sName="instance"+YAHOO.widget.DataSource._nIndex;YAHOO.widget.DataSource._nIndex++;this.queryEvent=new YAHOO.util.CustomEvent("query",this);this.cacheQueryEvent=new YAHOO.util.CustomEvent("cacheQuery",this);this.getResultsEvent=new YAHOO.util.CustomEvent("getResults",this);this.getCachedResultsEvent=new YAHOO.util.CustomEvent("getCachedResults",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.cacheFlushEvent=new YAHOO.util.CustomEvent("cacheFlush",this)};YAHOO.widget.DataSource.prototype._addCacheElem=function(B){var A=this._aCache;if(!A||!B||!B.query||!B.results){return }if(A.length>=this.maxCacheEntries){A.shift()}A.push(B)};YAHOO.widget.DataSource.prototype._doQueryCache=function(A,I,N){var H=[];var G=false;var J=this._aCache;var F=(J)?J.length:0;var K=this.queryMatchContains;var D;if((this.maxCacheEntries>0)&&J&&(F>0)){this.cacheQueryEvent.fire(this,N,I);if(!this.queryMatchCase){D=I;I=I.toLowerCase()}for(var P=F-1;P>=0;P--){var E=J[P];var B=E.results;var C=(!this.queryMatchCase)?encodeURIComponent(E.query).toLowerCase():encodeURIComponent(E.query);if(C==I){G=true;H=B;if(P!=F-1){J.splice(P,1);this._addCacheElem(E)}break}else{if(this.queryMatchSubset){for(var O=I.length-1;O>=0;O--){var R=I.substr(0,O);if(C==R){G=true;for(var M=B.length-1;M>=0;M--){var Q=B[M];var L=(this.queryMatchCase)?encodeURIComponent(Q[0]).indexOf(I):encodeURIComponent(Q[0]).toLowerCase().indexOf(I);if((!K&&(L===0))||(K&&(L>-1))){H.unshift(Q)}}E={};E.query=I;E.results=H;this._addCacheElem(E);break}}if(G){break}}}}if(G){this.getCachedResultsEvent.fire(this,N,D,H);A(D,H,N)}}return H};YAHOO.widget.DS_XHR=function(C,A,D){if(D&&(D.constructor==Object)){for(var B in D){this[B]=D[B]}}if(!YAHOO.lang.isArray(A)||!YAHOO.lang.isString(C)){return }this.schema=A;this.scriptURI=C;this._init()};YAHOO.widget.DS_XHR.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_XHR.TYPE_JSON=0;YAHOO.widget.DS_XHR.TYPE_XML=1;YAHOO.widget.DS_XHR.TYPE_FLAT=2;YAHOO.widget.DS_XHR.ERROR_DATAXHR="XHR response failed";YAHOO.widget.DS_XHR.prototype.connMgr=YAHOO.util.Connect;YAHOO.widget.DS_XHR.prototype.connTimeout=0;YAHOO.widget.DS_XHR.prototype.scriptURI=null;YAHOO.widget.DS_XHR.prototype.scriptQueryParam="query";YAHOO.widget.DS_XHR.prototype.scriptQueryAppend="";YAHOO.widget.DS_XHR.prototype.responseType=YAHOO.widget.DS_XHR.TYPE_JSON;YAHOO.widget.DS_XHR.prototype.responseStripAfter="\n<!-";YAHOO.widget.DS_XHR.prototype.doQuery=function(E,G,B){var J=(this.responseType==YAHOO.widget.DS_XHR.TYPE_XML);var D=this.scriptURI+"?"+this.scriptQueryParam+"="+G;if(this.scriptQueryAppend.length>0){D+="&"+this.scriptQueryAppend}var C=null;var F=this;var I=function(K){if(!F._oConn||(K.tId!=F._oConn.tId)){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATANULL);return }for(var N in K){}if(!J){K=K.responseText}else{K=K.responseXML}if(K===null){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATANULL);return }var M=F.parseResponse(G,K,B);var L={};L.query=decodeURIComponent(G);L.results=M;if(M===null){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATAPARSE);M=[]}else{F.getResultsEvent.fire(F,B,G,M);F._addCacheElem(L)}E(G,M,B)};var A=function(K){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DS_XHR.ERROR_DATAXHR);return };var H={success:I,failure:A};if(YAHOO.lang.isNumber(this.connTimeout)&&(this.connTimeout>0)){H.timeout=this.connTimeout}if(this._oConn){this.connMgr.abort(this._oConn)}F._oConn=this.connMgr.asyncRequest("GET",D,H,null)};YAHOO.widget.DS_XHR.prototype.parseResponse=function(sQuery,oResponse,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var nEnd=((this.responseStripAfter!=="")&&(oResponse.indexOf))?oResponse.indexOf(this.responseStripAfter):-1;if(nEnd!=-1){oResponse=oResponse.substring(0,nEnd)}switch(this.responseType){case YAHOO.widget.DS_XHR.TYPE_JSON:var jsonList,jsonObjParsed;if(YAHOO.lang.JSON){jsonObjParsed=YAHOO.lang.JSON.parse(oResponse);if(!jsonObjParsed){bError=true;break}else{try{jsonList=eval("jsonObjParsed."+aSchema[0])}catch(e){bError=true;break}}}else{if(oResponse.parseJSON){jsonObjParsed=oResponse.parseJSON();if(!jsonObjParsed){bError=true}else{try{jsonList=eval("jsonObjParsed."+aSchema[0])}catch(e){bError=true;break}}}else{if(window.JSON){jsonObjParsed=JSON.parse(oResponse);if(!jsonObjParsed){bError=true;break}else{try{jsonList=eval("jsonObjParsed."+aSchema[0])}catch(e){bError=true;break}}}else{try{while(oResponse.substring(0,1)==" "){oResponse=oResponse.substring(1,oResponse.length)}if(oResponse.indexOf("{")<0){bError=true;break}if(oResponse.indexOf("{}")===0){break}var jsonObjRaw=eval("("+oResponse+")");if(!jsonObjRaw){bError=true;break}jsonList=eval("(jsonObjRaw."+aSchema[0]+")")}catch(e){bError=true;break}}}}if(!jsonList){bError=true;break}if(!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList]}for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];if(!dataFieldValue){dataFieldValue=""}aResultItem.unshift(dataFieldValue)}if(aResultItem.length==1){aResultItem.push(jsonResult)}aResults.unshift(aResultItem)}break;case YAHOO.widget.DS_XHR.TYPE_XML:var xmlList=oResponse.getElementsByTagName(aSchema[0]);if(!xmlList){bError=true;break}for(var k=xmlList.length-1;k>=0;k--){var result=xmlList.item(k);var aFieldSet=[];for(var m=aSchema.length-1;m>=1;m--){var sValue=null;var xmlAttr=result.attributes.getNamedItem(aSchema[m]);if(xmlAttr){sValue=xmlAttr.value}else{var xmlNode=result.getElementsByTagName(aSchema[m]);if(xmlNode&&xmlNode.item(0)&&xmlNode.item(0).firstChild){sValue=xmlNode.item(0).firstChild.nodeValue}else{sValue=""}}aFieldSet.unshift(sValue)}aResults.unshift(aFieldSet)}break;case YAHOO.widget.DS_XHR.TYPE_FLAT:if(oResponse.length>0){var newLength=oResponse.length-aSchema[0].length;if(oResponse.substr(newLength)==aSchema[0]){oResponse=oResponse.substr(0,newLength)}if(oResponse.length>0){var aRecords=oResponse.split(aSchema[0]);for(var n=aRecords.length-1;n>=0;n--){if(aRecords[n].length>0){aResults[n]=aRecords[n].split(aSchema[1])}}}}break;default:break}sQuery=null;oResponse=null;oParent=null;if(bError){return null}else{return aResults}};YAHOO.widget.DS_XHR.prototype._oConn=null;YAHOO.widget.DS_ScriptNode=function(D,A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B]}}if(!YAHOO.lang.isArray(A)||!YAHOO.lang.isString(D)){return }this.schema=A;this.scriptURI=D;this._init()};YAHOO.widget.DS_ScriptNode.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_ScriptNode.prototype.getUtility=YAHOO.util.Get;YAHOO.widget.DS_ScriptNode.prototype.scriptURI=null;YAHOO.widget.DS_ScriptNode.prototype.scriptQueryParam="query";YAHOO.widget.DS_ScriptNode.prototype.asyncMode="allowAll";YAHOO.widget.DS_ScriptNode.prototype.scriptCallbackParam="callback";YAHOO.widget.DS_ScriptNode.callbacks=[];YAHOO.widget.DS_ScriptNode._nId=0;YAHOO.widget.DS_ScriptNode._nPending=0;YAHOO.widget.DS_ScriptNode.prototype.doQuery=function(A,F,C){var B=this;if(YAHOO.widget.DS_ScriptNode._nPending===0){YAHOO.widget.DS_ScriptNode.callbacks=[];YAHOO.widget.DS_ScriptNode._nId=0}var E=YAHOO.widget.DS_ScriptNode._nId;YAHOO.widget.DS_ScriptNode._nId++;YAHOO.widget.DS_ScriptNode.callbacks[E]=function(G){if((B.asyncMode!=="ignoreStaleResponses")||(E===YAHOO.widget.DS_ScriptNode.callbacks.length-1)){B.handleResponse(G,A,F,C)}else{}delete YAHOO.widget.DS_ScriptNode.callbacks[E]};YAHOO.widget.DS_ScriptNode._nPending++;var D=this.scriptURI+"&"+this.scriptQueryParam+"="+F+"&"+this.scriptCallbackParam+"=YAHOO.widget.DS_ScriptNode.callbacks["+E+"]";this.getUtility.script(D,{autopurge:true,onsuccess:YAHOO.widget.DS_ScriptNode._bumpPendingDown,onfail:YAHOO.widget.DS_ScriptNode._bumpPendingDown})};YAHOO.widget.DS_ScriptNode.prototype.handleResponse=function(oResponse,oCallbackFn,sQuery,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var jsonList,jsonObjParsed;try{jsonList=eval("(oResponse."+aSchema[0]+")")}catch(e){bError=true}if(!jsonList){bError=true;jsonList=[]}else{if(!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList]}}for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];if(!dataFieldValue){dataFieldValue=""}aResultItem.unshift(dataFieldValue)}if(aResultItem.length==1){aResultItem.push(jsonResult)}aResults.unshift(aResultItem)}if(bError){aResults=null}if(aResults===null){this.dataErrorEvent.fire(this,oParent,sQuery,YAHOO.widget.DataSource.ERROR_DATAPARSE);aResults=[]}else{var resultObj={};resultObj.query=decodeURIComponent(sQuery);resultObj.results=aResults;this._addCacheElem(resultObj);this.getResultsEvent.fire(this,oParent,sQuery,aResults)}oCallbackFn(sQuery,aResults,oParent)};YAHOO.widget.DS_ScriptNode._bumpPendingDown=function(){YAHOO.widget.DS_ScriptNode._nPending--};YAHOO.widget.DS_JSFunction=function(A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B]}}if(!YAHOO.lang.isFunction(A)){return }else{this.dataFunction=A;this._init()}};YAHOO.widget.DS_JSFunction.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSFunction.prototype.dataFunction=null;YAHOO.widget.DS_JSFunction.prototype.doQuery=function(C,F,D){var B=this.dataFunction;var E=[];E=B(F);if(E===null){this.dataErrorEvent.fire(this,D,F,YAHOO.widget.DataSource.ERROR_DATANULL);return }var A={};A.query=decodeURIComponent(F);A.results=E;this._addCacheElem(A);this.getResultsEvent.fire(this,D,F,E);C(F,E,D);return };YAHOO.widget.DS_JSArray=function(A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B]}}if(!YAHOO.lang.isArray(A)){return }else{this.data=A;this._init()}};YAHOO.widget.DS_JSArray.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSArray.prototype.data=null;YAHOO.widget.DS_JSArray.prototype.doQuery=function(E,I,A){var F;var C=this.data;var J=[];var D=false;var B=this.queryMatchContains;if(I){if(!this.queryMatchCase){I=I.toLowerCase()}for(F=C.length-1;F>=0;F--){var H=[];if(YAHOO.lang.isString(C[F])){H[0]=C[F]}else{if(YAHOO.lang.isArray(C[F])){H=C[F]}}if(YAHOO.lang.isString(H[0])){var G=(this.queryMatchCase)?encodeURIComponent(H[0]).indexOf(I):encodeURIComponent(H[0]).toLowerCase().indexOf(I);if((!B&&(G===0))||(B&&(G>-1))){J.unshift(H)}}}}else{for(F=C.length-1;F>=0;F--){if(YAHOO.lang.isString(C[F])){J.unshift([C[F]])}else{if(YAHOO.lang.isArray(C[F])){J.unshift(C[F])}}}}this.getResultsEvent.fire(this,A,I,J);E(I,J,A)};YAHOO.register("autocomplete",YAHOO.widget.AutoComplete,{version:"2.5.2",build:"1076"});(function(){YAHOO.util.Config=function(D){if(D){this.init(D)}if(!D){}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE)},checkNumber:function(D){return(!isNaN(D))},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F)}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner)}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value)}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value}}return D},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value}else{return undefined}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true}}else{return false}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G])}return true}}else{return false}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false}else{if(!B.isUndefined(P)){R.value=P}else{P=R.value}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P])}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break}}}}}return true}else{return false}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D)}else{this.fireEvent(D,E.value)}}},applyConfig:function(E,H){var G,D,F;if(H){F={};for(G in E){if(B.hasOwnProperty(E,G)){F[G.toLowerCase()]=E[G]}}this.initialConfig=F}for(G in E){if(B.hasOwnProperty(E,G)){this.queueProperty(G,E[G])}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D)}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D)}return true}else{return false}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G)}else{return false}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]"}return D},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", "}}return D},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true}}while(G--)}return false};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider)}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,add:function(A,D,C){var F=new Date(A.getTime());switch(D){case this.MONTH:var E=A.getMonth()+C;var B=0;if(E<0){while(E<0){E+=12;B-=1}}else{if(E>11){while(E>11){E-=12;B+=1}}}F.setMonth(E);F.setFullYear(A.getFullYear()+B);break;case this.DAY:F.setDate(A.getDate()+C);break;case this.YEAR:F.setFullYear(A.getFullYear()+C);break;case this.WEEK:F.setDate(A.getDate()+(C*7));break}return F},subtract:function(A,C,B){return this.add(A,C,(B*-1))},before:function(C,B){var A=B.getTime();if(C.getTime()<A){return true}else{return false}},after:function(C,B){var A=B.getTime();if(C.getTime()>A){return true}else{return false}},between:function(B,A,C){if(this.after(B,A)&&this.before(B,C)){return true}else{return false}},getJan1:function(A){return new Date(A,0,1)},getDayOffset:function(B,D){var C=this.getJan1(D);var A=Math.ceil((B.getTime()-C.getTime())/this.ONE_DAY_MS);return A},getWeekNumber:function(C,F){C=this.clearTime(C);var E=new Date(C.getTime()+(4*this.ONE_DAY_MS)-((C.getDay())*this.ONE_DAY_MS));var B=new Date(E.getFullYear(),0,1);var A=((E.getTime()-B.getTime())/this.ONE_DAY_MS)-1;var D=Math.ceil((A)/7);return D},isYearOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getFullYear()!=A.getFullYear()){C=true}return C},isMonthOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getMonth()!=A.getMonth()){C=true}return C},findMonthStart:function(A){var B=new Date(A.getFullYear(),A.getMonth(),1);return B},findMonthEnd:function(B){var D=this.findMonthStart(B);var C=this.add(D,this.MONTH,1);var A=this.subtract(C,this.DAY,1);return A},clearTime:function(A){A.setHours(12,0,0,0);return A}};YAHOO.widget.Calendar=function(C,A,B){this.init(C,A,B)};YAHOO.widget.Calendar.IMG_ROOT=null;YAHOO.widget.Calendar.DATE="D";YAHOO.widget.Calendar.MONTH_DAY="MD";YAHOO.widget.Calendar.WEEKDAY="WD";YAHOO.widget.Calendar.RANGE="R";YAHOO.widget.Calendar.MONTH="M";YAHOO.widget.Calendar.DISPLAY_DAYS=42;YAHOO.widget.Calendar.STOP_RENDER="S";YAHOO.widget.Calendar.SHORT="short";YAHOO.widget.Calendar.LONG="long";YAHOO.widget.Calendar.MEDIUM="medium";YAHOO.widget.Calendar.ONE_CHAR="1char";YAHOO.widget.Calendar._DEFAULT_CONFIG={PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:null},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""}};YAHOO.widget.Calendar._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",RESET:"reset",CLEAR:"clear"};YAHOO.widget.Calendar._STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4"};YAHOO.widget.Calendar.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,_selectedDates:null,domEventMap:null};YAHOO.widget.Calendar.prototype.init=function(C,A,B){this.initEvents();this.today=new Date();YAHOO.widget.DateMath.clearTime(this.today);this.id=C;this.oDomContainer=document.getElementById(A);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(B){this.cfg.applyConfig(B,true)}this.cfg.fireQueue()};YAHOO.widget.Calendar.prototype.configIframe=function(C,B,D){var A=B[0];if(!this.parent){if(YAHOO.util.Dom.inDocument(this.oDomContainer)){if(A){var E=YAHOO.util.Dom.getStyle(this.oDomContainer,"position");if(E=="absolute"||E=="relative"){if(!YAHOO.util.Dom.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){YAHOO.util.Dom.addClass(this.iframe,"fixedsize")}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild)}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null}}}}};YAHOO.widget.Calendar.prototype.configTitle=function(B,A,C){var E=A[0],F;if(E){this.createTitleBar(E)}else{var D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);if(!D){this.removeTitleBar()}else{this.createTitleBar("&#160;")}}};YAHOO.widget.Calendar.prototype.configClose=function(B,A,C){var E=A[0],D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);if(E){if(!D){this.createTitleBar("&#160;")}this.createCloseButton()}else{this.removeCloseButton();if(!D){this.removeTitleBar()}}};YAHOO.widget.Calendar.prototype.initEvents=function(){var A=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(A.BEFORE_SELECT);this.selectEvent=new YAHOO.util.CustomEvent(A.SELECT);this.beforeDeselectEvent=new YAHOO.util.CustomEvent(A.BEFORE_DESELECT);this.deselectEvent=new YAHOO.util.CustomEvent(A.DESELECT);this.changePageEvent=new YAHOO.util.CustomEvent(A.CHANGE_PAGE);this.beforeRenderEvent=new YAHOO.util.CustomEvent(A.BEFORE_RENDER);this.renderEvent=new YAHOO.util.CustomEvent(A.RENDER);this.resetEvent=new YAHOO.util.CustomEvent(A.RESET);this.clearEvent=new YAHOO.util.CustomEvent(A.CLEAR);this.beforeSelectEvent.subscribe(this.onBeforeSelect,this,true);this.selectEvent.subscribe(this.onSelect,this,true);this.beforeDeselectEvent.subscribe(this.onBeforeDeselect,this,true);this.deselectEvent.subscribe(this.onDeselect,this,true);this.changePageEvent.subscribe(this.onChangePage,this,true);this.renderEvent.subscribe(this.onRender,this,true);this.resetEvent.subscribe(this.onReset,this,true);this.clearEvent.subscribe(this.onClear,this,true)};YAHOO.widget.Calendar.prototype.doSelectCell=function(G,A){var L,F,I,C;var H=YAHOO.util.Event.getTarget(G);var B=H.tagName.toLowerCase();var E=false;while(B!="td"&&!YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTABLE)){if(!E&&B=="a"&&YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTOR)){E=true}H=H.parentNode;B=H.tagName.toLowerCase();if(B=="html"){return }}if(E){YAHOO.util.Event.preventDefault(G)}L=H;if(YAHOO.util.Dom.hasClass(L,A.Style.CSS_CELL_SELECTABLE)){F=L.id.split("cell")[1];I=A.cellDates[F];C=new Date(I[0],I[1]-1,I[2]);var K;if(A.Options.MULTI_SELECT){K=L.getElementsByTagName("a")[0];if(K){K.blur()}var D=A.cellDates[F];var J=A._indexOfSelectedFieldArray(D);if(J>-1){A.deselectCell(F)}else{A.selectCell(F)}}else{K=L.getElementsByTagName("a")[0];if(K){K.blur()}A.selectCell(F)}}};YAHOO.widget.Calendar.prototype.doCellMouseOver=function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C)}else{A=this}while(A.tagName.toLowerCase()!="td"){A=A.parentNode;if(A.tagName.toLowerCase()=="html"){return }}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.addClass(A,B.Style.CSS_CELL_HOVER)}};YAHOO.widget.Calendar.prototype.doCellMouseOut=function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C)}else{A=this}while(A.tagName.toLowerCase()!="td"){A=A.parentNode;if(A.tagName.toLowerCase()=="html"){return }}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.removeClass(A,B.Style.CSS_CELL_HOVER)}};YAHOO.widget.Calendar.prototype.setupConfig=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.configMinDate});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.configMaxDate});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.configOptions,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.configOptions});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.configOptions});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.configLocale});var B=function(){this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key)};this.cfg.subscribeToConfigEvent(A.START_WEEKDAY.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_LONG.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_1CHAR.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_MEDIUM.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_LONG.key,B,this,true);this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale})};YAHOO.widget.Calendar.prototype.configPageDate=function(B,A,C){this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key,this._parsePageDate(A[0]),true)};YAHOO.widget.Calendar.prototype.configMinDate=function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key,new Date(D[0],(D[1]-1),D[2]))}};YAHOO.widget.Calendar.prototype.configMaxDate=function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key,new Date(D[0],(D[1]-1),D[2]))}};YAHOO.widget.Calendar.prototype.configSelected=function(C,A,E){var B=A[0];var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;if(B){if(YAHOO.lang.isString(B)){this.cfg.setProperty(D,this._parseDates(B),true)}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(D)}};YAHOO.widget.Calendar.prototype.configOptions=function(B,A,C){this.Options[B.toUpperCase()]=A[0]};YAHOO.widget.Calendar.prototype.configLocale=function(C,B,D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.Locale[C.toUpperCase()]=B[0];this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key)};YAHOO.widget.Calendar.prototype.configLocaleValues=function(D,C,E){var B=YAHOO.widget.Calendar._DEFAULT_CONFIG;D=D.toLowerCase();var G=C[0];switch(D){case B.LOCALE_MONTHS.key:switch(G){case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_SHORT.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_LONG.key).concat();break}break;case B.LOCALE_WEEKDAYS.key:switch(G){case YAHOO.widget.Calendar.ONE_CHAR:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_1CHAR.key).concat();break;case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_SHORT.key).concat();break;case YAHOO.widget.Calendar.MEDIUM:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_MEDIUM.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_LONG.key).concat();break}var F=this.cfg.getProperty(B.START_WEEKDAY.key);if(F>0){for(var A=0;A<F;++A){this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift())}}break}};YAHOO.widget.Calendar.prototype.initStyles=function(){var A=YAHOO.widget.Calendar._STYLES;this.Style={CSS_ROW_HEADER:A.CSS_ROW_HEADER,CSS_ROW_FOOTER:A.CSS_ROW_FOOTER,CSS_CELL:A.CSS_CELL,CSS_CELL_SELECTOR:A.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:A.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:A.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:A.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:A.CSS_CELL_TODAY,CSS_CELL_OOM:A.CSS_CELL_OOM,CSS_CELL_OOB:A.CSS_CELL_OOB,CSS_HEADER:A.CSS_HEADER,CSS_HEADER_TEXT:A.CSS_HEADER_TEXT,CSS_BODY:A.CSS_BODY,CSS_WEEKDAY_CELL:A.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:A.CSS_WEEKDAY_ROW,CSS_FOOTER:A.CSS_FOOTER,CSS_CALENDAR:A.CSS_CALENDAR,CSS_SINGLE:A.CSS_SINGLE,CSS_CONTAINER:A.CSS_CONTAINER,CSS_NAV_LEFT:A.CSS_NAV_LEFT,CSS_NAV_RIGHT:A.CSS_NAV_RIGHT,CSS_CLOSE:A.CSS_CLOSE,CSS_CELL_TOP:A.CSS_CELL_TOP,CSS_CELL_LEFT:A.CSS_CELL_LEFT,CSS_CELL_RIGHT:A.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:A.CSS_CELL_BOTTOM,CSS_CELL_HOVER:A.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:A.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:A.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:A.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:A.CSS_CELL_HIGHLIGHT4}};YAHOO.widget.Calendar.prototype.buildMonthLabel=function(){var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);var C=this.Locale.LOCALE_MONTHS[A.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX;var B=A.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return B+C}else{return C+B}};YAHOO.widget.Calendar.prototype.buildDayLabel=function(A){return A.getDate()};YAHOO.widget.Calendar.prototype.createTitleBar=function(A){var B=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");B.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;B.innerHTML=A;this.oDomContainer.insertBefore(B,this.oDomContainer.firstChild);YAHOO.util.Dom.addClass(this.oDomContainer,"withtitle");return B};YAHOO.widget.Calendar.prototype.removeTitleBar=function(){var A=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A)}YAHOO.util.Dom.removeClass(this.oDomContainer,"withtitle")};YAHOO.widget.Calendar.prototype.createCloseButton=function(){var D=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,F="us/my/bn/x_d.gif";var E=D.getElementsByClassName("link-close","a",this.oDomContainer)[0];if(!E){E=document.createElement("a");A.addListener(E,"click",function(H,G){G.hide();A.preventDefault(H)},this)}E.href="#";E.className="link-close";if(YAHOO.widget.Calendar.IMG_ROOT!==null){var B=D.getElementsByClassName(C,"img",E)[0]||document.createElement("img");B.src=YAHOO.widget.Calendar.IMG_ROOT+F;B.className=C;E.appendChild(B)}else{E.innerHTML='<span class="'+C+" "+this.Style.CSS_CLOSE+'"></span>'}this.oDomContainer.appendChild(E);return E};YAHOO.widget.Calendar.prototype.removeCloseButton=function(){var A=YAHOO.util.Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A)}};YAHOO.widget.Calendar.prototype.renderHeader=function(E){var H=7;var F="us/tr/callt.gif";var G="us/tr/calrt.gif";var L=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(this.cfg.getProperty(L.SHOW_WEEK_HEADER.key)){H+=1}if(this.cfg.getProperty(L.SHOW_WEEK_FOOTER.key)){H+=1}E[E.length]="<thead>";E[E.length]="<tr>";E[E.length]='<th colspan="'+H+'" class="'+this.Style.CSS_HEADER_TEXT+'">';E[E.length]='<div class="'+this.Style.CSS_HEADER+'">';var J,K=false;if(this.parent){if(this.index===0){J=true}if(this.index==(this.parent.cfg.getProperty("pages")-1)){K=true}}else{J=true;K=true}var B=this.parent||this;if(J){var A=this.cfg.getProperty(L.NAV_ARROW_LEFT.key);if(A===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){A=YAHOO.widget.Calendar.IMG_ROOT+F}var C=(A===null)?"":' style="background-image:url('+A+')"';E[E.length]='<a class="'+this.Style.CSS_NAV_LEFT+'"'+C+" >&#160;</a>"}E[E.length]=this.buildMonthLabel();if(K){var D=this.cfg.getProperty(L.NAV_ARROW_RIGHT.key);if(D===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){D=YAHOO.widget.Calendar.IMG_ROOT+G}var I=(D===null)?"":' style="background-image:url('+D+')"';E[E.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+I+" >&#160;</a>"}E[E.length]="</div>\n</th>\n</tr>";if(this.cfg.getProperty(L.SHOW_WEEKDAYS.key)){E=this.buildWeekdays(E)}E[E.length]="</thead>";return E};YAHOO.widget.Calendar.prototype.buildWeekdays=function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;C[C.length]='<tr class="'+this.Style.CSS_WEEKDAY_ROW+'">';if(this.cfg.getProperty(A.SHOW_WEEK_HEADER.key)){C[C.length]="<th>&#160;</th>"}for(var B=0;B<this.Locale.LOCALE_WEEKDAYS.length;++B){C[C.length]='<th class="calweekdaycell">'+this.Locale.LOCALE_WEEKDAYS[B]+"</th>"}if(this.cfg.getProperty(A.SHOW_WEEK_FOOTER.key)){C[C.length]="<th>&#160;</th>"}C[C.length]="</tr>";return C};YAHOO.widget.Calendar.prototype.renderBody=function(f,c){var v=YAHOO.widget.Calendar._DEFAULT_CONFIG;var AJ=this.cfg.getProperty(v.START_WEEKDAY.key);this.preMonthDays=f.getDay();if(AJ>0){this.preMonthDays-=AJ}if(this.preMonthDays<0){this.preMonthDays+=7}this.monthDays=YAHOO.widget.DateMath.findMonthEnd(f).getDate();this.postMonthDays=YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;f=YAHOO.widget.DateMath.subtract(f,YAHOO.widget.DateMath.DAY,this.preMonthDays);var Q,H;var G="w";var W="_cell";var U="wd";var t="d";var I;var o;var O=this.today.getFullYear();var q=this.today.getMonth();var D=this.today.getDate();var AA=this.cfg.getProperty(v.PAGEDATE.key);var C=this.cfg.getProperty(v.HIDE_BLANK_WEEKS.key);var Z=this.cfg.getProperty(v.SHOW_WEEK_FOOTER.key);var T=this.cfg.getProperty(v.SHOW_WEEK_HEADER.key);var M=this.cfg.getProperty(v.MINDATE.key);var S=this.cfg.getProperty(v.MAXDATE.key);if(M){M=YAHOO.widget.DateMath.clearTime(M)}if(S){S=YAHOO.widget.DateMath.clearTime(S)}c[c.length]='<tbody class="m'+(AA.getMonth()+1)+" "+this.Style.CSS_BODY+'">';var AH=0;var J=document.createElement("div");var e=document.createElement("td");J.appendChild(e);var AG=new Date(AA.getFullYear(),0,1);var z=this.parent||this;for(var AC=0;AC<6;AC++){Q=YAHOO.widget.DateMath.getWeekNumber(f,AA.getFullYear(),AJ);H=G+Q;if(AC!==0&&C===true&&f.getMonth()!=AA.getMonth()){break}else{c[c.length]='<tr class="'+H+'">';if(T){c=this.renderRowHeader(Q,c)}for(var AI=0;AI<7;AI++){I=[];o=null;this.clearElement(e);e.className=this.Style.CSS_CELL;e.id=this.id+W+AH;if(f.getDate()==D&&f.getMonth()==q&&f.getFullYear()==O){I[I.length]=z.renderCellStyleToday}var R=[f.getFullYear(),f.getMonth()+1,f.getDate()];this.cellDates[this.cellDates.length]=R;if(f.getMonth()!=AA.getMonth()){I[I.length]=z.renderCellNotThisMonth}else{YAHOO.util.Dom.addClass(e,U+f.getDay());YAHOO.util.Dom.addClass(e,t+f.getDate());for(var AB=0;AB<this.renderStack.length;++AB){var u=this.renderStack[AB];var AK=u[0];var B;var V;var F;switch(AK){case YAHOO.widget.Calendar.DATE:B=u[1][1];V=u[1][2];F=u[1][0];if(f.getMonth()+1==B&&f.getDate()==V&&f.getFullYear()==F){o=u[2];this.renderStack.splice(AB,1)}break;case YAHOO.widget.Calendar.MONTH_DAY:B=u[1][0];V=u[1][1];if(f.getMonth()+1==B&&f.getDate()==V){o=u[2];this.renderStack.splice(AB,1)}break;case YAHOO.widget.Calendar.RANGE:var Y=u[1][0];var X=u[1][1];var g=Y[1];var L=Y[2];var P=Y[0];var AF=new Date(P,g-1,L);var E=X[1];var n=X[2];var A=X[0];var AE=new Date(A,E-1,n);if(f.getTime()>=AF.getTime()&&f.getTime()<=AE.getTime()){o=u[2];if(f.getTime()==AE.getTime()){this.renderStack.splice(AB,1)}}break;case YAHOO.widget.Calendar.WEEKDAY:var K=u[1][0];if(f.getDay()+1==K){o=u[2]}break;case YAHOO.widget.Calendar.MONTH:B=u[1][0];if(f.getMonth()+1==B){o=u[2]}break}if(o){I[I.length]=o}}}if(this._indexOfSelectedFieldArray(R)>-1){I[I.length]=z.renderCellStyleSelected}if((M&&(f.getTime()<M.getTime()))||(S&&(f.getTime()>S.getTime()))){I[I.length]=z.renderOutOfBoundsDate}else{I[I.length]=z.styleCellDefault;I[I.length]=z.renderCellDefault}for(var y=0;y<I.length;++y){if(I[y].call(z,f,e)==YAHOO.widget.Calendar.STOP_RENDER){break}}f.setTime(f.getTime()+YAHOO.widget.DateMath.ONE_DAY_MS);if(AH>=0&&AH<=6){YAHOO.util.Dom.addClass(e,this.Style.CSS_CELL_TOP)}if((AH%7)===0){YAHOO.util.Dom.addClass(e,this.Style.CSS_CELL_LEFT)}if(((AH+1)%7)===0){YAHOO.util.Dom.addClass(e,this.Style.CSS_CELL_RIGHT)}var m=this.postMonthDays;if(C&&m>=7){var N=Math.floor(m/7);for(var AD=0;AD<N;++AD){m-=7}}if(AH>=((this.preMonthDays+m+this.monthDays)-7)){YAHOO.util.Dom.addClass(e,this.Style.CSS_CELL_BOTTOM)}c[c.length]=J.innerHTML;AH++}if(Z){c=this.renderRowFooter(Q,c)}c[c.length]="</tr>"}}c[c.length]="</tbody>";return c};YAHOO.widget.Calendar.prototype.renderFooter=function(A){return A};YAHOO.widget.Calendar.prototype.render=function(){this.beforeRenderEvent.fire();var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var C=YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(A.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;YAHOO.util.Event.purgeElement(this.oDomContainer,true);var B=[];B[B.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALENDAR+" y"+C.getFullYear()+'" id="'+this.id+'">';B=this.renderHeader(B);B=this.renderBody(C,B);B=this.renderFooter(B);B[B.length]="</table>";this.oDomContainer.innerHTML=B.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElementsByTagName("td");this.cfg.refireEvent(A.TITLE.key);this.cfg.refireEvent(A.CLOSE.key);this.cfg.refireEvent(A.IFRAME.key);this.renderEvent.fire()};YAHOO.widget.Calendar.prototype.applyListeners=function(){var M=this.oDomContainer;var B=this.parent||this;var I="a";var E="mousedown";var J=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT,I,M);var C=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT,I,M);var D=M.getElementsByTagName("a");if(J&&J.length>0){for(var H=0,G=D.length;H<G;H++){if(D[H].className==this.Style.CSS_NAV_LEFT){this.linkLeft=D[H]}}YAHOO.util.Event.addListener(this.linkLeft,E,B.previousMonth,B,true)}if(C&&C.length>0){for(var H=0,G=D.length;H<G;H++){if(D[H].className==this.Style.CSS_NAV_RIGHT){this.linkRight=D[H]}}YAHOO.util.Event.addListener(this.linkRight,E,B.nextMonth,B,true)}if(this.domEventMap){var F,A;for(var O in this.domEventMap){if(YAHOO.lang.hasOwnProperty(this.domEventMap,O)){var K=this.domEventMap[O];if(!(K instanceof Array)){K=[K]}for(var H=0;H<K.length;H++){var N=K[H];A=YAHOO.util.Dom.getElementsByClassName(O,N.tag,this.oDomContainer);for(var L=0;L<A.length;L++){F=A[L];YAHOO.util.Event.addListener(F,N.event,N.handler,N.scope,N.correct)}}}}}YAHOO.util.Event.addListener(this.oDomContainer,"click",this.doSelectCell,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this)};YAHOO.widget.Calendar.prototype.getDateByCellId=function(B){var A=this.getDateFieldsByCellId(B);return new Date(A[0],A[1]-1,A[2])};YAHOO.widget.Calendar.prototype.getDateFieldsByCellId=function(A){A=A.toLowerCase().split("_cell")[1];A=parseInt(A,10);return this.cellDates[A]};YAHOO.widget.Calendar.prototype.renderOutOfBoundsDate=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOB);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER};YAHOO.widget.Calendar.prototype.renderRowHeader=function(B,A){A[A.length]='<th class="calrowhead">'+B+"</th>";return A};YAHOO.widget.Calendar.prototype.renderRowFooter=function(B,A){A[A.length]='<th class="calrowfoot">'+B+"</th>";return A};YAHOO.widget.Calendar.prototype.renderCellDefault=function(B,A){A.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(B)+"</a>"};YAHOO.widget.Calendar.prototype.styleCellDefault=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTABLE)};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT1)};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT2)};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT3)};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT4)};YAHOO.widget.Calendar.prototype.renderCellStyleToday=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_TODAY)};YAHOO.widget.Calendar.prototype.renderCellStyleSelected=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTED)};YAHOO.widget.Calendar.prototype.renderCellNotThisMonth=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOM);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER};YAHOO.widget.Calendar.prototype.renderBodyCellRestricted=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL);YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_RESTRICTED);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER};YAHOO.widget.Calendar.prototype.addMonths=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.subtractMonths=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.addYears=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.subtractYears=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.nextMonth=function(){this.addMonths(1)};YAHOO.widget.Calendar.prototype.previousMonth=function(){this.subtractMonths(1)};YAHOO.widget.Calendar.prototype.nextYear=function(){this.addYears(1)};YAHOO.widget.Calendar.prototype.previousYear=function(){this.subtractYears(1)};YAHOO.widget.Calendar.prototype.reset=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.resetProperty(A.SELECTED.key);this.cfg.resetProperty(A.PAGEDATE.key);this.resetEvent.fire()};YAHOO.widget.Calendar.prototype.clear=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.setProperty(A.SELECTED.key,[]);this.cfg.setProperty(A.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire()};YAHOO.widget.Calendar.prototype.select=function(C){var F=this._toFieldArray(C);var B=[];var E=[];var G=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var A=0;A<F.length;++A){var D=F[A];if(!this.isDateOOB(this._toDate(D))){if(B.length===0){this.beforeSelectEvent.fire();E=this.cfg.getProperty(G)}B.push(D);if(this._indexOfSelectedFieldArray(D)==-1){E[E.length]=D}}}if(B.length>0){if(this.parent){this.parent.cfg.setProperty(G,E)}else{this.cfg.setProperty(G,E)}this.selectEvent.fire(B)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype.selectCell=function(D){var B=this.cells[D];var H=this.cellDates[D];var G=this._toDate(H);var C=YAHOO.util.Dom.hasClass(B,this.Style.CSS_CELL_SELECTABLE);if(C){this.beforeSelectEvent.fire();var F=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var E=this.cfg.getProperty(F);var A=H.concat();if(this._indexOfSelectedFieldArray(A)==-1){E[E.length]=A}if(this.parent){this.parent.cfg.setProperty(F,E)}else{this.cfg.setProperty(F,E)}this.renderCellStyleSelected(G,B);this.selectEvent.fire([A]);this.doCellMouseOut.call(B,null,this)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype.deselect=function(E){var A=this._toFieldArray(E);var D=[];var G=[];var H=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var B=0;B<A.length;++B){var F=A[B];if(!this.isDateOOB(this._toDate(F))){if(D.length===0){this.beforeDeselectEvent.fire();G=this.cfg.getProperty(H)}D.push(F);var C=this._indexOfSelectedFieldArray(F);if(C!=-1){G.splice(C,1)}}}if(D.length>0){if(this.parent){this.parent.cfg.setProperty(H,G)}else{this.cfg.setProperty(H,G)}this.deselectEvent.fire(D)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype.deselectCell=function(E){var H=this.cells[E];var B=this.cellDates[E];var F=this._indexOfSelectedFieldArray(B);var G=YAHOO.util.Dom.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(G){this.beforeDeselectEvent.fire();var I=YAHOO.widget.Calendar._DEFAULT_CONFIG;var D=this.cfg.getProperty(I.SELECTED.key);var C=this._toDate(B);var A=B.concat();if(F>-1){if(this.cfg.getProperty(I.PAGEDATE.key).getMonth()==C.getMonth()&&this.cfg.getProperty(I.PAGEDATE.key).getFullYear()==C.getFullYear()){YAHOO.util.Dom.removeClass(H,this.Style.CSS_CELL_SELECTED)}D.splice(F,1)}if(this.parent){this.parent.cfg.setProperty(I.SELECTED.key,D)}else{this.cfg.setProperty(I.SELECTED.key,D)}this.deselectEvent.fire(A)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype.deselectAll=function(){this.beforeDeselectEvent.fire();var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var A=this.cfg.getProperty(D);var B=A.length;var C=A.concat();if(this.parent){this.parent.cfg.setProperty(D,[])}else{this.cfg.setProperty(D,[])}if(B>0){this.deselectEvent.fire(C)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype._toFieldArray=function(B){var A=[];if(B instanceof Date){A=[[B.getFullYear(),B.getMonth()+1,B.getDate()]]}else{if(YAHOO.lang.isString(B)){A=this._parseDates(B)}else{if(YAHOO.lang.isArray(B)){for(var C=0;C<B.length;++C){var D=B[C];A[A.length]=[D.getFullYear(),D.getMonth()+1,D.getDate()]}}}}return A};YAHOO.widget.Calendar.prototype._toDate=function(A){if(A instanceof Date){return A}else{return new Date(A[0],A[1]-1,A[2])}};YAHOO.widget.Calendar.prototype._fieldArraysAreEqual=function(C,B){var A=false;if(C[0]==B[0]&&C[1]==B[1]&&C[2]==B[2]){A=true}return A};YAHOO.widget.Calendar.prototype._indexOfSelectedFieldArray=function(E){var D=-1;var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var C=0;C<A.length;++C){var B=A[C];if(E[0]==B[0]&&E[1]==B[1]&&E[2]==B[2]){D=C;break}}return D};YAHOO.widget.Calendar.prototype.isDateOOM=function(A){return(A.getMonth()!=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth())};YAHOO.widget.Calendar.prototype.isDateOOB=function(D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var E=this.cfg.getProperty(A.MINDATE.key);var F=this.cfg.getProperty(A.MAXDATE.key);var C=YAHOO.widget.DateMath;if(E){E=C.clearTime(E)}if(F){F=C.clearTime(F)}var B=new Date(D.getTime());B=C.clearTime(B);return((E&&B.getTime()<E.getTime())||(F&&B.getTime()>F.getTime()))};YAHOO.widget.Calendar.prototype._parsePageDate=function(B){var E;var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(B){if(B instanceof Date){E=YAHOO.widget.DateMath.findMonthStart(B)}else{var F,D,C;C=B.split(this.cfg.getProperty(A.DATE_FIELD_DELIMITER.key));F=parseInt(C[this.cfg.getProperty(A.MY_MONTH_POSITION.key)-1],10)-1;D=parseInt(C[this.cfg.getProperty(A.MY_YEAR_POSITION.key)-1],10);E=new Date(D,F,1)}}else{E=new Date(this.today.getFullYear(),this.today.getMonth(),1)}return E};YAHOO.widget.Calendar.prototype.onBeforeSelect=function(){if(this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll()}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll()}}};YAHOO.widget.Calendar.prototype.onSelect=function(A){};YAHOO.widget.Calendar.prototype.onBeforeDeselect=function(){};YAHOO.widget.Calendar.prototype.onDeselect=function(A){};YAHOO.widget.Calendar.prototype.onChangePage=function(){this.render()};YAHOO.widget.Calendar.prototype.onRender=function(){};YAHOO.widget.Calendar.prototype.onReset=function(){this.render()};YAHOO.widget.Calendar.prototype.onClear=function(){this.render()};YAHOO.widget.Calendar.prototype.validate=function(){return true};YAHOO.widget.Calendar.prototype._parseDate=function(C){var D=C.split(this.Locale.DATE_FIELD_DELIMITER);var A;if(D.length==2){A=[D[this.Locale.MD_MONTH_POSITION-1],D[this.Locale.MD_DAY_POSITION-1]];A.type=YAHOO.widget.Calendar.MONTH_DAY}else{A=[D[this.Locale.MDY_YEAR_POSITION-1],D[this.Locale.MDY_MONTH_POSITION-1],D[this.Locale.MDY_DAY_POSITION-1]];A.type=YAHOO.widget.Calendar.DATE}for(var B=0;B<A.length;B++){A[B]=parseInt(A[B],10)}return A};YAHOO.widget.Calendar.prototype._parseDates=function(B){var I=[];var H=B.split(this.Locale.DATE_DELIMITER);for(var G=0;G<H.length;++G){var F=H[G];if(F.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var A=F.split(this.Locale.DATE_RANGE_DELIMITER);var E=this._parseDate(A[0]);var J=this._parseDate(A[1]);var D=this._parseRange(E,J);I=I.concat(D)}else{var C=this._parseDate(F);I.push(C)}}return I};YAHOO.widget.Calendar.prototype._parseRange=function(A,F){var E=new Date(A[0],A[1]-1,A[2]);var B=YAHOO.widget.DateMath.add(new Date(A[0],A[1]-1,A[2]),YAHOO.widget.DateMath.DAY,1);var D=new Date(F[0],F[1]-1,F[2]);var C=[];C.push(A);while(B.getTime()<=D.getTime()){C.push([B.getFullYear(),B.getMonth()+1,B.getDate()]);B=YAHOO.widget.DateMath.add(B,YAHOO.widget.DateMath.DAY,1)}return C};YAHOO.widget.Calendar.prototype.resetRenderers=function(){this.renderStack=this._renderStack.concat()};YAHOO.widget.Calendar.prototype.clearElement=function(A){A.innerHTML="&#160;";A.className=""};YAHOO.widget.Calendar.prototype.addRenderer=function(A,B){var D=this._parseDates(A);for(var C=0;C<D.length;++C){var E=D[C];if(E.length==2){if(E[0] instanceof Array){this._addRenderer(YAHOO.widget.Calendar.RANGE,E,B)}else{this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,E,B)}}else{if(E.length==3){this._addRenderer(YAHOO.widget.Calendar.DATE,E,B)}}}};YAHOO.widget.Calendar.prototype._addRenderer=function(B,C,A){var D=[B,C,A];this.renderStack.unshift(D);this._renderStack=this.renderStack.concat()};YAHOO.widget.Calendar.prototype.addMonthRenderer=function(B,A){this._addRenderer(YAHOO.widget.Calendar.MONTH,[B],A)};YAHOO.widget.Calendar.prototype.addWeekdayRenderer=function(B,A){this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[B],A)};YAHOO.widget.Calendar.prototype.clearAllBodyCellStyles=function(A){for(var B=0;B<this.cells.length;++B){YAHOO.util.Dom.removeClass(this.cells[B],A)}};YAHOO.widget.Calendar.prototype.setMonth=function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var B=this.cfg.getProperty(A);B.setMonth(parseInt(C,10));this.cfg.setProperty(A,B)};YAHOO.widget.Calendar.prototype.setYear=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var C=this.cfg.getProperty(A);C.setFullYear(parseInt(B,10));this.cfg.setProperty(A,C)};YAHOO.widget.Calendar.prototype.getSelectedDates=function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=new Date(D[0],D[1]-1,D[2]);C.push(A)}C.sort(function(G,F){return G-F});return C};YAHOO.widget.Calendar.prototype.hide=function(){this.oDomContainer.style.display="none"};YAHOO.widget.Calendar.prototype.show=function(){this.oDomContainer.style.display="block"};YAHOO.widget.Calendar.prototype.browser=function(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("opera")!=-1){return"opera"}else{if(A.indexOf("msie 7")!=-1){return"ie7"}else{if(A.indexOf("msie")!=-1){return"ie"}else{if(A.indexOf("safari")!=-1){return"safari"}else{if(A.indexOf("gecko")!=-1){return"gecko"}else{return false}}}}}}();YAHOO.widget.Calendar.prototype.toString=function(){return"Calendar "+this.id};YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar;YAHOO.widget.CalendarGroup=function(C,A,B){if(arguments.length>0){this.init(C,A,B)}};YAHOO.widget.CalendarGroup.prototype.init=function(C,A,B){this.initEvents();this.initStyles();this.pages=[];this.id=C;this.containerId=A;this.oDomContainer=document.getElementById(A);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(B){this.cfg.applyConfig(B,true)}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true)}};YAHOO.widget.CalendarGroup.prototype.setupConfig=function(){var A=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGES.key,{value:A.PAGES.value,validator:this.cfg.checkNumber,handler:this.configPages});this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.delegateConfig});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig})};YAHOO.widget.CalendarGroup.prototype.initEvents=function(){var C=this;var E="Event";var B=function(G,J,F){for(var I=0;I<C.pages.length;++I){var H=C.pages[I];H[this.type+E].subscribe(G,J,F)}};var A=function(F,I){for(var H=0;H<C.pages.length;++H){var G=C.pages[H];G[this.type+E].unsubscribe(F,I)}};var D=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(D.BEFORE_SELECT);this.beforeSelectEvent.subscribe=B;this.beforeSelectEvent.unsubscribe=A;this.selectEvent=new YAHOO.util.CustomEvent(D.SELECT);this.selectEvent.subscribe=B;this.selectEvent.unsubscribe=A;this.beforeDeselectEvent=new YAHOO.util.CustomEvent(D.BEFORE_DESELECT);this.beforeDeselectEvent.subscribe=B;this.beforeDeselectEvent.unsubscribe=A;this.deselectEvent=new YAHOO.util.CustomEvent(D.DESELECT);this.deselectEvent.subscribe=B;this.deselectEvent.unsubscribe=A;this.changePageEvent=new YAHOO.util.CustomEvent(D.CHANGE_PAGE);this.changePageEvent.subscribe=B;this.changePageEvent.unsubscribe=A;this.beforeRenderEvent=new YAHOO.util.CustomEvent(D.BEFORE_RENDER);this.beforeRenderEvent.subscribe=B;this.beforeRenderEvent.unsubscribe=A;this.renderEvent=new YAHOO.util.CustomEvent(D.RENDER);this.renderEvent.subscribe=B;this.renderEvent.unsubscribe=A;this.resetEvent=new YAHOO.util.CustomEvent(D.RESET);this.resetEvent.subscribe=B;this.resetEvent.unsubscribe=A;this.clearEvent=new YAHOO.util.CustomEvent(D.CLEAR);this.clearEvent.subscribe=B;this.clearEvent.unsubscribe=A};YAHOO.widget.CalendarGroup.prototype.configPages=function(K,J,G){var E=J[0];var C=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;var O="_";var L="groupcal";var N="first-of-type";var D="last-of-type";for(var B=0;B<E;++B){var M=this.id+O+B;var I=this.containerId+O+B;var H=this.cfg.getConfig();H.close=false;H.title=false;var A=this.constructChild(M,I,H);var F=A.cfg.getProperty(C);this._setMonthOnDate(F,F.getMonth()+B);A.cfg.setProperty(C,F);YAHOO.util.Dom.removeClass(A.oDomContainer,this.Style.CSS_SINGLE);YAHOO.util.Dom.addClass(A.oDomContainer,L);if(B===0){YAHOO.util.Dom.addClass(A.oDomContainer,N)}if(B==(E-1)){YAHOO.util.Dom.addClass(A.oDomContainer,D)}A.parent=this;A.index=B;this.pages[this.pages.length]=A}};YAHOO.widget.CalendarGroup.prototype.configPageDate=function(H,G,E){var C=G[0];var F;var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var B=0;B<this.pages.length;++B){var A=this.pages[B];if(B===0){F=A._parsePageDate(C);A.cfg.setProperty(D,F)}else{var I=new Date(F);this._setMonthOnDate(I,I.getMonth()+B);A.cfg.setProperty(D,I)}}};YAHOO.widget.CalendarGroup.prototype.configSelected=function(C,A,E){var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;this.delegateConfig(C,A,E);var B=(this.pages.length>0)?this.pages[0].cfg.getProperty(D):[];this.cfg.setProperty(D,B,true)};YAHOO.widget.CalendarGroup.prototype.delegateConfig=function(B,A,E){var F=A[0];var D;for(var C=0;C<this.pages.length;C++){D=this.pages[C];D.cfg.setProperty(B,F)}};YAHOO.widget.CalendarGroup.prototype.setChildFunction=function(D,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var C=0;C<A;++C){this.pages[C][D]=B}};YAHOO.widget.CalendarGroup.prototype.callChildFunction=function(F,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var E=0;E<A;++E){var D=this.pages[E];if(D[F]){var C=D[F];C.call(D,B)}}};YAHOO.widget.CalendarGroup.prototype.constructChild=function(D,B,C){var A=document.getElementById(B);if(!A){A=document.createElement("div");A.id=B;this.oDomContainer.appendChild(A)}return new YAHOO.widget.Calendar(D,B,C)};YAHOO.widget.CalendarGroup.prototype.setMonth=function(E){E=parseInt(E,10);var F;var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var D=0;D<this.pages.length;++D){var C=this.pages[D];var A=C.cfg.getProperty(B);if(D===0){F=A.getFullYear()}else{A.setYear(F)}this._setMonthOnDate(A,E+D);C.cfg.setProperty(B,A)}};YAHOO.widget.CalendarGroup.prototype.setYear=function(C){var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;C=parseInt(C,10);for(var E=0;E<this.pages.length;++E){var D=this.pages[E];var A=D.cfg.getProperty(B);if((A.getMonth()+1)==1&&E>0){C+=1}D.setYear(C)}};YAHOO.widget.CalendarGroup.prototype.render=function(){this.renderHeader();for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.render()}this.renderFooter()};YAHOO.widget.CalendarGroup.prototype.select=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.select(A)}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.selectCell=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.selectCell(A)}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.deselect=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselect(A)}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.deselectAll=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.deselectAll()}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.deselectCell=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselectCell(A)}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.reset=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.reset()}};YAHOO.widget.CalendarGroup.prototype.clear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.clear()}};YAHOO.widget.CalendarGroup.prototype.nextMonth=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextMonth()}};YAHOO.widget.CalendarGroup.prototype.previousMonth=function(){for(var B=this.pages.length-1;B>=0;--B){var A=this.pages[B];A.previousMonth()}};YAHOO.widget.CalendarGroup.prototype.nextYear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextYear()}};YAHOO.widget.CalendarGroup.prototype.previousYear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.previousYear()}};YAHOO.widget.CalendarGroup.prototype.getSelectedDates=function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=new Date(D[0],D[1]-1,D[2]);C.push(A)}C.sort(function(G,F){return G-F});return C};YAHOO.widget.CalendarGroup.prototype.addRenderer=function(A,B){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addRenderer(A,B)}};YAHOO.widget.CalendarGroup.prototype.addMonthRenderer=function(D,A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.addMonthRenderer(D,A)}};YAHOO.widget.CalendarGroup.prototype.addWeekdayRenderer=function(B,A){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addWeekdayRenderer(B,A)}};YAHOO.widget.CalendarGroup.prototype.renderHeader=function(){};YAHOO.widget.CalendarGroup.prototype.renderFooter=function(){};YAHOO.widget.CalendarGroup.prototype.addMonths=function(A){this.callChildFunction("addMonths",A)};YAHOO.widget.CalendarGroup.prototype.subtractMonths=function(A){this.callChildFunction("subtractMonths",A)};YAHOO.widget.CalendarGroup.prototype.addYears=function(A){this.callChildFunction("addYears",A)};YAHOO.widget.CalendarGroup.prototype.subtractYears=function(A){this.callChildFunction("subtractYears",A)};YAHOO.widget.CalendarGroup.prototype.show=function(){this.oDomContainer.style.display="block";if(YAHOO.env.ua.opera){this._fixWidth()}};YAHOO.widget.CalendarGroup.prototype._setMonthOnDate=function(C,D){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(D<0||D>11)){var B=YAHOO.widget.DateMath;var A=B.add(C,B.MONTH,D-C.getMonth());C.setTime(A.getTime())}else{C.setMonth(D)}};YAHOO.widget.CalendarGroup.prototype._fixWidth=function(){var B=this.oDomContainer.offsetWidth;var A=0;for(var D=0;D<this.pages.length;++D){var C=this.pages[D];A+=C.oDomContainer.offsetWidth}if(A>0){this.oDomContainer.style.width=A+"px"}};YAHOO.widget.CalendarGroup.CSS_CONTAINER="yui-calcontainer";YAHOO.widget.CalendarGroup.CSS_MULTI_UP="multi";YAHOO.widget.CalendarGroup.CSS_2UPTITLE="title";YAHOO.widget.CalendarGroup.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(YAHOO.widget.CalendarGroup,YAHOO.widget.Calendar,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyleSelected","renderCellNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hide","browser");YAHOO.widget.CalendarGroup._DEFAULT_CONFIG=YAHOO.widget.Calendar._DEFAULT_CONFIG;YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES={key:"pages",value:2};YAHOO.widget.CalendarGroup.prototype.toString=function(){return"CalendarGroup "+this.id};YAHOO.widget.CalGrp=YAHOO.widget.CalendarGroup;YAHOO.widget.Calendar2up=function(C,A,B){this.init(C,A,B)};YAHOO.extend(YAHOO.widget.Calendar2up,YAHOO.widget.CalendarGroup);YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up;YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.3.1",build:"541"});YAHOO.namespace("extension");YAHOO.extension.Carousel=function(B,A){this.init(B,A)};YAHOO.extension.Carousel.prototype={UNBOUNDED_SIZE:1000000,init:function(N,J){var I=this;this.getCarouselItem=this.getItem;var B="carousel-list";var C="carousel-clip-region";var F="carousel-next";var E="carousel-prev";this._carouselElemID=N;this.carouselElem=YAHOO.util.Dom.get(N);this._prevEnabled=true;this._nextEnabled=true;this.cfg=new YAHOO.util.Config(this);this.cfg.addProperty("scrollBeforeAmount",{value:0,handler:function(P,O,Q){},validator:I.cfg.checkNumber});this.cfg.addProperty("scrollAfterAmount",{value:0,handler:function(P,O,Q){},validator:I.cfg.checkNumber});this.cfg.addProperty("loadOnStart",{value:true,handler:function(P,O,Q){},validator:I.cfg.checkBoolean});this.cfg.addProperty("orientation",{value:"horizontal",handler:function(P,O,Q){I.reload()},validator:function(O){if(typeof O=="string"){return("horizontal,vertical".indexOf(O.toLowerCase())!=-1)}else{return false}}});this.cfg.addProperty("size",{value:this.UNBOUNDED_SIZE,handler:function(P,O,Q){I.reload()},validator:I.cfg.checkNumber});this.cfg.addProperty("numVisible",{value:3,handler:function(P,O,Q){I.reload()},validator:I.cfg.checkNumber});this.cfg.addProperty("firstVisible",{value:1,handler:function(P,O,Q){I.moveTo(O[0])},validator:I.cfg.checkNumber});this.cfg.addProperty("scrollInc",{value:3,handler:function(P,O,Q){},validator:I.cfg.checkNumber});this.cfg.addProperty("animationSpeed",{value:0.25,handler:function(P,O,Q){I.animationSpeed=O[0]},validator:I.cfg.checkNumber});this.cfg.addProperty("animationMethod",{value:YAHOO.util.Easing.easeOut,handler:function(P,O,Q){}});this.cfg.addProperty("animationCompleteHandler",{value:null,handler:function(P,O,Q){if(I._animationCompleteEvt){I._animationCompleteEvt.unsubscribe(I._currAnimationCompleteHandler,I)}I._currAnimationCompleteHandler=O[0];if(I._currAnimationCompleteHandler){if(!I._animationCompleteEvt){I._animationCompleteEvt=new YAHOO.util.CustomEvent("onAnimationComplete",I)}I._animationCompleteEvt.subscribe(I._currAnimationCompleteHandler,I)}}});this.cfg.addProperty("autoPlay",{value:0,handler:function(Q,O,R){var P=O[0];if(P>0){I.startAutoPlay()}else{I.stopAutoPlay()}}});this.cfg.addProperty("wrap",{value:false,handler:function(P,O,Q){},validator:I.cfg.checkBoolean});this.cfg.addProperty("navMargin",{value:0,handler:function(P,O,Q){I.calculateSize()},validator:I.cfg.checkNumber});this.cfg.addProperty("revealAmount",{value:0,handler:function(P,O,Q){I.reload()},validator:I.cfg.checkNumber});this.cfg.addProperty("prevElementID",{value:null,handler:function(P,O,Q){if(I._carouselPrev){YAHOO.util.Event.removeListener(I._carouselPrev,"click",I._scrollPrev)}I._prevElementID=O[0];if(I._prevElementID==null){I._carouselPrev=YAHOO.util.Dom.getElementsByClassName(E,"div",I.carouselElem)[0]}else{I._carouselPrev=YAHOO.util.Dom.get(I._prevElementID)}YAHOO.util.Event.addListener(I._carouselPrev,"click",I._scrollPrev,I)}});this.cfg.addProperty("prevElement",{value:null,handler:function(P,O,Q){if(I._carouselPrev){YAHOO.util.Event.removeListener(I._carouselPrev,"click",I._scrollPrev)}I._prevElementID=O[0];if(I._prevElementID==null){I._carouselPrev=YAHOO.util.Dom.getElementsByClassName(E,"div",I.carouselElem)[0]}else{I._carouselPrev=YAHOO.util.Dom.get(I._prevElementID)}YAHOO.util.Event.addListener(I._carouselPrev,"click",I._scrollPrev,I)}});this.cfg.addProperty("nextElementID",{value:null,handler:function(P,O,Q){if(I._carouselNext){YAHOO.util.Event.removeListener(I._carouselNext,"click",I._scrollNext)}I._nextElementID=O[0];if(I._nextElementID==null){I._carouselNext=YAHOO.util.Dom.getElementsByClassName(F,"div",I.carouselElem)}else{I._carouselNext=YAHOO.util.Dom.get(I._nextElementID)}if(I._carouselNext){YAHOO.util.Event.addListener(I._carouselNext,"click",I._scrollNext,I)}}});this.cfg.addProperty("nextElement",{value:null,handler:function(P,O,Q){if(I._carouselNext){YAHOO.util.Event.removeListener(I._carouselNext,"click",I._scrollNext)}I._nextElementID=O[0];if(I._nextElementID==null){I._carouselNext=YAHOO.util.Dom.getElementsByClassName(F,"div",I.carouselElem)}else{I._carouselNext=YAHOO.util.Dom.get(I._nextElementID)}if(I._carouselNext){YAHOO.util.Event.addListener(I._carouselNext,"click",I._scrollNext,I)}}});this.cfg.addProperty("disableSelection",{value:true,handler:function(P,O,Q){},validator:I.cfg.checkBoolean});this.cfg.addProperty("loadInitHandler",{value:null,handler:function(P,O,Q){if(I._loadInitHandlerEvt){I._loadInitHandlerEvt.unsubscribe(I._currLoadInitHandler,I)}I._currLoadInitHandler=O[0];if(I._currLoadInitHandler){if(!I._loadInitHandlerEvt){I._loadInitHandlerEvt=new YAHOO.util.CustomEvent("onLoadInit",I)}I._loadInitHandlerEvt.subscribe(I._currLoadInitHandler,I)}}});this.cfg.addProperty("loadNextHandler",{value:null,handler:function(P,O,Q){if(I._loadNextHandlerEvt){I._loadNextHandlerEvt.unsubscribe(I._currLoadNextHandler,I)}I._currLoadNextHandler=O[0];if(I._currLoadNextHandler){if(!I._loadNextHandlerEvt){I._loadNextHandlerEvt=new YAHOO.util.CustomEvent("onLoadNext",I)}I._loadNextHandlerEvt.subscribe(I._currLoadNextHandler,I)}}});this.cfg.addProperty("loadPrevHandler",{value:null,handler:function(P,O,Q){if(I._loadPrevHandlerEvt){I._loadPrevHandlerEvt.unsubscribe(I._currLoadPrevHandler,I)}I._currLoadPrevHandler=O[0];if(I._currLoadPrevHandler){if(!I._loadPrevHandlerEvt){I._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",I)}I._loadPrevHandlerEvt.subscribe(I._currLoadPrevHandler,I)}}});this.cfg.addProperty("prevButtonStateHandler",{value:null,handler:function(P,O,Q){if(I._currPrevButtonStateHandler){I._prevButtonStateHandlerEvt.unsubscribe(I._currPrevButtonStateHandler,I)}I._currPrevButtonStateHandler=O[0];if(I._currPrevButtonStateHandler){if(!I._prevButtonStateHandlerEvt){I._prevButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onPrevButtonStateChange",I)}I._prevButtonStateHandlerEvt.subscribe(I._currPrevButtonStateHandler,I)}}});this.cfg.addProperty("nextButtonStateHandler",{value:null,handler:function(P,O,Q){if(I._currNextButtonStateHandler){I._nextButtonStateHandlerEvt.unsubscribe(I._currNextButtonStateHandler,I)}I._currNextButtonStateHandler=O[0];if(I._currNextButtonStateHandler){if(!I._nextButtonStateHandlerEvt){I._nextButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onNextButtonStateChange",I)}I._nextButtonStateHandlerEvt.subscribe(I._currNextButtonStateHandler,I)}}});if(J){this.cfg.applyConfig(J)}YAHOO.util.Event.addListener(this.carouselElem,"mousedown",this._handleMouseDownForSelection,this,true);this._origFirstVisible=this.cfg.getProperty("firstVisible");this._currLoadInitHandler=this.cfg.getProperty("loadInitHandler");this._currLoadNextHandler=this.cfg.getProperty("loadNextHandler");this._currLoadPrevHandler=this.cfg.getProperty("loadPrevHandler");this._currPrevButtonStateHandler=this.cfg.getProperty("prevButtonStateHandler");this._currNextButtonStateHandler=this.cfg.getProperty("nextButtonStateHandler");this._currAnimationCompleteHandler=this.cfg.getProperty("animationCompleteHandler");this._nextElementID=this.cfg.getProperty("nextElementID");if(!this._nextElementID){this._nextElementID=this.cfg.getProperty("nextElement")}this._prevElementID=this.cfg.getProperty("prevElementID");if(!this._prevElementID){this._prevElementID=this.cfg.getProperty("prevElement")}this._autoPlayTimer=null;this._priorLastVisible=this._priorFirstVisible=this.cfg.getProperty("firstVisible");this._lastPrebuiltIdx=0;this.carouselList=YAHOO.util.Dom.getElementsByClassName(B,"ul",this.carouselElem)[0];if(this._nextElementID==null){this._carouselNext=YAHOO.util.Dom.getElementsByClassName(F,"div",this.carouselElem)[0]}else{this._carouselNext=YAHOO.util.Dom.get(this._nextElementID)}if(this._prevElementID==null){this._carouselPrev=YAHOO.util.Dom.getElementsByClassName(E,"div",this.carouselElem)[0]}else{this._carouselPrev=YAHOO.util.Dom.get(this._prevElementID)}this._clipReg=YAHOO.util.Dom.getElementsByClassName(C,"div",this.carouselElem)[0];if(this.isVertical()){YAHOO.util.Dom.addClass(this.carouselList,"carousel-vertical")}this._scrollNextAnim=new YAHOO.util.Motion(this.carouselList,this.scrollNextParams,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));this._scrollPrevAnim=new YAHOO.util.Motion(this.carouselList,this.scrollPrevParams,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this._carouselNext){YAHOO.util.Event.addListener(this._carouselNext,"click",this._scrollNext,this)}if(this._carouselPrev){YAHOO.util.Event.addListener(this._carouselPrev,"click",this._scrollPrev,this)}var H=this.cfg.getProperty("loadInitHandler");if(H){this._loadInitHandlerEvt=new YAHOO.util.CustomEvent("onLoadInit",this);this._loadInitHandlerEvt.subscribe(H,this)}var L=this.cfg.getProperty("loadNextHandler");if(L){this._loadNextHandlerEvt=new YAHOO.util.CustomEvent("onLoadNext",this);this._loadNextHandlerEvt.subscribe(L,this)}var M=this.cfg.getProperty("loadPrevHandler");if(M){this._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",this);this._loadPrevHandlerEvt.subscribe(M,this)}var K=this.cfg.getProperty("animationCompleteHandler");if(K){this._animationCompleteEvt=new YAHOO.util.CustomEvent("onAnimationComplete",this);this._animationCompleteEvt.subscribe(K,this)}var A=this.cfg.getProperty("prevButtonStateHandler");if(A){this._prevButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onPrevButtonStateChange",this);this._prevButtonStateHandlerEvt.subscribe(A,this)}var G=this.cfg.getProperty("nextButtonStateHandler");if(G){this._nextButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onNextButtonStateChange",this);this._nextButtonStateHandlerEvt.subscribe(G,this)}var D=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+D.start,this._calculateSize,this);if(this.cfg.getProperty("loadOnStart")){this._loadInitial()}},_handleMouseDownForSelection:function(A){if(this.cfg.getProperty("disableSelection")){YAHOO.util.Event.preventDefault(A);YAHOO.util.Event.stopPropagation(A)}},clear:function(){var A=this.cfg.getProperty("loadInitHandler");if(A){this._removeChildrenFromNode(this.carouselList);this._lastPrebuiltIdx=0}this.stopAutoPlay();this._priorLastVisible=this._priorFirstVisible=this._origFirstVisible;this.cfg.setProperty("firstVisible",this._origFirstVisible,true);this.moveTo(this._origFirstVisible)},reload:function(B){if(this._isValidObj(B)){this.cfg.setProperty("numVisible",B)}this.clear();var A=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+A.start,this._calculateSize,this);this._loadInitial()},load:function(){var A=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+A.start,this._calculateSize,this);this._loadInitial()},addItem:function(C,B,D){if(C>this.cfg.getProperty("size")){return null}var E=this.getItem(C);if(!this._isValidObj(E)){E=this._createItem(C,B);this.carouselList.appendChild(E)}else{if(this._isValidObj(E.placeholder)){var A=this._createItem(C,B);this.carouselList.replaceChild(A,E);E=A}}if(this._isValidObj(D)){YAHOO.util.Dom.addClass(E,D)}if(this.isVertical()){setTimeout(function(){E.style.display="block"},1)}return E},insertBefore:function(B,D){if(B>=this.cfg.getProperty("size")){return null}if(B<1){B=1}var A=B-1;if(A>this._lastPrebuiltIdx){this._prebuildItems(this._lastPrebuiltIdx,B)}var C=this._insertBeforeItem(B,D);this._enableDisableControls();return C},insertAfter:function(B,D){if(B>this.cfg.getProperty("size")){B=this.cfg.getProperty("size")}var A=B+1;if(A>this._lastPrebuiltIdx){this._prebuildItems(this._lastPrebuiltIdx,A+1)}var C=this._insertAfterItem(B,D);if(A>this.cfg.getProperty("size")){this.cfg.setProperty("size",A,true)}this._enableDisableControls();return C},scrollNext:function(){this._scrollNext(null,this);this._autoPlayTimer=null;if(this.cfg.getProperty("autoPlay")!==0){this._autoPlayTimer=this.startAutoPlay()}},scrollPrev:function(){this._scrollPrev(null,this)},scrollTo:function(A){this._position(A,true)},moveTo:function(A){this._position(A,false)},startAutoPlay:function(A){if(this._isValidObj(A)){this.cfg.setProperty("autoPlay",A,true)}if(this._autoPlayTimer!==null){return this._autoPlayTimer}var C=this;var B=function(){C.scrollNext()};this._autoPlayTimer=setTimeout(B,this.cfg.getProperty("autoPlay"));return this._autoPlayTimer},stopAutoPlay:function(){if(this._autoPlayTimer!==null){clearTimeout(this._autoPlayTimer);this._autoPlayTimer=null}},isVertical:function(){return(this.cfg.getProperty("orientation")!="horizontal")},isItemLoaded:function(A){var B=this.getItem(A);if(this._isValidObj(B)&&!this._isValidObj(B.placeholder)){return true}return false},getItem:function(A){var B=this._carouselElemID+"-item-"+A;var C=YAHOO.util.Dom.get(B);return C},show:function(){YAHOO.util.Dom.setStyle(this.carouselElem,"display","block");this.calculateSize()},hide:function(){YAHOO.util.Dom.setStyle(this.carouselElem,"display","none")},calculateSize:function(){var m=this.carouselList.childNodes;var Q=null;for(var c=0;c<m.length;c++){Q=m[c];if(Q.tagName=="LI"||Q.tagName=="li"){break}}var Z=this.cfg.getProperty("navMargin");var o=this.cfg.getProperty("numVisible");var H=this.cfg.getProperty("firstVisible");var f=this._getStyleVal(Q,"paddingLeft");var W=this._getStyleVal(Q,"paddingRight");var e=this._getStyleVal(Q,"marginLeft");var V=this._getStyleVal(Q,"marginRight");var U=this._getStyleVal(Q,"paddingTop");var C=this._getStyleVal(Q,"paddingBottom");var T=this._getStyleVal(Q,"marginTop");var A=this._getStyleVal(Q,"marginBottom");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-vertical");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-horizontal");if(this.isVertical()){var S=f+W+e+V;YAHOO.util.Dom.addClass(this.carouselList,"carousel-vertical");var F=U+C+T+A;var J=this._getStyleVal(this.carouselList,"paddingTop");var Y=this._getStyleVal(this.carouselList,"paddingBottom");var I=this._getStyleVal(this.carouselList,"marginTop");var X=this._getStyleVal(this.carouselList,"marginBottom");var n=J+Y+I+X;var O=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(F)/2):0;var D=this._getStyleVal(Q,"height",true);this.scrollAmountPerInc=(D+F);var E=this._getStyleVal(Q,"width");this.carouselElem.style.width=(E+S)+"px";this._clipReg.style.height=(this.scrollAmountPerInc*o+O*2+n)+"px";this.carouselElem.style.height=(this.scrollAmountPerInc*o+O*2+Z*2+n)+"px";var d=(this._isExtraRevealed())?(O-(Math.abs(T-A)+Math.abs(U-C))/2):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"top",""+d+"px");var M=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,M-this.scrollAmountPerInc*(H-1))}else{YAHOO.util.Dom.addClass(this.carouselList,"carousel-horizontal");var R=this._getStyleVal(this.carouselList,"paddingLeft");var L=this._getStyleVal(this.carouselList,"paddingRight");var P=this._getStyleVal(this.carouselList,"marginLeft");var K=this._getStyleVal(this.carouselList,"marginRight");var G=R+L+P+K;var g=e+V;var S=g+W+f;var O=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(S)/2):0;var E=Q.offsetWidth;this.scrollAmountPerInc=E+g;this._clipReg.style.width=(this.scrollAmountPerInc*o+O*2)+"px";this.carouselElem.style.width=(this.scrollAmountPerInc*o+Z*2+O*2+G)+"px";var B=(this._isExtraRevealed())?(O-(Math.abs(V-e)+Math.abs(W-f))/2-(P+R)):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"left",""+B+"px");var N=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,N-this.scrollAmountPerInc*(H-1))}},setProperty:function(C,B,A){this.cfg.setProperty(C,B,A)},getProperty:function(A){return this.cfg.getProperty(A)},getFirstItemRevealed:function(){return this._firstItemRevealed},getLastItemRevealed:function(){return this._lastItemRevealed},getFirstVisible:function(){return this.cfg.getProperty("firstVisible")},getLastVisible:function(){var B=this.cfg.getProperty("firstVisible");var A=this.cfg.getProperty("numVisible");return B+A-1},_getStyleVal:function(A,C,D){var B=YAHOO.util.Dom.getStyle(A,C);var E=D?parseFloat(B):parseInt(B,10);if(C=="height"&&isNaN(E)){E=A.offsetHeight}else{if(isNaN(E)){E=0}}return E},_calculateSize:function(A){A.calculateSize();A.show()},_removeChildrenFromNode:function(B){if(!this._isValidObj(B)){return }var A=B.childNodes.length;while(B.hasChildNodes()){B.removeChild(B.firstChild)}},_prebuildLiElem:function(A){if(A<1){return }var B=document.createElement("li");B.id=this._carouselElemID+"-item-"+A;B.placeholder=true;this.carouselList.appendChild(B);this._lastPrebuiltIdx=(A>this._lastPrebuiltIdx)?A:this._lastPrebuiltIdx},_createItem:function(B,A){if(B<1){return }var C=document.createElement("li");C.id=this._carouselElemID+"-item-"+B;if(typeof (A)==="string"){C.innerHTML=A}else{C.appendChild(A)}return C},_insertAfterItem:function(B,A){return this._insertBeforeItem(B+1,A)},_insertBeforeItem:function(G,A){var B=this.getItem(G);var D=this.cfg.getProperty("size");if(D!=this.UNBOUNDED_SIZE){this.cfg.setProperty("size",D+1,true)}for(var C=this._lastPrebuiltIdx;C>=G;C--){var F=this.getItem(C);if(this._isValidObj(F)){F.id=this._carouselElemID+"-item-"+(C+1)}}var H=this._createItem(G,A);var E=this.carouselList.insertBefore(H,B);this._lastPrebuiltIdx+=1;return H},insertAfterEnd:function(A){return this.insertAfter(this.cfg.getProperty("size"),A)},_position:function(A,B){var C=this._priorFirstVisible;if(A>C){var D=A-C;this._scrollNextInc(D,B)}else{var E=C-A;this._scrollPrevInc(E,B)}},_scrollPrev:function(B,A){if(B!==null){A.stopAutoPlay()}A._scrollPrevInc(A.cfg.getProperty("scrollInc"),(A.cfg.getProperty("animationSpeed")!==0))},_scrollNext:function(B,A){if(B!==null){A.stopAutoPlay()}A._scrollNextInc(A.cfg.getProperty("scrollInc"),(A.cfg.getProperty("animationSpeed")!==0))},_handleAnimationComplete:function(C,B,A){var E=A[0];var D=A[1];E._animationCompleteEvt.fire(D)},_areAllItemsLoaded:function(D,C){var A=true;for(var B=D;B<=C;B++){var E=this.getItem(B);if(!this._isValidObj(E)){this._prebuildLiElem(B);A=false}else{if(this._isValidObj(E.placeholder)){A=false}}}return A},_prebuildItems:function(C,B){for(var A=C;A<=B;A++){var D=this.getItem(A);if(!this._isValidObj(D)){this._prebuildLiElem(A)}}},_isExtraRevealed:function(){return(this.cfg.getProperty("revealAmount")>0)},_scrollNextInc:function(E,J){if(this._scrollNextAnim.isAnimated()||this._scrollPrevAnim.isAnimated()){return false}var N=this.cfg.getProperty("numVisible");var L=this._priorFirstVisible;var I=this._priorLastVisible;var O=this.cfg.getProperty("size");var A=this._calculateAllowableScrollExtent();if(this.cfg.getProperty("wrap")&&I==A.end){this.scrollTo(A.start);return }var K=L+E;var G=K+N-1;if(G>A.end){G=A.end;K=G-N+1}E=K-L;this.cfg.setProperty("firstVisible",K,true);if(E>0){if(this._isValidObj(this.cfg.getProperty("loadNextHandler"))){var D=this._calculateVisibleExtent(K,G);var F=(I+1)<D.start?(I+1):D.start;var H=this._areAllItemsLoaded(F,D.end);this._loadNextHandlerEvt.fire(D.start,D.end,H)}if(J){var M={points:{by:[-this.scrollAmountPerInc*E,0]}};if(this.isVertical()){M={points:{by:[0,-this.scrollAmountPerInc*E]}}}this._scrollNextAnim=new YAHOO.util.Motion(this.carouselList,M,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this.cfg.getProperty("animationCompleteHandler")){this._scrollNextAnim.onComplete.subscribe(this._handleAnimationComplete,[this,"next"])}this._scrollNextAnim.animate()}else{if(this.isVertical()){var B=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,B-this.scrollAmountPerInc*E)}else{var C=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,C-this.scrollAmountPerInc*E)}}}this._priorFirstVisible=K;this._priorLastVisible=G;this._enableDisableControls();return false},_scrollPrevInc:function(G,J){if(this._scrollNextAnim.isAnimated()||this._scrollPrevAnim.isAnimated()){return false}var N=this.cfg.getProperty("numVisible");var L=this._priorFirstVisible;var I=this._priorLastVisible;var O=this.cfg.getProperty("size");var K=L-G;var A=this._calculateAllowableScrollExtent();K=(K<A.start)?A.start:K;var F=K+N-1;if(F>A.end){F=A.end;K=F-N+1}G=L-K;this.cfg.setProperty("firstVisible",K,true);if(G>0){if(this._isValidObj(this.cfg.getProperty("loadPrevHandler"))){var E=this._calculateVisibleExtent(K,F);var C=(L-1)>E.end?(L-1):E.end;var H=this._areAllItemsLoaded(E.start,C);this._loadPrevHandlerEvt.fire(E.start,E.end,H)}if(J){var M={points:{by:[this.scrollAmountPerInc*G,0]}};if(this.isVertical()){M={points:{by:[0,this.scrollAmountPerInc*G]}}}this._scrollPrevAnim=new YAHOO.util.Motion(this.carouselList,M,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this.cfg.getProperty("animationCompleteHandler")){this._scrollPrevAnim.onComplete.subscribe(this._handleAnimationComplete,[this,"prev"])}this._scrollPrevAnim.animate()}else{if(this.isVertical()){var B=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,B+this.scrollAmountPerInc*G)}else{var D=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,D+this.scrollAmountPerInc*G)}}}this._priorFirstVisible=K;this._priorLastVisible=F;this._enableDisableControls();return false},_enableDisableControls:function(){var C=this.cfg.getProperty("firstVisible");var A=this.getLastVisible();var B=this._calculateAllowableScrollExtent();if(this._prevEnabled){if(C===B.start){this._disablePrev()}}if(this._prevEnabled===false){if(C>B.start){this._enablePrev()}}if(this._nextEnabled){if(A===B.end){this._disableNext()}}if(this._nextEnabled===false){if(A<B.end){this._enableNext()}}},_loadInitial:function(){var C=this.cfg.getProperty("firstVisible");this._priorLastVisible=this.getLastVisible();if(this._loadInitHandlerEvt){var A=this._calculateVisibleExtent(C,this._priorLastVisible);var B=this._areAllItemsLoaded(1,A.end);this._loadInitHandlerEvt.fire(A.start,A.end,B)}if(this.cfg.getProperty("autoPlay")!==0){this._autoPlayTimer=this.startAutoPlay()}this._enableDisableControls()},_calculateAllowableScrollExtent:function(){var D=this.cfg.getProperty("scrollBeforeAmount");var A=this.cfg.getProperty("scrollAfterAmount");var B=this.cfg.getProperty("size");var C={start:1-D,end:B+A};return C},_calculateVisibleExtent:function(D,A){if(!D){D=this.cfg.getProperty("firstVisible");A=this.getLastVisible()}var B=this.cfg.getProperty("size");D=D<1?1:D;A=A>B?B:A;var C={start:D,end:A};this._firstItemRevealed=-1;this._lastItemRevealed=-1;if(this._isExtraRevealed()){if(D>1){this._firstItemRevealed=D-1;C.start=this._firstItemRevealed}if(A<B){this._lastItemRevealed=A+1;C.end=this._lastItemRevealed}}return C},_disablePrev:function(){this._prevEnabled=false;if(this._prevButtonStateHandlerEvt){this._prevButtonStateHandlerEvt.fire(false,this._carouselPrev)}if(this._isValidObj(this._carouselPrev)){YAHOO.util.Event.removeListener(this._carouselPrev,"click",this._scrollPrev)}},_enablePrev:function(){this._prevEnabled=true;if(this._prevButtonStateHandlerEvt){this._prevButtonStateHandlerEvt.fire(true,this._carouselPrev)}if(this._isValidObj(this._carouselPrev)){YAHOO.util.Event.addListener(this._carouselPrev,"click",this._scrollPrev,this)}},_disableNext:function(){if(this.cfg.getProperty("wrap")){return }this._nextEnabled=false;if(this._isValidObj(this._nextButtonStateHandlerEvt)){this._nextButtonStateHandlerEvt.fire(false,this._carouselNext)}if(this._isValidObj(this._carouselNext)){YAHOO.util.Event.removeListener(this._carouselNext,"click",this._scrollNext)}},_enableNext:function(){this._nextEnabled=true;if(this._isValidObj(this._nextButtonStateHandlerEvt)){this._nextButtonStateHandlerEvt.fire(true,this._carouselNext)}if(this._isValidObj(this._carouselNext)){YAHOO.util.Event.addListener(this._carouselNext,"click",this._scrollNext,this)}},_isValidObj:function(A){if(null==A){return false}if("undefined"==typeof (A)){return false}return true}};YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C)}else{if(console&&console.log){if(!A){var A="info"}return console.log(A+":"+D)}else{return false}}};if(!YAHOO.lang.isFunction(YAHOO.lang.later)){YAHOO.lang.later=function(H,B,I,D,E){H=H||0;B=B||{};var C=I,G=D,F,A;if(YAHOO.lang.isString(I)){C=B[I]}if(!C){throw new TypeError("method undefined")}if(!YAHOO.lang.isArray(G)){G=[D]}F=function(){C.apply(B,G)};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A)}else{clearTimeout(A)}}}}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(B){var A=this.length;var C=Number(arguments[1])||0;C=(C<0)?Math.ceil(C):Math.floor(C);if(C<0){C+=A}for(;C<A;C++){if(C in this&&this[C]===B){return C}}return -1}}YAHOO.EU.Shopping.tooltipMsg={handleMsgDivs:function(G,D){for(var C=0,B=D.length;C<B;C++){var F=document.getElementById(D[C]);if(F){var H=YAHOO.util.Event.getTarget(G);var E=YAHOO.EU.Shopping.userHist.config.oSavedLs;var A=E.getElementsByTagName("li");if(H.nodeName.toLowerCase()!="a"&&YAHOO.util.Dom.hasClass(F,"hist-too-many-items")&&!YAHOO.util.Dom.isAncestor(H,F)){F.parentNode.removeChild(F)}else{if(H.nodeName.toLowerCase()!="a"&&H!=F&&!YAHOO.util.Dom.isAncestor(F,H)&&A.length<=5){F.parentNode.removeChild(F)}}}}},setWarningMsg:function(L,N,J,E,C){var I=["compare-max-error","compare-min-error","compare-min-error-2","hist-error-div","add-warning-msg"];for(var H=0,G=I.length;H<G;H++){var F=document.getElementById(I[H]);if(F){if(J!="compare-min-error-2"){F.parentNode.removeChild(F)}}}var K=document.createElement("div");var D=document.createTextNode(N);K.appendChild(D);var B=document.createElement("a");var M=document.createElement("img");M.setAttribute("src","http://r6.kelkoo.com/ux/buttons/orange-cross-button.gif");M.setAttribute("alt",YAHOO.EU.Shopping.locale.close);B.appendChild(M);B.href="#";K.appendChild(B);YAHOO.util.Event.addListener(B,"click",function(O){YAHOO.util.Event.preventDefault(O);K.parentNode.removeChild(K)},this,true);L.parentNode.insertBefore(K,L.parentNode.childNodes[0]);if(E&&E=="delete"){var A=YAHOO.util.Dom.getY(L);A=A+15;YAHOO.util.Dom.setY(K,A)}K.setAttribute("id",J);YAHOO.util.Dom.addClass(K,"warning-msg");if(C){YAHOO.util.Dom.addClass(K,C)}}};YAHOO.EU.Shopping.userHist={config:{sShowAllTxt:YAHOO.EU.Shopping.locale.showAll,sHideAllTxt:YAHOO.EU.Shopping.locale.hideAll},init:function(){var Q=YAHOO.EU.Shopping.userHist.config;var J=document.getElementById("user-hist");if(!J){return true}Q.oSavedLs=document.getElementById("sav-ls");var B=Q.oSavedLs;if(B.className!="intro"){B.className="enhanced"}var R=J.getElementsByTagName("h3");var D=J.getElementsByTagName("ol");var H=YAHOO.EU.Shopping.cookie.get("histCookie");YAHOO.log(H);if(!H||H=="undefined"){YAHOO.EU.Shopping.cookie.set("histCookie","sav=1,rv=0,rs=0",365,"."+YAHOO.EU.Shopping.locale.domain);YAHOO.log("firstCookie"+YAHOO.EU.Shopping.cookie.get("histCookie"))}var E=0;var K=["sav","rv","rs"];if(H){for(P=0;P<3;P++){var E=E+parseInt(YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),K[P],"read"))}}var N=document.getElementById("user-ctrls");var L=document.createElement("a");L.setAttribute("href","#");L.setAttribute("id","user-ctrl-cl");if(E==3){var F=document.createTextNode(Q.sHideAllTxt)}else{var F=document.createTextNode(Q.sShowAllTxt)}L.appendChild(F);var G=document.createElement("li");G.appendChild(L);G.className="ctrl-cls";N.appendChild(G);for(var P=0,O=R.length;P<O;P++){if(H){if(YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),K[P],"read")==1){YAHOO.util.Dom.addClass(R[P],"hist-op")}else{YAHOO.util.Dom.addClass(R[P],"hist-cl");YAHOO.util.Dom.addClass(D[P],"hide")}}else{if(P==0){YAHOO.util.Dom.addClass(R[P],"hist-op")}else{YAHOO.util.Dom.addClass(R[P],"hist-cl");YAHOO.util.Dom.addClass(D[P],"hide")}}var I=R[P].getElementsByTagName("span")[0];var C={oMainCont:J,aHeaders:R,oHeader:R[P],aContLs:D,oContent:D[P],oIndex:P,oChgAllLnk:document.getElementById("user-ctrl-cl")};YAHOO.util.Event.addListener(I,"click",M,C,true)}YAHOO.util.Event.addListener(L,"click",A,L,true);var S=B.getElementsByTagName("li");Q.aSavedLis=S;YAHOO.util.Dom.addClass(S[0],"selected");YAHOO.util.Event.addListener(B,"click",YAHOO.EU.Shopping.userHist.clickItemHandler,true);function M(U,T){if(YAHOO.util.Dom.hasClass(T.oHeader,"hist-op")){YAHOO.util.Dom.removeClass(T.oHeader,"hist-op");YAHOO.util.Dom.addClass(T.oHeader,"hist-cl");YAHOO.util.Dom.addClass(T.oContent,"hide");E=E-1;if(H){YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),K[T.oIndex],"update")}}else{YAHOO.util.Dom.removeClass(T.oHeader,"hist-cl");YAHOO.util.Dom.addClass(T.oHeader,"hist-op");YAHOO.util.Dom.removeClass(T.oContent,"hide");E=E+1;if(H){YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),K[T.oIndex],"update")}}if(E==3){T.oChgAllLnk.firstChild.nodeValue=Q.sHideAllTxt}else{if(E==0){T.oChgAllLnk.firstChild.nodeValue=Q.sShowAllTxt}}}function A(V){YAHOO.util.Event.preventDefault(V);if(this.firstChild.nodeValue==Q.sHideAllTxt){this.firstChild.nodeValue=Q.sShowAllTxt;for(var U=0,T=R.length;U<T;U++){if(YAHOO.util.Dom.hasClass(R[U],"hist-op")){YAHOO.util.Dom.removeClass(R[U],"hist-op");YAHOO.util.Dom.addClass(R[U],"hist-cl");YAHOO.util.Dom.addClass(D[U],"hide");YAHOO.EU.Shopping.cookie.set("histCookie","sav=0,rv=0,rs=0",365,"."+YAHOO.EU.Shopping.locale.domain);YAHOO.log("cookieset"+YAHOO.EU.Shopping.cookie.get("histCookie"))}}E=0}else{if(this.firstChild.nodeValue==Q.sShowAllTxt){this.firstChild.nodeValue=Q.sHideAllTxt;for(var U=0,T=R.length;U<T;U++){if(YAHOO.util.Dom.hasClass(R[U],"hist-cl")){YAHOO.util.Dom.removeClass(R[U],"hist-cl");YAHOO.util.Dom.addClass(R[U],"hist-op");YAHOO.util.Dom.removeClass(D[U],"hide");YAHOO.EU.Shopping.cookie.set("histCookie","sav=1,rv=1,rs=1",365,"."+YAHOO.EU.Shopping.locale.domain);YAHOO.log("cookieset"+YAHOO.EU.Shopping.cookie.get("histCookie"))}}E=3}}}},clickItemHandler:function(B){var C=YAHOO.util.Event.getTarget(B);if(C.nodeName.toLowerCase()=="ol"){return }var E=C.nodeName.toLowerCase();if(this.nodeName.toLowerCase()){var D=C}while(D.nodeName.toLowerCase()!="li"){D=D.parentNode}var A=D.getElementsByTagName("a")[0];if(E=="img"||C==A){YAHOO.util.Event.preventDefault(B);if(YAHOO.util.Dom.hasClass(D,"selected")){return true}else{YAHOO.EU.Shopping.userHist.updateSelectedLI(D)}}else{if(E=="a"&&YAHOO.util.Dom.hasClass(C,"delete")){YAHOO.util.Event.preventDefault(B);YAHOO.EU.Shopping.userHist.setLinkAction(C)}}},updateSelectedLI:function(A){var B=YAHOO.EU.Shopping.userHist.config.aSavedLis;for(i=0,j=B.length;i<j;i++){if(YAHOO.util.Dom.hasClass(B[i],"selected")){YAHOO.util.Dom.removeClass(B[i],"selected")}YAHOO.util.Dom.addClass(A,"selected")}},returnCookieVal:function(C,I,D){var G=new RegExp(I+"=[01]","i");var F=G.exec(C);YAHOO.log(F);if(F){var E=F[0].substring(F[0].length-1,F[0].length)}else{var E=1}if(D=="read"){return E}if(D=="update"){YAHOO.log(E);if(E==0){var B=1}else{var B=0}var H=I+"="+B;var A=C.replace(F,H);YAHOO.EU.Shopping.cookie.set("histCookie",A,365,"."+YAHOO.EU.Shopping.locale.domain);YAHOO.log("cookieset"+YAHOO.EU.Shopping.cookie.get("histCookie"))}},setLinkAction:function(M){if(YAHOO.util.Dom.hasClass(M,"delete")){var C="delete"}else{var C="add"}var H=YAHOO.EU.Shopping.userHist.config.oSavedLs;var A=H.getElementsByTagName("li");var E=document.getElementById("hist-error-div");if(E){E.parentNode.removeChild(E)}if(C=="add"&&A.length==5){var I=YAHOO.EU.Shopping.locale.histOversize;YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(M,I,"hist-error-div","add","hist-too-many-items");return }var K=M.href;var B=K.indexOf("catId");if(B==-1){var F=K.indexOf("offerId");var D=K.substring(F+8,K.length);YAHOO.EU.Shopping.userHist.updateSavedList(M,C,D)}else{var L=K.indexOf("pid");var J=K.substring(B+6,L);var G=K.substring(L+4,K.length);YAHOO.EU.Shopping.userHist.updateSavedList(M,C,G,J)}},updateSavedList:function(srcLink,action,id,catId){var handleSuccess=function(o){if(o.responseText){var response=eval(o.responseText);if(response.error!=""){YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(srcLink,response.error,"hist-error-div",action)}else{var oSavedLs=YAHOO.EU.Shopping.userHist.config.oSavedLs;var aSavedLis=oSavedLs.getElementsByTagName("li");if(action=="delete"){if(aSavedLis.length>1){var startIndex=response.savedListContent.indexOf("<li>");response.savedListContent=response.savedListContent.substring(startIndex,response.savedListContent.length);oSavedLs.innerHTML=response.savedListContent;aSavedLis=oSavedLs.getElementsByTagName("li");YAHOO.EU.Shopping.userHist.updateSelectedLI(aSavedLis[0])}else{var startIndex=response.savedListContent.indexOf("<li>");response.savedListContent=response.savedListContent.substring(startIndex,response.savedListContent.length);YAHOO.util.Dom.replaceClass(oSavedLs,"enhanced","intro");oSavedLs.innerHTML=response.savedListContent}}else{if(YAHOO.util.Dom.hasClass(oSavedLs,"intro")){YAHOO.util.Dom.replaceClass(oSavedLs,"intro","enhanced");oSavedLs.innerHTML=response.savedListContent;aSavedLis=oSavedLs.getElementsByTagName("li");YAHOO.EU.Shopping.userHist.updateSelectedLI(aSavedLis[0])}else{oSavedLs.innerHTML=response.savedListContent;aSavedLis=oSavedLs.getElementsByTagName("li");YAHOO.EU.Shopping.userHist.updateSelectedLI(aSavedLis[0])}YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(srcLink,YAHOO.EU.Shopping.locale.addedToSavedList,"add-warning-msg");var savedListTitle=document.getElementById("user-hist").getElementsByTagName("h3")[0];if(YAHOO.util.Dom.hasClass(savedListTitle,"hist-cl")){YAHOO.util.Dom.replaceClass(savedListTitle,"hist-cl","hist-op");YAHOO.util.Dom.removeClass(oSavedLs,"hide")}}}}};var handleFailure=function(o){};var callback={success:handleSuccess,failure:handleFailure,timeout:10000};if(catId){if(action=="add"){var url="/ctl/do/asyncCall/user-hist?action=add&id="+id+"&catId="+catId}else{var url="/ctl/do/asyncCall/user-hist?action=delete&id="+id+"&catId="+catId}}else{if(action=="add"){var url="/ctl/do/asyncCall/user-hist?action=add&id="+id}else{var url="/ctl/do/asyncCall/user-hist?action=delete&id="+id}}var request=YAHOO.util.Connect.asyncRequest("GET",url,callback)}};YAHOO.EU.Shopping.quickRating={init:function(){var A=document.getElementById("level3");if(A){YAHOO.util.Event.addListener(A,"click",YAHOO.EU.Shopping.quickRating.identify,this,true)}},identify:function(A){var B=YAHOO.util.Event.getTarget(A);var C=B.nodeName.toLowerCase();if(C=="a"&&YAHOO.util.Dom.hasClass(B,"quick-rating")){YAHOO.util.Event.preventDefault(A);YAHOO.EU.Shopping.quickRating.deploy(B)}},deploy:function(J){if(YAHOO.util.Dom.hasClass(J,"qr-open")){return true}YAHOO.util.Dom.addClass(J,"qr-open");var C=document.createElement("div");C.className="qr-wrap";YAHOO.util.Dom.generateId(C);var E=document.createElement("ol");var D=J.href.indexOf("?");var A=J.href.substring(D,J.href.length);var B=document.createElement("a");B.href="#";B.className="qr-close-lnk";B.innerHTML='<img src="http://r6.kelkoo.com/ux/buttons/orange-cross-button.gif" width="" height="" alt="'+YAHOO.EU.Shopping.locale.close+'">';for(i=1;i<=5;i++){var H=document.createElement("li");var I=document.createElement("a");I.className="qr-"+i;I.href="#";var G=document.createTextNode(YAHOO.EU.Shopping.locale.rate+" "+i);I.appendChild(G);H.appendChild(I);E.appendChild(H);var F={oQuickRateContainer:C,sUrlParams:A+"&quick_rating="+i,oCloseLnk:B,iRate:i};YAHOO.util.Event.addListener(I,"click",YAHOO.EU.Shopping.quickRating.rate,F,true)}C.appendChild(E);C.appendChild(B);YAHOO.util.Event.purgeElement(J,0);YAHOO.util.Event.addListener([B,J],"click",YAHOO.EU.Shopping.quickRating.switchDisplay,C,true);YAHOO.util.Dom.insertAfter(C,J)},switchDisplay:function(B,A){YAHOO.util.Event.preventDefault(B);if(YAHOO.util.Dom.hasClass(A,"hide")){YAHOO.util.Dom.removeClass(A,"hide")}else{YAHOO.util.Dom.addClass(A,"hide")}},rate:function(e,oParams){YAHOO.util.Event.preventDefault(e);var handleSuccess=function(o){if(o.responseText){var response=eval(o.responseText);if(response.msgKey=="0"){var quickRateOl=oParams.oQuickRateContainer.getElementsByTagName("ol")[0];var ratingSpan=document.createElement("span");ratingSpan.className="rating rat"+oParams.iRate;ratingSpan.innerHTML='<span class="rating-wrap"><span class="value">'+oParams.iRate+'</span> out of <span class="best">5</span></span>';oParams.oQuickRateContainer.replaceChild(ratingSpan,quickRateOl)}var message=document.createElement("div");message.className="qr-message";var messageTxt=document.createTextNode(response.quickRateMsg);message.appendChild(messageTxt);oParams.oQuickRateContainer.appendChild(message)}};var handleFailure=function(o){};var callback={success:handleSuccess,failure:handleFailure,timeout:10000};var url="/ctl/do/asyncCall/quick-rating-process"+oParams.sUrlParams+"&qrAjax=true";var request=YAHOO.util.Connect.asyncRequest("GET",url,callback)}};YAHOO.EU.Shopping.levelsSaveLnksListener={init:function(){YAHOO.util.Event.addListener(document.body,"click",function(B){YAHOO.EU.Shopping.levelsSaveLnksListener.targetSaveLnks(B);var A=["compare-max-error","compare-min-error","compare-min-error-2","hist-error-div","add-warning-msg"];YAHOO.EU.Shopping.tooltipMsg.handleMsgDivs(B,A)})},targetSaveLnks:function(C){var B=document.getElementById("sav-ls");if(!B){return }var A=B.getElementsByTagName("li");var E=A[0];if(E){var D=YAHOO.util.Event.getTarget(C);var F=D.nodeName.toLowerCase();if(F=="a"&&YAHOO.util.Dom.hasClass(D,"add-to-saved-list")){YAHOO.util.Event.preventDefault(C);YAHOO.EU.Shopping.userHist.setLinkAction(D)}}}};YAHOO.util.Event.onDOMReady(function(){if(YAHOO.EU.Shopping.Flags.saveLink){YAHOO.EU.Shopping.levelsSaveLnksListener.init()}});YAHOO.util.Event.addListener(window,"load",YAHOO.EU.Shopping.userHist.init);YAHOO.util.Event.addListener(window,"load",YAHOO.EU.Shopping.quickRating.init,this,true);YAHOO.EU.Shopping.sortingFormEnhancement={init:function(){var D=document.getElementById("sorting-form");if(D){D.parentNode.style.paddingBottom="10px";var B=YAHOO.util.Dom.getElementsByClassName("cta","button",D)[0];B.style.display="none";var E=D.getElementsByTagName("select");for(var C=0,A=E.length;C<A;C++){YAHOO.util.Event.addListener(E[C],"change",function(F){D.submit()},true)}}}};YAHOO.util.Event.onDOMReady(function(){if(document.getElementById("sorting-form")){YAHOO.EU.Shopping.sortingFormEnhancement.init()}});YAHOO.EU.Shopping.buying={formCallback:function(B){YAHOO.util.Event.stopEvent(B);var A=document.getElementById("bg-dd-select").value;if(A!=""){window.location=A}},init:function(){var K=document.getElementById("buyguide-form-list");var D=document.getElementById("bg-dd-ul");var A=document.getElementById("bg-form");if(A){YAHOO.util.Event.addListener(A,"submit",YAHOO.EU.Shopping.buying.formCallback);var C=document.createElement("select");C.id="bg-dd-select";var I=YAHOO.util.Dom.getElementsByClassName("bg-dd-li","li");for(var F=0,E=I.length;F<E;F++){var G=I[F].firstChild;var J=document.createElement("option");var B=G.textContent==""?G.textContent:G.innerHTML;var H=document.createTextNode(B.replace(/&amp;/gi,"&"));J.value=G.href;J.appendChild(H);C.appendChild(J)}A.insertBefore(C,D);A.removeChild(D);A.innerHTML+='<button class="cta internal" type="submit"><span class="t"><span></span></span><span class="cont"><span>Go</span></span><span class="b"><span> </span></span></button>'}}};YAHOO.EU.Shopping.contentnav={init:function(){var E=YAHOO.util.Dom.getElementsByClassName("corp-sublnk","ul");for(var C=0,B=E.length;C<B;C++){var D=YAHOO.util.Dom.getElementsByClassName("corp-active","li",E[C]);if(D.length==0){YAHOO.util.Dom.setStyle(E[C],"display","none")}else{var F=E[C].parentNode;var A=F.getElementsByTagName("h3");YAHOO.util.Dom.addClass(A,"corp-ttl-active")}}}};if(YAHOO.EU.Shopping.spop===undefined){YAHOO.EU.Shopping.spop=function(B,A){YAHOO.EU.Shopping.spop.superclass.constructor.call(this,B,A)};YAHOO.extend(YAHOO.EU.Shopping.spop,YAHOO.widget.Module)}YAHOO.EU.Shopping.spop.prototype.init=function(B,A){if(document.getElementById("giftform-mod")){YAHOO.util.Dom.setStyle(document.getElementById("giftform-mod"),"display","block")}if(document.getElementById("spop_fhome")||document.getElementById("giftform-mod")){YAHOO.util.Event.addListener("spop-form","submit",this.encodeFormBox,this,true);YAHOO.util.Event.addListener("spop-form-submit","click",this.encodeFormBox,this,true);YAHOO.util.Event.addListener("spop-form-target","change",this.updateFormBox,this,true);YAHOO.util.Event.addListener("spop-form-target","keydown",this.spopSubmit,this,true);YAHOO.util.Event.addListener("spop-form-category","keydown",this.spopSubmit,this,true);YAHOO.util.Event.addListener("spop-form-price","keydown",this.spopSubmit,this,true)}if(this.updateFormBox!==undefined){this.updateFormBox()}};YAHOO.EU.Shopping.spop.prototype.encodeFormBox=function(I){YAHOO.util.Event.stopEvent(I);var B="",N="",H="",J="",K="";if(document.getElementById("spop-form")){var M=document.getElementById("spop-form")}if(document.getElementById("spop-form-target")){var C=document.getElementById("spop-form-target");H=C.value}if(document.getElementById("spop-form-category")){var L=document.getElementById("spop-form-category");B=L.value}if(document.getElementById("spop-form-price")){var E=document.getElementById("spop-form-price");N=E.value}if(document.getElementById("spop-form-catId")){var G=document.getElementById("spop-form-catId");J=G.value}if(document.getElementById("spop-form-spopN")){var F=document.getElementById("spop-form-spopN");var K=F.value}var A="/ctl/do/spopResult?category="+B+"&price="+N+"&target="+H+"&catId="+J+"&spopn="+K+"&keepParams=true";var D="/ctl/do/contentWide?catId="+J+"&url="+escape(A);window.location=D};YAHOO.EU.Shopping.spop.prototype.spopSubmit=function(A){if(!A){A=window.event}if(A.keyCode==13){this.encodeFormBox(A);return false}};YAHOO.util.Event.onDOMReady(function(){new YAHOO.EU.Shopping.spop(document.getElementById("page"))});YAHOO.util.Event.onDOMReady(function(){if(document.getElementById("nav-corp")){YAHOO.EU.Shopping.contentnav.init()}});YAHOO.util.Event.onDOMReady(function(){if(YAHOO.EU.Shopping.Flags.buying){YAHOO.EU.Shopping.buying.init()}});YAHOO.util.Dom.addScriptNode=function(A){oScript=document.createElement("script");oScript.type="text/javascript";oScript.src=A;document.getElementsByTagName("head")[0].appendChild(oScript)};YAHOO.util.Dom.onMethodAvailable=function(sMethod,oCallback,o,bScope){if(typeof (eval(sMethod))==="function"){bScope?oCallback.call(o):oCallback(o)}else{setTimeout(function(){YAHOO.util.Dom.onMethodAvailable(sMethod,oCallback,o,bScope)},100)}};YAHOO.EU.Shopping.cookie={set:function(C,E,F,D){var D="; domain="+D+";"||"";if(F){var B=new Date();B.setTime(B.getTime()+(F*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+E+A+"; path=/"+D},get:function(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null},del:function(A){YAHOO.EU.Shopping.cookie.set(A,"",-1)}};YAHOO.EU.Shopping.openInPopup=function(C,A,D){var B=YAHOO.util.Event.getTarget(C);if(!B){return }if((B.tagName.toLowerCase()=="img")&&B.parentNode){B=B.parentNode}if(B&&B.tagName.toLowerCase()=="a"&&YAHOO.util.Dom.hasClass(B,"js-popup")){window.open(B.href,"popup","width="+A+",height="+D+",scrollbars=yes,menubar=no,status=no,toolbar=no");YAHOO.util.Event.stopEvent(C)}};YAHOO.EU.Shopping.validate={isDate:function(A){var B=new RegExp(/^(?:(?:0?[1-9]|1\d|2[0-8])(\/|-)(?:0?[1-9]|1[0-2]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:31(\/|-)(?:0?[13578]|1[02]))|(?:(?:29|30)(\/|-)(?:0?[1,3-9]|1[0-2])))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(29(\/|-)0?2)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/);if(!B.test(A)){return false}return true}};YAHOO.widget.DateMath.getDate=function(B){if(YAHOO.lang.isString){if(!YAHOO.EU.Shopping.validate.isDate(B)){return false}var A=B.split(new RegExp(/-|\//));if(!A||!(A.length>0&&A.length<4)){return false}return new Date(A[YAHOO.EU.Shopping.YUICalendarConf.MDY_YEAR_POSITION-1],A[YAHOO.EU.Shopping.YUICalendarConf.MDY_MONTH_POSITION-1]-1,A[YAHOO.EU.Shopping.YUICalendarConf.MDY_DAY_POSITION-1])}else{return new Date()}};YAHOO.util.Event.onDOMReady(function(){var A=550;var B=550;YAHOO.util.Event.addListener("level-results-page","click",function(C){YAHOO.EU.Shopping.openInPopup(C,A,B)});YAHOO.util.Event.addListener("product-overlay","click",function(C){YAHOO.EU.Shopping.openInPopup(C,A,B)});YAHOO.util.Event.addListener("merchant-desc","click",function(C){YAHOO.EU.Shopping.openInPopup(C,A,B)});YAHOO.util.Event.addListener("sbot","click",function(C){YAHOO.EU.Shopping.openInPopup(C,A,B)});YAHOO.util.Event.addListener("store-profile","click",function(C){YAHOO.EU.Shopping.openInPopup(C,A,B)})});YAHOO.util.Event.onDOMReady(function(){YAHOO.util.Event.addListener("mer-search","submit",function(B){var A=document.getElementById("mer-search-query");if(A.value==""){YAHOO.util.Event.stopEvent(B);if(!document.getElementById("merchant-search-error")){var C=document.createElement("p");C.id="merchant-search-error";C.appendChild(document.createTextNode(YAHOO.EU.Shopping.locale.merchantSearchError));document.getElementById("mer-search").insertBefore(C,A)}}})});YAHOO.util.Event.onDOMReady(function(){var C=document.getElementById("pop-cats-show");var A=document.getElementById("pop-cats-hide");var B=document.getElementById("more-other-cats");if(C&&A){YAHOO.util.Event.addListener(C,"click",function(D){YAHOO.util.Event.preventDefault(D);YAHOO.util.Dom.removeClass(B,"hide");YAHOO.util.Dom.addClass(C,"hide");YAHOO.util.Dom.removeClass(A,"hide")});YAHOO.util.Event.addListener(A,"click",function(D){YAHOO.util.Event.preventDefault(D);YAHOO.util.Dom.addClass(B,"hide");YAHOO.util.Dom.removeClass(C,"hide");YAHOO.util.Dom.addClass(A,"hide")})}});(function(){if(!window.console){window.console={};window.console.log=function(){return false}}var D=[];var C=[];for(var B=0,A=D.length;B<A;B++){C[B]=new Image();C[B].src=D[B]}YAHOO.util.Event.onAvailable("s",function(){YAHOO.util.Event.addListener("search","submit",function(E){if(this.value==""){YAHOO.util.Event.stopEvent(E);this.focus()}},this,true)})})();YAHOO.util.Event.addListener(window,"load",function(){if(document.getElementById("yahoo-sponsored-links-overturecomm")){document.getElementById("yahoo-sponsored-links-overturecomm").style.display="block"}if(document.getElementById("yahoo-sponsored-links")){document.getElementById("yahoo-sponsored-links").style.display="block"}});YAHOO.EU.Shopping.partnerwithus={init:function(){var A=YAHOO.util.Dom.getElementsByClassName("form-add-more","a");for(var C=0,B=A.length;C<B;C++){YAHOO.util.Dom.setStyle(A[C],"display","inline");YAHOO.util.Event.addListener(A[C],"click",YAHOO.EU.Shopping.partnerwithus.createField,this,true)}},createField:function(F){YAHOO.util.Event.preventDefault(F);var G=YAHOO.util.Event.getTarget(F);var C=G.parentNode;var E=G.title;var B=YAHOO.util.Dom.getElementsByClassName("form-original-fields","span",C);var A=YAHOO.util.Dom.getElementsByClassName("form-more-fields","span",C);if(A.length<=8){if(B[0]){var D=document.createElement("span");YAHOO.util.Dom.addClass(D,"form-more-fields");D.innerHTML="<label>&nbsp;</label>"+B[0].innerHTML;if(A.length<2){C.appendChild(D)}if(E=="input"){C.appendChild(D)}}}}};YAHOO.util.Event.onDOMReady(function(){if(document.getElementById("partner-withus-form")){YAHOO.EU.Shopping.partnerwithus.init()}});(function(){YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.unObfuscateMails={init:function(){var A=YAHOO.util.Dom.getElementsByClassName("obfuscateEmail","a");var B=YAHOO.util.Dom.getElementsByClassName("obfuscateEmail","span");return this.unObfuscate(A)&&this.unObfuscate(B)},unObfuscate:function(D){var B=D.length;var C=YAHOO.EU.Shopping.locale.obfuscationKey;for(var A=0;A<B;A++){D[A].innerHTML=D[A].innerHTML.replace(C,"@","g");if(D[A].tagName.toLowerCase()=="a"){D[A].href=D[A].href.replace(C,"@","g")}}return true}};YAHOO.util.Event.addListener(window,"load",function(){if(YAHOO.EU.Shopping.Flags.obfuscateEmail){YAHOO.EU.Shopping.unObfuscateMails.init()}})})();YAHOO.namespace("YAHOO.Kelkoo");YAHOO.Kelkoo.wrapText=function(C){var B=document.getElementById(C.linkId);if(B){var D=document.getElementById(C.spanHellipId);var A=document.getElementById(C.spanAfterId);YAHOO.util.Event.on(B,"click",function(E){YAHOO.util.Event.stopEvent(E);B.blur();if(D&&A&&B){D.className=(D.className=="show")?"hide":"show";A.className=(A.className=="show")?"hide":"show";B.className=(B.className=="show-details")?"hide-details":"show-details";B.innerHTML=(B.innerHTML==C.linkLabelShow)?C.linkLabelHide:C.linkLabelShow}},true)}};YAHOO.util.Event.onDOMReady(function(){YAHOO.Kelkoo.wrapText({linkId:"wrap-text",linkLabelShow:YAHOO.EU.Shopping.locale.lvl2ShowDetails,linkLabelHide:YAHOO.EU.Shopping.locale.lvl2HideDetails,spanHellipId:"desc-hellip",spanAfterId:"desc-tail"})});YAHOO.Kelkoo.closeBanner=function(){banner=document.getElementById("banner");banner.parentNode.removeChild(banner)};YAHOO.Kelkoo.changeFormAction=function(D,E){if(E!=undefined){var C=E}else{var C=YAHOO.util.Event.getTarget(D)}var B=YAHOO.util.Dom.getElementsByClassName("formAct","input",C);if(B.length>0){var A=B[0].value;C.action=A;C.method="get";C.submit()}};YAHOO.util.Event.onDOMReady(function(){var A=document.getElementsByTagName("form");YAHOO.util.Event.addListener(A,"submit",YAHOO.Kelkoo.changeFormAction)});YAHOO.util.Event.onDOMReady(function(){var A="";if(document.getElementById("results-view-Grid-label")){YAHOO.Kelkoo.clickTale("view as: list")}if(document.getElementById("results-view-List-label")){YAHOO.Kelkoo.clickTale("view as: grid")}if(document.getElementById("results-sortBy")){A=document.getElementById("results-sortBy");YAHOO.util.Event.addListener(A,"change",function(B){YAHOO.Kelkoo.clickTale("sorting by: "+A.value)})}});YAHOO.Kelkoo.clickTale=function(A){if(window.ClickTaleTag){ClickTaleTag(A)}};YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.Results=function(B,A){YAHOO.EU.Shopping.Results.superclass.constructor.call(this,B,A)};YAHOO.extend(YAHOO.EU.Shopping.Results,YAHOO.widget.Module);YAHOO.EU.Shopping.Results.pageResults=[];YAHOO.EU.Shopping.Results.prototype.init=function(B,A){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var D=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.Results.prototype.init");var C=-1}YAHOO.EU.Shopping.Results.superclass.init.call(this,B);this.beforeInitEvent.fire(YAHOO.EU.Shopping.Results);if(A){this.cfg.applyConfig(A,true)}this.initElementReferences();this.initDOMEventListeners();this.initDOMManipulations();this.initEvent.fire(YAHOO.EU.Shopping.Results);if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(D,C)}};YAHOO.EU.Shopping.Results.prototype.initEvents=function(){YAHOO.EU.Shopping.Results.superclass.initEvents.call(this);this.beforeSubmitViewTypeFormEvent=new YAHOO.util.CustomEvent("beforeSubmitViewTypeForm",this)};YAHOO.EU.Shopping.Results.prototype.initDefaultConfig=function(){YAHOO.EU.Shopping.Results.superclass.initDefaultConfig.call(this);this.cfg.addProperty("shortDetailsLength",{value:70});this.cfg.addProperty("shortDetailsLength-holidays_hotel",{value:160});this.cfg.addProperty("shortDetailsLength-hotel_kelkoo",{value:80})};YAHOO.EU.Shopping.Results.prototype.initElementReferences=function(){this.form=this.element.getElementsByTagName("form")[0]};YAHOO.EU.Shopping.Results.prototype.initDOMEventListeners=function(){YAHOO.util.Event.addListener(this.element,"click",this.onClick,this,true);var C=this.element.getElementsByTagName("form")[1]||undefined;if(C){YAHOO.util.Event.addListener(this.element.getElementsByTagName("form")[1],"submit",this.onSubmitCompareForm,this,true);var A=C.getElementsByTagName("input");for(var D=0,B;B=A[D];D++){if(B.getAttribute("type")=="checkbox"){YAHOO.util.Event.addListener(B,"click",this.onCheckCompareForm,C,true)}}}};YAHOO.EU.Shopping.Results.prototype.onClick=function(W){var Y=YAHOO.util.Event.getTarget(W);if((Y.nodeName.toLowerCase()=="input")&&(YAHOO.util.Dom.hasClass(Y,"date"))){YAHOO.util.Event.stopEvent(W);var D=YAHOO.util.Dom.getRegion(Y);this.calendar.show();this.calendar.text_field=Y;var F=Y;while(F.tagName.toLowerCase()!="form"){F=F.parentNode}var C=F.getElementsByTagName("input");var O=null;var V=null;for(var U=0,L;L=C[U];U++){if(YAHOO.util.Dom.hasClass(L,"from")){O=L}if(YAHOO.util.Dom.hasClass(L,"to")){V=L}}if(YAHOO.util.Dom.hasClass(Y,"from")&&(V!=null)){var E=V.value.split("/");if(E.length==3){var I=E[0]+"/"+E[1]+"/"+E[2];this.calendar.cfg.setProperty("mindate",new Date())}}if(YAHOO.util.Dom.hasClass(Y,"to")&&(O!=null)){var E=O.value.split("/");if(F.catId&&F.catId.value=="170701"&&E.length==3){var B=E[0]+"/"+E[1]+"/"+E[2];var M=new Date(E[2],E[1]-1,E[0]);M.setDate(M.getDate()+1);this.calendar.cfg.setProperty("mindate",M)}else{if(E.length==3){var B=E[0]+"/"+E[1]+"/"+E[2];this.calendar.cfg.setProperty("mindate",B)}}}if(Y.value.length){var E=Y.value.split("/");if(E.length==3){var A=E[0]+"/"+E[1]+"/"+E[2];this.calendar.cfg.setProperty("selected",A);this.calendar.cfg.setProperty("pagedate",E[1]+"/"+E[2])}}this.calendar.render();var X=document.getElementById("calendar_container");X.style.position="absolute";YAHOO.util.Dom.setXY(X,[D.left,D.bottom]);if(YAHOO.util.Dom.isAncestor("action-zoom-container",Y)){YAHOO.util.Event.removeListener("calendar_container","mouseover");YAHOO.util.Event.addListener("calendar_container","mouseover",YAHOO.EU.Shopping.Utils.ZoomManagement.manageLayer,{offerId:YAHOO.EU.Shopping.Utils.ZoomManagement.extendedShown});var N=YAHOO.util.Dom.getElementsByClassName("date-js","input","action-zoom-container");YAHOO.util.Event.removeListener(N,"mouseover");YAHOO.util.Event.addListener(N,"mouseover",YAHOO.EU.Shopping.Utils.ZoomManagement.manageLayer,{offerId:YAHOO.EU.Shopping.Utils.ZoomManagement.extendedShown})}}if(YAHOO.util.Dom.hasClass(Y,"show-hide-details")){YAHOO.util.Event.stopEvent(W);this.showHideDetails(Y)}if(YAHOO.util.Dom.hasClass(Y,"show-hide-dates")){YAHOO.util.Event.stopEvent(W);var S=new RegExp("(show|hide)-dates-(.+)$").exec(Y.id);if(S==null){return }var G=S[2];var T=S[1];var K=(T=="show")?"hide":"show";YAHOO.util.Dom.removeClass(Y,"show-dates");YAHOO.util.Dom.addClass(Y,"hide-dates");YAHOO.util.Dom.removeClass(YAHOO.util.Dom.get(K+"-dates-"+G),"hide-dates");YAHOO.util.Dom.addClass(YAHOO.util.Dom.get(K+"-dates-"+G),"show-dates");YAHOO.util.Dom.removeClass(YAHOO.util.Dom.get("list-dates-"+G),K+"-dates");YAHOO.util.Dom.addClass(YAHOO.util.Dom.get("list-dates-"+G),T+"-dates")}if((Y.tagName.toLowerCase()=="a")&&YAHOO.util.Dom.hasClass(Y.parentNode,"current-view-info")){YAHOO.util.Event.stopEvent(W);if(YAHOO.util.Dom.hasClass(Y,"used")){var R="used"}else{var R="all"}var Q=document.getElementById("results-newused");if(Q){var P=Q.options[0];while(P){if(P.value==R){P.selected=true;break}P=P.nextSibling}Q.form.submit()}}if((Y.tagName.toLowerCase()=="label")&&(Y.htmlFor=="results-view-Details")){var J=YAHOO.util.Dom.getElementsByClassName("show-hide-details");for(var U=0,H;H=J[U];U++){this.showHideDetails(H)}}};YAHOO.EU.Shopping.Results.prototype.onSubmitCompareForm=function(H){var C=0;var F=0;var G=YAHOO.util.Event.getTarget(H);var A=G.getElementsByTagName("input");for(var E=0,B;B=A[E];E++){if(B.getAttribute("type")=="checkbox"){C++;if(B.checked){F++}}}if(C>0&&F<2){YAHOO.util.Event.stopEvent(H);var D=G.getElementsByTagName("button");YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(D[0],YAHOO.EU.Shopping.locale.minProductsToCompare,"compare-min-error");YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(D[1],YAHOO.EU.Shopping.locale.minProductsToCompare,"compare-min-error-2");return false}return true};YAHOO.EU.Shopping.Results.prototype.onCheckCompareForm=function(G,B){var E=0;var A=0;var H=YAHOO.util.Event.getTarget(G);if(H.checked){var F=B.getElementsByTagName("input");for(var D=0,I;I=F[D];D++){if(I.getAttribute("type")=="checkbox"){E++;if(I.checked){A++}}}var C=B.getAttribute("max_compare");if(A>C){YAHOO.log("superieur a max");YAHOO.util.Event.stopEvent(G);H.checked=false;var J=YAHOO.EU.Shopping.locale.maxProductsToCompare.replace("MAX_COMPARE",C);YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(H.parentNode,J,"compare-max-error");return false}return true}};Date.prototype.getFullDate=function(){var A=this.getDate();var B=A;if(A<10){B="0"+A}return B};Date.prototype.getFullMonth=function(){var B=this.getMonth()+1;var A=B;if(B<10){A="0"+B}return A};YAHOO.EU.Shopping.Results.prototype.exportCalendarIntoTextField=function(A,C){var B=null;if(YAHOO.EU.Shopping.YUICalendarConf.MDY_DAY_POSITION<YAHOO.EU.Shopping.YUICalendarConf.MDY_MONTH_POSITION){B=A.getFullDate()+YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+A.getFullMonth()}else{B=A.getFullMonth()+YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+A.getFullDate()}if(YAHOO.EU.Shopping.YUICalendarConf.MDY_YEAR_POSITION==3){B+=YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+A.getFullYear()}else{B=+YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+A.getFullYear()}C.value=B};YAHOO.EU.Shopping.Results.prototype.onCalendarDateSelected=function(M,L,F){var A=L[0];var B=A[0];var N=B[0],K=B[1],O=B[2];var I=new Date();I.setFullYear(N,K-1,O);YAHOO.EU.Shopping.Results.prototype.exportCalendarIntoTextField(I,this.calendar.text_field);this.calendar.hide();var Q=document.getElementById(this.calendar.text_field.id);while(Q.tagName.toLowerCase()!="form"){if(!Q.parentNode){return }Q=Q.parentNode}var H=Q.getElementsByTagName("input");var E=null;var C=null;for(var D=0,P;P=H[D];D++){if(YAHOO.util.Dom.hasClass(P,"from")){E=P}if(YAHOO.util.Dom.hasClass(P,"to")){C=P}}if(YAHOO.util.Dom.hasClass(this.calendar.text_field,"from")&&(C!=null)){var G=new Date();G.setFullYear(N,K-1,O+5);YAHOO.EU.Shopping.Results.prototype.exportCalendarIntoTextField(G,C);var J=new YAHOO.util.ColorAnim(C,{backgroundColor:{to:"#FFF",from:"#FFFF00"}},1,YAHOO.util.Easing.easeIn);J.animate()}};YAHOO.EU.Shopping.Results.prototype.initDOMManipulations=function(){this.initExtendedView();YAHOO.EU.Shopping.PromoToogle.init();YAHOO.EU.Shopping.TextEllipsis.init();if((this.form&&YAHOO.util.Dom.hasClass(this.form,"view-details"))&&(YAHOO.util.Dom.getElementsByClassName("results-flight").length==0)&&(YAHOO.util.Dom.getElementsByClassName("results-hotel").length==0)){YAHOO.util.Dom.addClass(this.form,"view-details-js");var B=this.form.getElementsByTagName("fieldset");if(!B.length){return }if(B.length>=1){var G=B[0].getElementsByTagName("label")}else{var G=B[1].getElementsByTagName("label")}var A=false;for(var F=0,L;L=G[F];F++){var D=document.getElementById(L.htmlFor);if(D&&D.getAttribute("type")=="radio"){D.style.display="none";if(D.getAttribute("checked")=="checked"){D.checked=true;if(D.id=="results-view-Detailed"){A=true}}if(D.checked){YAHOO.util.Dom.addClass(L,"selected")}}YAHOO.util.Event.addListener(L,"click",this.changeViewType,this,true)}YAHOO.util.Dom.batch(this.form.getElementsByTagName("select"),function(M){YAHOO.util.Event.addListener(M,"change",function(){var N=document.getElementById("results-currentPage");if(N){N.parentNode.removeChild(N)}this.submitViewTypeForm(this)},this,true)},this,true)}var J=false;var H=this.element.getElementsByTagName("input");for(var F=0,K;K=H[F];F++){if(YAHOO.util.Dom.hasClass(K,"date")){YAHOO.util.Dom.addClass(K,"date-js");J=true}}if(J){var C=document.getElementById("calendar_container");if(!C){C=document.createElement("div");C.id="calendar_container";YAHOO.util.Dom.addClass(C,"calendar-container");document.body.appendChild(C)}function I(){this.calendar=new YAHOO.widget.Calendar("calendar","calendar_container",YAHOO.EU.Shopping.YUICalendarConf);this.calendar.cfg.setProperty("title",YAHOO.EU.Shopping.locale.chooseDate+":",false);this.calendar.cfg.setProperty("close",true);this.calendar.cfg.setProperty("mindate",new Date());this.calendar.cfg.setProperty("maxdate",YAHOO.widget.DateMath.add(new Date(),YAHOO.widget.DateMath.DAY,365));this.calendar.selectEvent.subscribe(this.onCalendarDateSelected,this,true);this.calendar.render();C.style.display="none"}YAHOO.util.Dom.onMethodAvailable("YAHOO.widget.Calendar",I,this,true)}var E=YAHOO.util.Dom.getElementsBy(function(N){var M=new RegExp(/^lvl-form-/);return(M.test(N.id))},"form",this.element);if(YAHOO.lang.isArray(E)&&E.length>0){YAHOO.util.Dom.batch(E,function(M){YAHOO.util.Event.addListener(M,"submit",YAHOO.EU.Shopping.Results.validateDateForm)})}};YAHOO.EU.Shopping.Results.prototype.submitViewTypeForm=function(A){if(this.beforeSubmitViewTypeFormEvent.fire(this.form,this)){YAHOO.Kelkoo.changeFormAction(A,this.form)}};YAHOO.EU.Shopping.Results.validateDateForm=function(F,E){if(F){var E=YAHOO.util.Event.getTarget(F);YAHOO.util.Event.preventDefault(F)}function B(J,H){var I=new YAHOO.util.ColorAnim(J,{backgroundColor:{to:"#FFF",from:"#FFFF00"}},4,YAHOO.util.Easing.easeIn);I.animate();alert(H)}var D=false;if(E.departureDate&&!YAHOO.EU.Shopping.validate.isDate(E.departureDate.value)){B(E.departureDate,YAHOO.EU.Shopping.locale.wrongDateFormat)}else{D=true}var G=YAHOO.widget.DateMath.getDate(E.departureDate.value);if(E.returnDate){var A=E.returnDate.value;if(D&&(!A||!YAHOO.EU.Shopping.validate.isDate(A))){B(E.returnDate,YAHOO.EU.Shopping.locale.wrongDateFormat);D=false}A=YAHOO.widget.DateMath.getDate(A);if(D&&(G.toString()!=A.toString())&&!YAHOO.widget.DateMath.before(G,A)){B(E.returnDate,YAHOO.EU.Shopping.locale.returnDateBeforeDeparture);D=false}if(D&&E.catId&&E.catId.value=="170701"&&G.toString()==A.toString()){B(E.returnDate,YAHOO.EU.Shopping.locale.returnDateEqualsDeparture);D=false}}if(D&&!G){B(E.departureDate,YAHOO.EU.Shopping.locale.wrongDateFormat);D=false}var C=new Date();C.setHours(0);C.setMinutes(0);C.setSeconds(0);C.setMilliseconds(0);if(D&&YAHOO.widget.DateMath.before(G,C)){B(E.departureDate,YAHOO.EU.Shopping.locale.departureDateBeforeToday);D=false}if(D){E.submit()}else{return false}};YAHOO.EU.Shopping.Results.prototype.initExtendedView=function(){if(YAHOO.EU.Shopping.Flags.extended){YAHOO.util.Dom.getElementsByClassName("extended-view-btn","span","level-results-page",function(A){YAHOO.EU.Shopping.Results.initSingleExtendedView(A)})}};YAHOO.EU.Shopping.Results.initSingleExtendedView=function(A){result=A;while(result!=null&&YAHOO.util.Dom.hasClass(result,"result")==false){result=result.parentNode}if(result!=null){if(!result.onExtendedViewChange){result.onExtendedViewChange=new YAHOO.util.CustomEvent("extended view changing")}YAHOO.util.Event.addListener(A,"click",function(B){YAHOO.util.Event.getTarget(B).blur();YAHOO.EU.Shopping.initCaroussel(this);if(YAHOO.util.Dom.hasClass(this,"extended-view-shown")){YAHOO.util.Dom.replaceClass(this,"extended-view-shown","extended-view-hidden");this.onExtendedViewChange.fire({display:"hide"})}else{if(YAHOO.util.Dom.hasClass(this,"extended-view-hidden")){YAHOO.util.Dom.replaceClass(this,"extended-view-hidden","extended-view-shown");this.onExtendedViewChange.fire({display:"show"})}}YAHOO.util.Event.preventDefault(B)},result,true)}};YAHOO.EU.Shopping.PromoToogle={currentToogle:null,initialized:false,initBodyEvent:function(){YAHOO.util.Event.addListener(document.body,"click",function(B){if(this.currentToogle!==null){var A=YAHOO.util.Event.getTarget(B);while(A!==null&&!(A.nodeName.toLowerCase()=="div"&&YAHOO.util.Dom.hasClass(A,"toogle-content"))){A=A.parentNode}if(A==null){YAHOO.EU.Shopping.PromoToogle.hideToogle()}}});this.initialized=true},hideToogle:function(){YAHOO.util.Dom.removeClass(this.currentToogle,"opened-toogle");YAHOO.util.Dom.addClass(this.currentToogle,"closed-toogle");this.currentToogle=null},showToogle:function(A){if(this.initialized==false){this.initBodyEvent()}this.currentToogle=A;YAHOO.util.Dom.removeClass(A,"closed-toogle");YAHOO.util.Dom.addClass(A,"opened-toogle")},initShowToogle:function(){YAHOO.util.Dom.getElementsByClassName("promo-toogle","div","level-results-page",function(){var A=YAHOO.util.Dom.getElementsByClassName("closed-toogle-link","a",this);for(var B=0;B<A.length;B++){YAHOO.util.Event.addListener(A[B],"click",function(C){YAHOO.EU.Shopping.PromoToogle.showToogle(this);YAHOO.util.Event.stopEvent(C)},this,true)}})},initHideToogle:function(){YAHOO.util.Dom.getElementsByClassName("promo-toogle","div","level-results-page",function(){var B=YAHOO.util.Dom.getElementsByClassName("opened-toogle-link","a",this);for(var A=0;A<B.length;A++){YAHOO.util.Event.addListener(B[A],"click",function(C){YAHOO.EU.Shopping.PromoToogle.hideToogle();YAHOO.util.Event.stopEvent(C)},this,true)}})},initDisplayToogle:function(){YAHOO.util.Dom.getElementsByClassName("promo-toogle","div","level-results-page",function(){YAHOO.util.Dom.setStyle(this,"display","block")})},init:function(){if(YAHOO.EU.Shopping.Flags.promo){this.initDisplayToogle();this.initShowToogle();this.initHideToogle()}}};YAHOO.EU.Shopping.TextEllipsis={init:function(){if(YAHOO.EU.Shopping.Flags.promo){if(this.internalInit()){return null}var A=YAHOO.util.Dom.getElementsByClassName("ellipsis","span","level-results-page");for(var B=0;B<A.length;B++){this.set(A[B])}}},set:function(B){var A=document.createElement("ins");B.appendChild(A);B.__ElipsisCheck=A;var C=document.createElement("var");B.appendChild(C);B.__ElipsisStyle=C.style;this.handleEllipsis.apply(B);B.addEventListener("overflow",this.handleEllipsis,false);B.addEventListener("underflow",this.handleEllipsis,false)},handleEllipsis:function(){var A=this;setTimeout(function(){A.__ElipsisStyle.display=(A.__ElipsisCheck.offsetLeft>=1)?"block":""},100)},internalInit:function(){sTextOverFlow=YAHOO.util.Dom.getStyle(document.body,"textOverflow");if(typeof (sTextOverFlow)=="string"||!document.getBoxObjectFor){for(i in this){delete this[i]}return true}return false}};YAHOO.EU.Shopping.Results.getOfferType=function(B){while(B.parentNode){var C=new RegExp(/offer-([a-z_-]+)/);var A=C.exec(B.className);if(!YAHOO.lang.isNull(A)&&A[1]!="form"){return A[1]}B=B.parentNode}return false};YAHOO.util.Event.addListener(window,"load",function(){YAHOO.EU.Shopping.Results.pageResults.push(new YAHOO.EU.Shopping.Results("level-results-page"))});var openFreeOfferLayer=function(C,G,B,A){var D=document.getElementById("freeOfferLayer");var E=document.getElementById(G);if(B==""){YAHOO.util.Dom.addClass("freeOfferMsg","hide");YAHOO.util.Dom.removeClass("disclamerMsg","hide")}else{YAHOO.util.Dom.removeClass("freeOfferMsg","hide");YAHOO.util.Dom.addClass("disclamerMsg","hide");YAHOO.util.Dom.getElementsByClassName("last-update-date",null,D,function(){this.innerHTML=B})}if((A!="grid")&&(D.clientHeight<(E.clientHeight-25))){YAHOO.util.Dom.setStyle(D,"height",(E.clientHeight-25)+"px")}else{YAHOO.util.Dom.setStyle(D,"height","auto")}YAHOO.util.Dom.getElementsByClassName("cta",null,D,function(){this.setAttribute("href","javascript:uxViewLink('"+C+"', true);")});var F=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.removeClass(D,"hide");if(A=="grid"){YAHOO.util.Dom.setXY(D,[F[0]+20,F[1]+160])}else{YAHOO.util.Dom.setXY(D,[F[0]+110,F[1]+10])}YAHOO.util.Dom.getElementsByClassName("close",null,D,function(){this.onclick=function(){YAHOO.util.Dom.addClass(D,"hide");return false}})};YAHOO.util.Event.addListener("filters-keyword1","click",function(A){this.value=""});YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.globalnav={config:{mode:"ajax",width:676,debug:false,sIdent:"global-nav-drop-down",sUrl:YAHOO.EU.Shopping.config.globalnav.dataURL,iMouseOverDelay:1000,iMouseEnterDelay:3000,bCloseIfNotEntered:false,aTabs:["gn-categories","gn-brands","gn-stores","gn-themes"]},cache:{sTabClickedId:""},init:function(){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var F=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.globalnav.init");var A=1}var E=YAHOO.EU.Shopping.globalnav;E.dropDown=new YAHOO.widget.Overlay(E.config.sIdent,{visible:false,monitorresize:true,iframe:true});E.cache.oDrop=document.getElementById(E.config.sIdent);var H=document.createElement("div");H.id="nav-wrapper";E.cache.oDrop.appendChild(H);E.navWrapper=H;var G=E.config.aTabs;var I;for(var D=0,C=G.length;D<C;D++){I=document.getElementById(G[D]);YAHOO.util.Event.addListener(I,"mouseup",E.tabEventHandler,I,true);YAHOO.util.Event.addListener(I,"keypress",E.tabEventHandler,I,true);YAHOO.util.Event.addListener(I,"click",E.tabEventHandler,I,true)}YAHOO.util.Event.addListener(document.getElementsByTagName("html")[0],"click",E.hideDropDown);var B=function(){if(E.dropDown.cfg.getProperty("visible")){E.setDropCoords()}};YAHOO.widget.Module.textResizeEvent.subscribe(B);YAHOO.widget.Overlay.windowResizeEvent.subscribe(B);if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(F,A)}},tabEventHandler:function(D){var B=YAHOO.EU.Shopping.globalnav;var E=this;switch(D.type){case"mouseup":if(B.cache.oTabClicked){YAHOO.util.Dom.removeClass(B.cache.oTabClicked.parentNode,"gn-drop-down");YAHOO.util.Dom.removeClass(B.cache.oTabClicked.parentNode,"gn-drop-down-nosel")}B.cache.isInDropDown=false;var C=E.parentNode;YAHOO.util.Dom.addClass(C,"gn-drop-down");var A=(window.ActiveXObject)?true:false;if(A&&C.className.indexOf("subchoice")==-1){YAHOO.util.Dom.addClass(C,"gn-drop-down-nosel")}B.cache.sTabClickedId=E.id;B.cache.oTabClicked=E;B.loadDropDown(E);if(B.timedClose){window.clearTimeout(B.timedClose)}if(!B.closeDropNotEntered&&!B.timedClose&&B.config.bCloseIfNotEntered){B.closeDropNotEntered=window.setTimeout(function(){if(B.cache.isInDropDown==false){B.dropDown.cfg.setProperty("visible",false)}B.closeDropNotEntered=null},B.config.iMouseEnterDelay)}YAHOO.util.Event.stopEvent(D);break;case"keypress":if(D.keyCode==13){window.location=E.href;YAHOO.util.Event.stopEvent(D)}break;case"click":YAHOO.util.Event.stopEvent(D);break}},getNavData:function(){var A=YAHOO.EU.Shopping.globalnav;switch(A.config.mode){case"json":var C=document.getElementsByTagName("head")[0];var B=document.createElement("script");B.type="text/javascript";B.src=A.config.sUrl+"?JSON=dataCallBack";C.appendChild(B);break;case"ajax":var D=YAHOO.util.Connect.asyncRequest("GET",A.config.sUrl,A.ajaxHandler,null);break}},dataCallBack:function(B){var A=YAHOO.EU.Shopping.globalnav;A.cache.dropDownData=B;if(A.cache.sTabClickedId&&A.cache.dropDownData&&!YAHOO.lang.isUndefined(A.cache.dropDownData[A.cache.sTabClickedId])){A.navWrapper.innerHTML=A.cache.dropDownData[A.cache.sTabClickedId];A.setCloseEvent()}else{A.hideDropDown()}},setCloseEvent:function(){var A=YAHOO.EU.Shopping.globalnav;var B=YAHOO.util.Dom.getElementsByClassName("close","a",A.cache.oDrop)[0];YAHOO.util.Event.addListener(B,"click",A.hideDropDown,{closelink:true},false)},ajaxHandler:{success:function(o){var YESg=YAHOO.EU.Shopping.globalnav;var sResponse=(o.responseText.indexOf("<!--")>-1)?o.responseText.replace(/<!--[\s\S]*?-->/g,""):o.responseText;oData=eval(sResponse);YESg.dataCallBack(oData)},failure:function(B){var A=YAHOO.EU.Shopping.globalnav;window.location=document.getElementById(A.cache.sTabClickedId).href},timeout:5000},loadDropDown:function(B){var A=YAHOO.EU.Shopping.globalnav;if(!A.cache.dropDownData){A.getNavData()}else{A.navWrapper.innerHTML=A.cache.dropDownData[B.id];A.setCloseEvent()}if(A.dropDown){A.setDropCoords(null,true);YAHOO.util.Event.addListener(A.cache.oDrop,"mouseover",A.dropDownEventHandler,this,true);YAHOO.util.Event.addListener(A.cache.oDrop,"mouseout",A.dropDownEventHandler,this,true);if(!A.cache.dropDownData){A.navWrapper.innerHTML='<img class="loading" src="http://r6.kelkoo.com/ux/globalnav/throbber.gif" alt=""><p class="loading">'+YAHOO.EU.Shopping.locale.loading+"</p>"}}},setDropCoords:function(G,C){var J;var D=YAHOO.EU.Shopping.globalnav;if(document.getElementById("kelkoo-logo")===null){var A=YAHOO.util.Dom.getRegion("page")}else{var A=YAHOO.util.Dom.getRegion("main")}var I=YAHOO.util.Dom.getRegion(D.cache.oTabClicked.parentNode?D.cache.oTabClicked.parentNode:D.cache.oTabClicked);var F=A.right;var L=A.left;var K=I.left;var E=I.right;var H=I.bottom-2;var B=D.config.width;if((K+B)>F){J=F-B}else{J=K-2}J=L;D.dropDown.cfg.setProperty("x",J);D.dropDown.cfg.setProperty("y",H);if(C){D.dropDown.cfg.setProperty("visible",true)}},dropDownEventHandler:function(D){var B=YAHOO.EU.Shopping.globalnav;YAHOO.util.Event.stopPropagation(D);var A=YAHOO.util.Event.getRelatedTarget(D);var C=YAHOO.util.Event.getTarget(D);switch(D.type){case"mouseover":if(B.cache.isInDropDown==false){B.cache.isInDropDown=true}break;case"mouseout":if(C==B.cache.oDrop||C.parentNode==B.cache.oDrop){B.cache.isInDropDown=false;B.timedClose=window.setTimeout(function(){if(B.cache.isInDropDown==false){B.closeDrop()}},B.config.iMouseOverDelay)}break}},closeDrop:function(B){var A=YAHOO.EU.Shopping.globalnav;A.dropDown.cfg.setProperty("visible",false);if(A.cache.oTabClicked){YAHOO.util.Dom.removeClass(A.cache.oTabClicked.parentNode,"gn-drop-down");YAHOO.util.Dom.removeClass(A.cache.oTabClicked.parentNode,"gn-drop-down-nosel")}A.cache.mouseInDropDown=false},hideDropDown:function(C,D){D=D||null;var B=YAHOO.util.Event.getTarget(C);var A=YAHOO.EU.Shopping.globalnav;if(D&&D.closelink){A.closeDrop(C)}else{if(!YAHOO.util.Dom.isAncestor(A.cache.oDrop,B)){A.closeDrop()}}if(C&&YAHOO.util.Event.getTarget(C).className=="close"){YAHOO.util.Event.preventDefault(C)}}};YAHOO.util.Event.onDOMReady(YAHOO.EU.Shopping.globalnav.init);function uxViewLink(B,A){var C=uxDecode64(B);uxViewDecodedLink(C,A)}function uxViewDecodedLink(B,A){if(A){var C="scrollbars=yes,toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=yes,status=yes,width=800,height=500";window.open(B,"",C)}else{window.location.href=B}}function uxDecode64(A){var D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var K,I,G,J,H,F,E;var B="";var C=0;A=A.replace(/-/g,"+").replace(/_/g,"=").replace(/\./g,"/");if(A.match("/[^A-Za-z0-9+\\/=]/")){return""}do{J=D.indexOf(A.charAt(C++));H=D.indexOf(A.charAt(C++));F=D.indexOf(A.charAt(C++));E=D.indexOf(A.charAt(C++));K=(J<<2)|(H>>4);I=((H&15)<<4)|(F>>2);G=((F&3)<<6)|E;B+=String.fromCharCode(K);if(F!=64){B+=String.fromCharCode(I)}if(E!=64){B+=String.fromCharCode(G)}K=I=G=J=H=F=E=""}while(C<A.length);return B}function uxStoreRefererCookie(){var A=unescape(document.location.href);YAHOO.EU.Shopping.cookie.set("Referer",A,1)}function uxTrvVisit(B){var A=YAHOO.util.Dom.get("lvl-form-"+B);if(YAHOO.lang.isObject(A)){if(YAHOO.lang.isObject(A.mode)){A.mode.value="buy"}if((arguments.length>1)&&arguments[1]){A.target="_blank"}YAHOO.EU.Shopping.Results.validateDateForm(null,A)}}function kk_link(A){uxViewLink(A)}function kk_link3(A){uxViewLink(A)}function kk_afficheCommande3(A){uxViewLink(A,true)}function kk_afficheCommande(A){uxViewDecodedLink(A,true)}function kk_go3(A){uxViewLink(A)}function kk_viewMerchant3(A){uxViewLink(A,true)}function addBookmark(){var B=window.document.URL;var A=window.document.title;if(window.ActiveXObject){window.external.AddFavorite(B,A)}else{if(navigator.userAgent.indexOf("Opera")!=-1){alert(YAHOO.EU.Shopping.locale.bookmarkMsg.replace(/\{0\}/,"CTRL + T"))}else{alert(YAHOO.EU.Shopping.locale.bookmarkMsg.replace(/\{0\}/,"CTRL + D"))}}}YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.linkTracking={getTrackerLink:function(A,B){return YAHOO.EU.Shopping.config.tracking.baseUrl+"/"+B+"/*"+A},addLinkTracking:function(){var I=new RegExp(YAHOO.EU.Shopping.config.tracking.uastring);if(!I.exec(navigator.userAgent)){var G=this.id;if(G){var H=document.getElementById(G);var A=H.getElementsByTagName("a");var C=window.location.host;for(var F=0,D=A.length;F<D;F++){var E=A[F].getAttribute("href");if(!E||E.indexOf("javascript:")>-1||E.substring(0,1)=="#"){continue}var E=(E.indexOf("http")==-1)?"http://"+C+E:E;var B=YAHOO.EU.Shopping.linkTracking.getTrackerLink(E,G);A[F].setAttribute("href",B)}}}},trackUxActions:function(B){var A=YAHOO.util.Get.script(B,{onSuccess:function(){},onFailure:function(){}})},addTracking:function(A){for(var C=0,B=A.length;C<B;C++){YAHOO.util.Event.onContentReady(A[C],YAHOO.EU.Shopping.linkTracking.addLinkTracking)}},formToData:function(H){function E(K){K=escape(K);K=K.replace(/\+/g,"%2B");K=K.replace(/%20/g,"+");return K}var I="";var J=(typeof (H)!="object")?document.forms[H]:H;for(var G=0,D=J.elements.length;G<D;G++){var F=J.elements[G];if(F&&!F.disabled&&F.name){if(F.type=="select-one"||F.type=="select-multi"){for(var C=0,B=F.options.length;C<B;C++){var A=F.options[C];if(F.options[C].selected){I+=F.name+"="+E((F.options[C].value||F.options[C].text))+"&"}}}else{if(F.type=="radio"||F.type=="checkbox"){if(F.checked===true){I+=F.name+"="+E(F.value)+"&"}}else{I+=F.name+"="+E(F.value)+"&"}}}}return I.slice(0,-1)},searchTracking:function(G){var F=document.getElementById("search");var B=window.location.host;var E=F.getAttribute("action");if(E.indexOf("http")==-1){E="http://"+B+E}var C=document.getElementById("s");YAHOO.util.Event.stopEvent(G);if(C.value!=""){var D=YAHOO.EU.Shopping.linkTracking.formToData(F);var A=E+"?"+D;var H=YAHOO.EU.Shopping.linkTracking.getTrackerLink(A,YAHOO.EU.Shopping.config.tracking.productsearchId);window.location=H}else{C.focus()}}};if(window.location.pathname=="/"&&YAHOO.EU.Shopping.config.tracking.bEnabled===true&&YAHOO.EU.Shopping.config.tracking.baseUrl!=""){YAHOO.EU.Shopping.linkTracking.addTracking(YAHOO.EU.Shopping.config.tracking.aModuleIds);YAHOO.util.Event.onContentReady("search",function(){YAHOO.util.Event.addListener("search","submit",YAHOO.EU.Shopping.linkTracking.searchTracking)})}YAHOO.namespace("YAHOO.EU.Shopping.Utils");YAHOO.EU.Shopping.Utils.BookmarkManager={createBookmark:function(A,B){if(typeof (window.external.AddFavorite)!="undefined"){if(B!=="undefined"){window.external.AddFavorite(A,B)}else{window.external.AddFavorite(A,document.title)}return true}return false},setHomePage:function(C,B){var A=document.createElement("a");A.href="#";A.style.behavior="url(#default#homepage)";if(typeof (A.setHomePage)!="undefined"){A.setHomePage(B);return true}return false},initLinks:function(){YAHOO.util.Event.onAvailable(["bmk1","bmk2"],function(){if(YAHOO.EU.Shopping.config.bookmark.isActivated&&window.external&&typeof (window.external.AddFavorite)!="undefined"){YAHOO.util.Dom.replaceClass("bmk1","hide","show");YAHOO.util.Dom.replaceClass("bmk2","hide","show");YAHOO.util.Event.addListener("bookmarkLink","click",function(D){YAHOO.util.Event.preventDefault(D);var B=window.location.href;if(B.indexOf("?")>=0){B=B+"&source=bookmark"}else{B=B+"?source=bookmark"}var A=YAHOO.EU.Shopping.Utils.BookmarkManager.createBookmark(B,document.title);if(A){var C="http://"+window.location.host+YAHOO.EU.Shopping.config.bookmark.trackingUrl+"?"+YAHOO.EU.Shopping.config.bookmark.bookmarkParam;C=YAHOO.EU.Shopping.linkTracking.getTrackerLink(C,"globalnav");YAHOO.EU.Shopping.linkTracking.trackUxActions(C)}});YAHOO.util.Event.addListener("homepageLink","click",function(D){YAHOO.util.Event.preventDefault(D);var B=window.location.href;if(B.indexOf("?")>=0){B=B+"&source=homepage"}else{B=B+"?source=homepage"}var A=YAHOO.EU.Shopping.Utils.BookmarkManager.setHomePage(D,B);if(A){var C="http://"+window.location.host+YAHOO.EU.Shopping.config.bookmark.trackingUrl+"?"+YAHOO.EU.Shopping.config.bookmark.homepageParam;C=YAHOO.EU.Shopping.linkTracking.getTrackerLink(C,"globalnav");YAHOO.EU.Shopping.linkTracking.trackUxActions(C)}})}})}};YAHOO.util.Event.onDOMReady(function(){if(document.getElementById("bmk1")||document.getElementById("bmk2")){YAHOO.EU.Shopping.Utils.BookmarkManager.initLinks()}});YAHOO.namespace("YAHOO.EU.Kelkoo");YAHOO.EU.Kelkoo.ajaxTabs={tabsInit:function(F,D,L,H){YAHOO.EU.Kelkoo.ajaxTabs.tabfired=new YAHOO.util.CustomEvent("tabfired",this);YAHOO.EU.Kelkoo.ajaxTabs.tabsList=document.getElementById(F);YAHOO.EU.Kelkoo.ajaxTabs.contentMain=document.getElementById(D);YAHOO.EU.Kelkoo.ajaxTabs.activeClass=H;var G=YAHOO.EU.Kelkoo.ajaxTabs.tabsList.getElementsByTagName("li");var I=YAHOO.EU.Kelkoo.ajaxTabs.tabsList.getElementsByTagName("a");for(var E=0;E<G.length;E++){var M=YAHOO.util.Dom.generateId();var K=M+"-tab";var J=M+"-cont";if(L[E].defaultActTab==="true"){var K="default-"+F+"-tab";var J="default-"+F+"-cont"}G[E].setAttribute("id",K);var A={parentLi:G[E].id,ajaxLink:L[E].ajaxlink,subCont:J};YAHOO.util.Event.addListener(I[E],"click",YAHOO.EU.Kelkoo.ajaxTabs.displayContent,A,true)}var C=document.createElement("img");var B=YAHOO.util.Dom.generateId();C.setAttribute("src","http://r6.kelkoo.com/misc/ajax-loader.gif");C.setAttribute("id",B);C.setAttribute("alt","");YAHOO.EU.Kelkoo.ajaxTabs.contentMain.appendChild(C);YAHOO.util.Dom.addClass(C,"hide ajaxtabs-loader");YAHOO.EU.Kelkoo.ajaxTabs.ajaxLoader=document.getElementById(B)},displayContent:function(C){YAHOO.util.Event.preventDefault(C);YAHOO.EU.Kelkoo.ajaxTabs.tabfired.fire();var D=document.getElementById(this.parentLi);if(YAHOO.util.Dom.hasClass(D,YAHOO.EU.Kelkoo.ajaxTabs.activeClass)){return }else{var E=YAHOO.util.Dom.getElementsByClassName(YAHOO.EU.Kelkoo.ajaxTabs.activeClass,"li",YAHOO.EU.Kelkoo.ajaxTabs.tabsList)[0];if(E){YAHOO.util.Dom.removeClass(E,YAHOO.EU.Kelkoo.ajaxTabs.activeClass)}var B=(E.id).slice(0,-3);B=B+"cont";YAHOO.util.Dom.addClass(B,"hide");YAHOO.util.Dom.addClass(D,YAHOO.EU.Kelkoo.ajaxTabs.activeClass)}if(document.getElementById(this.subCont)){YAHOO.util.Dom.removeClass(document.getElementById(this.subCont),"hide");return }else{var A=document.createElement("div");A.setAttribute("id",this.subCont);YAHOO.EU.Kelkoo.ajaxTabs.contentMain.appendChild(A);YAHOO.EU.Kelkoo.ajaxTabs.ajaxCall(D,this.ajaxLink,A)}},ajaxCall:function(F,B,E){var H=F.getElementsByTagName("a")[0].href;var A=function(P){if(P.responseText){YAHOO.util.Dom.addClass(YAHOO.EU.Kelkoo.ajaxTabs.ajaxLoader,"hide");function K(S,T){var R;var Q=[];while((R=S.exec(T))!=null){Q.push(R[1])}return Q}var O=/<script.*?>([\s\S]*?)<\/script>/mg;var J=K(O,P.responseText);E.innerHTML=P.responseText.replace(O,"");var N=document.createElement("script");N.type="text/javascript";var L="";for(i=0,j=J.length;i<j;i++){L+=J[i]}if(window.ActiveXObject){N.text=L}else{var I=document.createTextNode(L);N.appendChild(I)}var M=document.getElementsByTagName("head")[0].appendChild(N)}};var C=function(I){window.location=I.argument.fallbackHref};var G={success:A,failure:C,argument:{fallbackHref:H},timeout:10000};YAHOO.util.Dom.removeClass(YAHOO.EU.Kelkoo.ajaxTabs.ajaxLoader,"hide");var D=YAHOO.util.Connect.asyncRequest("GET",B,G)}};YAHOO.EU.Kelkoo.travel={searchformscontrol:{ctrlInit:function(E,B,D){var G=YAHOO.EU.Kelkoo.travel.searchformscontrol;if(E=="flight"){G.removeWarnings("flightForm");if(!G.checkCity("ffl","flightFrom",D.departureWrong)||!G.checkCity("ftl","flightTo",D.arrivalWrong)||!G.checkDates("departureDate","ddf","returnDate","rdf",B,D)){return false}else{var F=document.getElementById("flightForm");if(kk_flight_ctrlForm(F)){F.submit();return true}else{return false}}}if(E=="hotel"){G.removeWarnings("hotelForm");if(!G.checkCity("hti","hotel-town-inp",D.destinationWrong)||!G.checkDates("departureDateHotel","ddh","returnDateHotel","rdh",B,D)){return false}else{var C=document.getElementById("hotelForm");if(kk_hotel_ctrlForm(C)){C.submit();return true}else{return false}}}if(E=="car"){G.removeWarnings("carForm");if(!G.checkDates("departureDateCar","ddc","returnDateCar","rdc",B,D)){return false}else{var A=document.getElementById("carForm");A.submit();return true}}},removeWarnings:function(E){var B=YAHOO.util.Dom.getElementsByClassName("warningctrl","span",E);var A=B.length;for(var C=0;C<A;C++){B[C].parentNode.removeChild(B[C])}var D=YAHOO.util.Dom.getElementsByClassName("datewarn","label",E);var A=D.length;for(var C=0;C<A;C++){YAHOO.util.Dom.removeClass(D[C],"datewarn")}},checkCity:function(F,B,G){var D=document.getElementById(B);if(D.value==""){var E=document.getElementById(F);if(E.getElementsByTagName("span")[0]!==true){var C=document.createElement("span");C.className="warningctrl";var A=document.createTextNode(G);C.appendChild(A);E.appendChild(C)}return false}else{return true}},warnDate:function(C,D){if(C.getElementsByTagName("span")[0]!==true){YAHOO.util.Dom.addClass(C,"datewarn");var B=document.createElement("span");B.className="warningctrl";var A=document.createTextNode(D);B.appendChild(A);C.appendChild(B)}},checkDates:function(U,A,B,L,I,T){var E=YAHOO.EU.Kelkoo.travel.searchformscontrol;var X=document.getElementById(U);var S=document.getElementById(B);var O=document.getElementById(A);var F=document.getElementById(L);var R=new RegExp(/^(?:(?:0?[1-9]|1\d|2[0-8])(\/|-)(?:0?[1-9]|1[0-2]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:31(\/|-)(?:0?[13578]|1[02]))|(?:(?:29|30)(\/|-)(?:0?[1,3-9]|1[0-2])))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(29(\/|-)0?2)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/);if((A=="ddf")&&(document.getElementById("triptypeOneWay").checked==true)){if(!R.test(X.value)){E.warnDate(O,T.wrongDateFormat);return false}}else{if((!R.test(X.value))||(!R.test(S.value))){if(!R.test(X.value)){E.warnDate(O,T.wrongDateFormat)}else{E.warnDate(F,T.wrongDateFormat)}return false}}if((A=="ddh")&&(X.value==S.value)){E.warnDate(F,T.equalDates);return false}var M=X.value.split("/");var D=S.value.split("/");var Q=I.split("/");var P=new Date();var K=M[1]-1;P.setFullYear(M[2],K,M[0]);var J=new Date();var W=D[1]-1;J.setFullYear(D[2],W,D[0]);var H=new Date();var V=Q[1]-1;H.setFullYear(Q[2],V,Q[0]);if(((A=="ddf")&&(document.getElementById("triptypeOneWay").checked==false))||(A!="ddf")){if(P.getTime()>J.getTime()){E.warnDate(F,T.arrivalInf);return false}}if(A=="ddf"){if(document.getElementById("triptypeOneWay").checked==false){var N=new Date();N.setDate(H.getDate()+350);if(J.getTime()>N.getTime()){E.warnDate(F,T.arrivalTooFar);return false}}}else{var N=new Date();N.setDate(H.getDate()+730);if(J.getTime()>N.getTime()){E.warnDate(F,T.arrivalTooFar);return false}}if(A=="ddh"){var G=new Date();G.setDate(H.getDate()+1);if((P.getTime()<H.getTime())||(J.getTime()<G.getTime())){if(P.getTime()<H.getTime()){E.warnDate(O,T.departureInfCurr)}else{E.warnDate(F,T.arrivalInfCurr)}return false}var C=document.getElementById("hotelForm");var C=document.forms.searchFormHotel||document.forms.searchForm;C.nbnights.value=Math.round((J.getTime()-P.getTime())/(1000*3600*24));C.town.value=document.getElementById("hotel-town-inp").value}else{var G=new Date();G.setDate(H.getDate());if(P.getTime()<H.getTime()){E.warnDate(O,T.departureInfCurr);return false}if(((A=="ddf")&&(document.getElementById("triptypeOneWay").checked==false))||(A!="ddf")){if(J.getTime()<G.getTime()){E.warnDate(F,T.arrivalInfCurr)}}}return true}},toggleMerchantVisibility:function(C){YAHOO.EU.Kelkoo.ajaxTabs.tabfired.subscribe(YAHOO.EU.Kelkoo.travel.onTabFired);var I=document.getElementById("merchantlogos");I.style.display="block";var J=I.getElementsByTagName("strong")[0];var B=J.firstChild.nodeValue;var H=document.createElement("a");H.setAttribute("href","#");var A=document.createTextNode(B);H.appendChild(A);J.parentNode.insertBefore(H,J);J.parentNode.removeChild(J);var D=document.getElementById("ml-cont");var E=document.createElement("a");E.setAttribute("href","#");E.className="cont-cls";var F=document.createTextNode(C);E.appendChild(F);D.appendChild(E);YAHOO.util.Dom.addClass(D,"hide");YAHOO.util.Event.addListener(E,"click",G);YAHOO.util.Event.addListener(H,"click",G);function G(K){if(YAHOO.util.Dom.hasClass("ml-cont","hide")){YAHOO.util.Dom.removeClass("ml-cont","hide")}else{YAHOO.util.Dom.addClass("ml-cont","hide")}YAHOO.util.Event.preventDefault(K)}},onTabFired:function(){if(!YAHOO.util.Dom.hasClass("ml-cont","hide")){YAHOO.util.Dom.addClass("ml-cont","hide")}},searchform:{createAdvLink:function(K,H,I,F){var G=document.getElementById(K);var M=document.createElement("p");M.className="avtogg";var E=document.createTextNode(H);M.appendChild(E);var B=document.createElement("a");B.setAttribute("href","#");M.appendChild(B);var D=document.createTextNode(I);B.appendChild(D);G.appendChild(M);var J=document.createElement("p");J.className="avtogg";var A=document.createElement("a");A.setAttribute("href","#");var C=document.createTextNode(" "+F);A.appendChild(C);J.appendChild(A);function L(N){if(YAHOO.util.Dom.hasClass("advanced","hide")){YAHOO.util.Dom.removeClass("advanced","hide");G.removeChild(M);G.appendChild(J)}else{YAHOO.util.Dom.addClass("advanced","hide");G.removeChild(J);G.appendChild(M)}YAHOO.util.Event.preventDefault(N)}YAHOO.util.Event.addListener(B,"click",L);YAHOO.util.Event.addListener(A,"click",L)}}};function kk_setTrackingTravel(B,C,A){return false}YAHOO.EU.Kelkoo.generic={tabs:{activeClass:"active",contentDispClass:"show",init:function(){var A=YAHOO.EU.Kelkoo.generic.tabs;A.container=this;A.tabnav=YAHOO.util.Dom.getElementsByClassName("tabs","ul",this)[0];if(A.tabnav){A.tabLinks=A.tabnav.getElementsByTagName("a");A.tabLis=A.tabnav.getElementsByTagName("li");A.tabContent=YAHOO.util.Dom.getElementsByClassName("cont","",this);YAHOO.util.Event.addListener(A.tabnav,"click",A.switchTabs)}},getIndex:function(C,B){var A=false;for(i=0,j=B.length;i<j;i++){if(C===B[i]){A=i;break}}return A},switchTabs:function(D){YAHOO.util.Event.preventDefault(D);var C=YAHOO.EU.Kelkoo.generic.tabs;var B=YAHOO.util.Event.getTarget(D);if(B.nodeType==3){return }var A=C.getIndex(B,C.tabLinks);if(A===false){return }C.activeTab=(C.activeTab)?C.activeTab:YAHOO.util.Dom.getElementsByClassName("active","li",C.tabnav)[0];C.activeContent=(C.activeContent)?C.activeContent:YAHOO.util.Dom.getElementsByClassName("show","",C.container)[0];if(C.activeTab===C.tabLis[A]){return }YAHOO.util.Dom.removeClass(C.activeTab,C.activeClass);YAHOO.util.Dom.removeClass(C.activeContent,C.contentDispClass);C.activeTab=C.tabLis[A];C.activeContent=C.tabContent[A];YAHOO.util.Dom.addClass(C.activeTab,C.activeClass);YAHOO.util.Dom.addClass(C.activeContent,C.contentDispClass)}}};YAHOO.util.Event.onAvailable("tagcloud",YAHOO.EU.Kelkoo.generic.tabs.init);YAHOO.namespace("YAHOO.EU.Kelkoo.Travel");YAHOO.EU.Kelkoo.travel.AZtabs={sTabContainerId:"az-result-tabs",sTabContainerTagname:"UL",sTabTagname:"LI",sClassNameSelected:"active",aTabs:[],aContentAnchors:[],init:function(){var C=YAHOO.EU.Kelkoo.travel.AZtabs;var A=document.getElementById(C.sTabContainerId);if(!A){return false}C.aTabs=A.getElementsByTagName(C.sTabTagname);if(!C.aTabs||C.aTabs.length<1){return }for(var B=0;B<C.aTabs.length;B++){C.aContentAnchors[B]=C.getAnchor(C.aTabs[B])}C.hideContent();C.focusOnContent(C.aContentAnchors[0]);YAHOO.util.Event.addListener(A,"click",C.onTabClick)},onTabClick:function(C){var A=YAHOO.EU.Kelkoo.travel.AZtabs;var B=YAHOO.util.Event.getTarget(C);YAHOO.util.Event.stopEvent(C);if(B.tagName.toUpperCase()!=A.sTabTagname.toUpperCase()){if(B.id==A.sTabContainerId){return false}while(B.parentNode){B=B.parentNode;if(!B.tagName){return false}if(B.tagName.toUpperCase()==A.sTabTagname.toUpperCase()){break}}}A.moveSelectionTo(B);A.focusOnContent(A.getAnchor(B))},moveSelectionTo:function(D){var C=YAHOO.EU.Kelkoo.travel.AZtabs;for(var A=0,B=null;A<C.aTabs.length;A++){B=C.aTabs[A];YAHOO.util.Dom.removeClass(B,C.sClassNameSelected);if(B==D){YAHOO.util.Dom.addClass(D,C.sClassNameSelected)}}},focusOnContent:function(A){YAHOO.EU.Kelkoo.travel.AZtabs.hideContent();A=YAHOO.util.Dom.getElementsBy(function(B){if(!B.name){return false}return(B.name==A)},"a")[0];if(A){YAHOO.util.Dom.setStyle(A.parentNode.parentNode,"display","block")}},getAnchor:function(B){var A=B.getElementsByTagName("A")[0].href;if(A.indexOf("#")==-1){return }return A.substring(A.indexOf("#")+1)},hideContent:function(){var C=YAHOO.EU.Kelkoo.travel.AZtabs;var A=null;for(var B=0;B<C.aContentAnchors.length;B++){A=YAHOO.util.Dom.getElementsBy(function(D){if(!D.name){return false}return(D.name==C.aContentAnchors[B])},"a")[0];if(A&&A.parentNode&&YAHOO.util.Dom.hasClass(A.parentNode,"az-tabtitle")){YAHOO.util.Dom.setStyle(A.parentNode.parentNode,"display","none")}}}};function isLeapYear(A){return(((A%4===0)&&(A%100!==0))||(A%400===0))}var currentYear=(new Date()).getFullYear();var daysInMonth=[0,31,(isLeapYear(currentYear)?29:28),31,30,31,30,31,31,30,31,30,31];function kk_hotel_changed_adults(){var B=document.forms.searchFormHotel||document.forms.searchForm;var C=roomTypeMaxTotal[roomTypeCurr]-(B.nbadults.selectedIndex-1);var A=B.nbchildren.selectedIndex;if(A>=C){B.nbchildren.selectedIndex=C-1}}function kk_hotel_changed_children(){var B=document.forms.searchFormHotel||document.forms.searchForm;var C=roomTypeMaxTotal[roomTypeCurr]-(B.nbchildren.selectedIndex-1);var A=B.nbadults.selectedIndex;if(A>=C){B.nbadults.selectedIndex=C-1}}function kk_hotel_isNewCalendar(){return(document.getElementById("yfcMiniCalDiv")!=null)||!!document.getElementById("returnDate")}function kk_hotel_isDate(C){var D=C.indexOf(dtCh);var B=C.indexOf(dtCh,D+1);var F=C.substring(0,D);var G=C.substring(D+1,B);var E=C.substring(B+1);strYr=E;if(F.charAt(0)=="0"&&F.length>1){F=F.substring(1)}if(G.charAt(0)=="0"&&G.length>1){G=G.substring(1)}for(var A=1;A<=3;A++){if(strYr.charAt(0)=="0"&&strYr.length>1){strYr=strYr.substring(1)}}month=parseInt(G);day=parseInt(F);year=parseInt(strYr);if(D==-1||B==-1){alert(alert1+"(dd/mm/yyyy)");return false}if(G.length<1||month<1||month>12){alert(alert1);return false}if(F.length<1||day<1||day>31||(month==2&&day>kk_hotel_daysInFebruary(year))||day>daysInMonth[month]){alert(alert1);return false}if((E.length!=4&&E.length!=2)||year==0){alert(alert1);return false}if(C.indexOf(dtCh,B+1)!=-1||kk_hotel_IsInterger(kk_hotel_stripCharsInBag(C,dtCh))==false){alert(alert1);return false}return true}function kk_hotel_DaysArray(B){for(var A=1;A<=B;A++){this[A]=31;if(A==4||A==6||A==9||A==11){this[A]=30}if(A==2){this[A]=29}}return this}function kk_hotel_IsFourDigitsYear(A){return(A.search(/\d{4}/)!=-1)}function kk_hotel_IsInterger(B){var A;for(A=0;A<B.length;A++){var C=B.charAt(A);if(((C<"0")||(C>"9"))){return false}}return true}function kk_hotel_ConvertToFourDigitsYear(B){var A="20"+B;return A}function kk_hotel_stripCharsInBag(C,D){var B;var A="";for(B=0;B<C.length;B++){var E=C.charAt(B);if(D.indexOf(E)==-1){A+=E}}return A}function kk_hotel_daysInFebruary(A){return(((A%4==0)&&((!(A%100==0))||(A%400==0)))?29:28)}function kk_hotel_fill_guests(){var C=document.forms.searchFormHotel||document.forms.searchForm;if(C.roomtype.selectedIndex){roomType=C.roomtype.options[C.roomtype.selectedIndex].value;for(i=0;i<roomTypeValue.length;i++){if(roomType==roomTypeValue[i]){roomTypeCurr=i}}}var E=C.nbadults;var F=C.nbchildren;var A=C.nbadults.selectedIndex;var G=C.nbchildren.selectedIndex;for(i=0;i<=roomTypeGuestOption[roomTypeCurr];i++){E.options[i]=new Option(i,i,false,false);F.options[i]=new Option(i,i,false,false)}F.length=roomTypeGuestOption[roomTypeCurr]+1;E.length=roomTypeGuestOption[roomTypeCurr]+1;var B=window.location.href;var D=new RegExp("/do/","g");if(B.match(D)&&roomtypeBool=="true"){C.nbadults.selectedIndex=A;kk_hotel_changed_adults();C.nbchildren.selectedIndex=G;kk_hotel_changed_children();roomtypeBool="false"}else{if(!B.match(D)&&roomtypeBool=="true"){C.nbadults.selectedIndex=defaultAdultIndex;C.nbchildren.selectedIndex=0;roomtypeBool="false"}else{C.nbadults.selectedIndex=E.length-1;C.nbchildren.selectedIndex=0}}}function kk_hotel_cleanTown(A){if(A=="townSEL"&&(typeof (document.searchForm.townTEXT)!="undefined")){document.searchForm.townTEXT.value=""}if(A=="townTEXT"&&(typeof (document.searchForm.townSEL)!="undefined")){document.searchForm.townSEL.selectedIndex=0}}function kk_hotel_setMonth(){var A=document.forms.searchFormHotel||document.forms.searchForm;A.mreturn.selectedIndex=A.marrival.selectedIndex;kk_hotel_updateWeekDay()}function kk_hotel_setYear(){var A=document.forms.searchFormHotel||document.forms.searchForm;A.yreturn.selectedIndex=A.yarrival.selectedIndex;kk_hotel_updateWeekDay()}function kk_hotel_updateWeekDay(){var B=document.forms.searchFormHotel||document.forms.searchForm;var F=B.darrival.value;var D=B.marrival.value;var H=B.yarrival.value;if(H%4==0){var G=new Array(31,29,31,30,31,30,31,31,30,31,30,31)}else{var G=new Array(31,28,31,30,31,30,31,31,30,31,30,31)}if(F>G[D-1]){F=G[D-1];B.darrival.value=F}var I=B.dreturn.value;var E=B.mreturn.value;var A=B.yreturn.value;if(A%4==0){var C=new Array(31,29,31,30,31,30,31,31,30,31,30,31)}else{var C=new Array(31,28,31,30,31,30,31,31,30,31,30,31)}if(I>C[E-1]){I=C[E-1];B.dreturn.value=I}kk_hotel_getDepWeekDay(F,D,H);kk_hotel_getRetWeekDay(I,E,A)}function kk_hotel_getDepWeekDay(G,B,I){var A=document.forms.searchFormHotel||document.forms.searchForm;var E=[31,28,31,30,31,30,31,31,30,31,30,31];var J=A.darrival.options[A.darrival.selectedIndex].value-1;var F=A.marrival.options[A.marrival.selectedIndex].value-1;var H=A.yarrival.options[A.yarrival.selectedIndex].value;if(H%4==0){E[1]=29}if(typeof (A.wdday)!="undefined"){if(E[F]>=J){var C=new Date(I,B-1,G);var D=C.getDay();if(D==0){A.wdday.value=Sun}if(D==1){A.wdday.value=Mon}if(D==2){A.wdday.value=Tue}if(D==3){A.wdday.value=Wed}if(D==4){A.wdday.value=Thu}if(D==5){A.wdday.value=Fri}if(D==6){A.wdday.value=Sat}}}}function kk_hotel_getRetWeekDay(G,B,I){var A=document.forms.searchFormHotel||document.forms.searchForm;var E=[31,28,31,30,31,30,31,31,30,31,30,31];var J=A.dreturn.options[A.dreturn.selectedIndex].value-1;var F=A.mreturn.options[A.mreturn.selectedIndex].value-1;var H=A.yreturn.options[A.yreturn.selectedIndex].value;if(H%4==0){E[1]=29}if(typeof (A.wrday)!="undefined"){if(E[F]>=J){var C=new Date(I,B-1,G);var D=C.getDay();if(D==0){A.wrday.value=Sun}if(D==1){A.wrday.value=Mon}if(D==2){A.wrday.value=Tue}if(D==3){A.wrday.value=Wed}if(D==4){A.wrday.value=Thu}if(D==5){A.wrday.value=Fri}if(D==6){A.wrday.value=Sat}}}}function kk_hotel_ctrlForm(B){var A=kk_hotel_isNewCalendar();if(A){var H=B.departureDate.value;var D=B.returnDate.value;if(!kk_hotel_isDate(H)||!kk_hotel_isDate(D)){return false}var E=H.split("/");var F=D.split("/");selectedDepDay=E[0];selectedDepMonth=E[1];selectedDepYear=E[2];selectedRetDay=F[0];selectedRetMonth=F[1];selectedRetYear=F[2];if(!kk_hotel_IsFourDigitsYear(selectedDepYear)){selectedDepYear=kk_hotel_ConvertToFourDigitsYear(selectedDepYear)}if(!kk_hotel_IsFourDigitsYear(selectedRetYear)){selectedRetYear=kk_hotel_ConvertToFourDigitsYear(selectedRetYear)}}else{selectedDepDay=B.darrival.options[B.darrival.selectedIndex].value;selectedDepMonth=B.marrival.options[B.marrival.selectedIndex].value;selectedDepYear=B.yarrival.options[B.yarrival.selectedIndex].value;selectedRetDay=B.dreturn.options[B.dreturn.selectedIndex].value;selectedRetMonth=B.mreturn.options[B.mreturn.selectedIndex].value;selectedRetYear=B.yreturn.options[B.yreturn.selectedIndex].value}selectedDepDate=new Date(selectedDepYear,selectedDepMonth-1,selectedDepDay);selectedRetDate=new Date(selectedRetYear,selectedRetMonth-1,selectedRetDay);today=new Date();tableJJ=[31,29,31,30,31,30,31,31,30,31,30,31];if(topDestValues==null||topDestValues=="I"||topDestValues==""){if(B.townTEXT.value==""||B.townTEXT.value==null){alert(alertNoDestination);return false}else{for(i=0;i<correctDestination.length;i+=2){if(B.townTEXT.value.toUpperCase()==correctDestination[i]){B.townTEXT.value=correctDestination[i+1];i=correctDestination.length}}B.town.value=B.townTEXT.value}}else{if(B.townSEL.selectedIndex==0){if(B.townTEXT.value==""||B.townTEXT.value==null){alert(alertNoDestination);return false}else{for(i=0;i<correctDestination.length;i+=2){if(B.townTEXT.value.toUpperCase()==correctDestination[i]){B.townTEXT.value=correctDestination[i+1];i=correctDestination.length}}B.town.value=B.townTEXT.value}}else{B.town.value=B.townSEL.options[B.townSEL.selectedIndex].value}}if(selectedDepDay>tableJJ[selectedDepMonth-1]||(selectedRetDay>tableJJ[selectedRetMonth-1])){alert(alert1);return false}selectedDepTime=selectedDepDate.getTime()+82800000;selectedRetTime=selectedRetDate.getTime()+82800000;if(today.getTime()>selectedDepTime||today.getTime()>selectedRetTime){alert(alert2);return false}if(selectedRetTime<selectedDepTime){alert(alert3);return false}if((B.nbadults.selectedIndex+B.nbchildren.selectedIndex)<=0){alert(alertNoPerson);return false}if(!A){if((B.yreturn.selectedIndex==B.yarrival.selectedIndex)&&(B.mreturn.selectedIndex==B.marrival.selectedIndex)&&(B.dreturn.selectedIndex==B.darrival.selectedIndex)){alert(alert4);return false}}else{if(B.departureDate.value==B.returnDate.value){alert(alert4);return false}}B.nbnights.value=Math.round((selectedRetTime-selectedDepTime)/(1000*3600*24));if(typeof (B.priceList)!="undefined"){interval=B.priceInterval.value;if(interval==interval1){B.pricemin.value=0;B.price.value=price1}if(interval==interval2){B.pricemin.value=price1;B.price.value=price2}if(interval==interval3){B.pricemin.value=price2;B.price.value=10000}}if(typeof (kk_hotel_dayRangeValidDate)=="undefined"){kk_hotel_dayRangeValidDate=730}validDepDate=today.getTime()+24*3600*1000*kk_hotel_dayRangeValidDate;if(validDepDate<=selectedDepTime){alert(alert5);return false}var G=B.townTEXT.value;if(G!=""){var C="http://www."+YAHOO.EU.Shopping.locale.domain+"/tdcheck-170701?name="+G+"&type=city";var I=YAHOO.util.Get.script(C,{onSuccess:function(K){K.purge();if(bDestinationAvailable){K.data.oForm.submit()}else{var J=document.getElementById("hotel-search-confirm");J.style.display="block"}},data:{oForm:B}});return false}else{return true}}function kk_hotel_majDate(){var D=document.forms.searchFormHotel||document.forms.searchForm;if(D.darrival.value=="01"&&D.marrival.value=="01"&&D.dreturn.value=="01"&&D.mreturn.value=="01"){var B=new Date();var C=B.getTime()+(86400000*7);B.setTime(C);var G=B.getMonth()+1;var E=B.getFullYear();var A=B.getDate();D.darrival.options[A-1].selected=true;D.marrival.options[G-1].selected=true;D.yarrival.options[E-this_year].selected=true;var F=new Date();C=F.getTime()+(86400000*8);F.setTime(C);G=F.getMonth()+1;E=F.getFullYear();A=F.getDate();D.dreturn.options[A-1].selected=true;D.mreturn.options[G-1].selected=true;D.yreturn.options[E-this_year].selected=true}}function kk_hotel_relativeDates(){var D=document.forms.searchFormHotel||document.forms.searchForm;var O=new Array();O.name=new Array();O.val=new Array();var K;var I;var B;var P;var C=location.href;var Q=C.split("?");var H=Q[1].split("&");for(var F=0;F<H.length;F++){O.name[F]=H[F].split("=")[0];O.val[F]=H[F].split("=")[1];if(O.name[F]=="departureRelativeDay"){K=O.val[F]}if(O.name[F]=="departureRelativeWeek"){I=O.val[F]}if(O.name[F]=="departureRelativeMonth"){B=O.val[F]}if(O.name[F]=="RelativeDelay"){P=O.val[F]}}if(K==null){K=0}if(I==null){I=0}if(B==null){B=0}if(P==null){P=0}var M=new Date();day=M.getDate().toString(10);month=(M.getMonth()+1).toString(10);this_year=(M.getYear()+1900).toString(10);if(this_year>=3905){this_year=this_year-1900}if(K!=0||I!=0||B!=0){var J=kk_hotel_calculArrival(K,B,I);day=J.substring(0,2);month=J.substring(2,4);year=J.substring(4,8);if(day<10){day=day.substring(1,2)}if(month<10){month=month.substring(1,2)}D.darrival.options[day-1].selected=true;D.marrival.options[month].selected=true;D.yarrival.options[year-this_year].selected=true}var L=day;var E=month;var A=year;var N=new Date();month=N.getMonth()+1;this_year=N.getFullYear();if(this_year>=3905){this_year=this_year-1900}day=N.getDate();if(P!=0){var G=kk_hotel_calculDeparture(L,E,A,P);day=G.substring(0,2);month=G.substring(2,4);year=G.substring(4,8);if(day<10){day=day.substring(1,2)}if(month<10){month=month.substring(1,2)}D.dreturn.options[day-1].selected=true;D.mreturn.options[month].selected=true;D.yreturn.options[year-this_year].selected=true}}function kk_hotel_calculDeparture(H,B,J,K){var G=11;var M=0;var N=H;var D=B;var E=J;if(E>3904){E=E-1900}var L=new Date();var F=K;while(F>0){if(N==kk_hotel_DAY_MAX_MONTH(D,E)){D++;if(D>G){D=M;E++}F--;N=1;L.setDate(N);L.setMonth(D);L.setYear(E)}else{N++;L.setDate(N);L.setMonth(D);L.setYear(E);F--}}var C="";var I="";var A="";C=L.getDate().toString(10);I=(L.getMonth()+0).toString(10);A=(L.getYear()+1900).toString(10);if(A>3904){A=A-1900}if(I<10){I="0"+I}if(C<10){C="0"+C}if(N==31){C=31}return C+I+A}function kk_hotel_calculArrival(K,B,J){var E=-1;var I=-1;var Q=0;var L;var P;var G=11;var O=0;var M=new Date();var N=M.getDate();var D=M.getMonth();var F=M.getYear()+1900;if(F>3904){F=F-1900}I=kk_hotel_getCodeMois(B);E=kk_hotel_getCodeJour(K);if(I==-1){while(B!=0){D++;if(D>G){D=O;F++}B--}if(N>kk_hotel_DAY_MAX_MONTH(D,F)){N=1;D++;if(D>G){D=O;F++}}M.setDate(N);M.setMonth(D);M.setYear(F)}else{while(D!=kk_hotel_getCodeMois(B)){if(N>kk_hotel_DAY_MAX_MONTH(D,F)){N=1;D++}else{D++}if(D>G){D=O;F++}}M.setDate(N);M.setMonth(D);M.setYear(F)}P=7*J;if(E==-1){Q=1;while(K+P>0){if(N==kk_hotel_DAY_MAX_MONTH(D,F)){D++;if(D>G){D=O;F++}K--;M.setDate(N);M.setMonth(D);M.setYear(F);N=1}else{N++;M.setDate(N);M.setMonth(D);M.setYear(F);K--}}}else{while((L!=E|P>0)&Q==0){if(N==kk_hotel_DAY_MAX_MONTH(D,F)){D++;N=1;P--;M.setDate(N);M.setMonth(D);M.setYear(F);L=M.getDay();if(D>G){D=O;F++}}N++;P--;M.setDate(N);M.setMonth(D);M.setYear(F);L=M.getDay()}}var C="";var H="";var A="";C=M.getDate().toString(10);H=(M.getMonth()+0).toString(10);A=(M.getYear()+1900).toString(10);if(A>3904){A=A-1900}if(H<10){H="0"+H}if(C<10){C="0"+C}if(L==31){C=31}return C+H+A}function kk_hotel_isBissextile(A){if(A%400==0){return true}else{if((A%4==0)||(A%100!=0)){return true}else{return false}}}function kk_hotel_DAY_MAX_MONTH(B,A){if(B==kk_hotel_getCodeMois("January")||B==0){return 31}if(B==kk_hotel_getCodeMois("March")||B==2){return 31}if(B==kk_hotel_getCodeMois("April")||B==3){return 30}if(B==kk_hotel_getCodeMois("May")||B==4){return 31}if(B==kk_hotel_getCodeMois("June")||B==5){return 30}if(B==kk_hotel_getCodeMois("July")||B==6){return 31}if(B==kk_hotel_getCodeMois("August")||B==7){return 31}if(B==kk_hotel_getCodeMois("September")||B==8){return 30}if(B==kk_hotel_getCodeMois("October")||B==9){return 1}if(B==kk_hotel_getCodeMois("November")||B==10){return 30}if(B==kk_hotel_getCodeMois("December")||B==11){return 31}if(B==kk_hotel_getCodeMois("February")||B==1){if(kk_hotel_isBissextile(A)){return 29}else{return 28}}}function kk_hotel_getCodeMois(A){if(A=="January"){return 0}if(A=="February"){return 1}if(A=="March"){return 2}if(A=="April"){return 3}if(A=="May"){return 4}if(A=="June"){return 5}if(A=="July"){return 6}if(A=="August"){return 7}if(A=="September"){return 8}if(A=="October"){return 9}if(A=="November"){return 10}if(A=="December"){return 11}else{return -1}}function kk_hotel_getCodeJour(A){if(A=="Monday"){return 1}if(A=="Thuesday"){return 2}if(A=="Wednesday"){return 3}if(A=="Thursday"){return 4}if(A=="Friday"){return 5}if(A=="Saturday"){return 6}if(A=="Sunday"){return 0}else{return -1}}function kk_hotel_checkRoomtype(B){var D=parseInt(B.nbadults.options[B.nbadults.selectedIndex].value);var A=0;if(B.nbchildren.options){A=parseInt(B.nbchildren.options[B.nbchildren.selectedIndex].value);if(isNaN(A)){A=0}}var C=D+A;var E=B.roomtype.options[B.roomtype.selectedIndex].value.toUpperCase();if(C==2){if(FORBIDEN_ROOMTYPE_BY_PEOPLE[2].indexOf(E)!=-1){return confirm(CONFIRM_ROOMTYPE)}}else{if(C==3){if(FORBIDEN_ROOMTYPE_BY_PEOPLE[3].indexOf(E)!=-1){return confirm(CONFIRM_ROOMTYPE)}}else{if(C==4){if(FORBIDEN_ROOMTYPE_BY_PEOPLE[4].indexOf(E)!=-1){return confirm(CONFIRM_ROOMTYPE)}}else{if(C>=5){if(FORBIDEN_ROOMTYPE_BY_PEOPLE[5].indexOf(E)!=-1){return confirm(CONFIRM_ROOMTYPE)}return true}}}}}function kk_hotel_getTown(A){var B=A.options[A.selectedIndex];if(B.textContent){var C=B.textContent}if(B.innerText){var C=B.innerText}if(B.innerHTML){var C=B.innerHTML}C=C.replace(/&nbsp;/g,"");if(B.value.length>2){document.getElementById("hotel-town-inp").value=C}}function kk_flight_ctrlForm(A){if(typeof (A.airline)!="undefined"){if(A.airlineFormatted!=null&&A.airline.type.toLowerCase()=="select"){var B=A.airline.options[A.airline.selectedIndex].text;A.airlineFormatted.value=B}}A.departureTEXT.value=A.departure.value;A.arrivalTEXT.value=A.arrival.value;if(A.from.value=="kelbest"){A.from.value="shopbot"}return true}function kk_updateType(){var B=location.href;var A=B.match("TYPE=Oneway");if(A=="TYPE=Oneway"){kk_updateSearchForm(document.searchForm.type,"Oneway")}}function kk_flight_toggleOneTwoWay(){var A=document.getElementById("returnDateDiv");var B=document.getElementById("returnTimeDiv");var C=document.getElementById("returning");if(document.searchForm.type[0].checked){A.style.display="block";B.style.display="block";C.style.display="block"}else{if(document.searchForm.type[1].checked){A.style.display="none";B.style.display="none";C.style.display="none"}}}function kk_flightToMultistop(){var A="/b/a/c_100342123_multistop.html?forceVisible=true";document.location.href=A}function kk_flightToTripPlanner(){if(!document.searchForm.allSubCatId[0].checked){for(i=1;i<4;i++){if(document.searchForm.allSubCatId[i].checked){var C=document.searchForm.allSubCatId[i].value}}var D="/b/a/c_100371323_trip_planner.html";var G=document.searchForm.departure.value;var B=document.searchForm.arrival.value;var F=document.searchForm.departureDate.value;var A=document.searchForm.returnDate.value;var E=document.searchForm.nbadults.value;D=D+"?allSubCatId="+C+"&townDeparture="+G+"&destination="+B+"&departureDate="+F+"&returnDate="+A+"&nbAdults="+E;document.location.href=D}}function checkForm(A){return kk_flight_ctrlForm(A)}function kk_flight_caculateNumberOfDays(F){today=new Date();var D=today.getMonth();var C=(F+D+1)%12;var B=daysInMonth[C];var G;if(C!=0){G=new Date(today.getFullYear()+1,C-1,B)}else{G=new Date(today.getFullYear(),11,31)}var A=1000*60*60*24;var E=(Math.abs(Math.ceil((G.getTime()-today.getTime())/(A))));return E}function kk_flight_IsFourDigitsYear(A){return(A.search(/\d{4}/)!=-1)}function kk_flight_ConvertToFourDigitsYear(B){var A="20"+B;return A}function kk_flight_isNewCalendar(){return(document.getElementById("yfcMiniCalDiv")!=null)||!!document.getElementById("returnDate")}var dtCh="/";function kk_flight_IsInterger(B){var A;for(A=0;A<B.length;A++){var C=B.charAt(A);if(((C<"0")||(C>"9"))){return false}}return true}function kk_flight_stripCharsInBag(C,D){var B;var A="";for(B=0;B<C.length;B++){var E=C.charAt(B);if(D.indexOf(E)==-1){A+=E}}return A}function kk_flight_daysInFebruary(A){return(((A%4==0)&&((!(A%100==0))||(A%400==0)))?29:28)}function kk_flight_DaysArray(B){for(var A=1;A<=B;A++){this[A]=31;if(A==4||A==6||A==9||A==11){this[A]=30}if(A==2){this[A]=29}}return this}function kk_flight_isDate(C){var D=C.indexOf(dtCh);var B=C.indexOf(dtCh,D+1);var F=C.substring(0,D);var G=C.substring(D+1,B);var E=C.substring(B+1);strYr=E;if(F.charAt(0)=="0"&&F.length>1){F=F.substring(1)}if(G.charAt(0)=="0"&&G.length>1){G=G.substring(1)}for(var A=1;A<=3;A++){if(strYr.charAt(0)=="0"&&strYr.length>1){strYr=strYr.substring(1)}}month=parseInt(G);day=parseInt(F);year=parseInt(strYr);if(D==-1||B==-1){alert(alert1);return false}if(G.length<1||month<1||month>12){alert(alert1);return false}if(F.length<1||day<1||day>31||(month==2&&day>kk_flight_daysInFebruary(year))||day>daysInMonth[month]){alert(alert1);return false}if((E.length!=4&&E.length!=2)||year==0){alert(alert1);return false}if(C.indexOf(dtCh,B+1)!=-1||kk_flight_IsInterger(kk_flight_stripCharsInBag(C,dtCh))==false){alert(alert1);return false}return true}function kk_flight_openDepartureDateCalendar(){if(cal==null){cal=new kk_CalendarPopup();cal.setReturnFunction("kk_flight_setDepDate");cal.setMonthNames(month1,month2,month3,month4,month5,month6,month7,month8,month9,month10,month11,month12);cal.setDayHeaders(day1,day2,day3,day4,day5,day6,day7);cal.setWeekStartDay(1);cal.setTodayLabel(todayLabel)}month=document.searchForm.dmonth.options[document.searchForm.dmonth.selectedIndex].value;year=document.searchForm.dyear.options[document.searchForm.dyear.selectedIndex].value;cal.showCalendar("depdate",month,year);return false}function kk_flight_openReturnDateCalendar(){if(cal2==null){cal2=new kk_CalendarPopup();cal2.setReturnFunction("kk_flight_setRetDate");cal2.setMonthNames(month1,month2,month3,month4,month5,month6,month7,month8,month9,month10,month11,month12);cal2.setDayHeaders(day1,day2,day3,day4,day5,day6,day7);cal2.setWeekStartDay(1);cal2.setTodayLabel(todayLabel)}month=document.searchForm.rmonth.options[document.searchForm.rmonth.selectedIndex].value;year=document.searchForm.ryear.options[document.searchForm.ryear.selectedIndex].value;cal2.showCalendar("retdate",month,year);return false}function kk_flight_cleanTown(A){if(A=="departureSEL"){document.searchForm.departureTEXT.value=""}if(A=="departureTEXT"){document.searchForm.departureSEL.selectedIndex=0;document.searchForm.departure.value=document.searchForm.departureTEXT.value}if(A=="arrivalSEL"){document.searchForm.arrivalTEXT.value=""}if(A=="arrivalTEXT"){document.searchForm.arrivalSEL.selectedIndex=0;document.searchForm.arrival.value=document.searchForm.arrivalTEXT.value}}function kk_flight_currentYear(){var A=new Date();var B=A.getYear();if(B<999){B+=1900}return B}function kk_flight_setDepDate(D,A,C){var B=kk_flight_currentYear();document.searchForm.dday.selectedIndex=C-1;document.searchForm.dmonth.selectedIndex=A-1;if(D==B){document.searchForm.dyear.selectedIndex=0}if(D==B+1){document.searchForm.dyear.selectedIndex=1}kk_flight_setMonth();kk_flight_setYear();if(typeof (document.searchForm.wdday)!="undefined"){kk_flight_getDepWeekDay(C,A,D)}}function kk_flight_setRetDate(D,A,C){var B=kk_flight_currentYear();document.searchForm.rday.selectedIndex=C-1;document.searchForm.rmonth.selectedIndex=A-1;if(D==B){document.searchForm.ryear.selectedIndex=0}if(D==B+1){document.searchForm.ryear.selectedIndex=1}if(typeof (document.searchForm.wrday)!="undefined"){kk_flight_getRetWeekDay(C,A,D)}}function kk_flight_ctrlForm(C){if(typeof (C.airline)!="undefined"){if(C.airlineFormatted!=null&&C.airline.type.toLowerCase()=="select"){var I=C.airline.options[C.airline.selectedIndex].text;C.airlineFormatted.value=I}}var B=[31,28,31,30,31,30,31,31,30,31,30,31];var G=[31,28,31,30,31,30,31,31,30,31,30,31];var A=kk_flight_isNewCalendar();if(A){var H=C.departureDate.value;var D=C.returnDate.value;if(!kk_flight_isDate(H)||!kk_flight_isDate(D)){return false}var E=H.split("/");var F=D.split("/");selectedDepDay=E[0];selectedDepMonth=E[1];selectedDepYear=E[2];selectedRetDay=F[0];selectedRetMonth=F[1];selectedRetYear=F[2];if(!kk_flight_IsFourDigitsYear(selectedDepYear)){selectedDepYear=kk_flight_ConvertToFourDigitsYear(selectedDepYear)}if(!kk_flight_IsFourDigitsYear(selectedRetYear)){selectedRetYear=kk_flight_ConvertToFourDigitsYear(selectedRetYear)}}else{selectedDepDay=C.dday.options[C.dday.selectedIndex].value;selectedDepMonth=C.dmonth.options[C.dmonth.selectedIndex].value;selectedDepYear=C.dyear.options[C.dyear.selectedIndex].value;if(C.rday){selectedRetDay=C.rday.options[C.rday.selectedIndex].value;selectedRetMonth=C.rmonth.options[C.rmonth.selectedIndex].value;selectedRetYear=C.ryear.options[C.ryear.selectedIndex].value}else{selectedRetDay=selectedRetMonth=selectedRetYear=""}}selectedDepDate=new Date(selectedDepYear,selectedDepMonth-1,selectedDepDay);selectedRetDate=new Date(selectedRetYear,selectedRetMonth-1,selectedRetDay);today=new Date();if(typeof (C.departureTEXT)!="undefined"){selectedDepartureText=C.departureTEXT.value}else{selectedDepartureText=C.departure.value}if(typeof (C.departureSEL)!="undefined"){selectedDepartureSelect=C.departureSEL.options[C.departureSEL.selectedIndex].value}else{selectedDepartureSelect="I"}if((selectedDepartureText==null||selectedDepartureText=="")&&(selectedDepartureSelect!=null&&selectedDepartureSelect!="I")){C.departure.value=selectedDepartureSelect}else{if(C.arrivalTEXT.type!="hidden"){C.departure.value=selectedDepartureText}}if(typeof (C.arrivalTEXT)!="undefined"){selectedArrivalText=C.arrivalTEXT.value}else{selectedArrivalText=C.arrival.value}if(typeof (C.arrivalSEL)!="undefined"){selectedArrivalSelect=C.arrivalSEL.options[C.arrivalSEL.selectedIndex].value}else{selectedArrivalSelect="I"}if((selectedArrivalText==null||selectedArrivalText=="")&&(selectedArrivalSelect!=null&&selectedArrivalSelect!="I")){C.arrival.value=selectedArrivalSelect}else{if(C.arrivalTEXT.type!="hidden"){C.arrival.value=selectedArrivalText}}if(selectedDepYear%4==0){G[1]=29}if(selectedRetYear%4==0){B[1]=29}if(selectedDepDay>G[selectedDepMonth-1]||((C.type.type=="hidden"||!C.type[1].checked)&&selectedRetDay>B[selectedRetMonth-1])){alert(alert1);return false}selectedDepTime=selectedDepDate.getTime()+24*3600*1000;selectedRetTime=selectedRetDate.getTime()+24*3600*1000;if(today.getTime()>selectedDepTime||((today.getTime()>selectedRetTime)&&(C.type.type=="hidden"||!C.type[1].checked))){alert(alert2);return false}if(C.type.type=="hidden"||C.type[0].checked){if(selectedRetTime<selectedDepTime){alert(alert3);return false}}if(C.departureTEXT.type=="hidden"&&C.arrivalTEXT.type=="hidden"){C.departureTEXT.value=C.departure.value;C.arrivalTEXT.value=C.arrival.value}if(C.departure.value==""||C.arrival.value==""){alert(alert4);return false}if(C.type.type!="hidden"&&C.type[1].checked&&C.rday){C.rday.value="";C.rmonth.value="";C.ryear.value=""}if(A){if((yfcMiniCal.maxMonth!=null)&&(yfcMiniCal.maxMonth.length!=0)){kk_flight_dayRangeValidDate=kk_flight_caculateNumberOfDays(yfcMiniCal.maxMonth)+1}else{kk_flight_dayRangeValidDate=kk_flight_caculateNumberOfDays(11)+1}validDepDate=today.getTime()+24*3600*1000*kk_flight_dayRangeValidDate;if(validDepDate<=selectedDepTime){if(typeof (alert7)=="undefined"){alert("The departure date you can choose is up to 11 months from today")}else{alert(alert7)}return false}}else{if(typeof (kk_flight_dayRangeValidDate)=="undefined"){kk_flight_dayRangeValidDate=350}validDepDate=today.getTime()+24*3600*1000*kk_flight_dayRangeValidDate;if(validDepDate<=selectedDepTime){alert(alert5);return false}}if(C.from.value=="kelbest"){C.from.value="shopbot"}return true}function kk_flight_setMonth(){document.searchForm.rmonth.selectedIndex=document.searchForm.dmonth.selectedIndex;if(typeof (document.searchForm.wdday)!="undefined"){kk_flight_updateWeekDay()}}function kk_flight_setYear(){document.searchForm.ryear.selectedIndex=document.searchForm.dyear.selectedIndex;if(typeof (document.searchForm.wdday)!="undefined"){kk_flight_updateWeekDay()}}function kk_flight_updateWeekDay(){var A=document.searchForm.dday.value;var C=document.searchForm.dmonth.value;var B=document.searchForm.dyear.value;if(B%4==0){var H=new Array(31,29,31,30,31,30,31,31,30,31,30,31)}else{var H=new Array(31,28,31,30,31,30,31,31,30,31,30,31)}if(A>H[C-1]){A=H[C-1];document.searchForm.dday.value=A}var D=document.searchForm.rday.value;var G=document.searchForm.rmonth.value;var E=document.searchForm.ryear.value;if(E%4==0){var F=new Array(31,29,31,30,31,30,31,31,30,31,30,31)}else{var F=new Array(31,28,31,30,31,30,31,31,30,31,30,31)}if(D>F[G-1]){D=F[G-1];document.searchForm.rday.value=D}kk_flight_getDepWeekDay(A,C,B);kk_flight_getRetWeekDay(D,G,E)}function kk_flight_getDepWeekDay(F,A,H){var D=[31,28,31,30,31,30,31,31,30,31,30,31];var I=document.searchForm.dday.options[document.searchForm.dday.selectedIndex].value-1;var E=document.searchForm.dmonth.options[document.searchForm.dmonth.selectedIndex].value-1;var G=document.searchForm.dyear.options[document.searchForm.dyear.selectedIndex].value;if(G%4==0){D[1]=29}if(typeof (document.searchForm.wdday)!="undefined"){if(D[E]>=I){var B=new Date(H,A-1,F);var C=B.getDay();if(C==0){document.searchForm.wdday.value=Sun}if(C==1){document.searchForm.wdday.value=Mon}if(C==2){document.searchForm.wdday.value=Tue}if(C==3){document.searchForm.wdday.value=Wed}if(C==4){document.searchForm.wdday.value=Thu}if(C==5){document.searchForm.wdday.value=Fri}if(C==6){document.searchForm.wdday.value=Sat}}else{document.searchForm.wdday.value=""}}}function kk_flight_getRetWeekDay(F,A,H){var D=[31,28,31,30,31,30,31,31,30,31,30,31];var I=document.searchForm.rday.options[document.searchForm.rday.selectedIndex].value-1;var E=document.searchForm.rmonth.options[document.searchForm.rmonth.selectedIndex].value-1;var G=document.searchForm.ryear.options[document.searchForm.ryear.selectedIndex].value;if(G%4==0){D[1]=29}if(typeof (document.searchForm.wrday)!="undefined"){if(D[E]>=I){var B=new Date(H,A-1,F);var C=B.getDay();if(C==0){document.searchForm.wrday.value=Sun}if(C==1){document.searchForm.wrday.value=Mon}if(C==2){document.searchForm.wrday.value=Tue}if(C==3){document.searchForm.wrday.value=Wed}if(C==4){document.searchForm.wrday.value=Thu}if(C==5){document.searchForm.wrday.value=Fri}if(C==6){document.searchForm.wrday.value=Sat}}else{document.searchForm.wdday.value=""}}}function kk_flight_pV(B){var A=parent.opener.window.document.formulaire.selectedBox.value;var C=A+"TEXT";parent.opener.window.document.formulaire.elements[A].value=B;parent.opener.window.document.formulaire.elements[C].value=B;closePopup()}function kk_flight_checkEmptyAirport(){if(typeof (document.forms.formulaire.departure)!="undefined"){document.forms.formulaire.departureTEXT.value=document.forms.formulaire.departure.value}if(typeof (document.forms.formulaire.arrival)!="undefined"){document.forms.formulaire.arrivalTEXT.value=document.forms.formulaire.arrival.value}var B=document.forms.formulaire.departureTEXT.value;var A=document.forms.formulaire.arrivalTEXT.value;B=kk_flight_stringTrim(B);A=kk_flight_stringTrim(A);if(A.length==0||B.length==0){alert(ALERT_AIRPORT_EMPTY);return false}else{return true}}function kk_flight_stringTrim(A){if(A!=null){A=A.replace(/^\s+|\s+$/g,"")}return A}function kk_flight_updateDepartureTextFromSel(){document.forms.formulaire.departureTEXT.value=document.forms.formulaire.departure.options[document.forms.formulaire.departure.selectedIndex].value;document.forms.formulaire.departureSelected.value=document.forms.formulaire.departure.selectedIndex;return true}function kk_flight_updateArrivalTextFromSel(){document.forms.formulaire.arrivalTEXT.value=document.forms.formulaire.arrival.options[document.forms.formulaire.arrival.selectedIndex].value;document.forms.formulaire.arrivalSelected.value=document.forms.formulaire.arrival.selectedIndex;return true}function kk_flight_updateDepartureText(){document.forms.formulaire.departureTEXT.value=document.forms.formulaire.departure.value;return true}function kk_flight_updateArrivalText(){document.forms.formulaire.arrivalTEXT.value=document.forms.formulaire.arrival.value;return true}function kk_flight_majDate(){if(document.searchForm.dday.value=="1"&&document.searchForm.dmonth.value=="1"&&document.searchForm.rday.value=="1"&&document.searchForm.rmonth.value=="1"){var B=new Date();var C=B.getTime()+(86400000*7);B.setTime(C);var F=B.getMonth()+1;var D=B.getFullYear();var A=B.getDate();document.searchForm.dday.options[A-1].selected=true;document.searchForm.dmonth.options[F-1].selected=true;document.searchForm.dyear.options[D-this_year].selected=true;var E=new Date();C=E.getTime()+(86400000*14);E.setTime(C);F=E.getMonth()+1;D=E.getFullYear();A=E.getDate();document.searchForm.rday.options[A-1].selected=true;document.searchForm.rmonth.options[F-1].selected=true;document.searchForm.ryear.options[D-this_year].selected=true}}Locations=new Array();Towns=new Array();newLetter="";function kk_carHire_add_CityObj(C,B,D,A){this.REGION=C;this.IATA_CODE=B;this.CITY=D;this.PRODUCT=A}function kk_carHire_add_TownObj(B,A){this.town=B;this.type=A}function kk_carHire_initLocation(){Locations=new Array()}function kk_carHire_initTown(){Towns=new Array()}function kk_carHire_add_and_set(C,B,D,A){Locations[Locations.length]=new kk_carHire_add_CityObj(C,B,D,A)}function kk_carHire_optionObj(B,A){this.value=B;this.text=A}function kk_carHire_addTown(B,A){Towns[Towns.length]=new kk_carHire_add_TownObj(B,A)}function kk_carHire_replaceIn(B,A,C){cL=new String(B);lg=A.length;i=cL.indexOf(A);while(i>0){cL=cL.substring(0,i)+C+cL.substring(i+lg,cL.length);i=cL.indexOf(A)}return(cL)}function kk_carHire_getParam(B,A){i=B.indexOf("&"+A+"=");j=B.indexOf("&",i+3);return(B.substring(i+9,j))}var kk_carHire_setDropDowns_in_progress=false;function kk_carHire_setDropDowns(A){kk_carHire_setDropDowns_in_progress=true;if(A.name=="pickUpCountry"){A.form.pickUpTown.disabled=true;A.form.pickUpAdress.disabled=true;theCountry=A.options[A.selectedIndex].value;theCountryUrl=kk_carHire_replaceIn(theCountry," ","-");newLetter="";citySelected="";if(YAHOO.env.ua.gecko>=1.9){A.options[0].text=A.options[A.selectedIndex].text;A.options[0].value=A.options[A.selectedIndex].value;A.selectedIndex=0;A.form.pickUpTown.selectedIndex=0;A.form.pickUpAdress.selectedIndex=0}window.document.getElementById("townList").src="/content/"+countryDir+"/travel/carHire/"+theCountryUrl+"/townList_"+theCountryUrl+"R6.html"}else{if(A.name=="pickUpTown"){A.form.pickUpAdress.disabled=true;if(A.form.pickUpTown.options[A.form.pickUpTown.selectedIndex].value!=""){citySelected=A.form.pickUpTown.options[A.form.pickUpTown.selectedIndex].value}theCountry=A.form.pickUpCountry.options[A.form.pickUpCountry.selectedIndex].value;oldLetter=newLetter;newLetter=citySelected.charAt(0);if(newLetter.length>0&&newLetter!=oldLetter){A.form.classCity.value=newLetter;theCountryUrl=kk_carHire_replaceIn(theCountry," ","-");newLetter=escape(newLetter);theCountryUrl=escape(theCountryUrl);window.document.getElementById("locationList").src="/content/"+countryDir+"/travel/carHire/"+theCountryUrl+"/locationList_"+theCountryUrl+"_"+newLetter+"R6.html"}else{if(newLetter.length<1){optionList=new Array();kk_carHire_reWriteDropDown(document.getElementById("pickUpAdress"),optionList,selectLocation);kk_carHire_setDropDowns_in_progress=false}else{optionList=kk_carHire_getLocOptObjsAdress(document.getElementById("pickUpAdress").form);kk_carHire_reWriteDropDown(document.getElementById("pickUpAdress"),optionList,selectLocation);kk_carHire_setLastValue(parent.document.getElementById("pickUpAdress"),"");kk_carHire_setDropDowns(parent.document.getElementById("pickUpAdress"));kk_carHire_setDropDowns_in_progress=false}}A.disabled=false}else{if(A.name=="pickUpAdress"){if(A.form.pickUpTown.selectedIndex==0){optionList=new Array();kk_carHire_reWriteDropDown(document.getElementById("pickUpAdress"),optionList,selectLocation);kk_carHire_setLastValue(parent.document.getElementById("pickUpAdress"),"")}citySplit=A.form.pickUpAdress.value.split("#");A.form.pickUpAirportCode.value=citySplit[0];A.disabled=false;kk_carHire_setDropDowns_in_progress=false}}}}function kk_carhire_checkOnLoad(B){if(kk_carHire_setDropDowns_in_progress){setTimeout(function(){kk_carhire_checkOnLoad(B)},1000)}else{B++;var E=window.document.getElementById("airportSel");var D=window.document.getElementById("pickUpCountry");var A=window.document.getElementById("pickUpTown");var C="C";if(theField.form.airportSel[0].checked){C="A"}if(E&&D&&A&&(airportchecked!=C||theCountry!=D.options[D.selectedIndex].value||citySelected!=A.options[A.selectedIndex].value)){if(airportchecked=="A"){theField.form.airportSel[0].checked=true;theField.form.airportSel[1].checked=false}else{theField.form.airportSel[0].checked=false;theField.form.airportSel[1].checked=true}kk_carHire_setDropDowns(D)}else{if(B<7){setTimeout(function(){kk_carhire_checkOnLoad(B)},1000)}}}}function kk_carHire_getEmptyList(){itemList=new Array();itemList[itemList.length]=new kk_carHire_optionObj("","");return itemList}function kk_carHire_getLocOptObjsTown(A){if(A.airportSel[0].checked){airport="A"}else{airport="C"}itemList=new Array();for(i=0;i<Towns.length;i++){if((Towns[i].type).indexOf(airport)>=0){itemList[itemList.length]=new kk_carHire_optionObj(Towns[i].town,Towns[i].town)}}return itemList}function kk_carHire_getLocOptObjsAdress(A){if(A.airportSel[0].checked){airport="A"}else{airport="C"}itemList=new Array();for(i=0;i<Locations.length;i++){if((Locations[i].PRODUCT==airport||A.pickUpTown.value.length<1)&&(Locations[i].REGION==A.pickUpTown.value||A.pickUpTown.value.length<1)){itemList[itemList.length]=new kk_carHire_optionObj((Locations[i].IATA_CODE+"#"+Locations[i].CITY),Locations[i].CITY)}}return itemList}function kk_carHire_reWriteDropDown(A,C,B){A.length=0;A[0]=new Option(B,"");OptionIndex=1;for(i=0;i<C.length;i++){A[OptionIndex]=new Option(C[i].text,C[i].value);OptionIndex++}if(A.selectedIndex<0){A.options[0].selected=true}if(A.length==2&&A.options[0].value.length<1){A.options[1].selected=true}}function kk_carHire_defaultLocations(A){A.pickUpCountry.selectedIndex=0;kk_carHire_setDropDowns(A.pickUpCountry);A.pickUpTown.selectedIndex=0;kk_carHire_setDropDowns(A.pickUpTown);A.pickUpAdress.selectedIndex=0;kk_carHire_setDropDowns(A.pickUpAdress)}function kk_carHire_setLastValue(A,C){if(A.length==2&&A.options[0].value.length<1){A.options[1].selected=true}else{var B=false;for(i=0;i<A.length;i++){if(A.options[i].value==C){A.selectedIndex=i;B=true;break}}if(!B){A.options[0].selected=true}}}function kk_carHireToTripPlanner(){if(!document.searchForm.allSubCatId[0].checked){for(i=1;i<3;i++){if(document.searchForm.allSubCatId[i].checked){var F=document.searchForm.allSubCatId[i].value}}var A="/b/a/c_100371323_trip_planner.html";var G=document.searchForm.departureDate.value;var B=document.searchForm.returnDate.value;var C=document.searchForm.timeDeparture.value;var I=document.searchForm.minuteDeparture.value;var D=document.searchForm.timeReturn.value;var H=document.searchForm.minuteReturn.value;var E=document.searchForm.carType.value;A=A+"?allSubCatId="+F+"&departureDate="+G+"&returnDate="+B+"&pickupHour="+C+"&pickupMinute="+I+"&dropoffHour="+D+"&dropoffMinute="+H+"&carType="+E;document.location.href=A}}function kk_carHire_IsFourDigitsYear(A){return(A.search(/\d{4}/)!=-1)}function kk_carHire_ConvertToFourDigitsYear(B){var A="20"+B;return A}function kk_carHire_isNewCalendar(){return(document.getElementById("yfcMiniCalDiv")!=null)}var dtCh="/";function kk_carHire_IsInterger(B){var A;for(A=0;A<B.length;A++){var C=B.charAt(A);if(((C<"0")||(C>"9"))){return false}}return true}function kk_carHire_stripCharsInBag(C,D){var B;var A="";for(B=0;B<C.length;B++){var E=C.charAt(B);if(D.indexOf(E)==-1){A+=E}}return A}function kk_carHire_daysInFebruary(A){return(((A%4==0)&&((!(A%100==0))||(A%400==0)))?29:28)}function kk_carHire_DaysArray(B){for(var A=1;A<=B;A++){this[A]=31;if(A==4||A==6||A==9||A==11){this[A]=30}if(A==2){this[A]=29}}return this}function kk_carHire_isDate(D){var A=kk_carHire_DaysArray(12);var E=D.indexOf(dtCh);var C=D.indexOf(dtCh,E+1);var G=D.substring(0,E);var H=D.substring(E+1,C);var F=D.substring(C+1);strYr=F;if(G.charAt(0)=="0"&&G.length>1){G=G.substring(1)}if(H.charAt(0)=="0"&&H.length>1){H=H.substring(1)}for(var B=1;B<=3;B++){if(strYr.charAt(0)=="0"&&strYr.length>1){strYr=strYr.substring(1)}}month=parseInt(H);day=parseInt(G);year=parseInt(strYr);if(E==-1||C==-1){alert(alert1+"(dd/mm/yyyy)");return false}if(H.length<1||month<1||month>12){alert(alert1);return false}if(G.length<1||day<1||day>31||(month==2&&day>kk_carHire_daysInFebruary(year))||day>A[month]){alert(alert1);return false}if((F.length!=4&&F.length!=2)||year==0){alert(alert1);return false}if(D.indexOf(dtCh,C+1)!=-1||kk_carHire_IsInterger(kk_carHire_stripCharsInBag(D,dtCh))==false){alert(alert1);return false}return true}function kk_carHire_openDepartureDateCalendar(){if(cal==null){cal=new kk_CalendarPopup();cal.setReturnFunction("kk_carHire_setDepDate");cal.setMonthNames(month1,month2,month3,month4,month5,month6,month7,month8,month9,month10,month11,month12);cal.setDayHeaders(day1,day2,day3,day4,day5,day6,day7);cal.setWeekStartDay(1);cal.setTodayLabel(todayLabel)}month=document.searchForm.monthDeparture.options[document.searchForm.monthDeparture.selectedIndex].value;year=document.searchForm.yearDeparture.options[document.searchForm.yearDeparture.selectedIndex].value;cal.showCalendar("depdate",month,year);return false}function kk_carHire_openReturnDateCalendar(){if(cal2==null){cal2=new kk_CalendarPopup();cal2.setReturnFunction("kk_carHire_setRetDate");cal2.setMonthNames(month1,month2,month3,month4,month5,month6,month7,month8,month9,month10,month11,month12);cal2.setDayHeaders(day1,day2,day3,day4,day5,day6,day7);cal2.setWeekStartDay(1);cal2.setTodayLabel(todayLabel)}month=document.searchForm.monthReturn.options[document.searchForm.monthReturn.selectedIndex].value;year=document.searchForm.yearReturn.options[document.searchForm.yearReturn.selectedIndex].value;cal2.showCalendar("retdate",month,year);return false}function kk_carHire_ctrlForm(B){if(B.carTypeFormatted!=null){var J=B.carType.options[B.carType.selectedIndex].text;B.carTypeFormatted.value=J}var C=new Date();var H=C.getMonth()+1;var I=C.getFullYear();var K=C.getDate();var A=kk_carHire_isNewCalendar();if(A){var L=B.departureDate.value;var E=B.returnDate.value;if(!kk_carHire_isDate(L)||!kk_carHire_isDate(E)){return false}var D=L.split("/");var G=E.split("/");selectedDepDay=D[0];selectedDepMonth=D[1];selectedDepYear=D[2];selectedRetDay=G[0];selectedRetMonth=G[1];selectedRetYear=G[2];if(!kk_carHire_IsFourDigitsYear(selectedDepYear)){selectedDepYear=kk_carHire_ConvertToFourDigitsYear(selectedDepYear)}if(!kk_carHire_IsFourDigitsYear(selectedRetYear)){selectedRetYear=kk_carHire_ConvertToFourDigitsYear(selectedRetYear)}}else{selectedDepDay=B.dayDeparture.options[B.dayDeparture.selectedIndex].value;selectedDepMonth=B.monthDeparture.options[B.monthDeparture.selectedIndex].value;selectedDepYear=B.yearDeparture.options[B.yearDeparture.selectedIndex].value;selectedRetDay=B.dayReturn.options[B.dayReturn.selectedIndex].value;selectedRetMonth=B.monthReturn.options[B.monthReturn.selectedIndex].value;selectedRetYear=B.yearReturn.options[B.yearReturn.selectedIndex].value}selectedDepDate=new Date(selectedDepYear,selectedDepMonth-1,selectedDepDay);selectedRetDate=new Date(selectedRetYear,selectedRetMonth-1,selectedRetDay);today=new Date();tableJJ=[31,29,31,30,31,30,31,31,30,31,30,31];if(selectedDepDay>tableJJ[selectedDepMonth-1]||selectedRetDay>tableJJ[selectedRetMonth-1]){alert(alert1);return false}selectedDepTime=selectedDepDate.getTime()+24*3600*1000;selectedRetTime=selectedRetDate.getTime()+24*3600*1000;if((today.getTime()>selectedDepTime)||(today.getTime()>selectedRetTime)){alert(alert2);return false}if(selectedRetTime<selectedDepTime){alert(alert3);return false}if(typeof (kk_carHire_dayRangeValidDate)=="undefined"){kk_carHire_dayRangeValidDate=730}validDepDate=today.getTime()+24*3600*1000*kk_carHire_dayRangeValidDate;if(validDepDate<=selectedDepTime){alert(alert4);return false}var F="|"+document.searchForm.pickUpCountry.options[document.searchForm.pickUpCountry.selectedIndex].value+"|"+document.searchForm.pickUpTown.options[document.searchForm.pickUpTown.selectedIndex].value+"|"+document.searchForm.pickUpAdress.options[document.searchForm.pickUpAdress.selectedIndex].value+"|";if((F.indexOf("------")>=0)||(F.indexOf("Select")>=0)||(F.indexOf("||")>=0)){alert(YAHOO.EU.Shopping.locale.TravelNoDestination);return(false)}return true}function kk_carHire_currentYear(){var A=new Date();var B=A.getYear();if(B<999){B+=1900}return B}function kk_carHire_setDepDate(D,A,C){var B=kk_carHire_currentYear();document.searchForm.dayDeparture.selectedIndex=C-1;document.searchForm.monthDeparture.selectedIndex=A-1;if(D==B){document.searchForm.yearDeparture.selectedIndex=0}if(D==B+1){document.searchForm.yearDeparture.selectedIndex=1}kk_carHire_setMonth();kk_carHire_setYear();if(typeof (document.searchForm.wdday)!="undefined"){kk_carHire_getDepWeekDay(C,A,D)}}function kk_carHire_setRetDate(D,A,C){var B=kk_carHire_currentYear();document.searchForm.dayReturn.selectedIndex=C-1;document.searchForm.monthReturn.selectedIndex=A-1;if(D==B){document.searchForm.yearReturn.selectedIndex=0}if(D==B+1){document.searchForm.yearReturn.selectedIndex=1}if(typeof (document.searchForm.wrday)!="undefined"){kk_carHire_getRetWeekDay(C,A,D)}}function kk_carHire_setMonth(){document.searchForm.monthReturn.selectedIndex=document.searchForm.monthDeparture.selectedIndex;if(typeof (document.searchForm.wrday)!="undefined"){kk_carHire_updateWeekDay()}}function kk_carHire_setYear(){document.searchForm.yearReturn.selectedIndex=document.searchForm.yearDeparture.selectedIndex;if(typeof (document.searchForm.wrday)!="undefined"){kk_carHire_updateWeekDay()}}function kk_carHire_updateWeekDay(){var A=document.searchForm.dayDeparture.value;var C=document.searchForm.monthDeparture.value;var B=document.searchForm.yearDeparture.value;if(B%4==0){var H=new Array(31,29,31,30,31,30,31,31,30,31,30,31)}else{var H=new Array(31,28,31,30,31,30,31,31,30,31,30,31)}if(A>H[C-1]){A=H[C-1];document.searchForm.dayDeparture.value=A}var D=document.searchForm.dayReturn.value;var G=document.searchForm.monthReturn.value;var E=document.searchForm.yearReturn.value;if(E%4==0){var F=new Array(31,29,31,30,31,30,31,31,30,31,30,31)}else{var F=new Array(31,28,31,30,31,30,31,31,30,31,30,31)}if(D>F[G-1]){D=F[G-1];document.searchForm.dayReturn.value=D}kk_carHire_getDepWeekDay(A,C,B);kk_carHire_getRetWeekDay(D,G,E)}function kk_carHire_getDepWeekDay(D,A,E){if(typeof (document.searchForm.wdday)!="undefined"){var B=new Date(E,A-1,D);var C=B.getDay();if(C==0){document.searchForm.wdday.value=Sun}if(C==1){document.searchForm.wdday.value=Mon}if(C==2){document.searchForm.wdday.value=Tue}if(C==3){document.searchForm.wdday.value=Wed}if(C==4){document.searchForm.wdday.value=Thu}if(C==5){document.searchForm.wdday.value=Fri}if(C==6){document.searchForm.wdday.value=Sat}}}function kk_carHire_getRetWeekDay(D,A,E){if(typeof (document.searchForm.wrday)!="undefined"){var B=new Date(E,A-1,D);var C=B.getDay();if(C==0){document.searchForm.wrday.value=Sun}if(C==1){document.searchForm.wrday.value=Mon}if(C==2){document.searchForm.wrday.value=Tue}if(C==3){document.searchForm.wrday.value=Wed}if(C==4){document.searchForm.wrday.value=Thu}if(C==5){document.searchForm.wrday.value=Fri}if(C==6){document.searchForm.wrday.value=Sat}}}function kk_carHire_majDate(){if(document.searchForm.dayDeparture.value=="1"&&document.searchForm.dayReturn.value=="1"&&document.searchForm.monthDeparture.value=="1"&&document.searchForm.monthReturn.value=="1"){var B=new Date();var C=B.getTime()+(86400000*7);B.setTime(C);var F=B.getMonth()+1;var D=B.getFullYear();var A=B.getDate();document.searchForm.dayDeparture.options[A-1].selected=true;document.searchForm.monthDeparture.options[F-1].selected=true;document.searchForm.yearDeparture.options[D-this_year].selected=true;var E=new Date();C=E.getTime()+(86400000*10);E.setTime(C);F=E.getMonth()+1;D=E.getFullYear();A=E.getDate();document.searchForm.dayReturn.options[A-1].selected=true;document.searchForm.monthReturn.options[F-1].selected=true;document.searchForm.yearReturn.options[D-this_year].selected=true}}function add_CityObj(C,B,D,A){kk_carHire_add_CityObj(C,B,D,A)}function add_TownObj(B,A){kk_carHire_add_TownObj(B,A)}function initLocation(){kk_carHire_initLocation()}function initTown(){kk_carHire_initTown()}function add_and_set(C,B,D,A){kk_carHire_add_and_set(C,B,D,A)}function optionObj(B,A){kk_carHire_optionObj(B,A)}function addTown(B,A){kk_carHire_addTown(B,A)}function getLocOptObjsTown(A){return kk_carHire_getLocOptObjsTown(A)}function getLocOptObjsAdress(A){return kk_carHire_getLocOptObjsAdress(A)}function reWriteDropDown(A,C,B){kk_carHire_reWriteDropDown(A,C,B)}function setLastValue(A,B){kk_carHire_setLastValue(A,B)}function setDropDowns(A){kk_carHire_setDropDowns(A)}function kk_updateSearchForm(B,A){A=unescape(A);if(B){if(B.type=="text"||B.type=="hidden"){B.value=kk_decodeParams(A)}else{if(B.type=="select-one"){for(i=0;i<B.length;i++){if(B.options[i].value==A){B.selectedIndex=i}}}else{if(B.type=="checkbox"){B.checked=true}else{if(B[0]){for(i=0;i<B.length;i++){if(B[i].value==A){B[i].checked=true}}}}}}}}function kk_decodeParams(A){var B=A;while(B.indexOf("&#39;")>-1){B=B.replace("&#39;","'")}while(B.indexOf("&quot;")>-1){B=B.replace("&quot;",'"')}while(B.indexOf("&#34;")>-1){B=B.replace("&#34;",'"')}while(B.indexOf("&amp;")>-1){B=B.replace("&amp;","&")}return B}function yfcMiniCalPrevMonth(){if(this.currField==undefined){return }if(this.currMonth>0){this.currMonth--}if(this.currMonth==0){document.getElementById("yfcMiniCalPrevMonthDiv").style.visibility="hidden"}document.getElementById("yfcMiniCalNextMonthDiv").style.visibility="visible";if(this.disableSelectbox){document.getElementById("yfcMiniCalThisMonthTitle").innerHTML=this.months[this.currMonth].dropDownLabel}else{document.getElementById("yfcMiniCalMonthSelect").selectedIndex=this.currMonth}this.showMonth()}function yfcMiniCalNextMonth(){if(this.currField==undefined){return }if(this.currMonth<this.maxMonth){this.currMonth++}if(this.currMonth==this.maxMonth-1){document.getElementById("yfcMiniCalNextMonthDiv").style.visibility="hidden"}document.getElementById("yfcMiniCalPrevMonthDiv").style.visibility="visible";if(this.disableSelectbox){document.getElementById("yfcMiniCalThisMonthTitle").innerHTML=this.months[this.currMonth].dropDownLabel}else{document.getElementById("yfcMiniCalMonthSelect").selectedIndex=this.currMonth}this.showMonth()}function yfcMiniCalCloseCal(){var C=document.getElementById("yfcMiniCalDiv");var A=document.getElementById("yfcMiniCalIFrame");var B=document.getElementById("yfcMiniCalIFrameIn");if(!C||!B||!A){return }C.style.visibility="hidden";A.style.height="0px";A.style.width="0px";B.style.height="0px";B.style.width="0px";A.style.visibility="hidden";document.getElementById("yfcMiniCalNextMonthDiv").style.visibility="hidden";document.getElementById("yfcMiniCalPrevMonthDiv").style.visibility="hidden";this.displayed[this.currField]=0;this.currField=undefined;if(this.closeCalHandler!=undefined){this.closeCalHandler()}delete (C)}function yfcMiniCalOpenCal(O,A,L,S,F){if(!S){S=0}if(!F){F=24}var O=document.getElementById(O);var M=YAHOO.util.Dom.getAncestorByTagName(O,"form");var I=document.getElementById("yfcMiniCalDiv");var B=document.getElementById("yfcMiniCalIFrame");var E=document.getElementById("yfcMiniCalIFrameIn");var C=this.fields[A];var P=390;console.log(C);if(!O){return }if(!I){return }if(!B||!E){return }if(!C){return }var N=M?M.offsetWidth:662;var Q=M?getAbsoluteLeft(M):0;var H=getAbsoluteLeft(O);var R=getAbsoluteTop(O);var G=H+S+P;var K=(G>N+Q)?(Q+N-P):(H+S);var D=O?K+"px":0;var J=O?R+F+"px":0;I.style.top=J;I.style.left=D;B.style.top=J;B.style.left=D;B.style.height="197px";B.style.width=P+"px";E.style.height="197px";E.style.width=P+"px";I.style.visibility="visible";if(navigator.userAgent.indexOf("Opera")==-1){B.style.visibility="visible"}this.displayed[this.currField]=0;this.currField=A;this.displayed[A]=1;this.startField=L;this.showMonth(true);if(typeof (horizontalResizeManager)!="undefined"){horizontalResizeManager.attach(B,O);horizontalResizeManager.attach(I,O)}delete (I)}function getAbsoluteLeft(B){var A=0;while(B.offsetParent){A+=B.offsetLeft;B=B.offsetParent}return A}function getAbsoluteTop(B){var A=0;while(B.offsetParent){A+=B.offsetTop;B=B.offsetParent}return A}function yfcMiniCalUpdateArrows(){var B=document.getElementById("yfcMiniCalPrevMonthDiv");var A=document.getElementById("yfcMiniCalNextMonthDiv");if(this.currMonth==this.maxMonth-1){A.style.visibility="hidden";B.style.visibility="visible"}else{if(this.currMonth==0){A.style.visibility="visible";B.style.visibility="hidden"}else{A.style.visibility="visible";B.style.visibility="visible"}}delete B;delete A}function yfcMiniCalShowMonth(J){var E=this.currField.split(this.formFieldSeparator);var O=document.forms[E[0]][E[1]].value;var F=O.split("/");if(this.dayMonthDate){var L=F[0];var K=F[1]}else{var K=F[0];var L=F[1]}var d=(K&&K.indexOf("0")==0)?K.substring(1):K;var Y=(L&&L.indexOf("0")==0)?L.substring(1):L;var U=F[2];if(!parseInt(d)||!parseInt(Y)||!parseInt(U)){var X=new Date();K=X.getMonth();if(K<10){K="0"+K}L=X.getDate();if(L<10){L="0"+L}U=X.getFullYear()%100;if(U<10){U="0"+U}}var G=null;var H=null;var I=null;var Q=null;if(this.startField){E=this.startField.split(this.formFieldSeparator);G=document.forms[E[0]][E[1]].value;F=G.split("/");if(this.dayMonthDate){I=F[0];H=F[1]}else{H=F[0];I=F[1]}Q=F[2]}var A=this.currMonth+1;if(J){if(K.length==1){K="0"+K}for(var M=0;M<this.maxMonth;M++){if(this.months[M].mon!=K||this.months[M].yr!=U){continue}if(this.disableSelectbox){this.currMonth=M;document.getElementById("yfcMiniCalThisMonthTitle").innerHTML=this.months[this.currMonth].dropDownLabel}else{this.currMonth=((H==K||H==null)?M:M-1);if(this.currMonth<0){this.currMonth=0}document.getElementById("yfcMiniCalMonthSelect").selectedIndex=this.currMonth}A=this.currMonth+1;break}}nextMonthTitleDiv=document.getElementById("yfcMiniCalNextMonthTitle");nextMonthTitleDiv.innerHTML=this.months[A].dropDownLabel;var N=this.months[this.currMonth].startDOW;var V=this.months[this.currMonth].lastDay;var P=this.months[this.currMonth].mon;var S=this.months[this.currMonth].yr;var W=(this.currMonth==0)?this.today:0;var B=(this.months[this.currMonth].mon==K);var D=(this.months[this.currMonth].mon==H);var T=(this.months[this.currMonth].yr==U);var C=(this.months[this.currMonth].yr==Q);var R='<a href="javascript:void(0);" onClick="yfcMiniCal.updateField(\''+this.currField+"','"+P+"','";var c=1;var Z=1;for(i=0;i<42;i++){dayDiv=document.getElementById("yfcMiniCalDayDiv"+Number(i));dayDiv.className="yfcMiniCalDay"+((c>=W||this.disableSelectbox)?((c>V)?"Next":(((c==I)&&D&&C)?"Start":(((c==L)&&B&&T)?"Sel":""))):(this.disableSelectbox?"":"Past"));if(i<N||c>V){dayDiv.innerHTML="&nbsp;"}else{dayDiv.innerHTML=(c<W&&!this.disableSelectbox)?c:R+((c>9)?c:"0"+c)+"','"+S+"'); return false;\">"+c+"</a>";c++}}N=this.months[A].startDOW;V=this.months[A].lastDay;P=this.months[A].mon;S=this.months[A].yr;W=0;B=(this.months[A].mon==K);D=(this.months[A].mon==H);T=(this.months[A].yr==U);C=(this.months[A].yr==Q);R='<a href="javascript:void(0);" onClick="yfcMiniCal.updateField(\''+this.currField+"','"+P+"','";c=1;Z=1;for(i=0;i<42;i++){dayDiv=document.getElementById("yfcMiniCalDayDivNext"+Number(i));dayDiv.className="yfcMiniCalDay"+((c>=W||this.disableSelectbox)?((c>V)?"Next":(((c==I)&&D&&C)?"Start":(((c==L)&&B&&T)?"Sel":""))):(this.disableSelectbox?"":"Past"));if(i<N||c>V){dayDiv.innerHTML="&nbsp;"}else{dayDiv.innerHTML=(c<W&&!this.disableSelectbox)?c:R+((c>9)?c:"0"+c)+"','"+S+"'); return false;\">"+c+"</a>";c++}}this.updateArrows();delete (dayDiv)}function yfcMiniCalInitCalendar(){var B=document.getElementById("yfcMiniCalWeekdays");var D=document.getElementById("yfcMiniCalWeekdaysNext");if(!B||!D){return }var A=0;var C;while(A<42){C=document.createElement("div");C.id="yfcMiniCalDayDiv"+Number(A);C.className="yfcMiniCalDay";B.appendChild(C);C=document.createElement("div");C.id="yfcMiniCalDayDivNext"+Number(A);C.className="yfcMiniCalDay";D.appendChild(C);A++}newClr=document.createElement("br");newClr.className="ygcl";B.appendChild(newClr)}function yfcMiniCalField(D,B,C,A){this.formName=D;this.fldName=B;this.depFldName=C;this.depInc=(A==undefined)?3:A;this.depSet=false}function yfcMiniCalAddField(D,B,C,A){this.fields[D+this.formFieldSeparator+B]=new yfcMiniCalField(D,B,C,A)}function yfcMiniCalUpdateField(D,E,M,N){if(!this.fields[D]){return }var O=this.fields[D].formName;var C=this.fields[D].fldName;if(this.dayMonthDate){document.forms[O][C].value=M+"/"+E+"/"+N}else{document.forms[O][C].value=E+"/"+M+"/"+N}if(document.forms[O][C].onchange){document.forms[O][C].onchange()}var L=this.fields[D].depFldName;if(!L||this.fields[D].depSet){this.closeCal();document.forms[O][C].focus();return }var A=new Date(Number(N),E-1,M);var J=document.forms[O][L].value;var I=J.indexOf("/");var H=J.lastIndexOf("/");var B=(Number(J.substring(H+1))%100);if(this.dayMonthDate){var P=J.substring(0,I);var K=J.substring(I+1,H)}else{var K=J.substring(0,I);var P=J.substring(I+1,H)}var G=new Date(B,K-1,P);var F=false;if(B>=0&&parseInt(B)>=0&&K>=0&&parseInt(K)>=0&&P>=0&&parseInt(P)>=0){F=true}if(!F||G<=A){A.setDate(A.getDate()+this.fields[D].depInc);E=A.getMonth()+1;if(E<10){E="0"+E}M=A.getDate();if(M<10){M="0"+M}N=A.getFullYear().toString();if(this.dayMonthDate){document.forms[O][L].value=M+"/"+E+"/"+N}else{document.forms[O][L].value=E+"/"+M+"/"+N}}document.forms[O][C].focus();this.closeCal()}function yfcMiniCalMonth(C,D,B,E,A){this.mon=C;this.yr=D;this.startDOW=B;this.lastDay=E;this.dropDownLabel=A}function yfcMiniCalAddMonth(C,D,B,E,A){this.months.push(new yfcMiniCalMonth(C,D,B,E,A))}function yfcMiniCalSetMonth(A){this.currMonth=A.selectedIndex;this.showMonth()}function yfcToggleDisplay(A,B,D,C,E){if(this.displayed[B]){this.closeCal()}else{this.openCal(A,B,D,C,E)}}function yfcMiniCalClass(){this.months=new Array();this.fields=new Array();this.currMonth=0;this.maxMonth=11;this.currField=undefined;this.today=0;this.formFieldSeparator="_";this.displayed=new Array();this.init=yfcMiniCalInitCalendar;this.prevMonth=yfcMiniCalPrevMonth;this.nextMonth=yfcMiniCalNextMonth;this.closeCal=yfcMiniCalCloseCal;this.closeCalHandler=undefined;this.openCal=yfcMiniCalOpenCal;this.toggleDisplay=yfcToggleDisplay;this.addField=yfcMiniCalAddField;this.addMonth=yfcMiniCalAddMonth;this.showMonth=yfcMiniCalShowMonth;this.setMonth=yfcMiniCalSetMonth;this.updateArrows=yfcMiniCalUpdateArrows;this.updateField=yfcMiniCalUpdateField;this.dayMonthDate=false}function yfcMiniCalAttachFields(E,A,P,K,Q,L,C,N,H,T,R,U,D,V,M){var F=document.getElementById(E);var B=document.getElementById(A);var G=document.getElementById(P);var I=document.getElementById(K);var O=C+N+E;var J=C+N+A;var S;if(H){yfcMiniCal.closeCalHandler=H}if(F&&F.type!="hidden"){S=function(){yfcMiniCal.openCal(Q,O,null,U,D);if(T){T(E)}};F.onclick=S;if(G){S=function(){yfcMiniCal.toggleDisplay(Q,O,null,U,D);if(R){R(E)}};G.onclick=S}}if(B&&B.type!="hidden"){S=function(){yfcMiniCal.openCal(L,J,O,V,M);if(T){T(A)}};B.onclick=S;if(I){S=function(){yfcMiniCal.toggleDisplay(L,J,O,V,M);if(R){R(A)}};I.onclick=S}}}var yfcMiniCal=new yfcMiniCalClass();function kk_autosuggest_AutoSuggest(elem,suggestions,baseurl,autosuggestDiv,nbItems,className,navigation,separator){var me=this;this.elem=elem;this.suggestions=suggestions;this.eligible=new Array();this.inputText=null;this.baseurl=baseurl;this.highlighted=-1;this.div=document.getElementById(autosuggestDiv);this.data="dynamic";this.navigation=navigation;this.toDisable=false;this.separator=separator;this.addIframe=false;this.myLastValue="";this.buffer="";this.startList=0;this.sizeList=nbItems;this.itemLess="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<< << <<";this.itemMore="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;>> >> >>";this.timeToDisable=10000;this.startWith=false;this.boldSelection=true;this.nbLetters=3;this.sep="&nbsp;";this.uniqueRequest=true;this.timeNotReceived=0;if(suggestions!=""){this.data="static"}if(this.data!="static"){var obj=ygConn.getObject()}var lessId=-1;var moreId=-1;var TAB=9;var ESC=27;var KEYUP=38;var KEYDN=40;var KEYRIGHT=39;var KEYLEFT=37;var ENTER=13;var DEL=8;elem.setAttribute("autocomplete","off");if(!elem.id){var id="autosuggest"+idCounter;idCounter++;elem.id=id}this.kk_autosuggest_disableAutosuggest=function(){var ul=document.createElement("ul");this.div.replaceChild(ul,this.div.childNodes[0]);this.toDisable=true;this.suggestions=[];ygConn.http.abort(obj);ygConn.releaseObject(obj);elem.setAttribute("autocomplete","on")};this.kk_autosuggest_isValidBrowser=function(){var ua=navigator.userAgent.toLowerCase();isGecko=(ua.indexOf("gecko")!=-1&&ua.indexOf("safari")==-1);isSafari=(ua.indexOf("safari")!=-1);isOpera=(ua.indexOf("opera")!=-1);isIE=(ua.indexOf("msie")!=-1&&!isOpera&&(ua.indexOf("webtv")==-1));isMozilla=(isGecko&&ua.indexOf("gecko/")+14==ua.length);isNS=((isGecko)?(ua.indexOf("netscape")!=-1):((ua.indexOf("mozilla")!=-1)&&!isOpera&&!isSafari&&(ua.indexOf("spoofer")==-1)&&(ua.indexOf("compatible")==-1)&&(ua.indexOf("webtv")==-1)&&(ua.indexOf("hotjava")==-1)));isIECompatible=((ua.indexOf("msie")!=-1)&&!isIE);isNSCompatible=((ua.indexOf("mozilla")!=-1)&&!isNS&&!isMozilla&&!isIECompatible&&!isIE);geckoVersion=((isGecko)?ua.substring((ua.lastIndexOf("gecko/")+6),(ua.lastIndexOf("gecko/")+14)):-1);equivalentMozilla=((isGecko)?parseFloat(ua.substring(ua.indexOf("rv:")+3)):-1);versionMinor=parseFloat(navigator.appVersion);if(isGecko&&!isMozilla){versionMinor=parseFloat(ua.substring(ua.indexOf("/",ua.indexOf("gecko/")+6)+1))}else{if(isMozilla){versionMinor=parseFloat(ua.substring(ua.indexOf("rv:")+3))}else{if(isIE&&versionMinor>=4){versionMinor=parseFloat(ua.substring(ua.indexOf("msie")+5))}else{if(isSafari){versionMinor=parseFloat(ua.substring(ua.lastIndexOf("safari/")+7))}else{if(isOpera){versionMinor=parseFloat(ua.substring(ua.indexOf("opera")+6))}}}}}versionMajor=parseInt(versionMinor);isNS6up=(isNS&&versionMajor>=6);isIE55up=(isIE&&versionMinor>=5.5);this.addIframe=isIE55up;if(!isMozilla&&!isNSCompatible&&!isNS6up&&!isIE55up&&!isOpera){this.kk_autosuggest_disableAutosuggest()}};this.kk_autosuggest_isValidBrowser();this.kk_autosuggest_showAutosuggest=function(){this.toDisable=false;elem.setAttribute("autocomplete","off");var obj=ygConn.getObject();this.kk_autosuggest_isValidBrowser();setTimeout("document.getElementById('"+me.elem.id+"').focus()",0);if(elem.value.length>=me.nbLetters){this.kk_autosuggest_sendQuery(elem.value)}};this.kk_autosuggest_updateStatus=function(id,str_hide,str_show){if(this.toDisable){this.kk_autosuggest_showAutosuggest();document.getElementById(id).innerHTML=str_hide}else{this.kk_autosuggest_disableAutosuggest();document.getElementById(id).innerHTML=str_show}};this.kk_autosuggest_sendQuery=function(key){if(!this.toDisable){var url=baseurl+key;if(!ygConn.http.isCallInProgress(obj)){ygConn.http.asyncRequest(obj,"GET",url,false,this.kk_autosuggest_callBack)}else{timeNotReceived=0;if(this.buffer!=null){this.buffer=key;setTimeout("reSendQuery()",500)}else{this.buffer=key}}}reSendQuery=function(){if(!this.toDisable){timeNotReceived=timeNotReceived+500;if(me.timeToDisable<=timeNotReceived){this.toDisable=true;me.kk_autosuggest_disableAutosuggest()}if(me.buffer!=null){if(!ygConn.http.isCallInProgress(obj)){var url=baseurl+me.buffer;ygConn.http.asyncRequest(obj,"GET",url,false,me.kk_autosuggest_callBack);me.buffer=null}else{setTimeout("reSendQuery();",500)}}}}};this.kk_autosuggest_callBack=function(){if(arguments[0].readyState==4){if(arguments[0].status==200){if(arguments[0].responseText==""){me.kk_autosuggest_hideDiv()}else{suggestions=eval(arguments[0].responseText);me.suggestions=suggestions;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv()}else{me.kk_autosuggest_hideDiv()}}}else{me.kk_autosuggest_hideDiv()}}else{me.kk_autosuggest_hideDiv()}ygConn.releaseObject(obj)};elem.onfocus=function(){if(!this.toDisable&&(elem.value.length>=me.nbLetters||me.data=="static")&&(me.div.style.display=="none"||me.div.style.display=="")){me.inputText=elem.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv()}}};elem.onblur=function(){if(me.highlighted>-1&&(me.highlighted==moreId||me.highlighted==lessId)){setTimeout("document.getElementById('"+me.elem.id+"').focus()",0)}else{setTimeout("hideDiv()",200)}hideDiv=function(){me.div.style.display="none";me.highlighted=-1;me.startList=0}};elem.onkeydown=function(ev){var key=me.kk_autosuggest_getKeyCode(ev);switch(key){case TAB:if(me.highlighted>0){me.kk_autosuggest_useSuggestion();me.kk_autosuggest_hideDiv()}else{me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv()}break;case ESC:me.kk_autosuggest_hideDiv();break;case KEYRIGHT:case KEYLEFT:if(me.highlighted==moreId&&me.highlighted!=-1){me.startList=me.startList+me.sizeList;me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv()}else{if(me.highlighted==lessId&&me.highlighted!=-1){me.startList=me.startList-me.sizeList;me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv()}else{if(me.highlighted==-1){me.kk_autosuggest_hideDiv()}else{me.kk_autosuggest_useSuggestion()}}}break;case KEYUP:if(me.highlighted>0){me.highlighted--}me.kk_autosuggest_changeHighlight(key);break;case KEYDN:if(me.navigation==true){if(moreId!=-1){max=moreId}else{max=me.eligible.length%me.sizeList}}else{max=me.eligible.length-1}if(me.highlighted<max){me.highlighted++}me.kk_autosuggest_changeHighlight(key);break;default:me.kk_autosuggest_positionDiv();break}};elem.onkeypress=function(ev){var key=me.kk_autosuggest_getKeyCode(ev);switch(key){case ENTER:if(me.highlighted>-1){me.kk_autosuggest_useSuggestion();return false}}};elem.onkeyup=function(ev){var key=me.kk_autosuggest_getKeyCode(ev);switch(key){case TAB:case ESC:case ENTER:case KEYUP:case KEYDN:case KEYRIGHT:case KEYLEFT:return ;default:me.startList=0;if(me.data=="static"){if(this.value!=me.inputText){me.inputText=this.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv()}else{me.kk_autosuggest_hideDiv()}}else{me.kk_autosuggest_hideDiv()}}else{if(me.uniqueRequest){if(this.value.length==me.nbLetters&&this.value!=""){myValue=this.value;me.inputText=this.value;if(key==DEL){me.kk_autosuggest_hideDiv()}me.kk_autosuggest_sendQuery(myValue)}else{if(this.value!=me.inputText&&this.value.length>me.nbLetters){me.inputText=this.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv()}else{me.kk_autosuggest_hideDiv()}}else{me.kk_autosuggest_hideDiv()}}}else{if(this.value.length>=me.nbLetters&&this.value!=""){myValue=this.value;me.inputText=this.value;if(key==DEL){me.kk_autosuggest_hideDiv()}setTimeout("kk_autosuggest_waitSendQuery(myValue)",300)}else{me.kk_autosuggest_hideDiv()}}}}kk_autosuggest_waitSendQuery=function(key){if(me.inputText==key&&key!=me.myLastValue){me.kk_autosuggest_sendQuery(key)}me.myLastValue=key}};this.kk_autosuggest_useSuggestion=function(){if(this.highlighted>-1&&me.navigation!=true){if(separator==true){this.elem.value=this.eligible[this.highlighted].substring(0,this.eligible[this.highlighted].indexOf(me.sep))}else{this.elem.value=this.eligible[this.highlighted]}this.kk_autosuggest_hideDiv()}else{if(this.highlighted==moreId){this.startList=this.startList+this.sizeList;me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv()}else{if(this.highlighted==lessId){this.startList=this.startList-this.sizeList;if(this.startList<=0){this.startList=0;lessId=0}me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv()}else{itemId=this.startList+parseInt(this.highlighted)-(lessId+1);val=this.eligible[itemId];if(separator==true){me.inputText=val.substring(0,val.indexOf(me.sep))}else{me.inputText=val}this.elem.value=me.inputText;this.kk_autosuggest_hideDiv()}}}};this.kk_autosuggest_showDiv=function(){this.div.style.display="block"};this.kk_autosuggest_hideDiv=function(){this.div.style.display="none";this.highlighted=-1;this.startList=0};this.kk_autosuggest_changeHighlight=function(){var lis=this.div.getElementsByTagName("LI");for(i=0;i<lis.length;i++){var li=lis[i];if(this.highlighted==i){li.className="selected"}else{li.className=""}}};this.kk_autosuggest_positionDiv=function(){var el=this.elem;var x=0;var y=el.offsetHeight;while(el.offsetParent&&el.tagName.toUpperCase()!="BODY"){x+=el.offsetLeft;y+=el.offsetTop;el=el.offsetParent}x+=el.offsetLeft;y+=el.offsetTop;this.div.style.left=x+"px";this.div.style.top=y+"px"};this.kk_autosuggest_createDiv=function(){var ul=document.createElement("ul");if(this.navigation!=true){for(i=0;i<this.eligible.length;i++){var word=this.eligible[i];var li=document.createElement("li");var a=document.createElement("a");a.href="javascript:false";a.innerHTML=word;li.appendChild(a);if(me.highlighted==i){li.className="selected"}ul.appendChild(li)}endList=this.suggestions.length}else{endList=this.startList+this.sizeList;if(endList>this.eligible.length){endList=this.eligible.length}if(this.startList>=this.sizeList){var li=document.createElement("li");var a=document.createElement("a");a.href="javascript:false";a.innerHTML=this.itemLess;li.appendChild(a);lessId=0;ul.appendChild(li)}else{lessId=-1}me.highlighted=-1;for(i=this.startList;i<endList;i++){var word=new String(this.eligible[i]);var li=document.createElement("li");var a=document.createElement("a");a.href="javascript:false";if(me.boldSelection){wordFormatted=word.replace(cnvrt2Title(me.inputText),"<b>"+cnvrt2Title(me.inputText)+"</b>");if(wordFormatted.indexOf("<b>")==-1){wordFormatted=wordFormatted.replace(me.inputText,"<b>"+me.inputText+"</b>")}if(wordFormatted.indexOf("<b>")==-1){wordFormatted=wordFormatted.replace(me.inputText.toUpperCase(),"<b>"+me.inputText.toUpperCase()+"</b>")}wordFormatted=wordFormatted.replace("&<b>nbsp</b>;","&nbsp;").replace("&<b>nbs</b>p;","&nbsp;").replace("&<b>n</b>bsp;","&nbsp;").replace("&<b>nb</b>sp;","&nbsp;").replace("&<b>nbsp;</b>","&nbsp;");a.innerHTML=wordFormatted}else{a.innerHTML=word}li.appendChild(a);ul.appendChild(li)}if(this.eligible.length>endList){var li=document.createElement("li");var a=document.createElement("a");a.href="javascript:false";a.innerHTML=this.itemMore;li.appendChild(a);if(lessId==0){moreId=lessId+this.sizeList+1}else{moreId=this.startList+this.sizeList}ul.appendChild(li)}else{moreId=-1}}if(this.addIframe){var iframe=document.createElement("iframe");iframe.frameBorder=0;iframe.style.display="block";iframe.style.position="absolute";iframe.style.top=ul.offsetTop;iframe.style.left=0;iframe.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";iframe.id=this.div.id+"BackGround";iframe.style.zIndex="-10";ul.appendChild(iframe)}this.div.replaceChild(ul,this.div.childNodes[0]);ul.onmouseover=function(ev){var target=me.kk_autosuggest_getEventSource(ev);while(target.parentNode&&target.nodeName.toUpperCase()!="LI"){target=target.parentNode}var lis=me.div.getElementsByTagName("LI");for(i=0;i<lis.length;i++){var li=lis[i];if(li==target){me.highlighted=i;break}}me.kk_autosuggest_changeHighlight()};ul.onclick=function(ev){me.kk_autosuggest_useSuggestion();me.kk_autosuggest_cancelEvent(ev);return false};this.div.className=className;this.div.style.position="absolute";if(this.addIframe){if(this.div.offsetHeight>0){height=this.div.offsetHeight}else{if(endList>0){height=endList*17+20}}document.getElementById(this.div.id+"BackGround").style.height=height+"px"}function cnvrt2Title(str){return str.toLowerCase().replace(/\b[a-z]/g,cnvrt);function cnvrt(){return arguments[0].toUpperCase()}}};this.kk_autosuggest_getEligible=function(){this.eligible=new Array();if(me.navigation!=true){this.suggestions.length=this.sizeList}for(var i=0;i<this.suggestions.length;i++){if(this.suggestions[i].toUpperCase().indexOf(me.inputText.toUpperCase())>-1){var suggestion=this.suggestions[i];if((me.startWith&&suggestion.toLowerCase().indexOf(me.inputText.toLowerCase())==0)){this.eligible[this.eligible.length]=suggestion}else{if(!(me.startWith&&suggestion.toLowerCase().indexOf(me.inputText.toLowerCase())>=0)){this.eligible[this.eligible.length]=suggestion}}}}};this.kk_autosuggest_getKeyCode=function(ev){if(ev){return ev.keyCode}if(window.event){return window.event.keyCode}};this.kk_autosuggest_getEventSource=function(ev){if(ev){return ev.target}if(window.event){return window.event.srcElement}};this.kk_autosuggest_cancelEvent=function(ev){if(ev){ev.preventDefault();ev.stopPropagation()}if(window.event){window.event.returnValue=false}}}var idCounter=0;function ygConnect(){}ygConnect.prototype={_msxml_progid:["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],_async_response:{},_http_header:[],_isFormPost:false,_sFormData:null,getConnObject:function(A,G){var E,B;try{B=new XMLHttpRequest();E={conn:B,oId:A,tId:G}}catch(D){for(var C=0;C<this._msxml_progid.length;++C){try{B=new ActiveXObject(this._msxml_progid[C]);E={conn:B,oId:A,tId:G}}catch(D){}}}finally{if(B!=undefined||E!=undefined){var F=arguments.length>0?E:B;return F}else{return null}}},setProgId:function(A){this.msxml_progid.unshift(A)},syncRequest:function(F,C,E,B,A){if(!F){return }F.conn.open(C,E,false);if(this._http_header.length>0){this.setHeader(F)}if(this._isFormPost){A=this._sFormData;this._isFormPost=false}else{if(A){this.initHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8")}}A?F.conn.send(A):F.conn.send(null);try{if(F.conn.status==200){response=(B?F.conn.responseXML:F.conn.responseText)}else{response=this.connectException(F)}}catch(D){response=this.connectException(D,F.tId)}finally{ygConnect.superclass.releaseObject(F);return response}},asyncRequest:function(B,E,C,I,G,A,F){if(!B){var D={method:E,uri:C,isXml:I,callback:G,argument:A,data:F};ygConnect.superclass.queueRequest(D)}else{var H=this;B.conn.open(E,C,true);if(G){B.conn.onreadystatechange=function(){if(B.conn.readyState==4){try{if(B.conn.status==200){G(B.conn,B.tId,A)}else{var J=H.connectException(B);G(J,A)}}catch(K){var J=H.connectException(K,B.tId);G(J,A)}finally{ygConnect.superclass.releaseObject(B)}}}}else{B.conn.onreadystatechange=function(){H.stateChange(B,I)}}if(this._http_header.length>0){this.setHeader(B)}if(this._isFormPost){F=this._sFormData;this._isFormPost=false}else{if(F){this.initHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8")}}F?B.conn.send(F):B.conn.send(null)}},stateChange:function(D,A){var B;switch(D.conn.readyState){case 4:try{if(D.conn.status==200){B={tId:D.tId,status:D.conn.status,message:(A?D.conn.responseXML:D.conn.responseText)}}else{B=this.connectException(D)}}catch(C){B=this.connectException(C,D.tId)}finally{this.setResponse(B);ygConnect.superclass.releaseObject(D)}break}},setResponse:function(A){this._async_response[A.tId]=A},getResponse:function(B){var A=this._async_response[B];if(A){delete this._async_response[B];return A}},initHeader:function(B,C){var A=[B,C];this._http_header.push(A)},setHeader:function(C){var A=this._http_header;for(var B=0;B<A.length;B++){C.conn.setRequestHeader(A[B][0],A[B][1])}A.splice(0,A.length)},getHeader:function(B,A){return B.conn.getResponseHeader(A)},getAllHeaders:function(A){return A.conn.getAllResponseHeaders()},setForm:function(C){this._sFormData="";var E;var D=document.forms[C];for(var B=0;B<D.elements.length;B++){oElement=D.elements[B];elName=D.elements[B].name;elValue=D.elements[B].value;switch(oElement.type){case"select-multiple":for(var A=0;A<oElement.options.length;A++){if(oElement.options[A].selected){this._sFormData+=encodeURIComponent(elName)+"="+encodeURIComponent(oElement.options[A].value)+"&"}}break;case"radio":case"checkbox":if(oElement.checked){this._sFormData+=encodeURIComponent(elName)+"="+encodeURIComponent(elValue)+"&"}break;case"file":break;case undefined:break;default:this._sFormData+=encodeURIComponent(elName)+"="+encodeURIComponent(elValue)+"&";break}}this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);this._isFormPost=true;this.initHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8")},abort:function(A){if(this.isCallInProgress(A)){A.conn.abort();ygConnect.superclass.releaseObject(A)}},isCallInProgress:function(A){if(A){return A.conn.readyState!=4&&A.conn.readyState!=0}},connectException:function(A,B){if(A.conn){return{tId:A.tId,status:A.conn.status,message:A.conn.statusText}}else{return{tId:B,status:A.name,message:A.message}}}};var ygConnManager=function(){};ygConnManager.prototype={_object_count:0,_available_pool:[],_request_queue:[],_enable_pool:true,_max_pool_size:2,_transaction_id:0,http:new ygConnect()};var ygConn=ygConnManager.prototype;ygConnect.superclass=ygConnManager.prototype;ygConnManager.prototype.setPoolSize=function(A){this._max_pool_size=2};ygConnManager.prototype.disablePooling=function(){this._enable_pool=false};ygConnManager.prototype.enablePooling=function(){this._enable_pool=true};ygConnManager.prototype.getTransactionId=function(){return this._transaction_id};ygConnManager.prototype.incrObjCount=function(){this._object_count++};ygConnManager.prototype.incrTransactionId=function(){this._transaction_id++};ygConnManager.prototype.getObject=function(){var C;var B;var D=this.getTransactionId();if(this._enable_pool){try{if(window.XMLHttpRequest){B=this._object_count;C=this.http.getConnObject(B,D);if(C){this.incrTransactionId()}return C}else{if(window.ActiveXObject){return this.getActiveXObject()}}}catch(A){return this.getActiveXObject()}}else{return this.http.getConnObject()}};ygConnManager.prototype.getActiveXObject=function(){var B;var A;var C=this.getTransactionId();if(this._object_count<this._max_pool_size&&this._available_pool.length==0){A=this._object_count;B=this.http.getConnObject(A,C);if(B){this.incrObjCount();this.incrTransactionId()}}else{if(this._available_pool.length>0){B=this.getAvailableObject();if(B){B.tId=C;this.incrTransactionId()}}}return B};ygConnManager.prototype.getAvailableObject=function(){return this._available_pool.shift()};ygConnManager.prototype.releaseObject=function(B){try{if(window.XMLHttpRequest){B=null}else{B.conn.onreadystatechange=detachStateListener;this._available_pool.push(B)}}catch(A){B.conn.onreadystatechange=detachStateListener;this._available_pool.push(B)}finally{this.checkRequestQueue()}};ygConnManager.prototype.checkRequestQueue=function(){if(this._request_queue.length>0){var B=this.getObject();var A=this._request_queue.shift();this.http.asyncRequest(B,A.method,A.uri,A.isXml,A.callback,A.argument,A.data)}};ygConnManager.prototype.queueRequest=function(A){this._request_queue.push(A)};function detachStateListener(){return null}function kk_multistop_IsFourDigitsYear(A){return(A.search(/\d{4}/)!=-1)}function kk_multistop_ConvertToFourDigitsYear(B){var A="20"+B;return A}function kk_multistop_isNewCalendar(){return(document.getElementById("yfcMiniCalDiv")!=null)}var dtCh="/";function kk_multistop_IsInterger(B){var A;for(A=0;A<B.length;A++){var C=B.charAt(A);if(((C<"0")||(C>"9"))){return false}}return true}function kk_multistop_stripCharsInBag(C,D){var B;var A="";for(B=0;B<C.length;B++){var E=C.charAt(B);if(D.indexOf(E)==-1){A+=E}}return A}function kk_multistop_daysInFebruary(A){return(((A%4==0)&&((!(A%100==0))||(A%400==0)))?29:28)}function kk_multistop_DaysArray(B){for(var A=1;A<=B;A++){this[A]=31;if(A==4||A==6||A==9||A==11){this[A]=30}if(A==2){this[A]=29}}return this}function kk_multistop_isDate(D){var A=kk_multistop_DaysArray(12);var E=D.indexOf(dtCh);var C=D.indexOf(dtCh,E+1);var G=D.substring(0,E);var H=D.substring(E+1,C);var F=D.substring(C+1);strYr=F;if(G.charAt(0)=="0"&&G.length>1){G=G.substring(1)}if(H.charAt(0)=="0"&&H.length>1){H=H.substring(1)}for(var B=1;B<=3;B++){if(strYr.charAt(0)=="0"&&strYr.length>1){strYr=strYr.substring(1)}}month=parseInt(H);day=parseInt(G);year=parseInt(strYr);if(E==-1||C==-1){alert(alert1);return false}if(H.length<1||month<1||month>12){alert(alert1);return false}if(G.length<1||day<1||day>31||(month==2&&day>kk_multistop_daysInFebruary(year))||day>A[month]){alert(alert1);return false}if((F.length!=4&&F.length!=2)||year==0){alert(alert1);return false}if(D.indexOf(dtCh,C+1)!=-1||kk_multistop_IsInterger(kk_multistop_stripCharsInBag(D,dtCh))==false){alert(alert1);return false}return true}function kk_multistop_openDepartureDateLeg1Calendar(){if(cal==null){cal=new kk_CalendarPopup();cal.setReturnFunction("kk_multistop_setDepDate_leg1");cal.setMonthNames(month1,month2,month3,month4,month5,month6,month7,month8,month9,month10,month11,month12);cal.setDayHeaders(day1,day2,day3,day4,day5,day6,day7);cal.setWeekStartDay(1);cal.setTodayLabel(todayLabel,month,year)}month=document.searchForm.dmonth_leg1.options[document.searchForm.dmonth_leg1.selectedIndex].value;year=document.searchForm.dyear_leg1.options[document.searchForm.dyear_leg1.selectedIndex].value;cal.showCalendar("depdate_leg1",month,year);return false}function kk_multistop_openDepartureDateLeg2Calendar(){if(cal2==null){cal2=new kk_CalendarPopup();cal2.setReturnFunction("kk_multistop_setDepDate_leg2");cal2.setMonthNames(month1,month2,month3,month4,month5,month6,month7,month8,month9,month10,month11,month12);cal2.setDayHeaders(day1,day2,day3,day4,day5,day6,day7);cal2.setWeekStartDay(1);cal2.setTodayLabel(todayLabel)}month=document.searchForm.dmonth_leg2.options[document.searchForm.dmonth_leg2.selectedIndex].value;year=document.searchForm.dyear_leg2.options[document.searchForm.dyear_leg2.selectedIndex].value;cal2.showCalendar("depdate_leg2",month,year);return false}function kk_multistop_openDepartureDateLeg3Calendar(){if(cal3==null){cal3=new kk_CalendarPopup();cal3.setReturnFunction("kk_multistop_setDepDate_leg3");cal3.setMonthNames(month1,month2,month3,month4,month5,month6,month7,month8,month9,month10,month11,month12);cal3.setDayHeaders(day1,day2,day3,day4,day5,day6,day7);cal3.setWeekStartDay(1);cal3.setTodayLabel(todayLabel)}month=document.searchForm.dmonth_leg3.options[document.searchForm.dmonth_leg3.selectedIndex].value;year=document.searchForm.dyear_leg3.options[document.searchForm.dyear_leg3.selectedIndex].value;cal3.showCalendar("depdate_leg3",month,year);return false}function kk_multistop_cleanTown(A){}function kk_multistop_currentYear(){var A=new Date();var B=A.getYear();if(B<999){B+=1900}return B}function kk_multistop_setDepDate_leg1(D,A,C){var B=kk_multistop_currentYear();document.searchForm.dday_leg1.selectedIndex=C-1;document.searchForm.dmonth_leg1.selectedIndex=A-1;if(D==B){document.searchForm.dyear_leg1.selectedIndex=0}if(D==B+1){document.searchForm.dyear_leg1.selectedIndex=1}kk_multistop_setMonth_leg1();kk_multistop_setYear_leg1();kk_multistop_getDepWeekDay_leg1(C,A,D)}function kk_multistop_setDepDate_leg2(D,A,C){var B=kk_multistop_currentYear();document.searchForm.dday_leg2.selectedIndex=C-1;document.searchForm.dmonth_leg2.selectedIndex=A-1;if(D==B){document.searchForm.dyear_leg2.selectedIndex=0}if(D==B+1){document.searchForm.dyear_leg2.selectedIndex=1}kk_multistop_setMonth_leg2();kk_multistop_setYear_leg2();kk_multistop_getDepWeekDay_leg2(C,A,D)}function kk_multistop_setDepDate_leg3(D,A,C){var B=kk_multistop_currentYear();document.searchForm.dday_leg3.selectedIndex=C-1;document.searchForm.dmonth_leg3.selectedIndex=A-1;if(D==B){document.searchForm.dyear_leg3.selectedIndex=0}if(D==B+1){document.searchForm.dyear_leg3.selectedIndex=1}kk_multistop_getDepWeekDay_leg3(C,A,D)}function kk_multistop_ctrlForm(H){if(typeof (H.airline)!="undefined"){if(H.airlineFormatted!=null&&H.airline.type.toLowerCase()=="select"){var Q=H.airline.options[H.airline.selectedIndex].text;H.airlineFormatted.value=Q}}var G=[31,28,31,30,31,30,31,31,30,31,30,31];var M=[31,28,31,30,31,30,31,31,30,31,30,31];var C=kk_multistop_isNewCalendar();if(C){var I=H.departureDate1.value;var F=H.departureDate2.value;var D=H.departureDate3.value;if(!kk_multistop_isDate(I)||!kk_multistop_isDate(F)||!kk_multistop_isDate(D)){return false}var L=I.split("/");var K=F.split("/");var J=D.split("/");selectedDepDay_leg1=L[0];selectedDepMonth_leg1=L[1];selectedDepYear_leg1=L[2];selectedDepDay_leg2=K[0];selectedDepMonth_leg2=K[1];selectedDepYear_leg2=K[2];selectedDepDay_leg3=J[0];selectedDepMonth_leg3=J[1];selectedDepYear_leg3=J[2];if(!kk_multistop_IsFourDigitsYear(selectedDepYear_leg1)){selectedDepYear=kk_multistop_ConvertToFourDigitsYear(selectedDepYear_leg1)}if(!kk_multistop_IsFourDigitsYear(selectedDepYear_leg2)){selectedDepYear=kk_multistop_ConvertToFourDigitsYear(selectedDepYear_leg2)}if(!kk_multistop_IsFourDigitsYear(selectedDepYear_leg3)){selectedDepYear=kk_multistop_ConvertToFourDigitsYear(selectedDepYear_leg3)}}else{selectedDepDay_leg1=H.dday_leg1.options[H.dday_leg1.selectedIndex].value;selectedDepMonth_leg1=H.dmonth_leg1.options[H.dmonth_leg1.selectedIndex].value;selectedDepYear_leg1=H.dyear_leg1.options[H.dyear_leg1.selectedIndex].value;selectedDepDay_leg2=H.dday_leg2.options[H.dday_leg2.selectedIndex].value;selectedDepMonth_leg2=H.dmonth_leg2.options[H.dmonth_leg2.selectedIndex].value;selectedDepYear_leg2=H.dyear_leg2.options[H.dyear_leg2.selectedIndex].value;selectedDepDay_leg3=H.dday_leg3.options[H.dday_leg3.selectedIndex].value;selectedDepMonth_leg3=H.dmonth_leg3.options[H.dmonth_leg3.selectedIndex].value;selectedDepYear_leg3=H.dyear_leg3.options[H.dyear_leg3.selectedIndex].value}selectedDepDate_leg1=new Date(selectedDepYear_leg1,selectedDepMonth_leg1-1,selectedDepDay_leg1);selectedDepDate_leg2=new Date(selectedDepYear_leg2,selectedDepMonth_leg2-1,selectedDepDay_leg2);selectedDepDate_leg3=new Date(selectedDepYear_leg3,selectedDepMonth_leg3-1,selectedDepDay_leg3);today=new Date();selectedDepTime_leg1=selectedDepDate_leg1.getTime()+24*3600*1000;selectedDepTime_leg2=selectedDepDate_leg2.getTime()+24*3600*1000;selectedDepTime_leg3=selectedDepDate_leg3.getTime()+24*3600*1000;var E="";var B="";var A="";var P="";var O="";var N="";E=H.departure_leg1.value;B=H.arrival_leg1.value;A=H.departure_leg2.value;P=H.arrival_leg2.value;O=H.departure_leg3.value;N=H.arrival_leg3.value;if(E==""||B==""){alert(alert4);return false}else{if(today.getTime()>selectedDepTime_leg1){alert(alert2);return false}}if((A!=""&&P=="")||(A==""&&P!="")){alert(alert5);return false}if((O!=""&&N=="")||(O==""&&N!="")){alert(alert6);return false}if(A!=""&&P!=""){if(today.getTime()>selectedDepTime_leg2){alert(alert7);return false}if(selectedDepTime_leg1>selectedDepTime_leg2){alert(alert8);return false}}if(O!=""&&N!=""){if(today.getTime()>selectedDepTime_leg2){alert(alert9);return false}if(selectedDepTime_leg1>selectedDepTime_leg3){alert(alert10);return false}if(selectedDepTime_leg2>selectedDepTime_leg3){alert(alert11);return false}}return true}function kk_multistop_setMonth_leg1(){document.searchForm.dmonth_leg2.selectedIndex=document.searchForm.dmonth_leg1.selectedIndex;document.searchForm.dmonth_leg3.selectedIndex=document.searchForm.dmonth_leg1.selectedIndex;kk_multistop_updateWeekDay_leg1();kk_multistop_updateWeekDay_leg2();kk_multistop_updateWeekDay_leg3()}function kk_multistop_setMonth_leg2(){document.searchForm.dmonth_leg3.selectedIndex=document.searchForm.dmonth_leg2.selectedIndex;kk_multistop_updateWeekDay_leg2();kk_multistop_updateWeekDay_leg3()}function kk_multistop_setYear_leg1(){document.searchForm.dyear_leg2.selectedIndex=document.searchForm.dyear_leg1.selectedIndex;document.searchForm.dyear_leg3.selectedIndex=document.searchForm.dyear_leg1.selectedIndex;kk_multistop_updateWeekDay_leg1();kk_multistop_updateWeekDay_leg2();kk_multistop_updateWeekDay_leg3()}function kk_multistop_setYear_leg2(){document.searchForm.dyear_leg3.selectedIndex=document.searchForm.dyear_leg2.selectedIndex;kk_multistop_updateWeekDay_leg2();kk_multistop_updateWeekDay_leg3()}function kk_multistop_updateWeekDay_leg1(){var A=document.searchForm.dday_leg1.value;var C=document.searchForm.dmonth_leg1.value;var B=document.searchForm.dyear_leg1.value;if(B%4==0){var D=new Array(31,29,31,30,31,30,31,31,30,31,30,31)}else{var D=new Array(31,28,31,30,31,30,31,31,30,31,30,31)}if(A>D[C-1]){A=D[C-1];document.searchForm.dday_leg1.value=A}kk_multistop_getDepWeekDay_leg1(A,C,B)}function kk_multistop_getDepWeekDay_leg1(D,A,E){var B=new Date(E,A-1,D);var C=B.getDay();if(C==0){document.searchForm.wdday_leg1.value=Sun}if(C==1){document.searchForm.wdday_leg1.value=Mon}if(C==2){document.searchForm.wdday_leg1.value=Tue}if(C==3){document.searchForm.wdday_leg1.value=Wed}if(C==4){document.searchForm.wdday_leg1.value=Thu}if(C==5){document.searchForm.wdday_leg1.value=Fri}if(C==6){document.searchForm.wdday_leg1.value=Sat}}function kk_multistop_updateWeekDay_leg2(){var A=document.searchForm.dday_leg2.value;var C=document.searchForm.dmonth_leg2.value;var B=document.searchForm.dyear_leg2.value;if(B%4==0){var D=new Array(31,29,31,30,31,30,31,31,30,31,30,31)}else{var D=new Array(31,28,31,30,31,30,31,31,30,31,30,31)}if(A>D[C-1]){A=D[C-1];document.searchForm.dday_leg2.value=A}kk_multistop_getDepWeekDay_leg2(A,C,B)}function kk_multistop_getDepWeekDay_leg2(D,A,E){var B=new Date(E,A-1,D);var C=B.getDay();if(C==0){document.searchForm.wdday_leg2.value=Sun}if(C==1){document.searchForm.wdday_leg2.value=Mon}if(C==2){document.searchForm.wdday_leg2.value=Tue}if(C==3){document.searchForm.wdday_leg2.value=Wed}if(C==4){document.searchForm.wdday_leg2.value=Thu}if(C==5){document.searchForm.wdday_leg2.value=Fri}if(C==6){document.searchForm.wdday_leg2.value=Sat}}function kk_multistop_updateWeekDay_leg3(){var A=document.searchForm.dday_leg3.value;var C=document.searchForm.dmonth_leg3.value;var B=document.searchForm.dyear_leg3.value;if(B%4==0){var D=new Array(31,29,31,30,31,30,31,31,30,31,30,31)}else{var D=new Array(31,28,31,30,31,30,31,31,30,31,30,31)}if(A>D[C-1]){A=D[C-1];document.searchForm.dday_leg3.value=A}kk_multistop_getDepWeekDay_leg3(A,C,B)}function kk_multistop_getDepWeekDay_leg3(D,A,E){var B=new Date(E,A-1,D);var C=B.getDay();if(C==0){document.searchForm.wdday_leg3.value=Sun}if(C==1){document.searchForm.wdday_leg3.value=Mon}if(C==2){document.searchForm.wdday_leg3.value=Tue}if(C==3){document.searchForm.wdday_leg3.value=Wed}if(C==4){document.searchForm.wdday_leg3.value=Thu}if(C==5){document.searchForm.wdday_leg3.value=Fri}if(C==6){document.searchForm.wdday_leg3.value=Sat}}function kk_multistop_pV(B){var A=parent.opener.window.document.formulaire.selectedBox.value;var C=A+"TEXT";parent.opener.window.document.formulaire.elements[A].value=B;parent.opener.window.document.formulaire.elements[C].value=B;closePopup()}function kk_multistop_checkEmptyAirport(){if(typeof (document.forms.formulaire.departure)!="undefined"){document.forms.formulaire.departureTEXT.value=document.forms.formulaire.departure.value}if(typeof (document.forms.formulaire.arrival)!="undefined"){document.forms.formulaire.arrivalTEXT.value=document.forms.formulaire.arrival.value}var B=document.forms.formulaire.departureTEXT.value;var A=document.forms.formulaire.arrivalTEXT.value;B=kk_multistop_stringTrim(B);A=kk_multistop_stringTrim(A);if(A.length==0||B.length==0){alert(ALERT_AIRPORT_EMPTY);return false}else{return true}}function kk_multistop_stringTrim(A){if(A!=null){A=A.replace(/^\s+|\s+$/g,"")}return A}function kk_multistop_majDate(){if(document.searchForm.dday_leg3.value=="1"&&document.searchForm.dday_leg2.value=="1"&&document.searchForm.dday_leg1.value=="1"&&document.searchForm.dmonth_leg3.value=="1"&&document.searchForm.dmonth_leg2.value=="1"&&document.searchForm.dmonth_leg1.value=="1"){var B=new Date();var C=B.getTime()+(86400000*7);B.setTime(C);var G=B.getMonth()+1;var D=B.getFullYear();var A=B.getDate();document.searchForm.dday_leg1.options[A-1].selected=true;document.searchForm.dmonth_leg1.options[G-1].selected=true;document.searchForm.dyear_leg1.options[D-this_year].selected=true;var F=new Date();C=F.getTime()+(86400000*14);F.setTime(C);G=F.getMonth()+1;D=F.getFullYear();A=F.getDate();document.searchForm.dday_leg2.options[A-1].selected=true;document.searchForm.dmonth_leg2.options[G-1].selected=true;document.searchForm.dyear_leg2.options[D-this_year].selected=true;var E=new Date();C=E.getTime()+(86400000*21);E.setTime(C);G=E.getMonth()+1;D=E.getFullYear();A=E.getDate();document.searchForm.dday_leg3.options[A-1].selected=true;document.searchForm.dmonth_leg3.options[G-1].selected=true;document.searchForm.dyear_leg3.options[D-this_year].selected=true}}function kk_go(A){document.location.href=A}function kk_link3(A){var A=kk_decode64(A);kk_go(A)}var kk_keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function kk_decode64(D){var B="";var K,I,G="";var J,H,F,E="";var C=0;var A=/[^A-Za-z0-9\+\/\=]/g;if(A.exec(D)){return""}D=D.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{J=kk_keyStr.indexOf(D.charAt(C++));H=kk_keyStr.indexOf(D.charAt(C++));F=kk_keyStr.indexOf(D.charAt(C++));E=kk_keyStr.indexOf(D.charAt(C++));K=(J<<2)|(H>>4);I=((H&15)<<4)|(F>>2);G=((F&3)<<6)|E;B=B+String.fromCharCode(K);if(F!=64){B=B+String.fromCharCode(I)}if(E!=64){B=B+String.fromCharCode(G)}K=I=G="";J=H=F=E=""}while(C<D.length);return B}function validate(A,B){txt=A.value;if(txt==""){alert(B);A.focus();return false}return true}function buy(A){if(ctrlPSForm(A)){A.mode.value="buy";A.target="_blank";A.submit();A.onsubmit=f1}}function compare(A){if(ctrlPSForm(A)){A.mode.value="compare";A.target="_self";A.submit();A.onsubmit=f1}}function f1(){return false}function ctrlPSForm(A){selectedDepDay=A.dday.options[A.dday.selectedIndex].value;selectedDepMonth=A.dmonth.options[A.dmonth.selectedIndex].value;selectedDepYear=A.dyear.options[A.dyear.selectedIndex].value;selectedRetDay=A.rday.options[A.rday.selectedIndex].value;selectedRetMonth=A.rmonth.options[A.rmonth.selectedIndex].value;selectedRetYear=A.ryear.options[A.ryear.selectedIndex].value;selectedDepDate=new Date(selectedDepYear,selectedDepMonth-1,selectedDepDay);selectedRetDate=new Date(selectedRetYear,selectedRetMonth-1,selectedRetDay);today=new Date();tableJJ=[31,29,31,30,31,30,31,31,30,31,30,31];if(selectedDepDay>tableJJ[selectedDepMonth-1]||(true&&selectedRetDay>tableJJ[selectedRetMonth-1])){alert(jsalert1);return false}selectedDepTime=selectedDepDate.getTime()+24*3600*1000;selectedRetTime=selectedRetDate.getTime()+24*3600*1000;if(today.getTime()>selectedDepTime||((today.getTime()>selectedRetTime)&&true)){alert(jsalert2);return false}if((selectedRetTime<selectedDepTime)&&(true)){alert(jsalert3);return false}return true}function calendar(A){document.write('<div class="calendar_form">\n');var E=new Date();E.setDate(E.getDate()+dday);var B=E.getDate();var D=E.getMonth()+1;var C=E.getFullYear();document.write('<select name="dday">\n');for(i=1;i<=31;i++){if(B==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write('<select name="dmonth" >\n');for(i=1;i<=12;i++){if(D==i){document.write("<option value="+i+" selected>"+A[i-1]+"</option>\n")}else{document.write("<option value="+i+">"+A[i-1]+"</option>\n")}}document.write("</select> \n");document.write('<select name="dyear" >\n');for(i=C;i<=(C+5);i++){if(C==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select><br>\n");E=new Date();E.setDate(E.getDate()+rday);B=E.getDate();D=E.getMonth()+1;C=E.getFullYear();document.write('<select name="rday" >\n');for(i=1;i<=31;i++){if(B==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write('<select name="rmonth" >\n');for(i=1;i<=12;i++){if(D==i){document.write("<option value="+i+" selected>"+A[i-1]+"</option>\n")}else{document.write("<option value="+i+">"+A[i-1]+"</option>\n")}}document.write("</select>\n");document.write('<select name="ryear" >\n');for(i=C;i<=(C+5);i++){if(C==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write("</div>\n")}function longcalendar(A){document.write('<div class="calendar_form">\n');var E=new Date();E.setDate(E.getDate()+dday);var B=E.getDate();var D=E.getMonth()+1;var C=E.getFullYear();document.write('<select name="dday">\n');for(i=1;i<=31;i++){if(B==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write('<select name="dmonth" >\n');for(i=1;i<=12;i++){if(D==i){document.write("<option value="+i+" selected>"+A[i-1]+"</option>\n")}else{document.write("<option value="+i+">"+A[i-1]+"</option>\n")}}document.write("</select> \n");document.write('<select name="dyear" >\n');for(i=C;i<=(C+5);i++){if(C==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select> \n");document.write('<select name="dhour" >\n');for(i=0;i<=23;i++){if(i<10){document.write("<option value=0"+i+" selected>0"+i+"</option>\n")}else{if(i==10){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}}document.write("</select> \n");document.write('<span class="ss-n">h</span>\n');document.write('<select name="dminute" >\n');for(i=0;i<=50;i+=10){if(i==0){document.write("<option value=0"+i+" selected>"+ +"0"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select><br>\n");E=new Date();E.setDate(E.getDate()+rday);B=E.getDate();D=E.getMonth()+1;C=E.getFullYear();document.write('<select name="rday" >\n');for(i=1;i<=31;i++){if(B==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write('<select name="rmonth" >\n');for(i=1;i<=12;i++){if(D==i){document.write("<option value="+i+" selected>"+A[i-1]+"</option>\n")}else{document.write("<option value="+i+">"+A[i-1]+"</option>\n")}}document.write("</select>\n");document.write('<select name="ryear" >\n');for(i=C;i<=(C+5);i++){if(C==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write('<select name="rhour" >\n');for(i=0;i<=23;i++){if(i<10){document.write("<option value=0"+i+" selected>0"+i+"</option>\n")}else{if(i==10){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}}document.write("</select>\n");document.write('<span class="ss-n">h</span>\n');document.write('<select name="rminute" >\n');for(i=0;i<=50;i+=10){if(i==0){document.write("<option value=0"+i+" selected>"+ +"0"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write("</div>\n")}function kk_holiday_currentYear(){var A=new Date();var B=A.getYear();if(B<999){B+=1900}return B}function kk_AJAX(B){this.requestMethod="GET";this.response="";this.getXML=function(C){if(C){this.callbackXML=C}this.SetCallback(this.getXMLCallback,1);this.Get(this.source)};this.getText=function(C){if(C){this.callbackText=C}this.SetCallback(this.getTextCallback,1);this.Get(this.source)};this.SetCallback=function(D,C){if(C>2||C<0){return }this.callbacks[C].push(D)};this.insertHTML=function(C){this.DOMObject=C;this.getText(this.insertHTMLCallback)};this.source=B;this.request=new Object;this.callbacks=new Array(new Array(),new Array(),new Array());this.DOMObject=new Object;this.callbackXML=new Function;this.callbackText=new Function;var A=this;this.insertHTMLCallback=function(C){A.DOMObject.innerHTML=C};this.getXMLCallback=function(){A.callbackXML(A.request.responseXML)};this.getTextCallback=function(){A.callbackText(A.request.responseText)};this.GetCallback=function(){if(A.request.readyState==4&&A.request.status==200){cas=1}if(A.request.readyState==4&&A.request.status!=200){cas=2}if(A.request.readyState<4){cas=0}for(var C=0;C<A.callbacks[cas].length;C++){A.callbacks[cas][C](A.request)}};this.Get=function(C){if(window.XMLHttpRequest){this.request=new XMLHttpRequest();this.request.onreadystatechange=this.GetCallback;this.request.open(this.requestMethod,C,true);this.request.send(null)}else{if(window.ActiveXObject){this.request=new ActiveXObject("Microsoft.XMLHTTP");if(this.request){this.request.onreadystatechange=this.GetCallback;this.request.open(this.requestMethod,C,true);this.request.send()}}}}}function kk_updateStatusBar(){if(eval(document.getElementById)){var d=document.getElementById("statusBar");if(d){d.innerHTML=arguments[0]}}}function kk_updateStatus(){if(eval(document.getElementById)){var d=document.getElementById("currentStatus");if(d){d.innerHTML=arguments[0]}}}function kk_updateCounter(){if(eval(document.getElementById)){var d=document.getElementById("counter");if(d){d.innerHTML=arguments[0]}}}function kk_updatePage(currentPage,totalPage){if(eval(document.getElementById)){for(i=currentPage+1;i<=totalPage;i++){var id="page"+i;var pageDiv=document.getElementById(id);if(pageDiv){pageDiv.style.display="inline"}}if(totalPage>currentPage){var pageDiv=document.getElementById("nextpage");if(pageDiv){pageDiv.style.display="inline"}}}}function kk_showMerchantName(A){document.getElementById("newName_"+A).innerHTML=document.getElementById("layer_m_"+A).innerHTML}function kk_hideMerchantName(A,B){setTimeout('kk_realHideMerchantName("'+A+'","'+B+'")',2000)}function kk_realHideMerchantName(A,B){document.getElementById("newName_"+A).innerHTML=B}var date_start=new Date();var timer;var standPopup_travel=5000;var noResult=0;function kk_openTravelWaitingPopup(A,G,C,B,E){if(C==null){A=400;G=270;C=350;B=5000}date_start=new Date();clearTimeout(timer);standPopup_travel=B;var D=window.location.href;var F=new RegExp("page=|sort?","g");if(!D.match(F)){if(E==null){larg_total=(document.body.clientWidth-A);larg=(larg_total/2)}else{larg=E}document.write('<table><tr align="center"><td><div id="travelWait">');document.write('<iframe width="'+A+'px" height="'+G+'px" name="waitSearch" ID="waitSearch"  src="/ctl/do/popup?url=/WEB-INF/jsp/shopbot/shared/waitingFrame.jsp" align="middle" frameborder=0  position="absolute" scrolling=no rightmargin=0 marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 bottommargin=0 z-index="10" allowTransparency="true"> </iframe>');document.write("</div></td></tr></table>");document.write('<script language="javascript">');document.write(' document.getElementById("waitSearch").style.display = "inline";');document.write(' document.getElementById("waitSearch").style.position = "absolute";');document.write(' document.getElementById("waitSearch").style.left = "'+larg+'px";');document.write(' document.getElementById("waitSearch").style.top = "'+C+'px";');document.write(' document.getElementById("waitSearch").style.width="'+A+'px"; ');document.write(' document.getElementById("waitSearch").style.height="'+G+'px"; ');document.write("<\/script>")}}function kk_closeWaitingPopup(){var C=new Date();var B=C-date_start;var A=document.getElementById("waitSearch");if(A){if((B>standPopup_travel)||(noResult==1)){document.getElementById("waitSearch").style.display="none"}else{timer=setTimeout('document.getElementById("waitSearch").style.display = "none";',standPopup_travel)}}}function kk_closeWaitingPopup2(){var B=new Date();var A=B-date_start;if((A>standPopup_travel)){kk_hiddeWaitingPopup2()}else{timer=setTimeout(kk_hiddeWaitingPopup2,standPopup_travel)}}function kk_hiddeWaitingPopup2(){var A=parent.document.getElementById("waitSearch");if(A){A.style.display="none"}var B=parent.document.getElementById("iFrameCache");if(B){B.style.display="none"}}function kk_closeIntersticiel(){var C=new Date();var B=C-date_start;var A=document.getElementById("waitSearch");if(A){if(B>standPopup_travel){document.getElementById("waitSearch").style.display="none"}else{timer=setTimeout('document.getElementById("waitSearch").style.display = "none";',standPopup_travel)}}}function kk_closeWaitingPage(){var C=new Date();var B=C-date_start;var A=document.getElementById("waitSearch");if(A){if(B>standPopup_travel){document.getElementById("waitSearch").style.display="none"}else{timer=setTimeout('document.getElementById("waitSearch").style.display = "none";',standPopup_travel)}}}function kk_closePopupNoResult(){noResult=1}var date_start=new Date();var timer;var standPopup_travel=5000;var noResult=0;function openTravelWaitingPopup(A,G,C,B,E){if(C==null){A=400;G=270;C=350;B=5000}date_start=new Date();clearTimeout(timer);standPopup_travel=B;var D=window.location.href;var F=new RegExp("page=|sort?","g");if(!D.match(F)){if(E==null){larg_total=(document.body.clientWidth-A);larg=(larg_total/2)}else{larg=E}document.write('<table><tr align="center"><td><div id="travelWait">');document.write('<iframe width="'+A+'px" height="'+G+'px" name="waitSearch" ID="waitSearch"  src="/ctl/do/popup?url=/WEB-INF/jsp/shopbot/shared/waitingFrame.jsp" align="middle" frameborder=0  position="absolute" scrolling=no rightmargin=0 marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 bottommargin=0 z-index="10" allowTransparency="true"> </iframe>');document.write("</div></td></tr></table>");document.write('<script language="javascript">');document.write(' document.getElementById("waitSearch").style.display = "inline";');document.write(' document.getElementById("waitSearch").style.position = "absolute";');document.write(' document.getElementById("waitSearch").style.left = "'+larg+'px";');document.write(' document.getElementById("waitSearch").style.top = "'+C+'px";');document.write(' document.getElementById("waitSearch").style.width="'+A+'px"; ');document.write(' document.getElementById("waitSearch").style.height="'+G+'px"; ');document.write("<\/script>")}}function closeWaitingPopup(){var C=new Date();var B=C-date_start;var A=document.getElementById("waitSearch");if(A){if((B>standPopup_travel)||(noResult==1)){document.getElementById("waitSearch").style.display="none"}else{timer=setTimeout('document.getElementById("waitSearch").style.display = "none";',standPopup_travel)}}}function closeIntersticiel(){var C=new Date();var B=C-date_start;var A=document.getElementById("waitSearch");if(A){if(B>standPopup_travel){A.style.display="none"}else{timer=setTimeout('document.getElementById("waitSearch").style.display = "none";',standPopup_travel)}}}function closeWaitingPage(){var C=new Date();var B=C-date_start;var A=document.getElementById("waitSearch");if(A){if(B>standPopup_travel){A.style.display="none"}else{timer=setTimeout('document.getElementById("waitSearch").style.display = "none";',standPopup_travel)}}}function closePopupNoResult(){noResult=1}function kk_afficheCommande2(){w=(document.all?screen.width:screen.width)*0.9;h=(document.all?screen.height:screen.height-150)*0.9;op="scrollbars=yes,toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=yes,status=yes,width="+w+",height="+h+",screenX=0,screenY=0,top=0,left=0";var A=kk_recomposeUrl(kk_afficheCommande2.arguments);com=open(A,"",op)}function kk_recomposeUrl(){var F=arguments[0];var G=F[0];var C="";var B=1;var H="/";var I="?";if(G&&F.length>1){C=F[1]+":"+H;B++}var E=false;var D=F[1];if(D.indexOf("?")!=-1){E=true}var A=true;for(i=B;i<F.length;i++){if(F[i]==I){i++;if(i<F.length){C+=I+F[i];H="&"}}else{if(!E){C+=H+F[i]}else{if(A){C+=F[i];A=false;C+="&addedParams=true"}else{C+="&"+F[i]}}}}return C}function kk_validate(A,B){txt=A.value;if(txt==""){alert(B);A.focus();return false}return true}function kk_buy(A){if(kk_ctrlPSForm(A)){A.mode.value="buy";A.target="_blank";A.submit();A.onsubmit=kk_f1}}function kk_compare(A){if(kk_ctrlPSForm(A)){A.mode.value="compare";A.target="_self";A.submit();A.onsubmit=kk_f1}}function kk_f1(){return false}function kk_ctrlPSForm(A){selectedDepDay=A.dday.options[A.dday.selectedIndex].value;selectedDepMonth=A.dmonth.options[A.dmonth.selectedIndex].value;selectedDepYear=A.dyear.options[A.dyear.selectedIndex].value;if(A.rday.value!=""){selectedRetDay=A.rday.options[A.rday.selectedIndex].value;selectedRetMonth=A.rmonth.options[A.rmonth.selectedIndex].value;selectedRetYear=A.ryear.options[A.ryear.selectedIndex].value}else{selectedRetDay=selectedDepDay;selectedRetMonth=selectedDepMonth;selectedRetYear=selectedDepYear}selectedDepDate=new Date(selectedDepYear,selectedDepMonth-1,selectedDepDay);selectedRetDate=new Date(selectedRetYear,selectedRetMonth-1,selectedRetDay);today=new Date();tableJJ=[31,29,31,30,31,30,31,31,30,31,30,31];if(selectedDepDay>tableJJ[selectedDepMonth-1]||(true&&selectedRetDay>tableJJ[selectedRetMonth-1])){alert(jsalert1);return false}selectedDepTime=selectedDepDate.getTime()+24*3600*1000;selectedRetTime=selectedRetDate.getTime()+24*3600*1000;if(today.getTime()>selectedDepTime||((today.getTime()>selectedRetTime)&&true)){alert(jsalert2);return false}if((selectedRetTime<selectedDepTime)&&(true)){alert(jsalert3);return false}return true}function kk_PSsetMonth(A){if(typeof (A.rday)!="undefined"){A.rmonth.selectedIndex=A.dmonth.selectedIndex}}function kk_PSsetYear(A){if(typeof (A.rday)!="undefined"){A.ryear.selectedIndex=A.dyear.selectedIndex}}function kk_calendar(A){document.write('<div class="calendar_form">\n');var E=new Date();E.setDate(E.getDate()+dday);var B=E.getDate();var D=E.getMonth()+1;var C=E.getFullYear();document.write('<select name="dday">\n');for(i=1;i<=31;i++){if(B==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write('<select name="dmonth" >\n');for(i=1;i<=12;i++){if(D==i){document.write("<option value="+i+" selected>"+A[i-1]+"</option>\n")}else{document.write("<option value="+i+">"+A[i-1]+"</option>\n")}}document.write("</select> \n");document.write('<select name="dyear" >\n');for(i=C;i<=(C+5);i++){if(C==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select><br>\n");E=new Date();E.setDate(E.getDate()+rday);B=E.getDate();D=E.getMonth()+1;C=E.getFullYear();document.write('<select name="rday" >\n');for(i=1;i<=31;i++){if(B==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write('<select name="rmonth" >\n');for(i=1;i<=12;i++){if(D==i){document.write("<option value="+i+" selected>"+A[i-1]+"</option>\n")}else{document.write("<option value="+i+">"+A[i-1]+"</option>\n")}}document.write("</select>\n");document.write('<select name="ryear" >\n');for(i=C;i<=(C+5);i++){if(C==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write("</div>\n")}function kk_longcalendar(A){document.write('<div class="calendar_form">\n');var E=new Date();E.setDate(E.getDate()+dday);var B=E.getDate();var D=E.getMonth()+1;var C=E.getFullYear();document.write('<select name="dday">\n');for(i=1;i<=31;i++){if(B==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write('<select name="dmonth" >\n');for(i=1;i<=12;i++){if(D==i){document.write("<option value="+i+" selected>"+A[i-1]+"</option>\n")}else{document.write("<option value="+i+">"+A[i-1]+"</option>\n")}}document.write("</select> \n");document.write('<select name="dyear" >\n');for(i=C;i<=(C+5);i++){if(C==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select> \n");document.write('<select name="dhour" >\n');for(i=0;i<=23;i++){if(i<10){document.write("<option value=0"+i+" selected>0"+i+"</option>\n")}else{if(i==10){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}}document.write("</select> \n");document.write('<span class="ss-n">h</span>\n');document.write('<select name="dminute" >\n');for(i=0;i<=50;i+=10){if(i==0){document.write("<option value=0"+i+" selected>"+ +"0"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select><br>\n");E=new Date();E.setDate(E.getDate()+rday);B=E.getDate();D=E.getMonth()+1;C=E.getFullYear();document.write('<select name="rday" >\n');for(i=1;i<=31;i++){if(B==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write('<select name="rmonth" >\n');for(i=1;i<=12;i++){if(D==i){document.write("<option value="+i+" selected>"+A[i-1]+"</option>\n")}else{document.write("<option value="+i+">"+A[i-1]+"</option>\n")}}document.write("</select>\n");document.write('<select name="ryear" >\n');for(i=C;i<=(C+5);i++){if(C==i){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write('<select name="rhour" >\n');for(i=0;i<=23;i++){if(i<10){document.write("<option value=0"+i+" selected>0"+i+"</option>\n")}else{if(i==10){document.write("<option value="+i+" selected>"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}}document.write("</select>\n");document.write('<span class="ss-n">h</span>\n');document.write('<select name="rminute" >\n');for(i=0;i<=50;i+=10){if(i==0){document.write("<option value=0"+i+" selected>"+ +"0"+i+"</option>\n")}else{document.write("<option value="+i+">"+i+"</option>\n")}}document.write("</select>\n");document.write("</div>\n")}var kk_trv_wait={progressing:function(B,A){if(B=="start"){iPos=0;oMover=document.getElementById("mover");iMoverId=setInterval("kk_trv_wait.progressing()",50)}else{if(B=="stop"){clearInterval(iMoverId);oLoadingAnim.style.display="none";oLoadingAnim.style.border="0";oLoadStatus=document.getElementById("loading-animation-progress");oLoadStatus.style.textAlign="left";oLoadStatus.innerHTML=A}else{if(++iPos>29){iPos=0}oMover.style.left=(iPos-60)+"px"}}},kk_loading_animation:function(B){if(!oSettings.bDisplayLoading){return }var A=ygPos.getPos(oLoadingAnim);if(B=="start"){kk_trv_wait.progressing("start");ygPos.setPos(oLoadingAnim,A);var C=new ygAnim_Fade(oLoadingAnim,0.6,0.9);C.animate()}else{if(B=="stop"||B=="force"){if(!state_search_button||B=="force"){var C=new ygAnim_Fade(oLoadingAnim,0.4,0);C.onComplete=function(){ygPos.setPos(oDomRef,[-1000,A[1]]);if(document.hacking_iframe!=false){ygPos.setPos(document.hacking_iframe,[-1000,A[1]])}};C.animate();kk_trv_wait.progressing("stop")}}}}};YAHOO.namespace("Kelkoo.Travel");YAHOO.Kelkoo.Travel.SuggestAsYouType={currentValue:0,startsFrom:3,minimumFrom:3,sendDelay:0.2,formId:"",init:function(C,B,H,J){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var L=YAHOO.YUIKK.JSPT.mark("YAHOO.Kelkoo.Travel.SuggestAsYouType.init");var A=-1}this.formId=H;if(YAHOO.util.Dom.get(B)===null&&document.getElementById("product-overlay")!==null){var G=document.createElement("div");G.id=B;document.getElementById("product-overlay").appendChild(G);YAHOO.util.Dom.addClass(G,"sContainer");YAHOO.util.Dom.addClass(G,"hide")}if(YAHOO.util.Dom.get(C)&&YAHOO.util.Dom.get(B)){A=1;try{YAHOO.util.Event.purgeElement(C);this.oACDS=new YAHOO.widget.DS_XHR("/ctl/do/asyncCall/ux-travel-suggest-as-you-type",["travelSuggest.result","name"]);this.oACDS.queryMatchContains=true;this.oACDS.scriptQueryAppend="catId="+J;this.oAutoComp=new YAHOO.widget.AutoComplete(C,B,this.oACDS);this.oAutoComp.autoHighlight=false;this.oAutoComp.maxResultsDisplayed=20;this.oAutoComp.queryDelay=this.sendDelay;this.oAutoComp.minQueryLength=YAHOO.Kelkoo.Travel.SuggestAsYouType.minimumFrom;this.oAutoComp.sInputName=C;this.oAutoComp.sContainerName=B;this.oAutoComp.setFooter('<span class="sSuggestions">'+YAHOO.EU.Shopping.locale.suggestSuggestion+"</span>");this.oAutoComp.formatResult=function(S,V){var R=S[1].name+", "+S[1].info4Display;var P=R;if(V){var Q=E(V.toLowerCase());var U=E(R.substring(0,Q.length).toLowerCase());var T=new RegExp(Q);if(T.test(U)){P='<SPAN class="sHighlighted">'+R.substring(0,Q.length)+"</SPAN>"+R.substring(Q.length,R.length)}}return P};this.oAutoComp.doBeforeExpandContainer=function(P,Q,T,S){O(null,null,{sContainerName:Q});var R=YAHOO.util.Dom.getXY(P);if(navigator.appName.toLowerCase().indexOf("netscape")!==-1){R[0]=R[0]+1}R[1]+=YAHOO.util.Dom.get(P).offsetHeight+2;YAHOO.util.Dom.setXY(Q,R);return true};var M=function(Q,P,R){if(YAHOO.util.Dom.get(R.sInputName)!==null){YAHOO.util.Dom.get(R.sInputName).value=E(YAHOO.util.Dom.get(R.sInputName).value)}};var E=function(P){if(P!==null){P=P.replace(/[������]/gi,"a");P=P.replace(/[����]/gi,"e");P=P.replace(/[����]/gi,"i");P=P.replace(/[�������]/gi,"o");P=P.replace(/[����]/gi,"u");P=P.replace(/[�]/gi,"n");P=P.replace(/[�]/gi,"c");P=P.replace(/[��]/gi,"y");P=P.replace(/[�]/gi,"ae")}return P};var I=function(Q,P,R){YAHOO.util.Dom.addClass(R.sContainerName,"hide")};var O=function(Q,P,R){YAHOO.util.Dom.removeClass(R.sContainerName,"hide")};var F=function(P,Q){if(Q.oAutoComp.containerCollapseEvent){Q.oAutoComp.containerCollapseEvent.fire()}};var K=function(R,P){var S=P.sInputName;var Q=P.sContainerName;if(P.containerCollapseEvent){P.containerCollapseEvent.fire()}P.destroy();YAHOO.util.Event.addListener(S,"keyup",YAHOO.Kelkoo.Travel.SuggestAsYouType.resetSuggest,{sInputName:S,sContainerName:Q});YAHOO.util.Dom.get(S).focus()};var N=function(Q,P,S){if(S.oAutoComp.containerCollapseEvent){S.oAutoComp.containerCollapseEvent.fire()}if((searchForm=YAHOO.util.Dom.get(YAHOO.Kelkoo.Travel.SuggestAsYouType.formId))!==null&&YAHOO.util.Dom.get("suggest")===null){var R=document.createElement("input");R.type="hidden";R.id="suggest";R.name="suggest";R.value="true";searchForm.appendChild(R)}};this.oAutoComp.containerCollapseEvent.subscribe(I,{sContainerName:this.oAutoComp.sContainerName});this.oAutoComp.containerExpandEvent.subscribe(O,{sContainerName:this.oAutoComp.sContainerName});this.oAutoComp.containerCollapseEvent.subscribe(YAHOO.Kelkoo.Travel.SuggestAsYouType.resetSuggestFlag);this.oAutoComp.itemSelectEvent.subscribe(N,{sContainerName:this.oAutoComp.sContainerName,oAutoComp:this.oAutoComp});YAHOO.util.Event.removeListener(this.oAutoComp.sInputName,"keyup");YAHOO.util.Event.addListener(this.oAutoComp.sInputName,"keyup",YAHOO.Kelkoo.Travel.SuggestAsYouType.updateAutocomplete,{sInputName:this.oAutoComp.sInputName,oAutoComp:this.oAutoComp});YAHOO.util.Event.addListener(this.oAutoComp.sInputName,"keyup",YAHOO.Kelkoo.Travel.SuggestAsYouType.reset,{sInputName:this.oAutoComp.sInputName,oAutoComp:this.oAutoComp});YAHOO.util.Event.addListener(this.oAutoComp.sContainerName,"blur",F,{sContainerName:this.oAutoComp.sContainerName,oAutoComp:this.oAutoComp});if((searchForm=YAHOO.util.Dom.get(YAHOO.Kelkoo.Travel.SuggestAsYouType.formId))!==null){YAHOO.util.Event.addListener(YAHOO.Kelkoo.Travel.SuggestAsYouType.formId,"submit",F,{sContainerName:this.oAutoComp.sContainerName,oAutoComp:this.oAutoComp})}YAHOO.util.Event.addListener("sClose","click",K,this.oAutoComp)}catch(D){YAHOO.log("Exception :"+D)}}if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(L,A)}},updateAutocomplete:function(C,D){var A=YAHOO.util.Dom.get(D.sInputName);var B=0,E=0;if(A!==null&&A.value!==""){B=YAHOO.Kelkoo.Travel.SuggestAsYouType.currentValue;YAHOO.Kelkoo.Travel.SuggestAsYouType.currentValue=E=A.value.length;if(B<E&&E>=YAHOO.Kelkoo.Travel.SuggestAsYouType.startsFrom-1){YAHOO.util.Event.removeListener(D.sInputName,"keyup");YAHOO.util.Event.addListener(D.sInputName,"keyup",YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp,D.oAutoComp);YAHOO.util.Event.addListener(D.sInputName,"keyup",YAHOO.Kelkoo.Travel.SuggestAsYouType.reset,{sInputName:D.sInputName,oAutoComp:D.oAutoComp});D.oAutoComp.textboxKeyEvent.fire(D.oAutoComp,"keyup")}}},reset:function(A,B){if(YAHOO.util.Dom.get(B.sInputName).value===""){YAHOO.Kelkoo.Travel.SuggestAsYouType.currentValue=0;YAHOO.util.Event.removeListener(B.sInputName,"keyup");YAHOO.util.Event.addListener(B.sInputName,"keyup",YAHOO.Kelkoo.Travel.SuggestAsYouType.updateAutocomplete,{sInputName:B.sInputName,oAutoComp:B.oAutoComp});YAHOO.util.Event.addListener(B.sInputName,"keyup",YAHOO.Kelkoo.Travel.SuggestAsYouType.reset,{sInputName:B.sInputName,oAutoComp:B.oAutoComp})}},resetSuggest:function(A,B){if(YAHOO.util.Dom.get(B.sInputName).value===""){YAHOO.Kelkoo.Travel.SuggestAsYouType.resetSuggestFlag();YAHOO.Kelkoo.Travel.SuggestAsYouType.currentValue=0;YAHOO.Kelkoo.Travel.SuggestAsYouType.init(B.sInputName,B.sContainerName)}},resetSuggestFlag:function(){if((searchForm=YAHOO.util.Dom.get(YAHOO.Kelkoo.Travel.SuggestAsYouType.formId))!==null&&(suggestFlag=YAHOO.util.Dom.get("suggest"))!==null){searchForm.removeChild(suggestFlag)}}};YAHOO.namespace("YAHOO.Kelkoo");YAHOO.Kelkoo.sponsoredLinks={sModuleTemplate:'<h2><div><%if (arguments[0].aboutUrl) {%><a target="_blank" href="<%=aboutUrl%>"> <%}%> <%=title%> <%if (arguments[0].aboutUrl) {%></a> <%}%></div></h2><ul><%=ads%></ul>',sLineTemplate:'<li class="<% if (arguments[0].type != undefined){%>googleAds<% } else { %> yahooAds <%} %>"> <h3><a href="<%=url%>" target="_blank" <%if (arguments[0].tracking != undefined) {%> onclick="<%=tracking%>"  <%}%> rel="nofollow"><%=line1%></a></h3><p><%=line2%><% if (arguments[0].line3 != undefined){%> <span><%=line3%></span><% } %></p><a class="url" href="<%=url%>" target="_blank" <%if (arguments[0].tracking != undefined) {%> onclick="<%=tracking%>"  <%}%> rel="nofollow"><%=visible_url%></a></li>',nbAdsSRP:0,google_isActive:false,init:function(B){var A=document.getElementById("googleLinksCall");var C=document.getElementById("ysmLinksCall");this.renderSponsoredLinks(A,C,B)},tracking:function(A){setTimeout(function(){var C,B;C=document.getElementsByTagName("head")[0];B=document.createElement("script");B.type="text/javascript";B.src=A;C.appendChild(B)},0);return true},renderSponsoredLinks:function(P,L,C){var V=[];var M=document.getElementById("srp-links");var J=[];var N=((M!==undefined)&&(this.nbAdsSRP>0)&&(this.google_isActive))?this.nbAdsSRP-1:0;var D=((M!==undefined)&&(this.nbAdsSRP>0)&&(!this.google_isActive))?this.nbAdsSRP-1:0;if(L!==null){if(zSr!==undefined&&zSr.length>6&&ysm_data){for(k=6;(k<zSr.length);k+=6){var F={url:"/ctl/go/modulesGo?merchantId="+ysm_data.merchantId+"&frameset=no&from=content&catId="+ysm_data.catId+"&url="+escape(zSr[k+2]),line1:zSr[k+3],line2:zSr[k],visible_url:zSr[k+4]};V.push(F)}}}var A="";var O="";var U=0;var Q="";var B=(V)?V.length:0;if((H===undefined)&&(C!==undefined)){var H=C}if(P!==null&&H!==undefined){if(google_data&&google_data.active){for(var S=H.length-1;S>=0;S--){H[S].tracking="return YAHOO.Kelkoo.sponsoredLinks.tracking('/ctl/go/modulesGo?merchantId="+google_data.merchantId+"&frameset=no&redirect=false&from=content&catId="+google_data.catId+"');"}}U=H.length;if(document.getElementById("sponsored-links-rhs")==null){for(var S=N;S<U;S++){A+=YAHOO.EU.Shopping.templating.render(this.sLineTemplate,H[S])}}else{var G=(google_call_num_ads/2);if(U<G){G=U}if(YAHOO.util.Dom.hasClass("sponsored-links-rhs","first")){for(var S=N;S<G;S++){O+=YAHOO.EU.Shopping.templating.render(this.sLineTemplate,H[S])}for(S=G;S<U;S++){A+=YAHOO.EU.Shopping.templating.render(this.sLineTemplate,H[S])}}else{for(var S=N;S<G;S++){A+=YAHOO.EU.Shopping.templating.render(this.sLineTemplate,H[S])}for(S=G;S<U;S++){O+=YAHOO.EU.Shopping.templating.render(this.sLineTemplate,H[S])}}}}if((L!==undefined)&&(B>0)){for(var S=D;S<B;S++){Q+=YAHOO.EU.Shopping.templating.render(this.sLineTemplate,V[S])}}if((M!==undefined)&&(this.nbAdsSRP>0)){if(this.google_isActive){var E=(U>this.nbAdsSRP)?this.nbAdsSRP:U;if(E>0){for(var S=0;S<E;S++){J.push(H[S])}}}else{var E=(B>this.nbAdsSRP)?this.nbAdsSRP:B;if(E>0){for(var S=0;S<E;S++){J.push(V[S])}}}var T="";for(var S=0;S<J.length;S++){T+=YAHOO.EU.Shopping.templating.render(this.sLineTemplate,J[S])}M.innerHTML=YAHOO.EU.Shopping.templating.render(this.sModuleTemplate,{ads:T,title:YAHOO.EU.Shopping.locale.sponsoredLinksTitle,aboutUrl:google_data.aboutUrl})}if((M===undefined&&U>0)||(U-this.nbAdsSRP>0)){var K=YAHOO.EU.Shopping.templating.render(this.sModuleTemplate,{ads:A,title:YAHOO.EU.Shopping.locale.sponsoredLinksTitle,aboutUrl:google_data.aboutUrl});var R=undefined;var I=YAHOO.util.Dom.getElementsByClassName("id-sponsored-links");if(I&&I.length>0){R=I[0]}if(R){var W=R;while(W&&!YAHOO.util.Dom.hasClass(W,"results")&&W.parentNode){W=W.parentNode}if(W&&!YAHOO.util.Dom.hasClass(W,"results")){if((R)&&(R.parentNode)&&(R.parentNode.id!=undefined)&&(R.parentNode.id=="pri"||R.parentNode.id=="sec"||R.parentNode.id=="ter")){if(R.parentNode.id!="sec"){YAHOO.util.Dom.addClass(R,"gen-"+R.parentNode.id+"-mod")}}else{YAHOO.util.Dom.addClass(R,"gen-pri-mod")}}if(YAHOO.util.Dom.hasClass(R,"hide")){YAHOO.util.Dom.removeClass(R,"hide")}R.innerHTML=K}if(O!=""){var K=YAHOO.EU.Shopping.templating.render(this.sModuleTemplate,{ads:O,title:YAHOO.EU.Shopping.locale.sponsoredLinksTitle,aboutUrl:google_data.aboutUrl});var R=document.getElementById("sponsored-links-rhs");if(R){if((R)&&(R.parentNode)&&(R.parentNode.id!=undefined)&&(R.parentNode.id=="pri"||R.parentNode.id=="sec"||R.parentNode.id=="ter")){if(R.parentNode.id!="sec"){YAHOO.util.Dom.addClass(R,"gen-"+R.parentNode.id+"-mod")}}else{YAHOO.util.Dom.addClass(R,"gen-pri-mod")}R.innerHTML=K}}}if((B-this.nbAdsSRP>0)){var K=YAHOO.EU.Shopping.templating.render(this.sModuleTemplate,{ads:Q,title:ysm_data.title});var R=document.getElementById("sponsored-links-ysm");if(R){if((R)&&(R.parentNode)&&(R.parentNode.id!=undefined)&&(R.parentNode.id=="pri"||R.parentNode.id=="sec"||R.parentNode.id=="ter")){if(R.parentNode.id!="sec"){YAHOO.util.Dom.addClass(R,"gen-"+R.parentNode.id+"-mod")}}else{YAHOO.util.Dom.addClass(R,"gen-pri-mod")}R.innerHTML=K}}}};function google_ad_request_done(A){YAHOO.Kelkoo.sponsoredLinks.init(A);return true}function google_afs_request_done(A){YAHOO.Kelkoo.sponsoredLinks.init(A);return true}YAHOO.namespace("YAHOO.EU.Shopping.Utils");YAHOO.EU.Shopping.Utils.SuggestAsYouType={currentValue:0,startsFrom:YAHOO.EU.Shopping.config.suggestAsYouType.startsFrom,minimumFrom:YAHOO.EU.Shopping.config.suggestAsYouType.minimumFrom,init:function(C,B){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var J=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.Utils.SuggestAsYouType.init");var A=-1}if(YAHOO.util.Dom.get(B)===null&&document.getElementById("product-overlay")!==null){var G=document.createElement("div");G.id=B;document.getElementById("product-overlay").appendChild(G);YAHOO.util.Dom.addClass(G,"sContainer");YAHOO.util.Dom.addClass(G,"hide")}if(YAHOO.EU.Shopping.config.suggestAsYouType.isActivated&&YAHOO.util.Dom.get(C)&&YAHOO.util.Dom.get(B)){A=1;try{YAHOO.util.Event.purgeElement(C);this.oACDS=new YAHOO.widget.DS_XHR("/ctl/do/asyncCall/suggest-as-you-type",["searchResult.result","label"]);this.oACDS.queryMatchContains=true;this.oACDS.scriptQueryAppend="output=json";this.oAutoComp=new YAHOO.widget.AutoComplete(C,B,this.oACDS);this.oAutoComp.autoHighlight=false;this.oAutoComp.maxResultsDisplayed=20;this.oAutoComp.queryDelay=0.3;if(!isNaN(parseFloat(YAHOO.EU.Shopping.config.suggestAsYouType.sendDelay))){this.oAutoComp.queryDelay=YAHOO.EU.Shopping.config.suggestAsYouType.sendDelay}this.oAutoComp.minQueryLength=YAHOO.EU.Shopping.Utils.SuggestAsYouType.minimumFrom;this.oAutoComp.sInputName=C;this.oAutoComp.sContainerName=B;this.oAutoComp.setHeader('<span id="sClose" class="sClose">'+YAHOO.EU.Shopping.locale.suggestClose+"</span>");this.oAutoComp.setFooter('<span class="sSuggestions">'+YAHOO.EU.Shopping.locale.suggestSuggestion+"</span>");this.oAutoComp.formatResult=function(S,W){if(W){var P=E(W.toLowerCase());var N=P.split(" ");var V=E(S[1].label.toLowerCase());var U=V.split(" ");var Q="";for(var T=0;T<N.length;T++){for(var R=0;R<U.length;R++){var O=new RegExp("^"+N[T]);if(O.test(U[R])){U[R]=U[R].replace(N[T],'<SPAN class="sHighlighted">'+N[T]+"</SPAN>")}}}for(var R=0;R<U.length;R++){Q+=U[R]+" "}return Q}else{return S[1].label}};this.oAutoComp.doBeforeExpandContainer=function(N,O,R,Q){M(null,null,{sContainerName:O});var P=YAHOO.util.Dom.getXY(N);if(navigator.appName.toLowerCase().indexOf("netscape")!==-1){P[0]=P[0]+1}P[1]+=YAHOO.util.Dom.get(N).offsetHeight+2;YAHOO.util.Dom.setXY(O,P);return true};var K=function(O,N,P){if(YAHOO.util.Dom.get(P.sInputName)!==null){YAHOO.util.Dom.get(P.sInputName).value=E(YAHOO.util.Dom.get(P.sInputName).value)}};var E=function(N){if(N!==null){N=N.replace(/[����������]/gi,"a");N=N.replace(/[��������]/gi,"e");N=N.replace(/[������]/gi,"i");N=N.replace(/[����������]/gi,"o");N=N.replace(/[��������]/gi,"u");N=N.replace(/[��]/gi,"n");N=N.replace(/[��]/gi,"c");N=N.replace(/[�]/gi,"y");N=N.replace(/[��]/gi,"ae")}return N};var H=function(O,N,P){YAHOO.util.Dom.addClass(P.sContainerName,"hide")};var M=function(O,N,P){YAHOO.util.Dom.removeClass(P.sContainerName,"hide")};var F=function(N,O){if(O.oAutoComp.containerCollapseEvent){O.oAutoComp.containerCollapseEvent.fire()}};var I=function(P,N){var Q=N.sInputName;var O=N.sContainerName;if(N.containerCollapseEvent){N.containerCollapseEvent.fire()}N.destroy();YAHOO.util.Event.addListener(Q,"keyup",YAHOO.EU.Shopping.Utils.SuggestAsYouType.resetSuggest,{sInputName:Q,sContainerName:O});YAHOO.util.Dom.get(Q).focus()};var L=function(O,N,Q){if(Q.oAutoComp.containerCollapseEvent){Q.oAutoComp.containerCollapseEvent.fire()}if((searchForm=YAHOO.util.Dom.get("search"))!==null&&YAHOO.util.Dom.get("suggest")===null){var P=document.createElement("input");P.type="hidden";P.id="suggest";P.name="suggest";P.value="true";searchForm.appendChild(P)}YAHOO.util.Dom.get("search").submit()};this.oAutoComp.containerCollapseEvent.subscribe(H,{sContainerName:this.oAutoComp.sContainerName});this.oAutoComp.containerExpandEvent.subscribe(M,{sContainerName:this.oAutoComp.sContainerName});this.oAutoComp.containerCollapseEvent.subscribe(YAHOO.EU.Shopping.Utils.SuggestAsYouType.resetSuggestFlag);this.oAutoComp.itemSelectEvent.subscribe(L,{sContainerName:this.oAutoComp.sContainerName,oAutoComp:this.oAutoComp});YAHOO.util.Event.removeListener(this.oAutoComp.sInputName,"keyup");YAHOO.util.Event.addListener(this.oAutoComp.sInputName,"keyup",YAHOO.EU.Shopping.Utils.SuggestAsYouType.updateAutocomplete,{sInputName:this.oAutoComp.sInputName,oAutoComp:this.oAutoComp});YAHOO.util.Event.addListener(this.oAutoComp.sInputName,"keyup",YAHOO.EU.Shopping.Utils.SuggestAsYouType.reset,{sInputName:this.oAutoComp.sInputName,oAutoComp:this.oAutoComp});YAHOO.util.Event.addListener(this.oAutoComp.sContainerName,"blur",F,{sContainerName:this.oAutoComp.sContainerName,oAutoComp:this.oAutoComp});if((searchForm=YAHOO.util.Dom.get("search"))!==null){YAHOO.util.Event.addListener("search","submit",F,{sContainerName:this.oAutoComp.sContainerName,oAutoComp:this.oAutoComp})}YAHOO.util.Event.addListener("sClose","click",I,this.oAutoComp)}catch(D){YAHOO.log("Exception :"+D)}}if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(J,A)}},updateAutocomplete:function(C,D){var A=YAHOO.util.Dom.get(D.sInputName);var B=0,E=0;if(A!==null&&A.value!==""){B=YAHOO.EU.Shopping.Utils.SuggestAsYouType.currentValue;YAHOO.EU.Shopping.Utils.SuggestAsYouType.currentValue=E=A.value.length;if(((B<E&&E>=(YAHOO.EU.Shopping.Utils.SuggestAsYouType.startsFrom)))||((navigator.appName.toLowerCase().indexOf("netscape")==-1))&&((B<E&&E>=(YAHOO.EU.Shopping.Utils.SuggestAsYouType.startsFrom-1)))){YAHOO.util.Event.removeListener(D.sInputName,"keyup");YAHOO.util.Event.addListener(D.sInputName,"keyup",YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp,D.oAutoComp);YAHOO.util.Event.addListener(D.sInputName,"keyup",YAHOO.EU.Shopping.Utils.SuggestAsYouType.reset,{sInputName:D.sInputName,oAutoComp:D.oAutoComp});D.oAutoComp.textboxKeyEvent.fire(D.oAutoComp,"keyup")}}},reset:function(A,B){if(YAHOO.util.Dom.get(B.sInputName).value===""){YAHOO.EU.Shopping.Utils.SuggestAsYouType.currentValue=0;YAHOO.util.Event.removeListener(B.sInputName,"keyup");YAHOO.util.Event.addListener(B.sInputName,"keyup",YAHOO.EU.Shopping.Utils.SuggestAsYouType.updateAutocomplete,{sInputName:B.sInputName,oAutoComp:B.oAutoComp});YAHOO.util.Event.addListener(B.sInputName,"keyup",YAHOO.EU.Shopping.Utils.SuggestAsYouType.reset,{sInputName:B.sInputName,oAutoComp:B.oAutoComp})}},resetSuggest:function(A,B){if(YAHOO.util.Dom.get(B.sInputName).value===""){YAHOO.EU.Shopping.Utils.SuggestAsYouType.resetSuggestFlag();YAHOO.EU.Shopping.Utils.SuggestAsYouType.currentValue=0;YAHOO.EU.Shopping.Utils.SuggestAsYouType.init(B.sInputName,B.sContainerName)}},resetSuggestFlag:function(){if((searchForm=YAHOO.util.Dom.get("search"))!==null&&(suggestFlag=YAHOO.util.Dom.get("suggest"))!==null){searchForm.removeChild(suggestFlag)}}};YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.templating=new function(){var A={};this.init=function(C,B){this.cache={}};this.render=function(D,C){var B=!/\W/.test(D)?this.cache[D]=this.cache[D]||this.render(document.getElementById(D).innerHTML):new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+D.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');");return C?B(C):B}}();(function(){YAHOO.namespace("YAHOO.EU.Shopping.TUX");YAHOO.EU.Shopping.TUX.ResultsUI=function(A,I){var B;var D;var C=0;var F="";var H=this;function G(J,K){if(YAHOO.lang.isString(J)){this.oResultsContainer=document.getElementById(J)}else{this.oResultsContainer=J}if(this.oResultsContainer.nodeName.toUpperCase()=="OL"){B=oResultsContainer}else{B=document.createElement("OL");oResultsContainer.appendChild(B)}if(YAHOO.lang.isObject(K)){D=K}else{D={}}D.idPrefix=D.idPrefix||"result-";D.template=D.template||"<div>{result-title null}</div>";D.formatters=D.formatters||YAHOO.EU.Shopping.TUX.Utils.Formatters}this.insertResult=function(J,L){var M=E(J);if(YAHOO.EU.Shopping.config.oTUX.iAnimation){M.style.visibility="hidden";M.style.overflow="hidden";M.style.height="1px";YAHOO.util.Dom.setStyle(M,"opacity",0)}if(L>=0&&B.childNodes.length>0&&B.childNodes.length>L){var N=B.childNodes[L];YAHOO.util.Dom.insertBefore(M,N)}else{B.appendChild(M)}YAHOO.util.Dom.getElementsByClassName("extended-view-btn","span",M,function(O){YAHOO.EU.Shopping.Results.initSingleExtendedView(O)});if(YAHOO.EU.Shopping.config.oTUX.iAnimation){var K=new YAHOO.util.Anim(M,{height:{to:100}},0.5,YAHOO.util.Easing.easeOut);K.onComplete.subscribe(function(){M.style.height="auto";var O=new YAHOO.util.Anim(M,{opacity:{from:0,to:1}},0.5,YAHOO.util.Easing.easeIn);O.onStart.subscribe(function(){M.style.visibility="visible"});O.animate();return M});K.animate()}else{return M}};function E(J){var K=document.createElement("DIV");var M=D.idPrefix+J.offerId;if(!document.getElementById(M)){K.id=M;try{K.innerHTML=YAHOO.EU.Shopping.TUX.Utils.renderTemplate(D.template,J,D.formatters);YAHOO.EU.Shopping.TUX.ResultsUI.AirportInfo.enhanceTooltips(K,false,document.getElementById("airportBubble"));if((YAHOO.env.ua.ie>0)&&(typeof (KELKOO.corner)!="undefined")){KELKOO.corner.children("#"+M)}}catch(L){}return K.firstChild}else{return false}}this.addResults=function(J){if(YAHOO.lang.isArray(J)){var N=[];var M=B.childNodes.length;var K=0;(function(){start=new Date().getTime();for(;r=J[K];K++){if(YAHOO.lang.isObject(r)){if(!N[K]){N[K]=H.insertResult(r,(M+K));if(B.childNodes.length>YAHOO.EU.Shopping.TUX.Pagination.ppp){B.removeChild(B.getLastChild())}}}if(new Date().getTime()-start>50){setTimeout(arguments.callee,0);break}}})();return N}else{if(YAHOO.lang.isObject(J)){if((J.priceIndex>=0&&J.priceIndex<=YAHOO.EU.Shopping.TUX.Pagination.ppp)||B.childNodes.length<YAHOO.EU.Shopping.TUX.Pagination.ppp){var L=this.insertResult(J,J.priceIndex);if(B.childNodes.length>YAHOO.EU.Shopping.TUX.Pagination.ppp){B.removeChild(B.childNodes[B.childNodes.length-1])}return L}}else{return false}}};this.removeResult=function(J){var L;if(YAHOO.lang.isObject(J)){L=J.offerId}else{L=J}var K=document.getElementById(D.idPrefix+L);if(K){return K.parentNode.removeChild(K)}else{return false}};this.buildResultsList=function(J){if(YAHOO.lang.isArray(J)){B.innerHTML="";if(this.addResults(J)===false){return false}else{return true}}else{return false}};G(A,I);return this}})();(function(){YAHOO.namespace("YAHOO.EU.Shopping.TUX");YAHOO.EU.Shopping.TUX.ResultsUI.AirportInfo=new function(){function A(B,E){if(B.innerHTML!=undefined&&B.innerHTML!=""&&B.title!=undefined&&B.title!=""&&!YAHOO.util.Dom.hasClass(B,"has-bubble-tooltip")){if(E==undefined){E=document.body}var G=document.createElement("div");var H=B.title;G.className="airport-tooltip";var I=document.createElement("p");var D=document.createElement("dfn");D.appendChild(document.createTextNode(YAHOO.EU.Shopping.locale.airportcode));I.appendChild(D);I.appendChild(document.createTextNode(B.innerHTML+" : "+B.title));G.appendChild(I);G.style.display="none";G.style.position="absolute";YAHOO.util.Dom.addClass(B,"has-bubble-tooltip");E.appendChild(G);function C(){var J=YAHOO.util.Dom.getXY(B);var K=YAHOO.util.Dom.getXY(E);B.title="";G.style.visibility="hidden";G.style.display="block";G.style.top=(J[1]-(K[1]-E.offsetTop)-G.clientHeight)+"px";G.style.left=(J[0]-K[0]+B.offsetWidth)+"px";G.style.visibility="visible"}function F(){B.title=H;G.style.display="none"}YAHOO.util.Event.addListener(B,"mouseover",C);YAHOO.util.Event.addListener(B,"mouseout",F)}}this.enhanceTooltips=function(C,D,E){if(C===undefined){C=document.getElementsByTagName("body")[0]}var F=C.getElementsByTagName("acronym");for(var B=0;B<F.length;B++){A(F[B],E)}};this.enhanceTooltipsOnStartup=function(B){YAHOO.EU.Shopping.TUX.ResultsUI.AirportInfo.enhanceTooltips(undefined,true)}}()})();YAHOO.util.Event.onDOMReady(function(){if(!YAHOO.util.Dom.hasClass(document.getElementById("level-results-page"),"results-grid")){YAHOO.EU.Shopping.TUX.ResultsUI.AirportInfo.enhanceTooltips(undefined,true)}});YAHOO.namespace("YAHOO.EU.Shopping.Utils");YAHOO.EU.Shopping.Utils.ZoomManagement={currentSmallImage:null,currentZoom:null,currentOffer:0,previousOffer:0,zoomOffer:0,zoomShown:false,extendedShown:0,extendedBlocked:false,isImageLoadingOk:false,maxImageWidth:500,maxImageHeight:500,limitWidth:353,defaultImageWidth:90,defaultImageHeight:90,offsetPointerY:37,offsetExtendedPointerY:6,offsetLayerX:100,offsetLayerY:15,displayLimit:100,zoomFailureTimeOut:null,extendedTimeOut:null,extendedTimeOutDuration:1000,loadingImage:"http://r6.kelkoo.com/ux/travel/loading.gif",dropDown:null,init:function(){var E=YAHOO.EU.Shopping.Utils.ZoomManagement;if(document.getElementById("product-overlay")!==null){var F=null;var D=null;var B=0;if(document.getElementById("l3-photo")!==null){F=YAHOO.util.Dom.getElementsByClassName("carousel-zoom","div","l3-photo");for(B=0;B<F.length;B++){if(F[B].childNodes.length>0){D=E.getZoomButton(F[B]);if(D){YAHOO.util.Event.addListener(D,"mouseover",E.manageLayer,{offerId:-2,isFreeOffer:false,isTravelOffer:false})}}}}F=YAHOO.util.Dom.getElementsByClassName("result","li","level-results-page");var C=false;var A=false;if(F.length>0){this.createLayer(D);YAHOO.util.Dom.setStyle("action-zoom-container","visibility","hidden");YAHOO.util.Dom.setStyle("action-zoom-pointer","visibility","hidden");YAHOO.util.Event.addListener(document.getElementsByTagName("html")[0],"mouseover",E.bodyOn,{offerId:-1,isFreeOffer:false,isTravelOffer:false})}for(B=0;B<F.length;B++){if(F[B].childNodes.length>0){A=false;if(YAHOO.util.Dom.hasClass(F[B],"offer-freeoffer")){A=true}C=false;if(YAHOO.util.Dom.hasClass(F[B],"offer-flight_kelkoo")||YAHOO.util.Dom.hasClass(F[B],"offer-hotel_kelkoo")||YAHOO.util.Dom.hasClass(F[B],"offer-car_hire_kelkoo")){C=true}if(YAHOO.util.Dom.hasClass(F[B],"product-tile")){YAHOO.util.Event.removeListener(F[B],"mouseover");YAHOO.util.Event.addListener(F[B],"mouseover",E.manageLayer,{offerId:F[B].id,isFreeOffer:A,isTravelOffer:C});YAHOO.util.Event.removeListener(F[B].getChildren,"mouseover")}D=E.getZoomButton(F[B]);if(D){YAHOO.util.Event.removeListener(D,"mouseover");YAHOO.util.Event.addListener(D,"mouseover",E.manageLayer,{offerId:F[B].id,isFreeOffer:A,isTravelOffer:C})}}}}},getImage:function(D){var A=null;if(YAHOO.util.Dom.hasClass(D,"action-zoom")){A=YAHOO.util.Dom.getAncestorByClassName(D,"photo")}else{A=YAHOO.util.Dom.getElementsByClassName("photo",null,D)[0]}var C=YAHOO.util.Dom.getElementsByClassName("carousel","div",A);if(C.length>0){return C[0]}else{var B=YAHOO.util.Dom.getElementsBy(function(){return true},"img",A);if(B.length>0){return B[0]}return null}},getMerchantImageSrc:function(C){var A=C.parentNode.parentNode;var B=YAHOO.util.Dom.getElementsByClassName("merchant-image",null,A);if(B.length>0){return B[0].innerHTML}return null},getZoomButton:function(A){var B=YAHOO.util.Dom.getElementsByClassName("action-zoom",null,A);if(B.length>0){YAHOO.util.Dom.setStyle(B[0],"cursor","pointer");return B[0]}return null},manageLayer:function(E,B){var G=YAHOO.EU.Shopping.Utils.ZoomManagement;var F=YAHOO.util.Event.getTarget(E);var C=B.offerId;var D=YAHOO.util.Dom.hasClass(F,"action-zoom");if(F.title&&(F.title!=="")&&(F.tagName!="ACRONYM")){F.title=""}var I=document.getElementById(C);if(((C==-1)||(C!=G.currentOffer))&&(G.currentOffer!==0)){clearTimeout(G.extendedTimeOut);G.hideLayer();if(!D){G.previousOffer=G.extendedShown}G.extendedShown=0;G.zoomOffer=0;G.zoomShown=false}if(C!=-1){if(G.isLayerNotDisplay(B.offerId)){return null}}if(C!=-1){if(D&&!G.zoomShown&&((G.zoomOffer!=G.currentOffer)||(G.zoomOffer===0))){clearTimeout(G.extendedTimeOut);YAHOO.util.Dom.removeClass(I,"hover");var A=G.getMerchantImageSrc(F);var H=G.getImage(F);if(H&&A){G.currentSmallImage=H;YAHOO.util.Dom.addClass(H,"hover");YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getAncestorByClassName(H,"result"),"hover");if(G.extendedShown===G.currentOffer){G.createLayer(H);G.displayImage(H,A);G.zoomShown=true}else{G.zoomShown=false;G.extendedTimeOut=setTimeout(function(){G.createLayer(H);G.displayImage(H,A);G.zoomShown=true},G.extendedTimeOutDuration)}YAHOO.util.Event.removeListener("product-overlay","mouseover");if((F.tagName!="EM")&&!B.isFreeOffer){YAHOO.util.Event.addListener("product-overlay","mouseover",G.manageLayer,{offerId:C})}else{YAHOO.util.Event.addListener("product-overlay","mouseover",G.hideLayer)}G.zoomOffer=C;G.previousOffer=0}}else{if(!D&&((C!=G.currentOffer)||((C==G.currentOffer)&&(G.extendedBlocked))||(G.zoomOffer==G.currentOffer))){clearTimeout(G.extendedTimeOut);if(B.isFreeOffer&&G.zoomShown){G.hideLayer();G.zoomShown=false}var H=G.getImage(I);G.currentSmallImage=H;YAHOO.util.Dom.removeClass(G.currentSmallImage,"hover");YAHOO.util.Dom.addClass(I,"hover");I.style.display="none";I.style.display="block";if((!B.isFreeOffer)&&((C!=G.extendedShown)||G.zoomShown)){if(G.zoomShown){YAHOO.util.Dom.removeClass(G.currentSmallImage,"hover");G.displayExtended(I,H,B);G.extendedShown=C;G.zoomShown=false}else{G.extendedTimeOut=setTimeout(function(){G.createLayer(H);G.displayExtended(I,H,B);YAHOO.util.Event.removeListener("product-overlay","mouseover");YAHOO.util.Event.addListener("product-overlay","mouseover",G.manageLayer,{offerId:C});G.extendedShown=C},G.extendedTimeOutDuration)}}G.zoomOffer=0}}}if(C==-1){G.currentOffer=0}else{G.currentOffer=C}G.extendedBlocked=false},bodyOn:function(C,D){var A=YAHOO.EU.Shopping.Utils.ZoomManagement;var B=YAHOO.util.Event.getTarget(C);if(A.currentOffer!==0){if(!YAHOO.util.Dom.isAncestor("product-overlay",B)&&!(B.id=="product-overlay")&&!(YAHOO.util.Dom.isAncestor("level-results-page",B)&&YAHOO.util.Dom.hasClass("level-results-page","results-grid")&&(B.parentNode.className!="grid-3"))&&!YAHOO.util.Dom.hasClass(B,"action-zoom")&&!YAHOO.util.Dom.isAncestor("calendar_container",B)&&!(B.id=="calendar_container")){A.manageLayer(C,D)}}},createLayer:function(J){var F=YAHOO.EU.Shopping.Utils.ZoomManagement;var B=document.getElementById("action-zoom-container");var A=document.getElementById("action-zoom-pointer");var K=null;F.isImageLoadingOk=false;clearTimeout(F.zoomFailureTimeOut);if(B===null){B=document.createElement("div");B.id="action-zoom-container";B.className="yui-module yui-overlay";document.getElementById("product-overlay").appendChild(B);YAHOO.util.Dom.setStyle(B,"visibility","hidden");A=document.createElement("div");A.id="action-zoom-pointer";document.getElementById("product-overlay").appendChild(A);var G=document.createElement("span");G.className="action-zoom-left";B.appendChild(G);var C=document.createElement("span");C.className="action-zoom-bottom";G.appendChild(C);var E=document.createElement("span");E.className="action-zoom-top";C.appendChild(E);var D=document.createElement("span");D.className="action-zoom-right";E.appendChild(D);if(F.dropDown===null){F.dropDown=new YAHOO.widget.Overlay(B,{visible:false,monitorresize:true,iframe:true})}}var I=YAHOO.util.Dom.getX(J);YAHOO.util.Dom.setX("action-zoom-container",I+F.offsetLayerX);var H=YAHOO.util.Dom.getY(J);YAHOO.util.Dom.setY("action-zoom-container",H+F.offsetLayerY)},hideLayer:function(){var B=YAHOO.EU.Shopping.Utils.ZoomManagement;B.dropDown.cfg.setProperty("visible",false);YAHOO.util.Dom.removeClass(B.currentOffer,"hover");YAHOO.util.Dom.removeClass(B.extendedShown,"hover");YAHOO.util.Dom.removeClass(B.currentSmallImage,"hover");var A=document.getElementById("calendar_container");if(A){A.style.display="none"}YAHOO.util.Dom.setStyle("action-zoom-container","visibility","hidden");YAHOO.util.Dom.setStyle("action-zoom-pointer","visibility","hidden")},showLayer:function(){YAHOO.EU.Shopping.Utils.ZoomManagement.dropDown.cfg.setProperty("visible",true);YAHOO.util.Dom.setStyle("action-zoom-container","visibility","visible");YAHOO.util.Dom.setStyle("action-zoom-pointer","visibility","visible")},displayImage:function(J,A){var H=YAHOO.EU.Shopping.Utils.ZoomManagement;var K=YAHOO.util.Dom.getX(J);YAHOO.util.Dom.setX("action-zoom-pointer",K+H.defaultImageWidth+2);var I=YAHOO.util.Dom.getY(J);YAHOO.util.Dom.setY("action-zoom-pointer",I+H.offsetPointerY);var L=YAHOO.util.Dom.getElementsByClassName("action-zoom-right","span","action-zoom-container")[0];L.innerHTML="";var E=document.createElement("img");E.id="action-zoom-merchant-image";E.src=H.loadingImage;YAHOO.util.Dom.setStyle(E,"position","relative");YAHOO.util.Dom.setStyle(E,"top","37px");YAHOO.util.Dom.setStyle(E,"left","0px");L.appendChild(E);YAHOO.util.Dom.setStyle(L,"width",H.defaultImageWidth+"px");YAHOO.util.Dom.setStyle(L,"height",H.defaultImageHeight+"px");var G;G=new Image();G.id="action-zoom-merchant-image";G.src=A;if(!G.complete){if(H.extendedShown===0){H.setDropCoords(true,J,H.defaultImageWidth,H.defaultImageHeight)}YAHOO.util.Event.on(G,"load",function(R){H.isImageLoadingOk=true;var P=G.width;var M=G.height;var O=H.calculateDim(P,M,(YAHOO.util.Dom.getAncestorByClassName(J,"third")!==null));if(O[0]!=-1){try{var N=YAHOO.util.Dom.get("action-zoom-merchant-image");N.src=G.src;YAHOO.util.Dom.setStyle(N,"width",(O[0]+"px"));YAHOO.util.Dom.setStyle(N,"height",(O[1]+"px"));YAHOO.util.Dom.setStyle(N,"top","0px");if(O[0]>=H.defaultImageWidth){YAHOO.util.Dom.setStyle(L,"width","auto")}YAHOO.util.Dom.setStyle(L,"height","auto");H.setDropCoords(false,J,O[0],O[1])}catch(Q){}}else{H.isImageLoadingOk=false;H.handleFailure()}})}else{H.isImageLoadingOk=true;var F=G.width;var C=G.height;var D=H.calculateDim(F,C,(YAHOO.util.Dom.getAncestorByClassName(J,"third")!==null));if(D[0]!=-1){try{E.src=G.src;YAHOO.util.Dom.setStyle(E,"width",(D[0]+"px"));YAHOO.util.Dom.setStyle(E,"height",(D[1]+"px"));YAHOO.util.Dom.setStyle(E,"top","0px");if(D[0]>=H.defaultImageWidth){YAHOO.util.Dom.setStyle(L,"width","auto")}YAHOO.util.Dom.setStyle(L,"height","auto");H.setDropCoords(true,J,D[0],D[1])}catch(B){}}else{H.isImageLoadingOk=false;H.handleFailure()}}H.zoomFailureTimeOut=setTimeout(H.handleFailure,5000);H.showLayer();E.style.display="none";E.style.display="block"},displayExtended:function(C,G,A){var D=YAHOO.EU.Shopping.Utils.ZoomManagement;var J=YAHOO.util.Dom.getElementsByClassName("action-zoom-right","span","action-zoom-container")[0];var H=YAHOO.util.Dom.getX(G);YAHOO.util.Dom.setX("action-zoom-pointer",H+D.defaultImageWidth+2);var I=YAHOO.util.Dom.getElementsBy(function(){return true},"h4",C)[0];var F=YAHOO.util.Dom.getY(I);var E=YAHOO.util.Dom.getStyle(I,"padding-top").replace("px","");YAHOO.util.Dom.setY("action-zoom-pointer",(F+(E*1)+D.offsetExtendedPointerY));if(A.offerId!=D.previousOffer){J.innerHTML="";YAHOO.util.Dom.setStyle(J,"width",D.limitWidth+"px");YAHOO.util.Dom.setStyle(J,"height","auto");var B=document.createElement("div");B.className="extended-information-container";B.innerHTML=YAHOO.util.Dom.getElementsByClassName("extended-information-container","div",C)[0].innerHTML;J.appendChild(B);if(A.isTravelOffer){oResults=new YAHOO.EU.Shopping.Results("action-zoom-container");YAHOO.util.Event.removeListener("calendar_container","mouseover");YAHOO.util.Event.addListener("calendar_container","mouseover",D.manageLayer,{offerId:D.extendedShown})}YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName("close","span","action-zoom-container"),"click",D.hideLayer)}D.setDropCoords(true,G,D.limitWidth,(J.offsetHeight+5));D.showLayer()},setDropCoords:function(D,I,B,K){var E=YAHOO.EU.Shopping.Utils.ZoomManagement;var J=YAHOO.util.Dom.getX(I);var H=YAHOO.util.Dom.getY(I);E.dropDown.cfg.setProperty("width",(B+14)+"px");E.dropDown.cfg.setProperty("height",(K+14)+"px");E.dropDown.cfg.setProperty("x",J+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerX);if(K>=(YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageHeight-2*YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerY)){H=(H+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerY)}else{H=(H+((YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageHeight-K)/2-5))}var C=YAHOO.util.Dom.getDocumentScrollTop();var M=YAHOO.util.Dom.getDocumentScrollTop()+YAHOO.util.Dom.getViewportHeight();var F=H;var G=H+K;if(F<C){H=(H-F+C+10)}else{if(G>M){H=(H-G+M-15)}}E.dropDown.cfg.setProperty("y",H);var A=document.getElementById("action-zoom-pointer");var L=YAHOO.util.Dom.getY(A);if(L<(H+10)){YAHOO.util.Dom.setY(A,(H+10))}else{if(L>(H+K-30)){YAHOO.util.Dom.setY(A,(H+K-30))}}if(D){E.dropDown.cfg.setProperty("visible",true)}},isLayerNotDisplay:function(A){var E=YAHOO.EU.Shopping.Utils.ZoomManagement;var D=document.getElementById(A);if(D===null){return false}var B=YAHOO.util.Dom.getDocumentScrollTop();var G=YAHOO.util.Dom.getDocumentScrollTop()+YAHOO.util.Dom.getViewportHeight();var F=YAHOO.util.Dom.getY(D);var C=F+D.offsetHeight;if(((F+E.displayLimit)>G)||((C-E.displayLimit)<B)){YAHOO.util.Dom.removeClass(E.currentOffer,"hover");YAHOO.util.Dom.addClass(D,"hover");E.currentOffer=A;E.extendedBlocked=true;return true}return false},calculateDim:function(D,A,C){var B=1;if(D<YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageWidth&&A<YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageHeight){return[-1,-1]}if(C&&(D>YAHOO.EU.Shopping.Utils.ZoomManagement.limitWidth)){B=YAHOO.EU.Shopping.Utils.ZoomManagement.limitWidth/D;D=YAHOO.EU.Shopping.Utils.ZoomManagement.limitWidth;A=A*B}if(D>YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageWidth){B=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageWidth/D;D=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageWidth;A=A*B}if(A>YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageHeight){B=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageHeight/A;A=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageHeight;D=D*B}return[D,A]},handleFailure:function(){if(!YAHOO.EU.Shopping.Utils.ZoomManagement.isImageLoadingOk){var D=YAHOO.EU.Shopping.Utils.ZoomManagement.currentSmallImage;var C=YAHOO.EU.Shopping.Utils.ZoomManagement.currentZoom;var B=document.getElementById("action-zoom-merchant-image");B.src=D.src;B.width=D.width;B.height=D.height;YAHOO.util.Dom.setStyle(B,"top","0px");var A=YAHOO.util.Dom.getX(D);YAHOO.util.Dom.setX("action-zoom-container",A+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerX);var E=YAHOO.util.Dom.getY(D);YAHOO.util.Dom.setY("action-zoom-container",E+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerY);contentSpan=YAHOO.util.Dom.getElementsByClassName("action-zoom-right","span","action-zoom-container")[0];if(B.width>=YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageWidth){YAHOO.util.Dom.setStyle(contentSpan,"width","auto")}YAHOO.util.Dom.setStyle(contentSpan,"height","auto");YAHOO.EU.Shopping.Utils.ZoomManagement.setDropCoords(null,true,D,D.width,D.height)}}};YAHOO.util.Event.onDOMReady(function(){if(YAHOO.EU.Shopping.Flags.zoom){YAHOO.EU.Shopping.Utils.ZoomManagement.init()}});YAHOO.namespace("YAHOO.EU.Shopping");(function(){YAHOO.EU.Shopping.Carousel=function(B){var D=YAHOO.util.Dom.getElementsByClassName("img-list","ul",B);D=D[0];this.imageList=[];for(var C=0;C<D.childNodes.length;C++){if(D.childNodes[C].nodeType==1){this.imageList.push(D.childNodes[C].childNodes[0].nodeValue)}}this.loadInitialItems.context=this;YAHOO.EU.Shopping.Carousel.superclass.constructor.call(this,YAHOO.util.Dom.generateId(YAHOO.util.Dom.getElementsByClassName("carousel-component","div",B)[0],"yui-gen-carousel-"),{numVisible:1,animationSpeed:0.25,scrollInc:1,navMargin:0,firstVisible:1,wrap:true,size:this.imageList.length,prevElement:YAHOO.util.Dom.getElementsByClassName("previous","span",B),nextElement:YAHOO.util.Dom.getElementsByClassName("next","span",B),loadInitHandler:this.loadInitialItems,loadNextHandler:this.loadNextItems,loadPrevHandler:this.loadPrevItems,prevButtonStateHandler:this.handlePrevButtonState});var A=B;while(A!==null&&YAHOO.util.Dom.hasClass(A,"result")===false){A=A.parentNode}if(A!==null&&!A.onExtendedViewChange){A.onExtendedViewChange=new YAHOO.util.CustomEvent(this);A.onExtendedViewChange.subscribe(function(E,F){if(F[0].display=="show"){E.show()}})}};YAHOO.extend(YAHOO.EU.Shopping.Carousel,YAHOO.extension.Carousel,{_loadAll:true,_width:130,_height:130,loadInitialItems:function(D,A){if(YAHOO.util.Dom.hasClass(this.carouselList,"carousel_16_9")){this._width=120;this._height=90}var E=A[0];this.load(E);if(this._loadAll){var C=this.getProperty("size");for(var B=E+1;B<=C;B++){this.load(B)}}else{this.load(E+1)}this.updateIcons()},loadNextItems:function(B,A){var D=A[0];var C=A[2];if(!C){this.load(D)}this.updateIcons();this.updateZoomImage();this.load(D+1)},loadPrevItems:function(B,A){var D=A[0];var C=A[2];if(!C){this.load(D)}this.updateIcons();this.updateZoomImage()},handlePrevButtonState:function(D,B){var C=B[0];var A=B[1][0];if(C){YAHOO.util.Dom.removeClass(A,"inactive")}else{YAHOO.util.Dom.addClass(A,"inactive")}},fmtItem:function(B){var A='<div><img src="'+B+'" width="'+this._width+'" height="'+this._height+'"/></div>';return A},updateIcons:function(){var A=this.getLastVisible();var C=YAHOO.util.Dom.getElementsByClassName("position","span",this.carouselElem);for(var B=0;B<C.length;B++){if(B==(A-1)){YAHOO.util.Dom.addClass(C[B],"active")}else{YAHOO.util.Dom.removeClass(C[B],"active")}}},updateZoomImage:function(){var A=YAHOO.util.Dom.getElementsByClassName("merchant-image","span",this.carouselElem);if(A.length>0){A[0].innerHTML=this.imageList[this.getLastVisible()-1]}},load:function(A){if(this.imageList[A-1]!==null){this.addItem(A,this.fmtItem(this.imageList[A-1]))}}});YAHOO.EU.Shopping.initCaroussel=function(A){if(YAHOO.EU.Shopping.Flags.carousel){YAHOO.util.Dom.getElementsByClassName("carousel","div",A,function(D){if(!YAHOO.util.Dom.hasClass(D,"available")){YAHOO.util.Dom.setStyle(D,"display","block");var B=new YAHOO.EU.Shopping.Carousel(D);YAHOO.util.Dom.addClass(D,"available");var C=D.parentNode;YAHOO.util.Dom.getElementsByClassName("extended-photo","a",C,function(E){YAHOO.util.Dom.setStyle(E,"display","none")})}})}};YAHOO.util.Event.onDOMReady(function(){var A=document.getElementById("l3-photo");if(A){YAHOO.EU.Shopping.initCaroussel(A)}})})();(function(){YAHOO.namespace("YAHOO.EU.Shopping");var O=document;var F=/(?!.*?opera.*?)msie(?!.*?opera.*?)/i.test(navigator.userAgent);var I=/webkit/i.test(navigator.userAgent);var A={};var J=!F&&!I;var G={};var N=0;var D={trim:/^\s+|\s+$/g,quickTest:/^[^:\[>+~ ,]+$/,typeSelector:/(^[^\[:]+?)(?:\[|\:|$)/,tag:/^(\w+|\*)/,id:/^(\w*|\*)#/,classRE:/^(\w*|\*)\./,attributeName:/(\w+)(?:[!+~*\^$|=])|\w+/,attributeValue:/(?:[!+~*\^$|=]=*)(.+)(?:\])/,pseudoName:/(\:[^\(]+)/,pseudoArgs:/(?:\()(.+)(?:\))/,nthParts:/([+-]?\d)*(n)([+-]\d+)*/i,combinatorTest:/[+>~ ](?![^\(]+\)|[^\[]+\])/,combinator:/\s*[>~]\s*(?![=])|\s*\+\s*(?![0-9)])|\s+/g,recursive:/:(not|has)\((\w+|\*)?([#.](\w|\d)+)*(\:(\w|-)+(\([^\)]+\))?|\[[^\}]+\])*(\s*,\s*(\w+|\*)?([#.](\w|\d)+)*(\:(\w|-)+(\([^\)]+\))?|\[[^\}]+\])*)*\)/gi};var E=function(Q){if(!!(window.attachEvent&&!window.opera)){return function(T){if(T instanceof Array){return T}for(var U=0,S=[],R;R=T[U++];){S[S.length]=R}return S}}else{return function(R){return Array.prototype.slice.call(R)}}}();function B(R,Q){var V=[],U={};if(Q){Q=new RegExp("^"+Q+"$","i")}for(var T=0,S;S=R[T++];){S.uid=S.uid||N++;if(!U[S.uid]&&(!Q||S.nodeName.search(Q)!==-1)){V[V.length]=U[S.uid]=S}}return V}function M(R,Q){if(!R){return null}if(Q==="class"||Q==="className"){return R.className}if(Q==="for"){return R.htmlFor}return R.getAttribute(Q)||R[Q]}function C(R,Y,W,V,U,Z,Q){var c=[];if(!!Q){return Y.test(W.className)?[W]:[]}if(W.getElementsByClassName){c=E(W.getElementsByClassName(R));if(!!V){if(Y.test(W.className)){c[c.length]=W}}if(Z!="*"){c=B(c,Z)}A[U]=c.slice(0);return c}else{if(O.getElementsByClassName){c=E(O.getElementsByClassName(R));if(Z!="*"){c=B(c,Z)}A[U]=c.slice(0);return c}}var X=(Z=="*"&&W.all)?W.all:W.getElementsByTagName(Z);if(!!V){X[X.length]=W}for(var S=0,T;T=X[S++];){if(Y.test(T.className)){c[c.length]=T}}return c}function P(R,X,W,V,Z,Q){var S,c=[];if(!!Q){return M(X,"id")===R?[X]:[]}if(X.getElementById){S=X.getElementById(R)}else{S=O.getElementById(R)}if(S&&M(S,"id")===R){c[c.length]=S;A[V]=c.slice(0);return c}var Y=X.getElementsByTagName(Z);if(!!W){Y[Y.length]=X}for(var T=0,U;U=Y[T++];){if(M(U,"id")===R){c[c.length]=U;break}}return c}function H(T,Z,X,Q){var R,d,c="",e=[],S=[],Y,U,V;D.id.lastIndex=D.typeSelector.lastIndex=D.classRE.lastIndex=0;if(!D.tag.test(T)){T="*"+T}R=D.typeSelector.exec(T)[1];Z=Z instanceof Array?Z.slice(0):[Z];V=Z.length;U=V-1;if(D.id.test(R)){c="id";d=(d=R.match(/^\w+/))?d[0]:"*";R=R.replace(D.id,"")}else{if(D.classRE.test(R)){c="class";d=(d=R.match(D.tag))?d[0]:"*";R=R.replace(D.tag,"");contextRE=G[R+"RegExp"]||(G[R+"RegExp"]=new RegExp("(?:^|\\s)"+R.replace(/\./g,"\\s*")+"(?:\\s|$)"));R=R.replace(/\./g," ")}}while(U>-1){Y=Z[U--];Y.uid=Y.uid||N++;var W=T+Y.uid;if(J&&A[W]){e=e.concat(A[W]);continue}if(c==="id"){S=P(R,Y,X,W,d,Q)}else{if(c==="class"){S=C(R,contextRE,Y,X,W,d,Q)}else{S=E(Y.getElementsByTagName(R));if(!!X&&(Y.nodeName.toUpperCase()===R.toUpperCase()||R==="*")){S[S.length]=Y}}}e=V>1?e.concat(S):S;A[W]=e.slice(0)}return e}peppy={query:function(v,q,T,S,m,e){if(T){J=T.cache}var f=[];if(!m){v=v.replace(D.trim,"").replace(/(\[)\s+/g,"$1").replace(/\s+(\])/g,"$1").replace(/(\[[^\] ]+)\s+/g,"$1").replace(/\s+([^ \[]+\])/g,"$1").replace(/(\()\s+/g,"$1").replace(/(\+)([^0-9])/g,"$1 $2").replace(/['"]/g,"").replace(/\(\s*even\s*\)/gi,"(2n)").replace(/\(\s*odd\s*\)/gi,"(2n+1)")}if(typeof q==="string"){q=(q=H(q,O)).length>0?q:undefined}q=q||O;q.uid=q.uid||N++;var W=v+q.uid;if(J&&A[W]){return A[W]}D.quickTest.lastIndex=0;if(D.quickTest.test(v)){f=H(v,q,S,e);return(A[W]=f.slice(0))}var AB,y,s,o=[],p;AB=v.split(/\s*,\s*/g);y=AB.length>1?[""]:AB;for(var V=0,Y=0,x=0,u;AB.length>1&&(u=AB[V++])!==undefined;){Y+=(((l=u.match(/\(/g))?l.length:0)-((r=u.match(/\)/g))?r.length:0));y[x]=y[x]||"";y[x]+=(y[x]===""?u:","+u);if(Y===0){x++}}var U=0;while((s=y[U++])!==undefined){D.quickTest.lastIndex=0;if(D.quickTest.test(s)){Z=H(s,q,S,e);f=y.length>1?f.concat(Z):Z;continue}D.combinatorTest.lastIndex=0;if(D.combinatorTest.test(s)){var o,AA,X=0,d,t,n=0,Z;o=s.split(D.combinator);AA=o.length;d=s.match(D.combinator)||[""];t=d.length;while(X<AA){var z,R,Q;z=d[n++].replace(D.trim,"");R=Z||peppy.query(o[X++],q,S,true,e);Q=peppy.query(o[X++],z==""||z==">"?R:q,z==""||z==">",true,e);Z=peppy.queryCombinator(R,Q,z)}f=y.length>1?f.concat(Z):Z;Z=undefined}else{Z=peppy.querySelector(s,q,S,e);f=y.length>1?f.concat(Z):Z}}if(y.length>1){f=B(f)}return(A[W]=f.slice(0))},queryCombinator:function(T,R,X){var f=[],V={},W={},Y={},S={},U=peppy.simpleSelector.combinator[X];for(var d=0,Q;Q=T[d++];){Q.uid=Q.uid||N++;V[Q.uid]=Q}for(var Z=0,e;e=R[Z++];){e.uid=e.uid||N++;if(!W[e.uid]&&U(e,V,S,Y)){f[f.length]=e}W[e.uid]=e}return f},querySelector:function(y,x,X,p){var W,s=[],d,AA,AC,f=true,Z={};W=H(y,x,X,p);d=W.length;AA=d-1;var Y,AB;if(/:(not|has)/i.test(y)){AB=y.match(D.recursive);y=y.replace(D.recursive,"")}if(!(Y=y.match(/:(\w|-)+(\([^\(]+\))*|\[[^\[]+\]/g))){Y=[]}if(AB){Y=Y.concat(AB)}var AF;while((AF=Y.pop())!==undefined){var R=G[AF],AD,q,U,T=[],Q=false,AJ=false;s=[];if(R){U=R[0];AD=R[1];T=R.slice(2);q=AD[U]}else{if(!(/^:/.test(AF))){var u=AF.match(D.attributeName);var o=AF.match(D.attributeValue);T[1]=u[1]||u[0];T[2]=o?o[1]:"";U=""+AF.match(/[~!+*\^$|=]/);AD=peppy.simpleSelector.attribute;q=AD[U];G[AF]=[U,AD].concat(T)}else{var V=AF.match(D.pseudoArgs);T[1]=V?V[1]:"";U=AF.match(D.pseudoName)[1];AD=peppy.simpleSelector.pseudos;if(/nth-(?!.+only)/i.test(AF)){var AG,AE,AI=T[1],g=G[AI];if(g){AG=g[0];AE=g[1]}else{var m=AI.match(D.nthParts);if(m){AG=parseInt(m[1],10)||0;AE=parseInt(m[3],10)||0;if(/^\+n|^n/i.test(AI)){AG=1}else{if(/^-n/i.test(AI)){AG=-1}}T[2]=AG;T[3]=AE;G[AI]=[AG,AE]}}}else{if(/^:contains/.test(AF)){var c=T[1];var AH=G[c];if(AH){T[1]=AH}else{T[1]=G[c]=new RegExp(c)}}}q=AD[U];G[AF]=[U,AD].concat(T)}}Q=/:(\w|-)+type/i.test(AF);AJ=/^:(nth[^-]|eq|gt|lt|first|last)/i.test(AF);if(AJ){T[3]=AA}var z=W.length,t=z-1;while(t>-1){AC=W[t--];if(f){AC.peppyCount=t+1}var S=true;T[0]=AC;if(AJ){T[2]=AC.peppyCount}if(!q.apply(AD,T)){S=false}if(S){s.push(AC)}}W=s;f=false}return s},simpleSelector:{attribute:{"null":function(S,Q,R){return !!M(S,Q)},"=":function(S,Q,R){return M(S,Q)==R},"~":function(S,Q,R){return M(S,Q).match(new RegExp("\\b"+R+"\\b"))},"^":function(S,Q,R){return M(S,Q).indexOf(R)===0},"$":function(T,R,S){var Q=M(T,R);return Q.lastIndexOf(S)===Q.length-S.length},"*":function(S,Q,R){return M(S,Q).indexOf(R)!=-1},"|":function(S,Q,R){return M(S,Q).match("^"+R+"-?(("+R+"-)*("+R+"$))*")},"!":function(S,Q,R){return M(S,Q)!==R}},pseudos:{":root":function(Q){return Q===O.getElementsByTagName("html")[0]?true:false},":nth-child":function(U,Q,W,V,Y){if(!U.nodeIndex){var R=U.parentNode.firstChild,T=0,X;for(;R;R=R.nextSibling){if(R.nodeType==1){X=R;R.nodeIndex=++T}}X.IsLastNode=true;if(T==1){X.IsOnlyChild=true}}var S=U.nodeIndex;if(Q=="first"){return S==1}if(Q=="last"){return !!U.IsLastNode}if(Q=="only"){return !!U.IsOnlyChild}return(!W&&!V&&S==Q)||((W==0?S==V:W>0?S>=V&&(S-V)%W==0:S<=V&&(S+V)%W==0))},":nth-last-child":function(Q,R){return this[":nth-child"](Q,R,a,b)},":nth-of-type":function(R,S,Q){return this[":nth-child"](R,S,a,b,Q)},":nth-last-of-type":function(R,S,Q){return this[":nth-child"](R,S,a,b,Q)},":first-child":function(Q){return this[":nth-child"](Q,"first")},":last-child":function(Q){return this[":nth-child"](Q,"last")},":first-of-type":function(R,S,Q){return this[":nth-child"](R,"first",null,null,Q)},":last-of-type":function(R,S,Q){return this[":nth-child"](R,"last",null,null,Q)},":only-child":function(Q){return this[":nth-child"](Q,"only")},":only-of-type":function(R,S,Q){return this[":nth-child"](R,"only",null,null,Q)},":empty":function(S){for(var R=S.firstChild,Q=0;R!==null;R=R.nextSibling){if(R.nodeType===1||R.nodeType===3){return false}}return true},":not":function(R,Q){return peppy.query(Q,R,true,true,true).length===0},":has":function(R,Q){return peppy.query(Q,R,true,true,true).length>0},":selected":function(Q){return Q.selected},":hidden":function(Q){return Q.type==="hidden"||Q.style.display==="none"},":visible":function(Q){return Q.type!=="hidden"&&Q.style.display!=="none"},":input":function(Q){return Q.nodeName.search(/input|select|textarea|button/i)!==-1},":radio":function(Q){return Q.type==="radio"},":checkbox":function(Q){return Q.type==="checkbox"},":text":function(Q){return Q.type==="text"},":header":function(Q){return Q.nodeName.search(/h\d/i)!==-1},":enabled":function(Q){return !Q.disabled&&Q.type!=="hidden"},":disabled":function(Q){return Q.disabled},":checked":function(Q){return Q.checked},":contains":function(R,Q){return Q.test((R.textContent||R.innerText||""))},":parent":function(Q){return !!Q.firstChild},":odd":function(Q){return this[":nth-child"](Q,"2n+2",2,2)},":even":function(Q){return this[":nth-child"](Q,"2n+1",2,1)},":nth":function(S,R,Q){return R==Q},":eq":function(S,R,Q){return R==Q},":gt":function(S,R,Q){return Q>R},":lt":function(S,R,Q){return Q<R},":first":function(S,R,Q){return Q==0},":last":function(T,S,R,Q){return R==Q}},combinator:{"":function(T,R,U,S){var Q=T.uid;while((T=T.parentNode)!==null&&!U[T.uid]){if(!!R[T.uid]||!!S[T.uid]){return(S[Q]=true)}}return(U[Q]=false)},">":function(S,Q,T,R){return S.parentNode&&Q[S.parentNode.uid]},"+":function(S,Q,T,R){while((S=S.previousSibling)!==null&&!T[S.uid]){if(S.nodeType===1){return S.uid in Q}}return false},"~":function(T,R,U,S){var Q=T.uid;while((T=T.previousSibling)!==null&&!U[T.uid]){if(!!R[T.uid]||!!S[T.uid]){return(S[Q]=true)}}return(U[Q]=false)}}}};YAHOO.EU.Shopping.peppy=peppy;if(O.querySelectorAll){(function(){var Q=peppy.query;peppy.query=function(S,R){R=R||O;if(R===O){try{return R.querySelectorAll(S)}catch(T){}}return Q.apply(Q,E(arguments))}})()}else{var L=O.addEventListener||O.attachEvent;function K(){A={}}L("DOMAttrModified",K,false);L("DOMNodeInserted",K,false);L("DOMNodeRemoved",K,false)}})();YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.selectors={defaultConf:null,Peppy:function(F,B,C,D,G){if((B!=null)||(B!=undefined)){var A=B+"."+F}else{var A="."+F}var H=YAHOO.EU.Shopping.peppy.query(A,C,G);if(D){for(var E=H.length-1;E>=0;E--){D.call(H[E],H[E])}}return H},YUI:function(D,A,B,C,E){if(!C){return YAHOO.util.Dom.getElementsByClassName2(D,A,B,C)}else{YAHOO.util.Dom.getElementsByClassName2(D,A,B,C)}},autoConf:function(){if(YAHOO.env.ua.ie==6){return{fn:YAHOO.EU.Shopping.selectors.Peppy,cache:false,Prio:0,event:undefined}}else{return{fn:YAHOO.EU.Shopping.selectors.Peppy,cache:true,Prio:0,event:undefined}}}};YAHOO.EU.Shopping.selectors.defaultConf=YAHOO.EU.Shopping.selectors.autoConf();YAHOO.util.Dom.getElementsByClassName=function(D,A,B,C,E){return(YAHOO.EU.Shopping.selectors.defaultConf).fn(D,A,B,C)};YAHOO.namespace("YAHOO.Kelkoo");YAHOO.Kelkoo.Login=function(B){var C={left:180,top:75,height:210,url:"https://login.kelkoo.com",layerId:"login-layer"};var A=this;this.layer=null;this.init=function(D){if(D){C.url=(D.url)?uxDecode64(D.url):C.url;C.left=(D.left)?D.left:C.left;C.top=(D.top)?D.top:C.top;C.height=(D.height)?D.height:C.height;C.layerId=(D.layerId)?D.layerId:C.layerId}this.createLayer()};this.createLayer=function(){this.layer=document.getElementById(C.layerId);if(this.layer==null){var D=document.getElementById("product-overlay");this.layer=document.createElement("div");this.layer.id=C.layerId;this.layer.style.top=C.top;this.layer.style.left=C.left;this.layer.innerHTML='<div class="top"><span class="close">'+YAHOO.EU.Shopping.locale.suggestClose+'</span></div><iframe frameborder="0" scrolling="no" marginwidth="0" marginheight="0"></iframe>';D.appendChild(this.layer);YAHOO.util.Event.addListener(document.getElementById("page"),"click",A.closeLayer,{layerId:C.layerId});YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName("close","span",C.layerId)[0],"click",A.closeLayer,{layerId:C.layerId})}};this.openLayer=function(){var F=YAHOO.util.Dom.getXY("header");var D=this.layer.getElementsByTagName("iframe")[0];this.layer.removeChild(D);this.layer.style.display="block";var E=document.createElement("iframe");E.src=C.url;E.frameBorder="0";E.scrolling="no";E.marginWidth="0";E.marginHeight="0";E.style.border="0px solid #fff";E.height=C.height;E.width=(this.layer.offsetWidth-42);this.layer.appendChild(E);YAHOO.util.Dom.setXY(this.layer,[F[0]+C.left,F[1]+C.top])};this.closeLayer=function(D,E){document.getElementById(E.layerId).style.display="none"};this.init(B)};var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(D){for(var A=0;A<D.length;A++){var B=D[A].string;var C=D[A].prop;this.versionSearchString=D[A].versionSearch||D[A].identity;if(B){if(B.indexOf(D[A].subString)!=-1){return D[A].identity}}else{if(C){return D[A].identity}}}},searchVersion:function(B){var A=B.indexOf(this.versionSearchString);if(A==-1){return }return parseFloat(B.substring(A+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",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};(function(){YAHOO.util.Event.onDOMReady(function(){if(pageTrackerPerfs!==undefined){try{plend=new Date();plload=plend.getTime()-plstart.getTime();var I=Math.round(plload/100)*100+" ms";var H=document.location.pathname;if(document.location.search){H+=document.location.search}if((YAHOO.util.Dom.getElementsByClassName("offer").length==15)||(YAHOO.util.Dom.getElementsByClassName("catalog").length==15)){var E="";if(H.match(/^.*\/c-(\d+)-.+\.html.*$/gi)){E=H.replace(/^.*\/c-(\d+)-.+\.html.*$/gi,"$1")}else{if(H.match(/^.*\/d-.+-(\d+).*$/gi)){E=H.replace(/^.*\/d-.+-(\d+).*$/gi,"$1")}}var G="";if(H.match(/^.*ss[^-]*-\d*[-]*(.+).html.*$/gi)){G=H.replace(/^.*ss[^-]*-\d*[-]*(.+).html.*$/gi,"$1")}else{if(H.match(/^.*siteSearchQuery=([^&]+).*$/gi)){G=H.replace(/^.*siteSearchQuery=([^&]+).*$/gi,"$1")}}if(E!=""){pageTrackerPerfs._trackPageview("/load times by catId (ms)/"+E+"/"+I)}if(G!=""){pageTrackerPerfs._trackPageview("/load times by query (ms)/"+G+"/"+I)}}var C="other";if(perfsPageType!==undefined){if(perfsPageType.match("l1")){C="L1"}else{if(perfsPageType.match("l2")){C="L2"}else{if(perfsPageType.match("l3")){C="L3"}}}}if(C!="other"){var D="";var K="";var A=YAHOO.util.Dom.getElementsByClassName("view-type","fieldset","level-results-page");if(A.length>0){K=YAHOO.util.Dom.getElementsBy(function(){return true},"input",YAHOO.util.Dom.getElementsByClassName("view-type","fieldset","level-results-page")[0])}if(K.length>0){D=YAHOO.util.Dom.getElementsBy(function(){return true},"input",YAHOO.util.Dom.getElementsByClassName("view-type","fieldset","level-results-page")[0])[0].value}C=C+" "+D}pageTrackerPerfs._trackPageview("/load times by page type (ms)/"+C+"/"+I);if(plload<1000){lc="Very Fast"}else{if(plload<3000){lc="Fast"}else{if(plload<5000){lc="Medium"}else{if(plload<10000){lc="Sluggish"}else{if(plload<20000){lc="Slow"}else{lc="Very Slow"}}}}}pageTrackerPerfs._trackEvent("Page Load (ms)",lc+" pages",H,Math.round(plload));BrowserDetect.init();var F=BrowserDetect.browser;var J=BrowserDetect.version;pageTrackerPerfs._trackEvent("Page Load (ms)",F+" "+J,H,Math.round(plload));if(perfsServerTime!==undefined){var L=Math.round(perfsServerTime/100)*100+" ms";pageTrackerPerfs._trackPageview("/server time (ms)/"+C+"/"+L+"/"+H);pageTrackerPerfs._trackEvent("Server time (ms)",C+" pages",H,Math.round(perfsServerTime))}}catch(B){console.log("Unknown load time"+B)}}else{console.log("No tracker for perfs")}})})();YAHOO.namespace("Kelkoo");var gmapLoaded=new YAHOO.util.CustomEvent("gmapLoaded");YAHOO.Kelkoo.Gmap={callback:function(){gmapLoaded.fire()}};YAHOO.Kelkoo.GoogleMaps=function(B,C,D){var A=this;this.oMap="";this.oGeocoder="";this.aGeocodedAddresses=[];this.oInfoWindow="";this.bSingleAddress=true;this.init=function(){gmapLoaded.subscribe(function(M,L,I){I.scope.oInfoWindow=new google.maps.InfoWindow();if(document.getElementById(I.mapId)){I.scope.oGeocoder=geocoder=new google.maps.Geocoder();var G=new google.maps.LatLng(47.397,4.644);var O={zoom:1,center:G,mapTypeId:google.maps.MapTypeId.ROADMAP};I.scope.oMap=new google.maps.Map(document.getElementById(I.mapId),O);if(YAHOO.lang.isArray(I.address)){I.scope.bSingleAddress=false;var F=new google.maps.LatLngBounds();for(var J=0,H=I.address.length;J<H;J++){var K=I.address[J];I.scope.createMarkerFromLagLng(K.lat,K.lng,K.address,K.content);F.extend(new google.maps.LatLng(K.lat,K.lng));I.scope.oMap.fitBounds(F)}}else{var K=I.address;I.scope.createMarkerFromLagLng(K.lat,K.lng,K.address,K.content)}var N=google.maps.event.addListener(I.scope.oMap,"zoom_changed",function(){var P=I.scope.oMap.getZoom();if(P>10){I.scope.oMap.setZoom(10)}google.maps.event.removeListener(N)})}},{address:C,mapId:B,zoom:D,scope:A});var E=YAHOO.util.Get.script("http://maps.google.com/maps/api/js?sensor=false&callback=YAHOO.Kelkoo.Gmap.callback",{onSuccess:function(F){},data:{address:C,mapId:B,zoom:D},scope:A})};this.centerShowMarker=function(E){if(A.aGeocodedAddresses[E]){var F=A.aGeocodedAddresses[E];A.oMap.setCenter(new google.maps.LatLng(F.lat,F.lng));var G=A.oMap.getZoom();if(G<4){A.oMap.setZoom(4)}A.oInfoWindow.setContent(A.aGeocodedAddresses[E].content);A.oInfoWindow.open(A.oMap,F.marker)}};this.centerShowMarkerFromLatLng=function(E,I,F){if(A.aGeocodedAddresses[E]){var G=A.aGeocodedAddresses[E];A.oMap.setCenter(new google.maps.LatLng(I,F));var H=A.oMap.getZoom();if(H<4){A.oMap.setZoom(4)}A.oInfoWindow.setContent(A.aGeocodedAddresses[E].content);A.oInfoWindow.open(A.oMap,G.marker)}};this.showMarker=function(E){A.centerShowMarker(0,E)};this.createMarkerFromAddress=function(E){var F=A.aGeocodedAddresses.length;if(A.bSingleAddress){A.geoCode(E,1)}else{A.geoCode(E,F)}};this.createMarkerFromLagLng=function(I,F,E,H){var G=A.aGeocodedAddresses.length;A.createMarker(E,new google.maps.LatLng(I,F),H)};this.createMarker=function(G,E,H){var F=new google.maps.Marker({map:A.oMap,position:E});if(G!=""){google.maps.event.addListener(F,"click",function(){A.oInfoWindow.setContent(H);A.oInfoWindow.open(A.oMap,F)})}if(G!=null){A.aGeocodedAddresses[G]={address:G,lat:E.Ra,lng:E.Sa,marker:F,content:H}}};this.removeAllMarkers=function(){for(var E in A.aGeocodedAddresses){A.aGeocodedAddresses[E].marker.setMap(null)}};this.geoCode=function(F,E){if(A.oGeocoder){A.oGeocoder.geocode({address:F},function(H,G){if(G==google.maps.GeocoderStatus.OK){A.createMarker(F,H[0].geometry.location,F)}else{}})}};this.init()};YAHOO.util.Event.onDOMReady(function(H){if(document.getElementById("top20-list")){var B=[];var A=document.getElementById("top20-list");var F=A.getElementsByTagName("a");for(var E=0,C=F.length;E<C;E++){if((F[E].href!="")&&(F[E].className!="seeall")&&(F[E].className.indexOf("coords-")>=0)){var I=F[E].className.replace("coords-","").split("_");var D='\r\n<a href="'+F[E].href+'">'+F[E].innerHTML+"</a>";B.push({address:F[E].innerHTML,lat:I[0],lng:I[1],content:D})}}if(B.length>0){var G=new YAHOO.Kelkoo.GoogleMaps("azmap",B)}}});YAHOO.namespace("Kelkoo");YAHOO.Kelkoo.calendar=function(C,A,D){this.aElements=C;this.oCalendar="";this.elTargeted="";this.fctCallback=D;this.iPages=A==undefined?2:A;var B=this;this.init=function(){YAHOO.util.Event.addListener(B.aElements,"click",B.show)};this.show=function(P){if(!document.getElementById("calContainer_"+B.iPages)){var J=document.createElement("div");J.id="calContainer_"+B.iPages;J.style.position="absolute";document.body.appendChild(J)}var H=document.getElementById("calContainer_"+B.iPages);var G=YAHOO.util.Event.getTarget(P);B.elTargeted=G;if(B.oCalendar==""){if(B.iPages==2){B.oCalendar=new YAHOO.widget.CalendarGroup("calendar","calContainer_"+B.iPages)}else{B.oCalendar=new YAHOO.widget.Calendar("calendar","calContainer_"+B.iPages)}B.oCalendar.cfg.setProperty("close",true);B.oCalendar.cfg.setProperty("DATE_FIELD_DELIMITER",YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER);B.oCalendar.cfg.setProperty("LOCALE_WEEKDAYS",YAHOO.EU.Shopping.YUICalendarConf.LOCALE_WEEKDAYS);B.oCalendar.cfg.setProperty("START_WEEKDAY",YAHOO.EU.Shopping.YUICalendarConf.START_WEEKDAY);B.oCalendar.cfg.setProperty("MDY_DAY_POSITION",YAHOO.EU.Shopping.YUICalendarConf.MDY_DAY_POSITION);B.oCalendar.cfg.setProperty("MDY_MONTH_POSITION",YAHOO.EU.Shopping.YUICalendarConf.MDY_MONTH_POSITION);B.oCalendar.cfg.setProperty("MDY_YEAR_POSITION",YAHOO.EU.Shopping.YUICalendarConf.MDY_YEAR_POSITION);B.oCalendar.cfg.setProperty("MD_DAY_POSITION",YAHOO.EU.Shopping.YUICalendarConf.MD_DAY_POSITION);B.oCalendar.cfg.setProperty("MD_MONTH_POSITION",YAHOO.EU.Shopping.YUICalendarConf.MD_MONTH_POSITION);B.oCalendar.cfg.setProperty("MONTHS_SHORT",YAHOO.EU.Shopping.YUICalendarConf.MONTHS_SHORT);B.oCalendar.cfg.setProperty("MONTHS_LONG",YAHOO.EU.Shopping.YUICalendarConf.MONTHS_LONG);B.oCalendar.cfg.setProperty("WEEKDAYS_1CHAR",YAHOO.EU.Shopping.YUICalendarConf.WEEKDAYS_1CHAR);B.oCalendar.cfg.setProperty("WEEKDAYS_SHORT",YAHOO.EU.Shopping.YUICalendarConf.WEEKDAYS_SHORT);B.oCalendar.cfg.setProperty("WEEKDAYS_MEDIUM",YAHOO.EU.Shopping.YUICalendarConf.WEEKDAYS_MEDIUM);B.oCalendar.cfg.setProperty("WEEKDAYS_LONG",YAHOO.EU.Shopping.YUICalendarConf.WEEKDAYS_LONG);if(B.fctCallback==undefined){B.fctCallback=B.setValue}B.oCalendar.selectEvent.subscribe(B.fctCallback,{scope:B,cal:B.oCalendar})}B.oCalendar.cfg.setProperty("mindate",new Date());B.oCalendar.cfg.setProperty("maxdate",YAHOO.widget.DateMath.add(new Date(),YAHOO.widget.DateMath.DAY,365));var E="";for(var M=0,L=B.aElements.length;M<L;M++){var S=YAHOO.util.Dom.get(B.aElements[M]).value;if(S==""){var R=B.oCalendar.cfg.config.mindate.value.getDay();var O=(B.oCalendar.cfg.config.mindate.value.getMonth()+1);var Q=B.oCalendar.cfg.config.mindate.value.getFullYear();E+=R+"/"+O+"/"+Q+","}else{var F=S.split("/");E+=F[0]+"/"+F[1]+"/"+F[2]+","}}var N=E.slice(0,(E.length-1));var K=N.split(",");var I=K[0].split("/");B.oCalendar.cfg.setProperty("pagedate",I[1]+"/"+I[2]);B.oCalendar.cfg.setProperty("selected",N);B.oCalendar.show();YAHOO.util.Dom.setX(H,YAHOO.util.Dom.getX(G));YAHOO.util.Dom.setY(H,YAHOO.util.Dom.getY(G)+25);B.oCalendar.render()};this.setValue=function(I,G,L){var F=L.scope.elTargeted;var K=G[0][0];var E=(K[2]<10)?"0"+K[2]:K[2];var J=(K[1]<10)?"0"+K[1]:K[1];var H=K[0];F.value=E+"/"+J+"/"+H;L.cal.hide()};this.init()};YAHOO.util.Event.onDOMReady(function(I){var H=function(S,Q,V){var P=V.scope.elTargeted;var U=Q[0][0];var O=(U[2]<10)?"0"+U[2]:U[2];var T=(U[1]<10)?"0"+U[1]:U[1];var R=U[0];P.value=O+"/"+T+"/"+R;V.cal.hide();G(P.id);if(YAHOO.util.Dom.get("hotel-form")){K()}};var G=function(V){if(V=="hotel-departureDate"||V=="flight-departureDate"){var W=YAHOO.util.Dom.get(V);var O=YAHOO.util.Dom.get("hotel-returnDate");var R=1;if(W.id=="flight-departureDate"){O=YAHOO.util.Dom.get("flight-returnDate");R=7}var U=W.value.split("/");var P=O.value.split("/");var X=new Date(U[1]+"/"+U[0]+"/"+U[2]);var Q=new Date(P[1]+"/"+P[0]+"/"+P[2]);Q.setTime(X.getTime()+24*3600*1000*R);var S=Q.getMonth()+1;if(S<10){S="0"+S}var T=Q.getDate();if(T<10){T="0"+T}O.value=T+"/"+S+"/"+Q.getFullYear()}};var K=function(){var T=YAHOO.util.Dom.get("hotel-error-focus");var V=YAHOO.util.Dom.get("hotel-departureDate");var S=YAHOO.util.Dom.get("hotel-returnDate");var Q=V.value.split("/");var P=S.value.split("/");var U=new Date(Q[1]+"/"+Q[0]+"/"+Q[2]);var R=new Date(P[1]+"/"+P[0]+"/"+P[2]);if(U>R){elError.style.display="block";elError.innerHTML=YAHOO.EU.Shopping.locale.hotelFormAlert3;moveFocus(T,S);bHasError=true}else{var O=R.getTime()-U.getTime();document.getElementById("hotel-nbnights").value=O/(1000*60*60*24)}};if(YAHOO.util.Dom.get("flight-form")){if(YAHOO.util.Dom.get("flight-useTDWS")){var F="flight-departureTEXT";var D="flight-arrivalTEXT";var N="flight-departure";var M="flight-arrival"}else{var F="flight-departure";var D="flight-arrival";var N="flight-departureTEXT";var M="flight-arrivalTEXT"}var E=new YAHOO.Kelkoo.calendar(["flight-departureDate","flight-returnDate"],undefined,H);YAHOO.util.Event.addListener("flight-departureDate","change",function(){G("flight-departureDate")});var L=YAHOO.util.Dom.get("flight-form");YAHOO.util.Event.addListener("flight-adv-link","click",function(R){YAHOO.util.Event.preventDefault(R);var Q=YAHOO.util.Dom.get("flight-form");var P=YAHOO.util.Dom.getElementsByClassName("advanced","fieldset",Q);var O=P[0].style.display;if(O=="block"){YAHOO.util.Dom.removeClass(this,"activated")}else{YAHOO.util.Dom.addClass(this,"activated")}P[0].style.display=(O=="block")?"none":"block"});function C(){var P=document.getElementById("flight-form");var O=document.getElementById("flight-returning-li");var S=document.getElementById("flight-returning-time-li");var R=P.type[0].value;for(var Q=0;Q<P.type.length;Q++){if(P.type[Q].checked==true){R=P.type[Q].value}}if(R=="Oneway"){YAHOO.util.Dom.addClass(O,"remove");YAHOO.util.Dom.addClass(S,"remove");YAHOO.util.Dom.get("flight-departureTimeReturn").disabled=true;YAHOO.util.Dom.get("flight-returnDate").disabled=true}else{YAHOO.util.Dom.removeClass(O,"remove");YAHOO.util.Dom.removeClass(S,"remove");YAHOO.util.Dom.get("flight-departureTimeReturn").disabled=false;YAHOO.util.Dom.get("flight-returnDate").disabled=false}}var J=YAHOO.util.Dom.getElementsByClassName("type-radio","input",L);YAHOO.util.Event.addListener(J,"click",function(){C()});C();if(YAHOO.util.Dom.get("flight-useTDWS")){YAHOO.Kelkoo.Travel.SuggestAsYouType.init(F,"flight-departureSuggest","flight-form","172201");YAHOO.Kelkoo.Travel.SuggestAsYouType.init(D,"flight-arrivalSuggest","flight-form","172201")}YAHOO.util.Event.addListener(L,"submit",function(o){function u(e,v){if(YAHOO.env.ua.ie==0){YAHOO.util.Dom.setX(e,YAHOO.util.Dom.getX(v)+parseInt(YAHOO.util.Dom.getStyle(v,"width"))+12);YAHOO.util.Dom.setY(e,YAHOO.util.Dom.getY(v)+parseInt(YAHOO.util.Dom.getStyle(v,"height"))-16);e.style.visibility="visible"}}YAHOO.util.Event.preventDefault(o);var t=false;var c=YAHOO.util.Dom.get("flight-error");var T=YAHOO.util.Dom.get("flight-error-focus");var W=YAHOO.util.Dom.get(F);var f=YAHOO.util.Dom.get(D);var V=YAHOO.util.Dom.get("flight-departureDate");var m=YAHOO.util.Dom.get("flight-returnDate");var P=YAHOO.util.Dom.get("flight-nbadults");var Y=YAHOO.util.Dom.get("flight-nbchilds");var g=YAHOO.util.Dom.get("flight-nbbabies");var O=YAHOO.util.Dom.get("type-oneway");if(W.value==""){c.style.display="block";c.innerHTML=YAHOO.EU.Shopping.locale.flightFormAlert4;W.focus();u(T,W);t=true}else{if(f.value==""){c.style.display="block";c.innerHTML=YAHOO.EU.Shopping.locale.flightFormAlert4;f.focus();u(T,f);t=true}}if(V.value==""){c.style.display="block";c.innerHTML=YAHOO.EU.Shopping.locale.flightFormAlert1;V.focus();u(T,V);t=true}else{if(!O.checked&&m.value==""){c.style.display="block";c.innerHTML=YAHOO.EU.Shopping.locale.flightFormAlert1;m.focus();u(T,m);t=true}}var X=V.value.split("/");var n=m.value.split("/");var s=new Date(X[1]+"/"+X[0]+"/"+X[2]);var U=new Date(n[1]+"/"+n[0]+"/"+n[2]);if(!O.checked&&s>U){c.style.display="block";c.innerHTML=YAHOO.EU.Shopping.locale.flightFormAlert3;u(T,m);t=true}var Q=s.getTime()+24*3600*1000;var Z=U.getTime()+24*3600*1000;var q=350;var p=new Date();if(p.getTime()>Q){c.style.display="block";c.innerHTML=YAHOO.EU.Shopping.locale.flightFormAlert2;u(T,V);t=true}var d=p.getTime()+24*3600*1000*q;if(d<=Q){c.style.display="block";c.innerHTML=YAHOO.EU.Shopping.locale.flightFormAlert5;u(T,V);t=true}document.getElementById(D).value=f.value;var S=W.value.indexOf("(",1);var R=W.value.indexOf(")",S);if(S>0&&R>0&&(R-S)==4){document.getElementById(N).value=W.value.substring(S+1,R)}else{document.getElementById(N).value=W.value}S=f.value.indexOf("(",1);R=f.value.indexOf(")",S);if(S>0&&R>0&&(R-S)==4){document.getElementById(M).value=f.value.substring(S+1,R)}else{document.getElementById(M).value=f.value}if(!t){this.submit()}})}if(YAHOO.util.Dom.get("hotel-form")){var B=new YAHOO.Kelkoo.calendar(["hotel-departureDate","hotel-returnDate"],undefined,H);K();YAHOO.util.Event.addListener("hotel-departureDate","change",function(){G("hotel-departureDate")});YAHOO.Kelkoo.Travel.SuggestAsYouType.init("hotel-town","hotel-town-suggest","hotel-searchForm","170701");var A=YAHOO.util.Dom.get("hotel-form");YAHOO.util.Event.addListener("hotel-adv-link","click",function(R){YAHOO.util.Event.preventDefault(R);var Q=YAHOO.util.Dom.get("hotel-form");var P=YAHOO.util.Dom.getElementsByClassName("advanced","fieldset",Q);var O=P[0].style.display;if(O=="block"){YAHOO.util.Dom.removeClass(this,"activated")}else{YAHOO.util.Dom.addClass(this,"activated")}P[0].style.display=(O=="block")?"none":"block"});YAHOO.util.Event.addListener(A,"submit",function(d){function o(q,s){if(YAHOO.env.ua.ie==0){var p=12;var e=16;if(s.type&&s.type=="select-one"){p=24}YAHOO.util.Dom.setX(q,YAHOO.util.Dom.getX(s)+parseInt(YAHOO.util.Dom.getStyle(s,"width"))+p);YAHOO.util.Dom.setY(q,YAHOO.util.Dom.getY(s)+parseInt(YAHOO.util.Dom.getStyle(s,"height"))-e);q.style.visibility="visible"}}YAHOO.util.Event.preventDefault(d);var n=false;var X=YAHOO.util.Dom.get("hotel-error");var R=YAHOO.util.Dom.get("hotel-error-focus");var O=YAHOO.util.Dom.get("hotel-town");var T=YAHOO.util.Dom.get("hotel-departureDate");var Z=YAHOO.util.Dom.get("hotel-returnDate");var P=YAHOO.util.Dom.get("hotel-nbadults");var V=YAHOO.util.Dom.get("hotel-nbchilds");if(O.value==""){X.style.display="block";X.innerHTML=YAHOO.EU.Shopping.locale.hotelFormAlert4;O.focus();o(R,O);n=true}if(T.value==""){X.style.display="block";X.innerHTML=YAHOO.EU.Shopping.locale.hotelFormAlert1;T.focus();o(R,T);n=true}else{if(Z.value==""){X.style.display="block";X.innerHTML=YAHOO.EU.Shopping.locale.hotelFormAlert2;Z.focus();o(R,Z);n=true}}var U=T.value.split("/");var c=Z.value.split("/");var m=new Date(U[1]+"/"+U[0]+"/"+U[2]);var S=new Date(c[1]+"/"+c[0]+"/"+c[2]);if(m>S){X.style.display="block";X.innerHTML=YAHOO.EU.Shopping.locale.hotelFormAlert3;o(R,Z);n=true}var Q=m.getTime()+24*3600*1000;var W=S.getTime()+24*3600*1000;var g=350;var f=new Date();if(f.getTime()>Q){X.style.display="block";X.innerHTML=YAHOO.EU.Shopping.locale.hotelFormAlert2;o(R,T);n=true}var Y=f.getTime()+24*3600*1000*g;if(Y<=Q){X.style.display="block";X.innerHTML=YAHOO.EU.Shopping.locale.hotelFormAlert5;o(R,T);n=true}if(P.value==0){X.style.display="block";X.innerHTML=YAHOO.EU.Shopping.locale.hotelFormAlert6;o(R,P);n=true}if(!n){this.submit()}})}});