function FareFinderComp(){FareFinderComp.superclass.constructor.call(this);}YAHOO.lang.extend(FareFinderComp,AutoCompleteComp);FareFinderComp.prototype.showFields=function(k,c){var a=document.getElementById(this.domId).getElementsByTagName("form");var h=YAHOO.util.Event.getTarget(k);for(var e=0;e<a.length;e++){var b=a.item(e);if(b.inputId){if(YAHOO.util.Dom.hasClass(b,c)){YAHOO.util.Dom.removeClass(b,"hidden");}else{YAHOO.util.Dom.addClass(b,"hidden");}}}if(DomSupport.isNodeName(h,"button")){var g=h.parentNode.getElementsByTagName("button");for(var d=0;d<g.length;d++){var f=g.item(d);if(f==h){YAHOO.util.Dom.addClass(f,"active");}else{YAHOO.util.Dom.removeClass(f,"active");}}}};FareFinderComp.prototype.handlePackageSelection=function(a){var b=(a!="CH");if(b){YAHOO.util.Dom.addClass("vacationIndexForm","vacationHasOrigin");}else{YAHOO.util.Dom.removeClass("vacationIndexForm","vacationHasOrigin");}};FareFinderComp.prototype.prefillHotelDestination=function(d,a){if(!this.isRadioClick(d)){return;}var c=document.getElementById(this.domId+"-hotelDestinationFields");var e=c.getElementsByTagName("input")[0];DomSupport.setValue(e,a);var b=document.getElementById(this.domId+"-cityRadio");DomSupport.dispatchEvent("click",b);b.checked=true;};FareFinderComp.prototype.showHotelDestinationFields=function(a,c){if(!this.isRadioClick(a)){return;}var b=YAHOO.util.Dom.getFirstChild(document.getElementById(this.domId+"-hotelDestinationFields"));while(b!==null){b.style.display=(YAHOO.util.Dom.hasClass(b,c))?"block":"none";b=YAHOO.util.Dom.getNextSibling(b);}};FareFinderComp.prototype.showCarStartLocationFields=function(a,c){if(!this.isRadioClick(a)){return;}var b=YAHOO.util.Dom.getFirstChild(document.getElementById(this.domId+"-carStartLocationFields"));while(b!==null){b.style.display=(YAHOO.util.Dom.hasClass(b,c))?"block":"none";b=YAHOO.util.Dom.getNextSibling(b);}};FareFinderComp.prototype.isRadioClick=function(a){var b=YAHOO.util.Event.getTarget(a);return(DomSupport.isNodeName(b,"label")||DomSupport.isNodeName(b,"input"));};