YAHOO.widget.DS_JSArray=YAHOO.util.LocalDataSource;YAHOO.widget.DS_JSFunction=YAHOO.util.FunctionDataSource;YAHOO.widget.DS_XHR=function(sScriptURI,aSchema,oConfigs){var DS=new YAHOO.util.XHRDataSource(sScriptURI,oConfigs);DS._aDeprecatedSchema=aSchema;return DS;};YAHOO.widget.DS_ScriptNode=function(sScriptURI,aSchema,oConfigs){var DS=new YAHOO.util.ScriptNodeDataSource(sScriptURI,oConfigs);DS._aDeprecatedSchema=aSchema;return DS;};YAHOO.widget.DS_XHR.TYPE_JSON=YAHOO.util.DataSourceBase.TYPE_JSON;YAHOO.widget.DS_XHR.TYPE_XML=YAHOO.util.DataSourceBase.TYPE_XML;YAHOO.widget.DS_XHR.TYPE_FLAT=YAHOO.util.DataSourceBase.TYPE_TEXT;YAHOO.widget.AutoComplete=function(elInput,elContainer,oDataSource,oConfigs){if(elInput&&elContainer&&oDataSource){if(oDataSource instanceof YAHOO.util.DataSourceBase){this.dataSource=oDataSource;}
else{YAHOO.log("Could not instantiate AutoComplete due to an invalid DataSource","error",this.toString());return;}
this.key=0;var schema=oDataSource.responseSchema;if(oDataSource._aDeprecatedSchema){var aDeprecatedSchema=oDataSource._aDeprecatedSchema;if(YAHOO.lang.isArray(aDeprecatedSchema)){if((oDataSource.responseType===YAHOO.util.DataSourceBase.TYPE_JSON)||(oDataSource.responseType===YAHOO.util.DataSourceBase.TYPE_UNKNOWN)){schema.resultsList=aDeprecatedSchema[0];this.key=aDeprecatedSchema[1];schema.fields=(aDeprecatedSchema.length<3)?null:aDeprecatedSchema.slice(1);}
else if(oDataSource.responseType===YAHOO.util.DataSourceBase.TYPE_XML){schema.resultNode=aDeprecatedSchema[0];this.key=aDeprecatedSchema[1];schema.fields=aDeprecatedSchema.slice(1);}
else if(oDataSource.responseType===YAHOO.util.DataSourceBase.TYPE_TEXT){schema.recordDelim=aDeprecatedSchema[0];schema.fieldDelim=aDeprecatedSchema[1];}
oDataSource.responseSchema=schema;}}
if(YAHOO.util.Dom.inDocument(elInput)){if(YAHOO.lang.isString(elInput)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+elInput;this._elTextbox=document.getElementById(elInput);}
else{this._sName=(elInput.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+elInput.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._elTextbox=elInput;}
YAHOO.util.Dom.addClass(this._elTextbox,"yui-ac-input");}
else{YAHOO.log("Could not instantiate AutoComplete due to an invalid input element","error",this.toString());return;}
if(YAHOO.util.Dom.inDocument(elContainer)){if(YAHOO.lang.isString(elContainer)){this._elContainer=document.getElementById(elContainer);}
else{this._elContainer=elContainer;}
if(this._elContainer.style.display=="none"){YAHOO.log("The container may not display properly if display is set to \"none\" in CSS","warn",this.toString());}
var elParent=this._elContainer.parentNode;var elTag=elParent.tagName.toLowerCase();if(elTag=="div"){YAHOO.util.Dom.addClass(elParent,"yui-ac");}
else{YAHOO.log("Could not find the wrapper element for skinning","warn",this.toString());}}
else{YAHOO.log("Could not instantiate AutoComplete due to an invalid container element","error",this.toString());return;}
if(this.dataSource.dataType===YAHOO.util.DataSourceBase.TYPE_LOCAL){this.applyLocalFilter=true;}
if(oConfigs&&(oConfigs.constructor==Object)){for(var sConfig in oConfigs){if(sConfig){this[sConfig]=oConfigs[sConfig];}}}
this._initContainerEl();this._initProps();this._initListEl();this._initContainerHelperEls();var oSelf=this;var elTextbox=this._elTextbox;YAHOO.util.Event.addListener(elTextbox,"keyup",oSelf._onTextboxKeyUp,oSelf);YAHOO.util.Event.addListener(elTextbox,"keydown",oSelf._onTextboxKeyDown,oSelf);YAHOO.util.Event.addListener(elTextbox,"focus",oSelf._onTextboxFocus,oSelf);YAHOO.util.Event.addListener(elTextbox,"blur",oSelf._onTextboxBlur,oSelf);YAHOO.util.Event.addListener(elContainer,"mouseover",oSelf._onContainerMouseover,oSelf);YAHOO.util.Event.addListener(elContainer,"mouseout",oSelf._onContainerMouseout,oSelf);YAHOO.util.Event.addListener(elContainer,"click",oSelf._onContainerClick,oSelf);YAHOO.util.Event.addListener(elContainer,"scroll",oSelf._onContainerScroll,oSelf);YAHOO.util.Event.addListener(elContainer,"resize",oSelf._onContainerResize,oSelf);YAHOO.util.Event.addListener(elTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf);YAHOO.util.Event.addListener(window,"unload",oSelf._onWindowUnload,oSelf);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.containerPopulateEvent=new YAHOO.util.CustomEvent("containerPopulate",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);this.textboxChangeEvent=new YAHOO.util.CustomEvent("textboxChange",this);elTextbox.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;YAHOO.log("AutoComplete initialized","info",this.toString());}
else{YAHOO.log("Could not instantiate AutoComplete due invalid arguments","error",this.toString());}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.applyLocalFilter=null;YAHOO.widget.AutoComplete.prototype.queryMatchCase=false;YAHOO.widget.AutoComplete.prototype.queryMatchContains=false;YAHOO.widget.AutoComplete.prototype.queryMatchSubset=false;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.typeAheadDelay=0.5;YAHOO.widget.AutoComplete.prototype.queryInterval=500;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.suppressInputUpdate=false;YAHOO.widget.AutoComplete.prototype.resultTypeList=true;YAHOO.widget.AutoComplete.prototype.queryQuestionMark=true;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.getInputEl=function(){return this._elTextbox;};YAHOO.widget.AutoComplete.prototype.getContainerEl=function(){return this._elContainer;};YAHOO.widget.AutoComplete.prototype.isFocused=function(){return(this._bFocused===null)?false:this._bFocused;};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this._bContainerOpen;};YAHOO.widget.AutoComplete.prototype.getListEl=function(){return this._elList;};YAHOO.widget.AutoComplete.prototype.getListItemMatch=function(elListItem){if(elListItem._sResultMatch){return elListItem._sResultMatch;}
else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemData=function(elListItem){if(elListItem._oResultData){return elListItem._oResultData;}
else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemIndex=function(elListItem){if(YAHOO.lang.isNumber(elListItem._nItemIndex)){return elListItem._nItemIndex;}
else{return null;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(sHeader){if(this._elHeader){var elHeader=this._elHeader;if(sHeader){elHeader.innerHTML=sHeader;elHeader.style.display="block";}
else{elHeader.innerHTML="";elHeader.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setFooter=function(sFooter){if(this._elFooter){var elFooter=this._elFooter;if(sFooter){elFooter.innerHTML=sFooter;elFooter.style.display="block";}
else{elFooter.innerHTML="";elFooter.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setBody=function(sBody){if(this._elBody){var elBody=this._elBody;YAHOO.util.Event.purgeElement(elBody,true);if(sBody){elBody.innerHTML=sBody;elBody.style.display="block";}
else{elBody.innerHTML="";elBody.style.display="none";}
this._elList=null;}};YAHOO.widget.AutoComplete.prototype.generateRequest=function(sQuery){var dataType=this.dataSource.dataType;if(dataType===YAHOO.util.DataSourceBase.TYPE_XHR){if(!this.dataSource.connMethodPost){sQuery=(this.queryQuestionMark?"?":"")+(this.dataSource.scriptQueryParam||"query")+"="+sQuery+
(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}
else{sQuery=(this.dataSource.scriptQueryParam||"query")+"="+sQuery+
(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}
else if(dataType===YAHOO.util.DataSourceBase.TYPE_SCRIPTNODE){sQuery="&"+(this.dataSource.scriptQueryParam||"query")+"="+sQuery+
(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}
return sQuery;};YAHOO.widget.AutoComplete.prototype.sendQuery=function(sQuery){this._bFocused=null;var newQuery=(this.delimChar)?this._elTextbox.value+sQuery:sQuery;this._sendQuery(newQuery);};YAHOO.widget.AutoComplete.prototype.collapseContainer=function(){this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype.getSubsetMatches=function(sQuery){var subQuery,oCachedResponse,subRequest;for(var i=sQuery.length;i>=this.minQueryLength;i--){subRequest=this.generateRequest(sQuery.substr(0,i));this.dataRequestEvent.fire(this,subQuery,subRequest);YAHOO.log("Searching for query subset \""+subQuery+"\" in cache","info",this.toString());oCachedResponse=this.dataSource.getCachedResponse(subRequest);if(oCachedResponse){YAHOO.log("Found match for query subset \""+subQuery+"\": "+YAHOO.lang.dump(oCachedResponse),"info",this.toString());return this.filterResults.apply(this.dataSource,[sQuery,oCachedResponse,oCachedResponse,{scope:this}]);}}
YAHOO.log("Did not find subset match for query subset \""+sQuery+"\"","info",this.toString());return null;};YAHOO.widget.AutoComplete.prototype.preparseRawResponse=function(oRequest,oFullResponse,oCallback){var nEnd=((this.responseStripAfter!=="")&&(oFullResponse.indexOf))?oFullResponse.indexOf(this.responseStripAfter):-1;if(nEnd!=-1){oFullResponse=oFullResponse.substring(0,nEnd);}
return oFullResponse;};YAHOO.widget.AutoComplete.prototype.filterResults=function(sQuery,oFullResponse,oParsedResponse,oCallback){if(oCallback&&oCallback.argument&&oCallback.argument.query){sQuery=oCallback.argument.query;}
if(sQuery&&sQuery!==""){oParsedResponse=YAHOO.widget.AutoComplete._cloneObject(oParsedResponse);var oAC=oCallback.scope,oDS=this,allResults=oParsedResponse.results,filteredResults=[],bMatchFound=false,bMatchCase=(oDS.queryMatchCase||oAC.queryMatchCase),bMatchContains=(oDS.queryMatchContains||oAC.queryMatchContains);for(var i=allResults.length-1;i>=0;i--){var oResult=allResults[i];var sResult=null;if(YAHOO.lang.isString(oResult)){sResult=oResult;}
else if(YAHOO.lang.isArray(oResult)){sResult=oResult[0];}
else if(this.responseSchema.fields){var key=this.responseSchema.fields[0].key||this.responseSchema.fields[0];sResult=oResult[key];}
else if(this.key){sResult=oResult[this.key];}
if(YAHOO.lang.isString(sResult)){var sKeyIndex=(bMatchCase)?sResult.indexOf(decodeURIComponent(sQuery)):sResult.toLowerCase().indexOf(decodeURIComponent(sQuery).toLowerCase());if((!bMatchContains&&(sKeyIndex===0))||(bMatchContains&&((sKeyIndex===0)||((sResult.toLowerCase().charAt(sKeyIndex-1))==' ')||((sResult.toLowerCase().charAt(sKeyIndex-1))=='(')||((sResult.toLowerCase().charAt(sKeyIndex-1))=='-')))){filteredResults.unshift(oResult);}}}
oParsedResponse.results=filteredResults;YAHOO.log("Filtered "+filteredResults.length+" results against query \""+sQuery+"\": "+YAHOO.lang.dump(filteredResults),"info",this.toString());}
else{YAHOO.log("Did not filter results against query","info",this.toString());}
return oParsedResponse;};YAHOO.widget.AutoComplete.prototype.handleResponse=function(sQuery,oResponse,oPayload){if((this instanceof YAHOO.widget.AutoComplete)&&this._sName){this._populateList(sQuery,oResponse,oPayload);}};YAHOO.widget.AutoComplete.prototype.doBeforeLoadData=function(sQuery,oResponse,oPayload){return true;};YAHOO.widget.AutoComplete.prototype.formatResult=function(oResultData,sQuery,sResultMatch){var sMarkup=(sResultMatch)?sResultMatch:"";return sMarkup;};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(elTextbox,elContainer,sQuery,aResults){return true;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var instanceName=this.toString();var elInput=this._elTextbox;var elContainer=this._elContainer;this.textboxFocusEvent.unsubscribeAll();this.textboxKeyEvent.unsubscribeAll();this.dataRequestEvent.unsubscribeAll();this.dataReturnEvent.unsubscribeAll();this.dataErrorEvent.unsubscribeAll();this.containerPopulateEvent.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();this.textboxChangeEvent.unsubscribeAll();YAHOO.util.Event.purgeElement(elInput,true);YAHOO.util.Event.purgeElement(elContainer,true);elContainer.innerHTML="";for(var key in this){if(YAHOO.lang.hasOwnProperty(this,key)){this[key]=null;}}
YAHOO.log("AutoComplete instance destroyed: "+instanceName);};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.containerPopulateEvent=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.prototype.textboxChangeEvent=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=null;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._elList=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sPastSelections="";YAHOO.widget.AutoComplete.prototype._sInitInputValue=null;YAHOO.widget.AutoComplete.prototype._elCurListItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID=-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 minQueryLength=this.minQueryLength;if(!YAHOO.lang.isNumber(minQueryLength)){this.minQueryLength=1;}
var maxResultsDisplayed=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(maxResultsDisplayed)||(maxResultsDisplayed<1)){this.maxResultsDisplayed=10;}
var queryDelay=this.queryDelay;if(!YAHOO.lang.isNumber(queryDelay)||(queryDelay<0)){this.queryDelay=0.2;}
var typeAheadDelay=this.typeAheadDelay;if(!YAHOO.lang.isNumber(typeAheadDelay)||(typeAheadDelay<0)){this.typeAheadDelay=0.2;}
var delimChar=this.delimChar;if(YAHOO.lang.isString(delimChar)&&(delimChar.length>0)){this.delimChar=[delimChar];}
else if(!YAHOO.lang.isArray(delimChar)){this.delimChar=null;}
var animSpeed=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(animSpeed)||(animSpeed<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&&delimChar){YAHOO.log("The forceSelection feature has been enabled with delimChar defined.","warn",this.toString());}};YAHOO.widget.AutoComplete.prototype._initContainerHelperEls=function(){if(this.useShadow&&!this._elShadow){var elShadow=document.createElement("div");elShadow.className="yui-ac-shadow";elShadow.style.width=0;elShadow.style.height=0;this._elShadow=this._elContainer.appendChild(elShadow);}
if(this.useIFrame&&!this._elIFrame){var elIFrame=document.createElement("iframe");elIFrame.src=this._iFrameSrc;elIFrame.frameBorder=0;elIFrame.scrolling="no";elIFrame.style.position="absolute";elIFrame.style.width=0;elIFrame.style.height=0;elIFrame.tabIndex=-1;elIFrame.style.padding=0;this._elIFrame=this._elContainer.appendChild(elIFrame);}};YAHOO.widget.AutoComplete.prototype._initContainerEl=function(){YAHOO.util.Dom.addClass(this._elContainer,"yui-ac-container");if(!this._elContent){var elContent=document.createElement("div");elContent.className="yui-ac-content";elContent.style.display="none";this._elContent=this._elContainer.appendChild(elContent);var elHeader=document.createElement("div");elHeader.className="yui-ac-hd";elHeader.style.display="none";this._elHeader=this._elContent.appendChild(elHeader);var elBody=document.createElement("div");elBody.className="yui-ac-bd";this._elBody=this._elContent.appendChild(elBody);var elFooter=document.createElement("div");elFooter.className="yui-ac-ft";elFooter.style.display="none";this._elFooter=this._elContent.appendChild(elFooter);}
else{YAHOO.log("Could not initialize the container","warn",this.toString());}};YAHOO.widget.AutoComplete.prototype._initListEl=function(){var nListLength=this.maxResultsDisplayed;var elList=this._elList||document.createElement("ul");var elListItem;while(elList.childNodes.length<nListLength){elListItem=document.createElement("li");elListItem.style.display="none";elListItem._nItemIndex=elList.childNodes.length;elList.appendChild(elListItem);}
if(!this._elList){var elBody=this._elBody;YAHOO.util.Event.purgeElement(elBody,true);elBody.innerHTML="";this._elList=elBody.appendChild(elList);}};YAHOO.widget.AutoComplete.prototype._focus=function(){var oSelf=this;setTimeout(function(){try{oSelf._elTextbox.focus();}
catch(e){}},0);};YAHOO.widget.AutoComplete.prototype._enableIntervalDetection=function(){var oSelf=this;if(!oSelf._queryInterval&&oSelf.queryInterval){oSelf._queryInterval=setInterval(function(){oSelf._onInterval();},oSelf.queryInterval);YAHOO.log("Interval set","info",this.toString());}};YAHOO.widget.AutoComplete.prototype._onInterval=function(){var currValue=this._elTextbox.value;var lastValue=this._sLastTextboxValue;if(currValue!=lastValue){this._sLastTextboxValue=currValue;this._sendQuery(currValue);}};YAHOO.widget.AutoComplete.prototype._clearInterval=function(){if(this._queryInterval){clearInterval(this._queryInterval);this._queryInterval=null;YAHOO.log("Interval cleared","info",this.toString());}};YAHOO.widget.AutoComplete.prototype._isIgnoreKey=function(nKeyCode){if((nKeyCode==9)||(nKeyCode==13)||(nKeyCode==16)||(nKeyCode==17)||(nKeyCode>=18&&nKeyCode<=20)||(nKeyCode==27)||(nKeyCode>=33&&nKeyCode<=35)||(nKeyCode>=36&&nKeyCode<=40)||(nKeyCode>=44&&nKeyCode<=45)||(nKeyCode==229)){return true;}
return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(sQuery){if(this.minQueryLength<0){this._toggleContainer(false);YAHOO.log("Property minQueryLength is less than 0","info",this.toString());return;}
if(this.delimChar){var extraction=this._extractQuery(sQuery);sQuery=extraction.query;this._sPastSelections=extraction.previous;}
if((sQuery&&(sQuery.length<this.minQueryLength))||(!sQuery&&this.minQueryLength>0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);}
this._toggleContainer(false);YAHOO.log("Query \""+sQuery+"\" is too short","info",this.toString());return;}
sQuery=encodeURIComponent(sQuery);this._nDelayID=-1;if(this.dataSource.queryMatchSubset||this.queryMatchSubset){var oResponse=this.getSubsetMatches(sQuery);if(oResponse){this.handleResponse(sQuery,oResponse,{query:sQuery});return;}}
if(this.responseStripAfter){this.dataSource.doBeforeParseData=this.preparseRawResponse;}
if(this.applyLocalFilter){this.dataSource.doBeforeCallback=this.filterResults;}
var sRequest=this.generateRequest(sQuery);this.dataRequestEvent.fire(this,sQuery,sRequest);YAHOO.log("Sending query \""+sRequest+"\"","info",this.toString());this.dataSource.sendRequest(sRequest,{success:this.handleResponse,failure:this.handleResponse,scope:this,argument:{query:sQuery}});};YAHOO.widget.AutoComplete.prototype._populateList=function(sQuery,oResponse,oPayload){if(this._nTypeAheadDelayID!=-1){clearTimeout(this._nTypeAheadDelayID);}
sQuery=(oPayload&&oPayload.query)?oPayload.query:sQuery;var ok=this.doBeforeLoadData(sQuery,oResponse,oPayload);if(ok&&!oResponse.error){this.dataReturnEvent.fire(this,sQuery,oResponse.results);if(this._bFocused||(this._bFocused===null)){var sCurQuery=decodeURIComponent(sQuery);this._sCurQuery=sCurQuery;this._bItemSelected=false;var allResults=oResponse.results,nItemsToShow=Math.min(allResults.length,this.maxResultsDisplayed),sMatchKey=(this.dataSource.responseSchema.fields)?(this.dataSource.responseSchema.fields[0].key||this.dataSource.responseSchema.fields[0]):0;if(nItemsToShow>0){if(!this._elList||(this._elList.childNodes.length<nItemsToShow)){this._initListEl();}
this._initContainerHelperEls();var allListItemEls=this._elList.childNodes;for(var i=nItemsToShow-1;i>=0;i--){var elListItem=allListItemEls[i],oResult=allResults[i];if(this.resultTypeList){var aResult=[];aResult[0]=(YAHOO.lang.isString(oResult))?oResult:oResult[sMatchKey]||oResult[this.key];var fields=this.dataSource.responseSchema.fields;if(YAHOO.lang.isArray(fields)&&(fields.length>1)){for(var k=1,len=fields.length;k<len;k++){aResult[aResult.length]=oResult[fields[k].key||fields[k]];}}
else{if(YAHOO.lang.isArray(oResult)){aResult=oResult;}
else if(YAHOO.lang.isString(oResult)){aResult=[oResult];}
else{aResult[1]=oResult;}}
oResult=aResult;}
elListItem._sResultMatch=(YAHOO.lang.isString(oResult))?oResult:(YAHOO.lang.isArray(oResult))?oResult[0]:(oResult[sMatchKey]||"");elListItem._oResultData=oResult;elListItem.innerHTML=this.formatResult(oResult,sCurQuery,elListItem._sResultMatch);elListItem.style.display="";}
if(nItemsToShow<allListItemEls.length){var extraListItem;for(var j=allListItemEls.length-1;j>=nItemsToShow;j--){extraListItem=allListItemEls[j];extraListItem.style.display="none";}}
this._nDisplayedItems=nItemsToShow;this.containerPopulateEvent.fire(this,sQuery,allResults);if(this.autoHighlight){var elFirstListItem=this._elList.firstChild;this._toggleHighlight(elFirstListItem,"to");this.itemArrowToEvent.fire(this,elFirstListItem);YAHOO.log("Arrowed to first item","info",this.toString());this._typeAhead(elFirstListItem,sQuery);}
else{this._toggleHighlight(this._elCurListItem,"from");}
ok=this.doBeforeExpandContainer(this._elTextbox,this._elContainer,sQuery,allResults);this._toggleContainer(ok);}
else{this._toggleContainer(false);}
YAHOO.log("Container populated with "+nItemsToShow+" list items","info",this.toString());return;}}
else{this.dataErrorEvent.fire(this,sQuery);}
YAHOO.log("Could not populate list","info",this.toString());};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var extraction=(this.delimChar)?this._extractQuery(this._elTextbox.value):{previous:"",query:this._elTextbox.value};this._elTextbox.value=extraction.previous;this.selectionEnforceEvent.fire(this,extraction.query);YAHOO.log("Selection enforced","info",this.toString());};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var elMatch=null;for(var i=0;i<this._nDisplayedItems;i++){var elListItem=this._elList.childNodes[i];var sMatch=(""+elListItem._sResultMatch).toLowerCase();if(sMatch==this._sCurQuery.toLowerCase()){elMatch=elListItem;break;}}
return(elMatch);};YAHOO.widget.AutoComplete.prototype._typeAhead=function(elListItem,sQuery){if(!this.typeAhead||(this._nKeyCode==8)){return;}
var oSelf=this,elTextbox=this._elTextbox;if(elTextbox.setSelectionRange||elTextbox.createTextRange){this._nTypeAheadDelayID=setTimeout(function(){var nStart=elTextbox.value.length;oSelf._updateValue(elListItem);var nEnd=elTextbox.value.length;oSelf._selectText(elTextbox,nStart,nEnd);var sPrefill=elTextbox.value.substr(nStart,nEnd);oSelf.typeAheadEvent.fire(oSelf,sQuery,sPrefill);YAHOO.log("Typeahead occured with prefill string \""+sPrefill+"\"","info",oSelf.toString());},(this.typeAheadDelay*1000));}};YAHOO.widget.AutoComplete.prototype._selectText=function(elTextbox,nStart,nEnd){if(elTextbox.setSelectionRange){elTextbox.setSelectionRange(nStart,nEnd);}
else if(elTextbox.createTextRange){var oTextRange=elTextbox.createTextRange();oTextRange.moveStart("character",nStart);oTextRange.moveEnd("character",nEnd-elTextbox.value.length);oTextRange.select();}
else{elTextbox.select();}};YAHOO.widget.AutoComplete.prototype._extractQuery=function(sQuery){var aDelimChar=this.delimChar,nDelimIndex=-1,nNewIndex,nQueryStart,i=aDelimChar.length-1,sPrevious;for(;i>=0;i--){nNewIndex=sQuery.lastIndexOf(aDelimChar[i]);if(nNewIndex>nDelimIndex){nDelimIndex=nNewIndex;}}
if(aDelimChar[i]==" "){for(var j=aDelimChar.length-1;j>=0;j--){if(sQuery[nDelimIndex-1]==aDelimChar[j]){nDelimIndex--;break;}}}
if(nDelimIndex>-1){nQueryStart=nDelimIndex+1;while(sQuery.charAt(nQueryStart)==" "){nQueryStart+=1;}
sPrevious=sQuery.substring(0,nQueryStart);sQuery=sQuery.substr(nQueryStart);}
else{sPrevious="";}
return{previous:sPrevious,query:sQuery};};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(bShow){var width=this._elContent.offsetWidth+"px";var height=this._elContent.offsetHeight+"px";if(this.useIFrame&&this._elIFrame){var elIFrame=this._elIFrame;if(bShow){elIFrame.style.width=width;elIFrame.style.height=height;elIFrame.style.padding="";YAHOO.log("Iframe expanded","info",this.toString());}
else{elIFrame.style.width=0;elIFrame.style.height=0;elIFrame.style.padding=0;YAHOO.log("Iframe collapsed","info",this.toString());}}
if(this.useShadow&&this._elShadow){var elShadow=this._elShadow;if(bShow){elShadow.style.width=width;elShadow.style.height=height;YAHOO.log("Shadow expanded","info",this.toString());}
else{elShadow.style.width=0;elShadow.style.height=0;YAHOO.log("Shadow collapsed","info",this.toString());}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(bShow){YAHOO.log("Toggling container "+((bShow)?"open":"closed"),"info",this.toString());var elContainer=this._elContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return;}
if(!bShow){this._toggleHighlight(this._elCurListItem,"from");this._nDisplayedItems=0;this._sCurQuery=null;if(this._elContent.style.display=="none"){return;}}
var oAnim=this._oAnim;if(oAnim&&oAnim.getEl()&&(this.animHoriz||this.animVert)){if(oAnim.isAnimated()){oAnim.stop(true);}
var oClone=this._elContent.cloneNode(true);elContainer.appendChild(oClone);oClone.style.top="-9000px";oClone.style.width="";oClone.style.height="";oClone.style.display="";var wExp=oClone.offsetWidth;var hExp=oClone.offsetHeight;var wColl=(this.animHoriz)?0:wExp;var hColl=(this.animVert)?0:hExp;oAnim.attributes=(bShow)?{width:{to:wExp},height:{to:hExp}}:{width:{to:wColl},height:{to:hColl}};if(bShow&&!this._bContainerOpen){this._elContent.style.width=wColl+"px";this._elContent.style.height=hColl+"px";}
else{this._elContent.style.width=wExp+"px";this._elContent.style.height=hExp+"px";}
elContainer.removeChild(oClone);oClone=null;var oSelf=this;var onAnimComplete=function(){oAnim.onComplete.unsubscribeAll();if(bShow){oSelf._toggleContainerHelpers(true);oSelf._bContainerOpen=bShow;oSelf.containerExpandEvent.fire(oSelf);YAHOO.log("Container expanded","info",oSelf.toString());}
else{oSelf._elContent.style.display="none";oSelf._bContainerOpen=bShow;oSelf.containerCollapseEvent.fire(oSelf);YAHOO.log("Container collapsed","info",oSelf.toString());}};this._toggleContainerHelpers(false);this._elContent.style.display="";oAnim.onComplete.subscribe(onAnimComplete);oAnim.animate();}
else{if(bShow){this._elContent.style.display="";this._toggleContainerHelpers(true);this._bContainerOpen=bShow;this.containerExpandEvent.fire(this);YAHOO.log("Container expanded","info",this.toString());}
else{this._toggleContainerHelpers(false);this._elContent.style.display="none";this._bContainerOpen=bShow;this.containerCollapseEvent.fire(this);YAHOO.log("Container collapsed","info",this.toString());}}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(elNewListItem,sType){if(elNewListItem){var sHighlight=this.highlightClassName;if(this._elCurListItem){YAHOO.util.Dom.removeClass(this._elCurListItem,sHighlight);this._elCurListItem=null;}
if((sType=="to")&&sHighlight){YAHOO.util.Dom.addClass(elNewListItem,sHighlight);this._elCurListItem=elNewListItem;}}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(elNewListItem,sType){if(elNewListItem==this._elCurListItem){return;}
var sPrehighlight=this.prehighlightClassName;if((sType=="mouseover")&&sPrehighlight){YAHOO.util.Dom.addClass(elNewListItem,sPrehighlight);}
else{YAHOO.util.Dom.removeClass(elNewListItem,sPrehighlight);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(elListItem){if(!this.suppressInputUpdate){var elTextbox=this._elTextbox;var sDelimChar=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var sResultMatch=elListItem._sResultMatch;var sNewValue="";if(sDelimChar){sNewValue=this._sPastSelections;sNewValue+=sResultMatch+sDelimChar;if(sDelimChar!=" "){sNewValue+=" ";}}
else{sNewValue=sResultMatch;}
elTextbox.value=sNewValue;if(elTextbox.type=="textarea"){elTextbox.scrollTop=elTextbox.scrollHeight;}
var end=elTextbox.value.length;this._selectText(elTextbox,end,end);this._elCurListItem=elListItem;}};YAHOO.widget.AutoComplete.prototype._selectItem=function(elListItem){this._bItemSelected=true;this._updateValue(elListItem);this._sPastSelections=this._elTextbox.value;this._clearInterval();this.itemSelectEvent.fire(this,elListItem,elListItem._oResultData);YAHOO.log("Item selected: "+YAHOO.lang.dump(elListItem._oResultData),"info",this.toString());this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._elCurListItem){this._selectItem(this._elCurListItem);}
else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(nKeyCode){if(this._bContainerOpen){var elCurListItem=this._elCurListItem,nCurItemIndex=-1;if(elCurListItem){nCurItemIndex=elCurListItem._nItemIndex;}
var nNewItemIndex=(nKeyCode==40)?(nCurItemIndex+1):(nCurItemIndex-1);if(nNewItemIndex<-2||nNewItemIndex>=this._nDisplayedItems){return;}
if(elCurListItem){this._toggleHighlight(elCurListItem,"from");this.itemArrowFromEvent.fire(this,elCurListItem);YAHOO.log("Item arrowed from: "+elCurListItem._nItemIndex,"info",this.toString());}
if(nNewItemIndex==-1){if(this.delimChar){this._elTextbox.value=this._sPastSelections+this._sCurQuery;}
else{this._elTextbox.value=this._sCurQuery;}
return;}
if(nNewItemIndex==-2){this._toggleContainer(false);return;}
var elNewListItem=this._elList.childNodes[nNewItemIndex],elContent=this._elContent,sOF=YAHOO.util.Dom.getStyle(elContent,"overflow"),sOFY=YAHOO.util.Dom.getStyle(elContent,"overflowY"),scrollOn=((sOF=="auto")||(sOF=="scroll")||(sOFY=="auto")||(sOFY=="scroll"));if(scrollOn&&(nNewItemIndex>-1)&&(nNewItemIndex<this._nDisplayedItems)){if(nKeyCode==40){if((elNewListItem.offsetTop+elNewListItem.offsetHeight)>(elContent.scrollTop+elContent.offsetHeight)){elContent.scrollTop=(elNewListItem.offsetTop+elNewListItem.offsetHeight)-elContent.offsetHeight;}
else if((elNewListItem.offsetTop+elNewListItem.offsetHeight)<elContent.scrollTop){elContent.scrollTop=elNewListItem.offsetTop;}}
else{if(elNewListItem.offsetTop<elContent.scrollTop){this._elContent.scrollTop=elNewListItem.offsetTop;}
else if(elNewListItem.offsetTop>(elContent.scrollTop+elContent.offsetHeight)){this._elContent.scrollTop=(elNewListItem.offsetTop+elNewListItem.offsetHeight)-elContent.offsetHeight;}}}
this._toggleHighlight(elNewListItem,"to");this.itemArrowToEvent.fire(this,elNewListItem);YAHOO.log("Item arrowed to "+elNewListItem._nItemIndex,"info",this.toString());if(this.typeAhead){this._updateValue(elNewListItem);}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(v,oSelf){var elTarget=YAHOO.util.Event.getTarget(v);var elTag=elTarget.nodeName.toLowerCase();while(elTarget&&(elTag!="table")){switch(elTag){case"body":return;case"li":if(oSelf.prehighlightClassName){oSelf._togglePrehighlight(elTarget,"mouseover");}
else{oSelf._toggleHighlight(elTarget,"to");}
oSelf.itemMouseOverEvent.fire(oSelf,elTarget);YAHOO.log("Item moused over "+elTarget._nItemIndex,"info",oSelf.toString());break;case"div":if(YAHOO.util.Dom.hasClass(elTarget,"yui-ac-container")){oSelf._bOverContainer=true;return;}
break;default:break;}
elTarget=elTarget.parentNode;if(elTarget){elTag=elTarget.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(v,oSelf){var elTarget=YAHOO.util.Event.getTarget(v);var elTag=elTarget.nodeName.toLowerCase();while(elTarget&&(elTag!="table")){switch(elTag){case"body":return;case"li":if(oSelf.prehighlightClassName){oSelf._togglePrehighlight(elTarget,"mouseout");}
else{oSelf._toggleHighlight(elTarget,"from");}
oSelf.itemMouseOutEvent.fire(oSelf,elTarget);YAHOO.log("Item moused out "+elTarget._nItemIndex,"info",oSelf.toString());break;case"ul":oSelf._toggleHighlight(oSelf._elCurListItem,"to");break;case"div":if(YAHOO.util.Dom.hasClass(elTarget,"yui-ac-container")){oSelf._bOverContainer=false;return;}
break;default:break;}
elTarget=elTarget.parentNode;if(elTarget){elTag=elTarget.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerClick=function(v,oSelf){var elTarget=YAHOO.util.Event.getTarget(v);var elTag=elTarget.nodeName.toLowerCase();while(elTarget&&(elTag!="table")){switch(elTag){case"body":return;case"li":oSelf._toggleHighlight(elTarget,"to");oSelf._selectItem(elTarget);return;default:break;}
elTarget=elTarget.parentNode;if(elTarget){elTag=elTarget.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(v,oSelf){oSelf._focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(v,oSelf){oSelf._toggleContainerHelpers(oSelf._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(v,oSelf){var nKeyCode=v.keyCode;if(oSelf._nTypeAheadDelayID!=-1){clearTimeout(oSelf._nTypeAheadDelayID);}
switch(nKeyCode){case 9:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(oSelf._elCurListItem){if(oSelf.delimChar&&(oSelf._nKeyCode!=nKeyCode)){if(oSelf._bContainerOpen){YAHOO.util.Event.stopEvent(v);}}
oSelf._selectItem(oSelf._elCurListItem);}
else{oSelf._toggleContainer(false);}}
break;case 13:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(oSelf._elCurListItem){if(oSelf._nKeyCode!=nKeyCode){if(oSelf._bContainerOpen){YAHOO.util.Event.stopEvent(v);}}
oSelf._selectItem(oSelf._elCurListItem);}
else{oSelf._toggleContainer(false);}}
break;case 27:oSelf._toggleContainer(false);return;case 39:oSelf._jumpSelection();break;case 38:if(oSelf._bContainerOpen){YAHOO.util.Event.stopEvent(v);oSelf._moveSelection(nKeyCode);}
break;case 40:if(oSelf._bContainerOpen){YAHOO.util.Event.stopEvent(v);oSelf._moveSelection(nKeyCode);}
break;default:oSelf._bItemSelected=false;oSelf._toggleHighlight(oSelf._elCurListItem,"from");oSelf.textboxKeyEvent.fire(oSelf,nKeyCode);YAHOO.log("Textbox keyed","info",oSelf.toString());break;}
if(nKeyCode===18){oSelf._enableIntervalDetection();}
oSelf._nKeyCode=nKeyCode;};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(v,oSelf){var nKeyCode=v.keyCode;if(YAHOO.env.ua.opera||(navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&(YAHOO.env.ua.webkit<420)){switch(nKeyCode){case 9:if(oSelf._bContainerOpen){if(oSelf.delimChar){YAHOO.util.Event.stopEvent(v);}
if(oSelf._elCurListItem){oSelf._selectItem(oSelf._elCurListItem);}
else{oSelf._toggleContainer(false);}}
break;case 13:if(oSelf._bContainerOpen){YAHOO.util.Event.stopEvent(v);if(oSelf._elCurListItem){oSelf._selectItem(oSelf._elCurListItem);}
else{oSelf._toggleContainer(false);}}
break;default:break;}}
else if(nKeyCode==229){oSelf._enableIntervalDetection();}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(v,oSelf){var sText=this.value;oSelf._initProps();var nKeyCode=v.keyCode;if(oSelf._isIgnoreKey(nKeyCode)){return;}
if(oSelf._nDelayID!=-1){clearTimeout(oSelf._nDelayID);}
oSelf._nDelayID=setTimeout(function(){oSelf._sendQuery(sText);},(oSelf.queryDelay*1000));};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(v,oSelf){if(!oSelf._bFocused){oSelf._elTextbox.setAttribute("autocomplete","off");oSelf._bFocused=true;oSelf._sInitInputValue=oSelf._elTextbox.value;oSelf.textboxFocusEvent.fire(oSelf);YAHOO.log("Textbox focused","info",oSelf.toString());}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(v,oSelf){if(!oSelf._bOverContainer||(oSelf._nKeyCode==9)){if(!oSelf._bItemSelected){var elMatchListItem=oSelf._textMatchesOption();if(!oSelf._bContainerOpen||(oSelf._bContainerOpen&&(elMatchListItem===null))){if(oSelf.forceSelection){oSelf._clearSelection();}
else{oSelf.unmatchedItemSelectEvent.fire(oSelf,oSelf._sCurQuery);YAHOO.log("Unmatched item selected: "+oSelf._sCurQuery,"info",oSelf.toString());}}
else{if(oSelf.forceSelection){oSelf._selectItem(elMatchListItem);}}}
oSelf._clearInterval();oSelf._bFocused=false;if(oSelf._sInitInputValue!==oSelf._elTextbox.value){oSelf.textboxChangeEvent.fire(oSelf);}
oSelf.textboxBlurEvent.fire(oSelf);YAHOO.log("Textbox blurred","info",oSelf.toString());oSelf._toggleContainer(false);}
else{oSelf._focus();}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(v,oSelf){if(oSelf&&oSelf._elTextbox&&oSelf.allowBrowserAutocomplete){oSelf._elTextbox.setAttribute("autocomplete","on");}};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(sQuery){return this.generateRequest(sQuery);};YAHOO.widget.AutoComplete.prototype.getListItems=function(){var allListItemEls=[],els=this._elList.childNodes;for(var i=els.length-1;i>=0;i--){allListItemEls[i]=els[i];}
return allListItemEls;};YAHOO.widget.AutoComplete._cloneObject=function(o){if(!YAHOO.lang.isValue(o)){return o;}
var copy={};if(YAHOO.lang.isFunction(o)){copy=o;}
else if(YAHOO.lang.isArray(o)){var array=[];for(var i=0,len=o.length;i<len;i++){array[i]=YAHOO.widget.AutoComplete._cloneObject(o[i]);}
copy=array;}
else if(YAHOO.lang.isObject(o)){for(var x in o){if(YAHOO.lang.hasOwnProperty(o,x)){if(YAHOO.lang.isValue(o[x])&&YAHOO.lang.isObject(o[x])||YAHOO.lang.isArray(o[x])){copy[x]=YAHOO.widget.AutoComplete._cloneObject(o[x]);}
else{copy[x]=o[x];}}}}
else{copy=o;}
return copy;};YAHOO.register("autocomplete",YAHOO.widget.AutoComplete,{version:"2.7.0",build:"1799"});
