
var ygPos=new function()
{this.getPos=function(oEl)
{var pos=[oEl.offsetLeft,oEl.offsetTop];var parent=oEl.offsetParent;var tmp={x:null,y:null};if(parent!=oEl)
{while(parent)
{switch(browser)
{case'ie':if(_getStyle(parent,'position')=='relative'&&_getStyle(oEl,'width')=='auto'&&!(_getStyle(oEl,'position')!='static'))
{return[oEl.offsetLeft,oEl.offsetTop];}
else if(_getStyle(parent,'width')!='auto'||_getStyle(oEl.parentNode,'position')!='static')
{tmp.x=parseInt(_getStyle(parent,'borderLeftWidth'));tmp.y=parseInt(_getStyle(parent,'borderTopWidth'));if(!isNaN(tmp.x))pos[0]+=tmp.x;if(!isNaN(tmp.y))pos[1]+=tmp.y;}
break;case'gecko':if(_getStyle(parent,'position')=='relative')
{tmp.x=parseInt(_getStyle(parent,'border-left-width'));tmp.y=parseInt(_getStyle(parent,'border-top-width'));if(!isNaN(tmp.x))pos[0]+=tmp.x;if(!isNaN(tmp.y))pos[1]+=tmp.y;}
break;}
pos[0]+=parent.offsetLeft;pos[1]+=parent.offsetTop;parent=parent.offsetParent;}}
if(browser=='ie'&&_getStyle(oEl,'width')!='auto'&&_getStyle(oEl.offsetParent,'width')=='auto'&&_getStyle(oEl.offsetParent,'position')=='relative')
{parent=oEl.parentNode;while(parent.tagName!='HTML')
{tmp.x=parseInt(_getStyle(parent,'marginLeft'));tmp.y=parseInt(_getStyle(parent,'paddingLeft'));if(!isNaN(tmp.x))pos[0]-=tmp.x;if(!isNaN(tmp.y))pos[0]-=tmp.y;parent=parent.parentNode;}}
return pos;},this.getX=function(oEl){return this.getPos(oEl)[0];}
this.getY=function(oEl){return this.getPos(oEl)[1];}
this.setPos=function(oEl,endPos)
{var offset=[0,0];var delta={x:0,y:0};var curStylePos=_getStyle(oEl,'position');if(curStylePos=='static')
{oEl.style.position='relative';curStylePos='relative';}
if(oEl.offsetWidth){if(curStylePos=='relative')
{offset=this.getPos(oEl);var tmp={x:_getStyle(oEl,'left'),y:_getStyle(oEl,'top')};delta.x=(tmp.x&&tmp.x.indexOf('px')!=-1)?parseInt(tmp.x):0;delta.y=(tmp.y&&tmp.y.indexOf('px')!=-1)?parseInt(tmp.y):0;}
else
{offset=this.getPos(oEl.offsetParent);var tmp={x:_getStyle(oEl,'margin-left'),y:_getStyle(oEl,'margin-top')};delta.x=(tmp.x&&tmp.x.indexOf('px')!=-1)?0-parseInt(tmp.x):0;delta.y=(tmp.y&&tmp.y.indexOf('px')!=-1)?0-parseInt(tmp.y):0;}}
if(browser=='safari')
{if(oEl.offsetParent&&oEl.offsetParent.tagName=='BODY')
{if(_getStyle(oEl,'position')=='relative')
{delta.x-=document.body.offsetLeft;delta.y-=document.body.offsetTop;}
else if(_getStyle(oEl,'position')=='absolute'||_getStyle(oEl,'position')=='fixed')
{delta.x+=document.body.offsetLeft;delta.y+=document.body.offsetTop;}}}
if(endPos[0]!==null)oEl.style.left=endPos[0]-offset[0]+delta.x+'px';if(endPos[1]!==null)oEl.style.top=endPos[1]-offset[1]+delta.y+'px';}
this.setX=function(oEl,x){this.setPos(oEl,[x,null]);}
this.setY=function(oEl,y){this.setPos(oEl,[null,y]);}
var _getStyle=function(oEl,property)
{var dv=document.defaultView;if(oEl.style[property])return oEl.style[property];else if(oEl.currentStyle)
{if(property.indexOf('-')!=-1)
{property=property.split('-');property[1]=property[1].toUpperCase().charAt(0)+property[1].substr(1);property=property.join('');}
if(oEl.currentStyle[property])return oEl.currentStyle[property];}
else if(dv&&dv.getComputedStyle(oEl,'')&&dv.getComputedStyle(oEl,'').getPropertyValue(property))
return dv.getComputedStyle(oEl,'').getPropertyValue(property);return null;}
var _getBrowser=function()
{var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1)
return'opera';else if(ua.indexOf('msie')!=-1)
return'ie';else if(ua.indexOf('safari')!=-1)
return'safari';else if(ua.indexOf('gecko')!=-1)
return'gecko';else
return false;}
var browser=_getBrowser();}
var yui=window.yui||{};yui.CustomEvent=function(_1,_2){this.type=_1;this.scope=_2||window;this.subscribers=[];if(yui["Event"]){yui.Event.regCE(this);}};yui.CustomEvent.prototype.subscribe=function(fn,_4,_5){this.subscribers.push(new yui.Subscriber(fn,_4,_5));};yui.CustomEvent.prototype.unsubscribe=function(fn,_6){for(var i=0;i<this.subscribers.length;++i){var s=this.subscribers[i];if(s&&s.contains(fn,_6)){this._delete(i);}}};yui.CustomEvent.prototype.fire=function(){for(var i=0;i<this.subscribers.length;++i){var s=this.subscribers[i];if(s){var _9=(s.override)?s.obj:this.scope;s.fn.call(_9,this.type,arguments,s.obj);}}};yui.CustomEvent.prototype.unsubscribeAll=function(){for(var i=0;i<this.subscribers.length;++i){this._delete(i);}};yui.CustomEvent.prototype._delete=function(_10){var s=this.subscribers[_10];if(s){delete s.fn;delete s.obj;}delete this.subscribers[_10];};yui.Subscriber=function(fn,obj,_12){this.fn=fn;this.obj=obj||null;this.override=(_12);};yui.Subscriber.prototype.contains=function(fn,obj){return(this.fn==fn&&this.obj==obj);};yui=window.yui||{};yui.Event=new function(){var _13=this;this.loadComplete=false;this.listeners=[];this.delayedListeners=[];this.unloadListeners=[];this.customEvents=[];this.legacyEvents=[];this.legacyHandlers=[];this.EL=0;this.TYPE=1;this.FN=2;this.WFN=3;this.SCOPE=3;this.ADJ_SCOPE=4;this.isSafari=(navigator.userAgent.match(/safari/gi));this.isIE=(!this.isSafari&&navigator.userAgent.match(/msie/gi));this.addListener=function(el,_15,fn,_16,_17){if(this._isValidCollection(el)){var ok=true;for(var i=0;i<el.length;++i){ok=(this.on(el[i],_15,fn,_16,_17)&&ok);}return ok;}else{if(typeof el=="string"){if(this.loadComplete){el=this.getEl(el);}else{this.delayedListeners[this.delayedListeners.length]=[el,_15,fn,_16,_17];return true;}}}if(!el){return false;}if("unload"==_15&&_16!==this){this.unloadListeners[this.unloadListeners.length]=[el,_15,fn,_16,_17];return true;}var _19=(_17)?_16:el;var _20=function(e){return fn.call(_19,_13.getEvent(e),_16);};var li=[el,_15,fn,_20,_19];var _23=this.listeners.length;this.listeners[_23]=li;if(this.useLegacyEvent(el,_15)){var _24=this.getLegacyIndex(el,_15);if(_24==-1){_24=this.legacyEvents.length;this.legacyEvents[_24]=[el,_15,el["on"+_15]];this.legacyHandlers[_24]=[];el["on"+_15]=function(e){_13.fireLegacyEvent(_13.getEvent(e),_24);};}this.legacyHandlers[_24].push(_23);}else{if(el.addEventListener){el.addEventListener(_15,_20,false);}else{if(el.attachEvent){el.attachEvent("on"+_15,_20);}}}return true;};this.on=this.addListener;this.fireLegacyEvent=function(e,_25){var ok=true;var le=_13.legacyHandlers[_25];for(i=0;i<le.length;++i){var _27=le[i];if(_27){var li=_13.listeners[_27];var _28=li[_13.ADJ_SCOPE];var ret=li[_13.WFN].call(_28,e);ok=(ok&&ret);}}return ok;};this.getLegacyIndex=function(el,_30){for(var i=0;i<this.legacyEvents.length;++i){var le=this.legacyEvents[i];if(le&&le[0]==el&&le[1]==_30){return i;}}return-1;};this.useLegacyEvent=function(el,_31){return((!el.addEventListener&&!el.attachEvent)||(_31=="click"&&this.isSafari));};this.removeListener=function(el,_32,fn){if(typeof el=="string"){el=this.getEl(el);}else{if(this._isValidCollection(el)){var ok=true;for(var i=0;i<el.length;++i){ok=(this.removeListener(el[i],_32,fn)&&ok);}return ok;}}var _33=null;var _34=this._getCacheIndex(el,_32,fn);if(_34>=0){_33=this.listeners[_34];}if(!el||!_33){return false;}if(el.removeEventListener){el.removeEventListener(_32,_33[this.WFN],false);}else{if(el.detachEvent){el.detachEvent("on"+_32,_33[this.WFN]);}}delete this.listeners[_34][this.WFN];delete this.listeners[_34][this.FN];delete this.listeners[_34];return true;};this.getTarget=function(ev,_36){var t=ev.target||ev.srcElement;if(_36&&t&&"#text"==t.nodeName){return t.parentNode;}else{return t;}};this.getPageX=function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}return x;};this.getPageY=function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}return y;};this.getRelatedTarget=function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else{if(ev.type=="mouseover"){t=ev.fromElement;}}}return t;};this.getTime=function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(e){return t;}}return ev.time;};this.stopEvent=function(ev){this.stopPropagation(ev);this.preventDefault(ev);};this.stopPropagation=function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}};this.preventDefault=function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}};this.getEvent=function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}c=c.caller;}}return ev;};this.getCharCode=function(ev){return ev.charCode||(ev.type=="keypress")?ev.keyCode:0;};this._getCacheIndex=function(el,_41,fn){for(var i=0;i<this.listeners.length;++i){var li=this.listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==_41){return i;}}return-1;};this._isValidCollection=function(o){return(o&&o.length&&typeof o!="string"&&!o.alert&&!o.tagName&&typeof o[0]!="undefined");};this.elCache={};this.getEl=function(id){return document.getElementById(id);};this.clearCache=function(){for(i in this.elCache){delete this.elCache[i];}};this.regCE=function(ce){this.customEvents.push(ce);};this._load=function(e){_13.loadComplete=true;};this._tryPreloadAttach=function(){var _45=!this.loadComplete;for(var i=0;i<this.delayedListeners.length;++i){var d=this.delayedListeners[i];if(d){var el=this.getEl(d[this.EL]);if(el){this.on(el,d[this.TYPE],d[this.FN],d[this.SCOPE]);delete this.delayedListeners[i];}}}if(_45){setTimeout("yui.Event._tryPreloadAttach()",50);}};this._unload=function(e,me){for(var i=0;i<me.unloadListeners.length;++i){var l=me.unloadListeners[i];if(l){l[me.FN](me.getEvent(e),l[me.SCOPE]);}}if(me.listeners&&me.listeners.length>0){for(i=0;i<me.listeners.length;++i){l=me.listeners[i];if(l){me.removeListener(l[me.EL],l[me.TYPE],l[me.FN]);}}me.clearCache();}for(i=0;i<me.customEvents.length;++i){me.customEvents[i].unsubscribeAll();delete me.customEvents[i];}for(i=0;i<me.legacyEvents.length;++i){delete me.legacyEvents[i][0];delete me.legacyEvents[i];}};this._getScrollLeft=function(){return this._getScroll()[1];};this._getScrollTop=function(){return this._getScroll()[0];};this._getScroll=function(){var dd=document.documentElement;db=document.body;if(dd&&dd.scrollTop){return[dd.scrollTop,dd.scrollLeft];}else{if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}}};};if(document&&document.body){yui.Event._load();}else{yui.Event.on(window,"load",yui.Event._load,yui.Event);}yui.Event.on(window,"unload",yui.Event._unload,yui.Event);yui.Event._tryPreloadAttach();function ygAnim(_1,_2,_3){if(_1){this.init(_1,_2,_3);}}ygAnim.prototype={oDomRef:null,iTotalFrames:0,iCurrentFrame:0,animate:function(){ygAnimMgr.registerElement(this);},stop:function(){ygAnimMgr.stop(this);},isAnimated:function(){return this._isAnimated;},setFrameBased:function(_4){if(_4===false){this._isFrameBased=false;this.iTotalFrames=ygAnimMgr.fps*this._units;}else{this._isFrameBased=true;this.iTotalFrames=this._units;}if(this.aTween){this.cacheTween();}},handleOptions:function(){},createTween:function(){},cacheTween:function(){},doTween:function(){},onStart:function(){},onTween:function(){},onComplete:function(){},init:function(el,_6,_7){if(el){this.oDomRef=el;}if(_6){this._units=_6;}if(_7){this.handleOptions(_7);}if(_6===null){this.iTotalFrames=null;}else{this.iTotalFrames=ygAnimMgr.fps*_6;}},getStyle:function(_8){var dv=document.defaultView;if(this.oDomRef.style[_8]){return this.oDomRef.style[_8];}else{if(this.oDomRef.currentStyle){if(_8.indexOf("-")!=-1){_8=_8.split("-");for(var i=1;i<_8.length;++i){_8[i]=_8[i].toUpperCase().charAt(0)+_8[i].substr(1);}_8=_8.join("");}if(this.oDomRef.currentStyle[_8]){return this.oDomRef.currentStyle[_8];}}else{if(dv&&dv.getComputedStyle&&dv.getComputedStyle(this.oDomRef,"").getPropertyValue(_8)){return dv.getComputedStyle&&dv.getComputedStyle(this.oDomRef,"").getPropertyValue(_8);}}}},_isAnimated:false,_isFrameBased:false};ygAnimMgr=new function(){this.fps=200;this.iDelay=1;var _11=null;var _12=[];var _13=0;var _14=this;this.registerElement=function(o){if(o._isAnimated){return false;}_12[_12.length]=o;_13+=1;o._isAnimated=true;o.onStart();o._startTime=new Date();this.start();};this.start=function(){if(_11===null){_11=setInterval(this.run,this.iDelay);}};this.stop=function(o){if(!o){clearInterval(_11);for(var i=0,len=_12.length;i<len;++i){_12[i]._isAnimated=false;}_12=[];_11=null;_13=0;}else{o._isAnimated=false;o.iCurrentFrame=0;o.onComplete();_13-=1;if(_13<=0){_14.stop();}}};this.run=function(){for(var i=_12.length-1;i>=0;--i){var o=_12[i];if(!o||!o._isAnimated){continue;}if(o.iCurrentFrame<o.iTotalFrames||o.iTotalFrames===null){var _16=(new Date()-o._startTime);var _17=(o.iCurrentFrame*o._units*1000/o.iTotalFrames);var _18=0;if(_16<o._units*1000){_18=Math.round((_16/_17-1)*o.iCurrentFrame);}else{_18=o.iTotalFrames-(o.iCurrentFrame+1);}if(_18>0&&isFinite(_18)){if(o.iCurrentFrame+_18>=o.iTotalFrames){_18=o.iTotalFrames-(o.iCurrentFrame+1);}o.iCurrentFrame+=_18;if(o._t){o._t+=_18*(1/(o.iTotalFrames-1));}}o.doTween();o.onTween();o.iCurrentFrame+=1;}else{ygAnimMgr.stop(o);}}};};ygBezier=new function(){this.getPosition=function(_19,t){var _21=[];var n=_19.length;for(var i=0;i<n;++i){_21[i]=[_19[i][0],_19[i][1]];}for(var j=1;j<n;++j){for(i=0;i<n-j;++i){_21[i][0]=(1-t)*_21[i][0]+t*_21[parseInt(i+1)][0];_21[i][1]=(1-t)*_21[i][1]+t*_21[parseInt(i+1)][1];}}return{x:_21[0][0],y:_21[0][1]};};};ygAnim_Move.prototype=new ygAnim();function ygAnim_Move(el,_24,_25){if(el){this.init(el,_24,_25);}}ygAnim_Move.prototype.doTween=function(){var p={};if(!this.oDomRef){ygAnimMgr.stop(this);return false;}if(!this.aTween||!this.aTween[this.iCurrentFrame]){if(this.iCurrentFrame===0){this._t=0;}p=this._getPoint(this._t);this._t+=1/(this.iTotalFrames-1);}else{p=this.aTween[this.iCurrentFrame];}this.oDomRef.style.left=p.x+"px";this.oDomRef.style.top=p.y+"px";};ygAnim_Move.prototype.createTween=function(_27){var t=0;var _28=[];if(_27){for(var i=0;i<this.iTotalFrames;++i){_28[i]={};var p=this._getPoint(t);_28[i].x=p.x;_28[i].y=p.y;t+=1/(this.iTotalFrames-1);}}return _28;};ygAnim_Move.prototype.cacheTween=function(){this.aTween=this.createTween(this._points,this.iTotalFrames);};ygAnim_Move.prototype.handleOptions=function(_29){this.setPoints(_29);};ygAnim_Move.prototype.setPoints=function(_30){if(_30.length==2){if(typeof _30[0]=="number"){_30=[_30];}}var _31=this._getPos();_30.unshift(_31);this._points=_30;if(this.aTween){this.cacheTween();}};ygAnim_Move.prototype.setStart=function(_32){this._points[0]=_32;if(this.aTween){this.cacheTween();}};ygAnim_Move.prototype._getPoint=function(t){var _33={};var _34=null;if(this.getStyle("position")!="relative"&&this.oDomRef.offsetWidth){_34=this.oDomRef.offsetParent;}var _35={x:0,y:0};while(_34&&_34.tagName!="HTML"&&_34.tagName!="BODY"){_35.x+=_34.offsetLeft;_35.y+=_34.offsetTop;_34=_34.offsetParent;}var pos=ygBezier.getPosition(this._points,t);_33.x=Math.round(pos.x)-_35.x;_33.y=Math.round(pos.y)-_35.y;return _33;};ygAnim_Move.prototype._getPos=function(){var pos=[0,0];if(this.getStyle("position")&&this.getStyle("position")=="relative"){if(this.getStyle("left").indexOf("px")!=-1){pos[0]=parseInt(this.getStyle("left"));}else{pos[0]=0;}if(this.getStyle("top").indexOf("px")!=-1){pos[1]=parseInt(this.getStyle("top"));}else{pos[1]=0;}}else{if(typeof ygPos!="undefined"){pos=ygPos.getPos(this.oDomRef);}else{if(this.oDomRef.offsetWidth){pos=[this.oDomRef.offsetLeft,this.oDomRef.offsetTop];var _37=this.oDomRef.offsetParent;if(_37!=this.oDomRef){while(_37){pos[0]+=_37.offsetLeft;pos[1]+=_37.offsetTop;_37=_37.offsetParent;}}}}}return pos;};ygAnim_Size.prototype=new ygAnim();function ygAnim_Size(el,_38,_39){if(el){this.init(el,_38,_39);}}ygAnim_Size.prototype.doTween=function(){var p={};if(!this.oDomRef){ygAnimMgr.stop(this);return false;}if(!this.aTween||!this.aTween[this.iCurrentFrame]){if(this.iCurrentFrame===0){this._t=0;}p=ygBezier.getPosition(this._sizes,this._t);this._t+=1/(this.iTotalFrames-1);}else{p=this.aTween[this.iCurrentFrame];}this.oDomRef.style.width=Math.round(p.x)+"px";this.oDomRef.style.height=Math.round(p.y)+"px";};ygAnim_Size.prototype.createTween=function(_40){var t=0;var _41=[];if(_40){for(var i=0;i<this.iTotalFrames;++i){_41[i]=ygBezier.getPosition(_40,t);t+=1/(this.iTotalFrames-1);}}return _41;};ygAnim_Size.prototype.cacheTween=function(){this.aTween=this.createTween(this._sizes,this.iTotalFrames);};ygAnim_Size.prototype.handleOptions=function(_42){this.setSizes(_42);};ygAnim_Size.prototype.setSizes=function(_43){if(_43.length==2){if(typeof _43[0]=="number"){_43=[_43];}}var _44=this._getSize();_43.unshift(_44);this._sizes=_43;if(this.aTween){this.cacheTween();}};ygAnim_Size.prototype.setStart=function(_45){this._sizes[0]=_45;if(this.aTween){this.cacheTween();}};ygAnim_Size.prototype._getSize=function(){var _46=[0,0];if(this.getStyle("width")&&this.getStyle("width").indexOf("px")!=-1){_46[0]=parseInt(this.getStyle("width"));}else{if(this.oDomRef.offsetWidth){_46[0]=this.oDomRef.offsetWidth;}}if(this.getStyle("height")&&this.getStyle("height").indexOf("px")!=-1){_46[1]=parseInt(this.getStyle("height"));}else{if(this.oDomRef.offsetHeight){_46[1]=this.oDomRef.offsetHeight;}}return _46;};ygAnim_Fade.prototype=new ygAnim();function ygAnim_Fade(el,_47,_48){if(el){if(_48===0){_48=0.01;}this.init(el,_47,_48);this.iTotalFrames=50*_47;}}ygAnim_Fade.prototype.doTween=function(){var p={};if(!this.oDomRef){ygAnimMgr.stop(this);return false;}if(!this.aTween||!this.aTween[this.iCurrentFrame]){if(this.iCurrentFrame===0){this._t=0;}p=ygBezier.getPosition(this._opac,this._t);this._t+=1/(this.iTotalFrames-1);}else{p=this.aTween[this.iCurrentFrame];}p.x=Math.round(p.x*100)/100;this.oDomRef.style.filter="alpha(opacity="+p.x*100+")";this.oDomRef.style.opacity=p.x;this.oDomRef.style["-moz-opacity"]=p.x;this.oDomRef.style["-khtml-opacity"]=p.x;};ygAnim_Fade.prototype.createTween=function(_49){var t=0;var _50=[];for(var i=0;i<this.iTotalFrames;++i){_50[i]=ygBezier.getPosition(this._opac,t);t+=1/(this.iTotalFrames-1);}return _50;};ygAnim_Fade.prototype.cacheTween=function(){this.aTween=this.createTween(this._opac,this.iTotalFrames);};ygAnim_Fade.prototype.handleOptions=function(_51){this.setOpac(_51);};ygAnim_Fade.prototype.setOpac=function(_52){if(typeof _52=="number"){_52=[[_52,1]];}else{for(var i=0;i<_52.length;++i){_52[i]=[_52[i],1];}}var _53=[this._getOpac(),1];_52.unshift(_53);this._opac=_52;if(this.aTween){this.cacheTween();}};ygAnim_Fade.prototype.setStart=function(_54){if(_54==="0"){_54=0.01;}else{if(_54=="1"){_54=0.99;this.oDomRef.style.opacity=_54;}}this._opac[0]=[_54,1];if(this.aTween){this.cacheTween();}};ygAnim_Fade.prototype._getOpac=function(){var _55;if(this.getStyle("opacity")){_55=this.getStyle("opacity");}else{if(this.getStyle("-moz-opacity")){_55=this.getStyle("-moz-opacity");}else{_55=0.99;}}if(_55=="0"){_55=0.01;}else{if(_55=="1"){_55=0.99;this.oDomRef.style.opacity=_55;}}return _55;};ygAnim_Scroll.prototype=new ygAnim();function ygAnim_Scroll(el,_56,_57){if(el){this.init(el,_56,_57);}}ygAnim_Scroll.prototype.doTween=function(){var p={};if(!this.oDomRef){ygAnimMgr.stop(this);return false;}if(!this.aTween||!this.aTween[this.iCurrentFrame]){if(this.iCurrentFrame===0){this._t=0;}p=ygBezier.getPosition(this._points,this._t);this._t+=1/(this.iTotalFrames-1);}else{p=this.aTween[this.iCurrentFrame];}this.oDomRef.scrollLeft=p.x;this.oDomRef.scrollTop=p.y;};ygAnim_Scroll.prototype.createTween=function(_58){var t=0;var _59=[];if(_58){for(var i=0;i<this.iTotalFrames;++i){_59[i]={};var p=this._getPoint(t);_59[i].x=p.x;_59[i].y=p.y;t+=1/(this.iTotalFrames-1);}}return _59;};ygAnim_Scroll.prototype.cacheTween=function(){this.aTween=this.createTween(this._points,this.iTotalFrames);};ygAnim_Scroll.prototype.handleOptions=function(_60){this.setPoints(_60);};ygAnim_Scroll.prototype.setPoints=function(_61){if(_61.length==2){if(typeof _61[0]=="number"){_61=[_61];}}var _62=[this.oDomRef.scrollLeft,this.oDomRef.scrollTop];_61.unshift(_62);this._points=_61;if(this.aTween){this.cacheTween();}};ygAnim_Scroll.prototype.setStart=function(_63){this._points[0]=_63;if(this.aTween){this.cacheTween();}};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(objectId,transactionId)
{var obj,http;try
{http=new XMLHttpRequest();obj={conn:http,oId:objectId,tId:transactionId};}
catch(e)
{for(var i=0;i<this._msxml_progid.length;++i){try
{http=new ActiveXObject(this._msxml_progid[i]);obj={conn:http,oId:objectId,tId:transactionId};}
catch(e){}}}
finally
{if(http!=undefined||obj!=undefined){var connObj=arguments.length>0?obj:http;return connObj;}
else{return null;}}},setProgId:function(id)
{this.msxml_progid.unshift(id);},syncRequest:function(o,sMethod,sUri,bXml,oPostData)
{if(!o){return;}
o.conn.open(sMethod,sUri,false);if(this._http_header.length>0)
this.setHeader(o);if(this._isFormPost){oPostData=this._sFormData;this._isFormPost=false;}
else if(oPostData){this.initHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');}
oPostData?o.conn.send(oPostData):o.conn.send(null);try
{if(o.conn.status==200){response=(bXml?o.conn.responseXML:o.conn.responseText);}
else{response=this.connectException(o);}}
catch(e)
{response=this.connectException(e,o.tId);}
finally
{ygConnect.superclass.releaseObject(o);return response;}},asyncRequest:function(o,sMethod,sUri,bXml,oCallback,oCallbackArgs,oPostData)
{if(!o){var queueObject={method:sMethod,uri:sUri,isXml:bXml,callback:oCallback,argument:oCallbackArgs,data:oPostData}
ygConnect.superclass.queueRequest(queueObject);}
else{var self=this;o.conn.open(sMethod,sUri,true);if(oCallback){o.conn.onreadystatechange=function()
{if(o.conn.readyState==4){try
{if(o.conn.status==200){oCallback(o.conn,o.tId,oCallbackArgs);}
else{var errorObj=self.connectException(o);oCallback(errorObj,oCallbackArgs);}}
catch(e)
{var errorObj=self.connectException(e,o.tId);oCallback(errorObj,oCallbackArgs);}
finally
{ygConnect.superclass.releaseObject(o);}}}}
else{o.conn.onreadystatechange=function(){self.stateChange(o,bXml)}}
if(this._http_header.length>0){this.setHeader(o);}
if(this._isFormPost){oPostData=this._sFormData;this._isFormPost=false;}
else if(oPostData){this.initHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');}
oPostData?o.conn.send(oPostData):o.conn.send(null);}},stateChange:function(o,bXml)
{var oResponse;switch(o.conn.readyState){case 4:try
{if(o.conn.status==200){oResponse={tId:o.tId,status:o.conn.status,message:(bXml?o.conn.responseXML:o.conn.responseText)}}
else
oResponse=this.connectException(o);}
catch(e)
{oResponse=this.connectException(e,o.tId);}
finally
{this.setResponse(oResponse);ygConnect.superclass.releaseObject(o);}
break;}},setResponse:function(o)
{this._async_response[o.tId]=o;},getResponse:function(tId)
{var oResponse=this._async_response[tId];if(oResponse){delete this._async_response[tId];return oResponse;}},initHeader:function(label,value)
{var oHeader=[label,value];this._http_header.push(oHeader);},setHeader:function(o)
{var oHeader=this._http_header;for(var i=0;i<oHeader.length;i++)
o.conn.setRequestHeader(oHeader[i][0],oHeader[i][1]);oHeader.splice(0,oHeader.length);},getHeader:function(o,label)
{return o.conn.getResponseHeader(label);},getAllHeaders:function(o)
{return o.conn.getAllResponseHeaders();},setForm:function(formName)
{this._sFormData='';var prevElName;var oForm=document.forms[formName];for(var i=0;i<oForm.elements.length;i++){oElement=oForm.elements[i];elName=oForm.elements[i].name;elValue=oForm.elements[i].value;switch(oElement.type)
{case'select-multiple':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected){this._sFormData+=encodeURIComponent(elName)+'='+encodeURIComponent(oElement.options[j].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(o)
{if(this.isCallInProgress(o)){o.conn.abort();ygConnect.superclass.releaseObject(o);}},isCallInProgress:function(o)
{if(o)
return o.conn.readyState!=4&&o.conn.readyState!=0;},connectException:function(o,transactionId)
{if(o.conn){return{tId:o.tId,status:o.conn.status,message:o.conn.statusText}}
else{return{tId:transactionId,status:o.name,message:o.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(i)
{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 o;var oId;var tId=this.getTransactionId();if(this._enable_pool){try
{if(window.XMLHttpRequest){oId=this._object_count;o=this.http.getConnObject(oId,tId);if(o){this.incrTransactionId();}
return o;}
else if(window.ActiveXObject){return this.getActiveXObject();}}
catch(e)
{return this.getActiveXObject();}}
else{return this.http.getConnObject();}}
ygConnManager.prototype.getActiveXObject=function()
{var o;var oId;var tId=this.getTransactionId();if(this._object_count<this._max_pool_size&&this._available_pool.length==0){oId=this._object_count;o=this.http.getConnObject(oId,tId);if(o){this.incrObjCount();this.incrTransactionId();}}
else if(this._available_pool.length>0){o=this.getAvailableObject();if(o){o.tId=tId;this.incrTransactionId();}}
return o;}
ygConnManager.prototype.getAvailableObject=function()
{return this._available_pool.shift();}
ygConnManager.prototype.releaseObject=function(o)
{try
{if(window.XMLHttpRequest){o=null;}
else{o.conn.onreadystatechange=detachStateListener;this._available_pool.push(o);}}
catch(e)
{o.conn.onreadystatechange=detachStateListener;this._available_pool.push(o);}
finally
{this.checkRequestQueue();}}
ygConnManager.prototype.checkRequestQueue=function()
{if(this._request_queue.length>0){var o=this.getObject();var q=this._request_queue.shift();this.http.asyncRequest(o,q.method,q.uri,q.isXml,q.callback,q.argument,q.data);}}
ygConnManager.prototype.queueRequest=function(o)
{this._request_queue.push(o);}
function detachStateListener(){return null;}
ygAnim_Size.prototype=new ygAnim();function ygAnim_Size(el,units,sizes,MeasureUnit)
{if(el){this.init(el,units,sizes);}
if(MeasureUnit){this.setMeasureUnit(MeasureUnit);}else{this.setMeasureUnit('px');}};ygAnim_Size.prototype.setMeasureUnit=function(new_unit)
{if(typeof(new_unit)=='object'){this.MeasureUnitX=new_unit[0];this.MeasureUnitY=new_unit[1];}else{this.MeasureUnitX=new_unit;this.MeasureUnitY=new_unit;}};ygAnim_Size.prototype.doTween=function()
{var p={};if(!this.oDomRef)
{ygAnimMgr.stop(this);return false;}
if(!this.aTween||!this.aTween[this.iCurrentFrame])
{if(this.iCurrentFrame===0){this._t=0;}
p=ygBezier.getPosition(this._sizes,this._t);this._t+=1/(this.iTotalFrames-1);}
else
{p=this.aTween[this.iCurrentFrame];}
this.oDomRef.style.height=Math.round(p.y)+this.MeasureUnitY;};ygAnim_Size.prototype.createTween=function(sizes)
{var t=0;var tween=[];if(sizes)
{for(var i=0;i<this.iTotalFrames;++i)
{tween[i]=ygBezier.getPosition(sizes,t);t+=1/(this.iTotalFrames-1);}}
return tween;};ygAnim_Size.prototype.cacheTween=function()
{this.aTween=this.createTween(this._sizes,this.iTotalFrames);};ygAnim_Size.prototype.handleOptions=function(options){this.setSizes(options);};ygAnim_Size.prototype.setSizes=function(sizes)
{if(sizes.length==2)
{if(typeof sizes[0]=='number'){sizes=[sizes];}}
var start=this._getSize();sizes.unshift(start);this._sizes=sizes;if(this.aTween){this.cacheTween();}};ygAnim_Size.prototype.setStart=function(size)
{this._sizes[0]=size;if(this.aTween){this.cacheTween();}};ygAnim_Size.prototype._getSize=function()
{var size=[0,0];if(this.getStyle('width'))
{size[0]=parseInt(this.getStyle('width'));}
else if(this.oDomRef.offsetWidth)
{size[0]=this.oDomRef.offsetWidth;}
if(this.getStyle('height'))
{size[1]=parseInt(this.getStyle('height'));}
else if(this.oDomRef.offsetHeight)
{size[1]=this.oDomRef.offsetHeight;}
return size;};function kk_trim(s){while(s.substring(0,1)==' '){s=s.substring(1,s.length);}
while(s.substring(s.length-1,s.length)==' '){s=s.substring(0,s.length-1);}
return s;}
var kk_msf=function(form_name){this.sFormName=form_name;this.oForm=document.getElementById('msf'+this.sFormName);this.oSettings={};this.iDataStep=0;this.oTabs={};this.eComplete=new yui.CustomEvent('complete',this);this.oForm.get=function(id){childs=this.getElementsByTagName("*");for(var i=0;i<childs.length;i++){if((childs[i].id&&childs[i].id==id)||(childs[i].name&&childs[i].name==id)){return childs[i];}}
for(var i=0;i<this.length;i++){if((this[i].id&&this[i].id==id)||(this[i].name&&this[i].name==id)){return this[i];}}
return false;}
this.oLoadingAnimation=this.oForm.get('loading_animation');this.search_form_result_url=this.oForm.action;this.oDatas=[];this.roundCorners=function(obj){if(!obj)
var obj=document.body;for(var c=0;c<obj.childNodes.length;c++){var o=obj.childNodes[c];if((o.id&&o.id!='debug')&&o.childNodes)
this.roundCorners(o);if(o.nodeType==1){if(o.className.indexOf('rounded')!=-1){o.innerHTML+='<div id="ctl"><div id="quadtl">&bull;</div></div><div id="cbl"><div id="quadbl">&bull;</div></div><div id="ctr"><div id="quadtr">&bull;</div></div><div id="cbr"><div id="quadbr">&bull;</div></div>';o.style.position='relative';}}}}
this.progressing=function(moment){if(moment=='start'){this.iPos=0;this.oMover=this.oForm.get("mover");this.iMoverId=setInterval("kk_msf_"+this.sFormName+".progressing()",50);}else if(moment=='stop'){clearInterval(this.iMoverId);}else{if(++this.iPos>29)
this.iPos=0;this.oMover.style.left=(this.iPos-60)+'px';}}
this.kk_search_form_update_callback=function(){if(typeof(arguments[0].responseXML)!='object'){me=arguments[1][0];me.kk_loading_animation('stop');if(me.oForm.postcode){me.oForm.postcode.disabled=false;}
return;}
me=arguments[2][0];url=arguments[2][1];response=arguments[0].responseXML.documentElement;param_search=response.getElementsByTagName('offers')[0];me.updateNbOffers(param_search.getAttribute('nboffers'));me.oForm.action=param_search.getAttribute('href');drop_downs_to_build=response.getElementsByTagName('Attribute');me.search_form_result_url=param_search.getAttribute('href');me.searchButtonEnable();me.iDataStep++;me.oDatas[me.iDataStep]=[];me.oDatas[me.iDataStep]['initial_nb_offers']=param_search.getAttribute('nboffers');me.oDatas[me.iDataStep]['form_action']=param_search.getAttribute('href');me.oDatas[me.iDataStep]['url']=url;me.oDatas[me.iDataStep]['back_url']=[];for(i=0;i<drop_downs_to_build.length;i++){input_name=drop_downs_to_build[i].getAttribute('name');backHref=drop_downs_to_build[i].getAttribute('backHref');if(backHref&&backHref!=''&&backHref!=null){me.oDatas[me.iDataStep]['back_url'][input_name]=backHref;}else{me.oDatas[me.iDataStep]['back_url'][input_name]='';}
values=drop_downs_to_build[i].getElementsByTagName('Entry');me.oDatas[me.iDataStep][input_name]=[];if(me.oForm.get(input_name)!=false&&input_name!='tabFilters'){me.oDatas[me.iDataStep][input_name][0]=[me.oForm.get(input_name).options[0].text,me.oForm.get(input_name).options[0].value];}
for(var j=0;j<values.length;j++){if(me.oDatas[me.iDataStep][input_name].length)
k=me.oDatas[me.iDataStep][input_name].length;else
k=0;if(!(input_name=='tabFilters'&&values[j].getAttribute('selected')&&values[j].getAttribute('selected')!='selected'&&(values[j].getAttribute('href')&&(values[j].getAttribute('href')==''||values[j].getAttribute('href')==me.oSettings.sUrlPrefix)))){me.oDatas[me.iDataStep][input_name][k]=[values[j].firstChild.nodeValue,values[j].getAttribute('href')];}
if(input_name=='tabFilters'){if(values[j].getAttribute('selected')=='selected'){me.oSettings.iSelectedTab=k;}}}}
me.populateDropdowns(me.oDatas[me.iDataStep]);if(me.oForm.postcode){me.oForm.postcode.disabled=false;}
me.kk_loading_animation('stop');}
var save_option=new Array();this.kk_search_form_update=function(url){this.kk_search_form_ajax=ygConn.getObject();this.kk_loading_animation('start');for(i=0;i<this.oForm.length;i++){if(this.oForm[i].type&&this.oForm[i].type=='select-one'){this.oForm[i].disabled=true;save_option=this.oForm[i][this.oForm[i].selectedIndex];var save_default_option=this.oForm[i][0];this.oForm[i].length=0;this.oForm[i].options[0]=save_default_option;if(save_option!=save_default_option){this.oForm[i].options[1]=save_option;this.oForm[i].options[1].selected=true;}else{this.oForm[i].options[0].selected=true;}}}
if(this.oForm.postcode){this.oForm.postcode.disabled=true;}
this.searchButtonDisable();url=this.addArguments(url)+'&keepParams=true';ygConn.http.asyncRequest(this.kk_search_form_ajax,'GET',url,true,this.kk_search_form_update_callback,[this,url],null);}
version=0;if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");version=parseFloat(temp[1]);}
if(version>=5.5){document.write('<IFRAME id="hacking_iframe" style="POSITION: absolute;LEFT: -1000px;" src="javascript:false;" frameBorder="0" scrolling="no"></IFRAME>');document.hacking_iframe=document.getElementById('hacking_iframe');document.hacking_iframe.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';document.hacking_iframe.style.width='250px';document.hacking_iframe.style.height='200px';}else{document.hacking_iframe=false;}
this.oLoadingAnimation.style.filter='alpha(opacity=1)';this.oLoadingAnimation.style.opacity=0.01;this.oLoadingAnimation.style['-moz-opacity']=0;this.oLoadingAnimation.style['-khtml-opacity']=0;this.kk_loading_animation=function(moment){if(!this.oSettings.bDisplayLoading)
return;var SFD_position=ygPos.getPos(this.oForm.get('normal_search_form'));if(moment=='start'){this.progressing('start');ygPos.setPos(this.oLoadingAnimation,SFD_position);if(document.hacking_iframe!=false){if(this.sFormName=='colLeftHome'||this.sFormName=='colLeftHomeWL'){adding_px=200;}else{adding_px=50;}
ygPos.setPos(document.hacking_iframe,[SFD_position[0]+adding_px,SFD_position[1]]);}
var oAnim=new ygAnim_Fade(this.oLoadingAnimation,0.6,0.9);oAnim.animate();}else if(moment=='stop'||moment=='force'){if(!this.state_search_button||moment=='force'){var oAnim=new ygAnim_Fade(this.oLoadingAnimation,0.4,0);oAnim.onComplete=function(){ygPos.setPos(this.oDomRef,[-1000,SFD_position[1]]);if(document.hacking_iframe!=false){ygPos.setPos(document.hacking_iframe,[-1000,SFD_position[1]]);}}
oAnim.animate();this.progressing('stop');}else{setTimeout("kk_msf_"+this.sFormName+".kk_loading_animation('force')",500);}}}
this.kk_search_form_switch_state=0;var speed_effect=15;this.kk_search_form_switch_option=function(link_adv_option){this.expand_this=function(element_name,final_height,measure_unit){element_to_expand=this.oForm.get(element_name);stable_width=100;if(parseInt(element_to_expand.style.height)>0){final_measures=[stable_width,0];}else{final_measures=[stable_width,final_height];}
var oAnim=new ygAnim_Size(element_to_expand,speed_effect,final_measures,['%',measure_unit]);oAnim.setFrameBased(true);oAnim.animate();}
if(this.kk_search_form_switch_state==0){link_adv_option.innerHTML=this.oSettings.sAdvSearchBack;if(this.oSettings.iAdvFiltersSize>0){this.expand_this('to_show',((((Math.floor(this.oSettings.iAdvFiltersSize)*this.oSettings.iAdvHeightRatio)+0.5)*23)+18),'px');}
this.kk_search_form_switch_state=1;}else{this.expand_this('to_show',0,'px');link_adv_option.innerHTML=this.oSettings.sAdvSearch;this.kk_search_form_switch_state=0;}}
this.rs_form=function(){this.abortCall();this.searchButtonDisable();if(this.oForm.postcode){this.oForm.postcode.value=this.oSettings.sInitialPostCode;}
if(this.oSettings.sTabsMode=='normal'){this.oTabs=this.oForm.get('search_tabs');}
this.search_form_result_url=this.oForm.action;this.updateNbOffers(this.oDatas[0]['initial_nb_offers']);this.populateDropdowns(this.oDatas[0],true);this.iDataStep=0;}
this.back=function(){this.iDataStep--;if(this.iDataStep<1){this.rs_form();}else{this.kk_search_form_update(this.oDatas[this.iDataStep]['url']);this.iDataStep--;}}
this.updateNbOffers=function(sNbOffers){this.oForm.get('totalOffersCount').innerHTML=sNbOffers;}
this.removeFilter=function(e,oKk_msf){regex=new RegExp(/remove_(.+)/)
filter_name=regex.exec(this.id);filter_name=filter_name[1];yui.Event.removeListener(this,'click',oKk_msf.clickOnTab);oKk_msf.kk_search_form_update(oKk_msf.oDatas[oKk_msf.iDataStep]['back_url'][filter_name]);}
this.toggleRemoveButton=function(sFilterName,sBackUrl){if(this.oSettings.bDisplayRemoveFilter){removeButton=this.oForm.get('remove_'+sFilterName);if(removeButton){yui.Event.removeListener(removeButton,'click',this.removeFilter);if(sBackUrl!==false){removeButton.src=this.oSettings.sRemoveButtonSrc;yui.Event.addListener(removeButton,'click',this.removeFilter,this);}else{removeButton.src=this.oSettings.sRemoveButtonDisabledSrc;}}}else{return;}}
this.populateDropdowns=function(oData,bReset){for(i=0;i<this.oForm.length;i++){if(this.oForm[i].type&&this.oForm[i].type=='select-one'){name=this.oForm[i].name;if(oData['back_url']&&oData['back_url'][name]){this.toggleRemoveButton(name,oData['back_url'][name]);}else{this.toggleRemoveButton(name,false);}
if(oData[name]){for(j=0;j<oData[name].length;j++){url=oData[name][j][1];if(url.indexOf(this.oSettings.sUrlPrefix)==-1){url=this.oSettings.sUrlPrefix+url;}
this.oForm[i].options[j]=new Option(oData[name][j][0],url);}
if(j>2){this.oForm[i].disabled=false;this.oForm[i].options[0].selected=true;}else{if(bReset){this.oForm[i].options[0].selected=true;}else{this.oForm[i].options[this.oForm[i].options.length-1].selected=true;}
this.oForm[i].disabled=true;}
if(name=='tabFilters'&&this.oSettings.sTabsMode=='dropdown'){this.oForm[i].options[this.oSettings.iSelectedTab].selected=true;}}else{this.oForm[i].disabled=true;}}}
if(oData.tabFilters&&this.oSettings.sTabsMode=='normal'){this.updateTabs(oData.tabFilters);}}
this.updateTabs=function(oDataFilters){if(this.oSettings.sTabsMode!='normal')
return;tabs=this.oTabs.getElementsByTagName('H4');for(i=0;i<tabs.length;i++){data=oDataFilters[i];if(i==this.oSettings.iSelectedTab){tabs[i].className='tab_on';tabs[i].innerHTML=data[0];}else{tabs[i].className='tab_off';tabs[i].innerHTML='<a href="#">'+data[0]+'</a>';activeTab=tabs[i].getElementsByTagName('A');yui.Event.addListener(activeTab[0],'click',this.clickOnTab,this);url=data[1];if(url=='root')
url='';if(url.indexOf(this.oSettings.sUrlPrefix)==-1){url=this.oSettings.sUrlPrefix+url;}
activeTab[0].value=url;}
if(i==0){tabs[i].className+=' first';}}}
this.clickOnTab=function(e,oKk_msf){activeTabs=oKk_msf.oTabs.getElementsByTagName('A');for(i=0;i<activeTabs.length;i++){yui.Event.removeListener(activeTabs[i],'click',oKk_msf.clickOnTab);activeTabs[i].className='tab_off';}
this.className='tab_on';oKk_msf.kk_search_form_update(this.value);}
this.resetTabs=function(){if(this.oSettings.sTabsMode!='normal'){return;}
activeTabs=this.oTabs.getElementsByTagName('A');for(i=0;i<activeTabs.length;i++){yui.Event.addListener(activeTabs[i],'click',this.clickOnTab,this);activeTabs[i].value=activeTabs[i].href;activeTabs[i].href='#';}}
this.abortCall=function(){if(this.kk_search_form_ajax&&ygConn.http.isCallInProgress(this.kk_search_form_ajax)){ygConn.http.abort(this.kk_search_form_ajax);}}
this.addArguments=function(url){if(url.indexOf('?')!=-1){url+='&'+this.oSettings.sUrlSuffix;}else{url+='?'+this.oSettings.sUrlSuffix;}
return url;}
this.searchButtonEnable=function(){yui.Event.addListener(this.oForm.get('search_form_view_result'),'click',this.submit,this);this.oForm.get('search_form_view_result').innerHTML='<img src="'+this.oSettings.sSearchButtonSrc+'" title="'+this.oSettings.sSearchButtonAlt+'">';this.oForm.get('reset').src=this.oSettings.sResetButtonSrc;this.oForm.get('back').src=this.oSettings.sBackButtonSrc;yui.Event.addListener(this.oForm.get('back'),'click',this.back,this,true);yui.Event.addListener(this.oForm.get('reset'),'click',this.rs_form,this,true);this.state_search_button=true;}
this.searchButtonDisable=function(){this.oForm.get('search_form_view_result').innerHTML='<img onclick="alert(\''+this.oSettings.sSearchButtonDisabledAlt+'\');" src="'+this.oSettings.sSearchButtonDisabledSrc+'" title="'+this.oSettings.sSearchButtonDisabledAlt+'">';this.oForm.get('reset').src=this.oSettings.sResetButtonDisabledSrc;this.oForm.get('back').src=this.oSettings.sBackButtonDisabledSrc;yui.Event.removeListener(this.oForm.get('back'),'click',this.back);yui.Event.removeListener(this.oForm.get('reset'),'click',this.rs_form);yui.Event.removeListener(this.oForm.get('search_form_view_result'),'click',this.submit);this.state_search_button=false;}
this.submit=function(e,oKk_msf){if(oKk_msf.oForm.postcode){pc=kk_trim(oKk_msf.oForm.postcode.value);}else{pc='';}
if(pc!=''&&pc!=oKk_msf.oSettings.sInitialPostCode){if(oKk_msf.search_form_result_url.indexOf(oKk_msf.oSettings.sCatId+'/')==-1){oKk_msf.search_form_result_url+='/pc_'+pc;}else{oKk_msf.search_form_result_url+=',pc_'+pc;}}else if(!oKk_msf.state_search_button){return false;}
oKk_msf.search_form_result_url=oKk_msf.addArguments(oKk_msf.search_form_result_url);if(oKk_msf.search_form_result_url.indexOf(oKk_msf.oSettings.sResultDomainName)==-1){oKk_msf.search_form_result_url=oKk_msf.oSettings.sResultDomainName+oKk_msf.search_form_result_url;}
oKk_msf.oForm.get('search_form_view_result').href=oKk_msf.search_form_result_url;oKk_msf.oForm.action=oKk_msf.search_form_result_url;oKk_msf.eComplete.fire(oKk_msf.search_form_result_url);return true;}}