YAHOO.util.Connect={_msxml_progid:["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_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,setProgId:function(id){
this._msxml_progid.unshift(id);
},setDefaultPostHeader:function(b){
this._use_default_post_header=b;
},setDefaultXhrHeader:function(b){
this._use_default_xhr_header=b;
},setPollingInterval:function(i){
if(typeof i=="number"&&isFinite(i)){
this._polling_interval=i;
}
},createXhrObject:function(_5){
var _6,_7;
try{
_7=new XMLHttpRequest();
_6={conn:_7,tId:_5};
}
catch(e){
for(var i=0;i<this._msxml_progid.length;++i){
try{
_7=new ActiveXObject(this._msxml_progid[i]);
_6={conn:_7,tId:_5};
break;
}
catch(e){
}
}
}
finally{
return _6;
}
},getConnectionObject:function(){
var o;
var _a=this._transaction_id;
try{
o=this.createXhrObject(_a);
if(o){
this._transaction_id++;
}
}
catch(e){
}
finally{
return o;
}
},asyncRequest:function(_b,_c,_d,_e){
var o=this.getConnectionObject();
if(!o){
return null;
}else{
if(this._isFormSubmit){
if(this._isFileUpload){
this.uploadFile(o.tId,_d,_c,_e);
this.releaseObject(o);
return;
}
if(_b.toUpperCase()=="GET"){
if(this._sFormData.length!=0){
_c+=((_c.indexOf("?")==-1)?"?":"&")+this._sFormData;
}else{
_c+="?"+this._sFormData;
}
}else{
if(_b.toUpperCase()=="POST"){
_e=_e?this._sFormData+"&"+_e:this._sFormData;
}
}
}
o.conn.open(_b,_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(this._isFormSubmit||(_e&&this._use_default_post_header)){
this.initHeader("Content-Type",this._default_post_header);
if(this._isFormSubmit){
this.resetFormState();
}
}
if(this._has_default_headers||this._has_http_headers){
this.setHeader(o);
}
this.handleReadyState(o,_d);
o.conn.send(_e||null);
return o;
}
},handleReadyState:function(o,_11){
var _12=this;
if(_11&&_11.timeout){
this._timeOut[o.tId]=window.setTimeout(function(){
_12.abort(o,_11,true);
},_11.timeout);
}
this._poll[o.tId]=window.setInterval(function(){
if(o.conn&&o.conn.readyState==4){
window.clearInterval(_12._poll[o.tId]);
delete _12._poll[o.tId];
if(_11&&_11.timeout){
delete _12._timeOut[o.tId];
}
_12.handleTransactionResponse(o,_11);
}
},this._polling_interval);
},handleTransactionResponse:function(o,_14,_15){
if(!_14){
this.releaseObject(o);
return;
}
var _16,_17;
try{
if(o.conn.status!==undefined&&o.conn.status!=0){
_16=o.conn.status;
}else{
_16=13030;
}
}
catch(e){
_16=13030;
}
if(_16>=200&&_16<300){
_17=this.createResponseObject(o,_14.argument);
if(_14.success){
if(!_14.scope){
_14.success(_17);
}else{
_14.success.apply(_14.scope,[_17]);
}
}
}else{
switch(_16){
case 12002:
case 12029:
case 12030:
case 12031:
case 12152:
case 13030:
_17=this.createExceptionObject(o.tId,_14.argument,(_15?_15:false));
if(_14.failure){
if(!_14.scope){
_14.failure(_17);
}else{
_14.failure.apply(_14.scope,[_17]);
}
}
break;
default:
_17=this.createResponseObject(o,_14.argument);
if(_14.failure){
if(!_14.scope){
_14.failure(_17);
}else{
_14.failure.apply(_14.scope,[_17]);
}
}
}
}
this.releaseObject(o);
_17=null;
},createResponseObject:function(o,_19){
var obj={};
var _1b={};
try{
var _1c=o.conn.getAllResponseHeaders();
var _1d=_1c.split("\n");
for(var i=0;i<_1d.length;i++){
var _1f=_1d[i].indexOf(":");
if(_1f!=-1){
_1b[_1d[i].substring(0,_1f)]=_1d[i].substring(_1f+2);
}
}
}
catch(e){
}
obj.tId=o.tId;
obj.status=o.conn.status;
obj.statusText=o.conn.statusText;
obj.getResponseHeader=_1b;
obj.getAllResponseHeaders=_1c;
obj.responseText=o.conn.responseText;
obj.responseXML=o.conn.responseXML;
if(typeof _19!==undefined){
obj.argument=_19;
}
return obj;
},createExceptionObject:function(tId,_21,_22){
var _23=0;
var _24="communication failure";
var _25=-1;
var _26="transaction aborted";
var obj={};
obj.tId=tId;
if(_22){
obj.status=_25;
obj.statusText=_26;
}else{
obj.status=_23;
obj.statusText=_24;
}
if(_21){
obj.argument=_21;
}
return obj;
},initHeader:function(_28,_29,_2a){
var _2b=(_2a)?this._default_headers:this._http_headers;
if(_2b[_28]===undefined){
_2b[_28]=_29;
}else{
_2b[_28]=_29+","+_2b[_28];
}
if(_2a){
this._has_default_headers=true;
}else{
this._has_http_headers=true;
}
},setHeader:function(o){
if(this._has_default_headers){
for(var _2d in this._default_headers){
if(YAHOO.lang.hasOwnProperty(this._default_headers,_2d)){
o.conn.setRequestHeader(_2d,this._default_headers[_2d]);
}
}
}
if(this._has_http_headers){
for(var _2d in this._http_headers){
if(YAHOO.lang.hasOwnProperty(this._http_headers,_2d)){
o.conn.setRequestHeader(_2d,this._http_headers[_2d]);
}
}
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(_2e,_2f,_30){
this.resetFormState();
var _31;
if(typeof _2e=="string"){
_31=(document.getElementById(_2e)||document.forms[_2e]);
}else{
if(typeof _2e=="object"){
_31=_2e;
}else{
return;
}
}
if(_2f){
this.createFrame(_30?_30:null);
this._isFormSubmit=true;
this._isFileUpload=true;
this._formNode=_31;
return;
}
var _32,_33,_34,_35;
var _36=false;
for(var i=0;i<_31.elements.length;i++){
_32=_31.elements[i];
_35=_31.elements[i].disabled;
_33=_31.elements[i].name;
_34=_31.elements[i].value;
if(!_35&&_33){
switch(_32.type){
case "select-one":
case "select-multiple":
for(var j=0;j<_32.options.length;j++){
if(_32.options[j].selected){
if(window.ActiveXObject){
this._sFormData+=encodeURIComponent(_33)+"="+encodeURIComponent(_32.options[j].attributes["value"].specified?_32.options[j].value:_32.options[j].text)+"&";
}else{
this._sFormData+=encodeURIComponent(_33)+"="+encodeURIComponent(_32.options[j].hasAttribute("value")?_32.options[j].value:_32.options[j].text)+"&";
}
}
}
break;
case "radio":
case "checkbox":
if(_32.checked){
this._sFormData+=encodeURIComponent(_33)+"="+encodeURIComponent(_34)+"&";
}
break;
case "file":
case undefined:
case "reset":
case "button":
break;
case "submit":
if(_36==false){
this._sFormData+=encodeURIComponent(_33)+"="+encodeURIComponent(_34)+"&";
_36=true;
}
break;
default:
this._sFormData+=encodeURIComponent(_33)+"="+encodeURIComponent(_34)+"&";
break;
}
}
}
this._isFormSubmit=true;
this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);
return this._sFormData;
},resetFormState:function(){
this._isFormSubmit=false;
this._isFileUpload=false;
this._formNode=null;
this._sFormData="";
},createFrame:function(_39){
var _3a="yuiIO"+this._transaction_id;
if(window.ActiveXObject){
var io=document.createElement("<iframe id=\""+_3a+"\" name=\""+_3a+"\" />");
if(typeof _39=="boolean"){
io.src="javascript:false";
}else{
if(typeof secureURI=="string"){
io.src=_39;
}
}
}else{
var io=document.createElement("iframe");
io.id=_3a;
io.name=_3a;
}
io.style.position="absolute";
io.style.top="-1000px";
io.style.left="-1000px";
document.body.appendChild(io);
},appendPostData:function(_3c){
var _3d=[];
var _3e=_3c.split("&");
for(var i=0;i<_3e.length;i++){
var _40=_3e[i].indexOf("=");
if(_40!=-1){
_3d[i]=document.createElement("input");
_3d[i].type="hidden";
_3d[i].name=_3e[i].substring(0,_40);
_3d[i].value=_3e[i].substring(_40+1);
this._formNode.appendChild(_3d[i]);
}
}
return _3d;
},uploadFile:function(id,_42,uri,_44){
var _45="yuiIO"+id;
var _46="multipart/form-data";
var io=document.getElementById(_45);
this._formNode.action=uri;
this._formNode.method="POST";
this._formNode.target=_45;
if(this._formNode.encoding){
this._formNode.encoding=_46;
}else{
this._formNode.enctype=_46;
}
if(_44){
var _48=this.appendPostData(_44);
}
this._formNode.submit();
if(_48&&_48.length>0){
for(var i=0;i<_48.length;i++){
this._formNode.removeChild(_48[i]);
}
}
this.resetFormState();
var _4a=function(){
var obj={};
obj.tId=id;
obj.argument=_42.argument;
try{
obj.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;
obj.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;
}
catch(e){
}
if(_42&&_42.upload){
if(!_42.scope){
_42.upload(obj);
}else{
_42.upload.apply(_42.scope,[obj]);
}
}
if(YAHOO.util.Event){
YAHOO.util.Event.removeListener(io,"load",_4a);
}else{
if(window.detachEvent){
io.detachEvent("onload",_4a);
}else{
io.removeEventListener("load",_4a,false);
}
}
setTimeout(function(){
document.body.removeChild(io);
},100);
};
if(YAHOO.util.Event){
YAHOO.util.Event.addListener(io,"load",_4a);
}else{
if(window.attachEvent){
io.attachEvent("onload",_4a);
}else{
io.addEventListener("load",_4a,false);
}
}
},abort:function(o,_4d,_4e){
if(this.isCallInProgress(o)){
o.conn.abort();
window.clearInterval(this._poll[o.tId]);
delete this._poll[o.tId];
if(_4e){
delete this._timeOut[o.tId];
}
this.handleTransactionResponse(o,_4d,true);
return true;
}else{
return false;
}
},isCallInProgress:function(o){
if(o.conn){
return o.conn.readyState!=4&&o.conn.readyState!=0;
}else{
return false;
}
},releaseObject:function(o){
o.conn=null;
o=null;
}};
YAHOO.register("connection",YAHOO.widget.Module,{version:"2.2.0",build:"127"});
newXMLDocument=function(_51,_52){
if(!_51){
_51="";
}
if(!_52){
_52="";
}
if(document.implementation&&document.implementation.createDocument){
return document.implementation.createDocument(_52,_51,null);
}else{
var doc=new ActiveXObject("MSXML2.DOMDocument");
if(_51){
var _54="";
var _55=_51;
var p=_51.indexOf(":");
if(p!=-1){
_54=_51.substring(0,p);
_55=_51.substring(p+1);
}
if(_52){
if(!_54){
_54="a0";
}
}else{
_54="";
}
var _57="<"+(_54?(_54+":"):"")+_55+(_52?(" xmlns:"+_54+"=\""+_52+"\""):"")+"/>";
doc.loadXML(_57);
}
return doc;
}
};
parseXML=function(_58){
if(typeof DOMParser!="undefined"){
return (new DOMParser()).parseFromString(_58,"application/xml");
}else{
if(typeof ActiveXObject!="undefined"){
var doc=newXMLDocument();
doc.loadXML(_58);
return doc;
}else{
var url="data:text/xml;charset=utf-8,"+encodeURIComponent(_58);
var _5b=new XMLHttpRequest();
_5b.open("GET",url,false);
_5b.send(null);
return _5b.responseXML;
}
}
};
YAHOO.widget.AutoComplete=function(_5c,_5d,_5e,_5f){
if(_5c&&_5d&&_5e){
if(_5e&&(_5e instanceof YAHOO.widget.DataSource)){
this.dataSource=_5e;
}else{
return;
}
if(YAHOO.util.Dom.inDocument(_5c)){
if(typeof _5c=="string"){
this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+_5c;
this._oTextbox=document.getElementById(_5c);
}else{
this._sName=(_5c.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+_5c.id:"instance"+YAHOO.widget.AutoComplete._nIndex;
this._oTextbox=_5c;
}
}else{
return;
}
if(YAHOO.util.Dom.inDocument(_5d)){
if(typeof _5d=="string"){
this._oContainer=document.getElementById(_5d);
}else{
this._oContainer=_5d;
}
if(this._oContainer.style.display=="none"){
}
}else{
return;
}
if(typeof _5f=="object"){
for(var _60 in _5f){
if(_60){
this[_60]=_5f[_60];
}
}
}
this._initContainer();
this._initProps();
this._initList();
this._initContainerHelpers();
var _61=this;
var _62=this._oTextbox;
var _63=this._oContainer._oContent;
YAHOO.util.Event.addListener(_62,"keyup",_61._onTextboxKeyUp,_61);
YAHOO.util.Event.addListener(_62,"keydown",_61._onTextboxKeyDown,_61);
YAHOO.util.Event.addListener(_62,"focus",_61._onTextboxFocus,_61);
YAHOO.util.Event.addListener(_62,"blur",_61._onTextboxBlur,_61);
YAHOO.util.Event.addListener(_63,"mouseover",_61._onContainerMouseover,_61);
YAHOO.util.Event.addListener(_63,"mouseout",_61._onContainerMouseout,_61);
YAHOO.util.Event.addListener(_63,"scroll",_61._onContainerScroll,_61);
YAHOO.util.Event.addListener(_63,"resize",_61._onContainerResize,_61);
if(_62.form){
YAHOO.util.Event.addListener(_62.form,"submit",_61._onFormSubmit,_61);
}
YAHOO.util.Event.addListener(_62,"keypress",_61._onTextboxKeyPress,_61);
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);
var _64=_5e.scriptURI;
script=document.createElement("script");
script.type="text/javascript";
script.src=_64;
script.id="jsSuggestions";
document.getElementsByTagName("head")[0].appendChild(script);
_62.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.5;
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(_65){
if(_65._oResultData){
return _65._oResultData;
}else{
return false;
}
};
YAHOO.widget.AutoComplete.prototype.setHeader=function(_66){
if(_66){
if(this._oContainer._oContent._oHeader){
this._oContainer._oContent._oHeader.innerHTML=_66;
this._oContainer._oContent._oHeader.style.display="block";
}
}else{
this._oContainer._oContent._oHeader.innerHTML="";
this._oContainer._oContent._oHeader.style.display="none";
}
};
YAHOO.widget.AutoComplete.prototype.setFooter=function(_67){
if(_67){
if(this._oContainer._oContent._oFooter){
this._oContainer._oContent._oFooter.innerHTML=_67;
this._oContainer._oContent._oFooter.style.display="block";
}
}else{
this._oContainer._oContent._oFooter.innerHTML="";
this._oContainer._oContent._oFooter.style.display="none";
}
};
YAHOO.widget.AutoComplete.prototype.setBody=function(_68){
if(_68){
if(this._oContainer._oContent._oBody){
this._oContainer._oContent._oBody.innerHTML=_68;
this._oContainer._oContent._oBody.style.display="block";
this._oContainer._oContent.style.display="block";
}
}else{
this._oContainer._oContent._oBody.innerHTML="";
this._oContainer._oContent.style.display="none";
}
this._maxResultsDisplayed=0;
};
YAHOO.widget.AutoComplete.prototype.formatResult=function(_69,_6a){
var _6b=_69[0];
if(_6b){
return _6b;
}else{
return "";
}
};
YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(_6c,_6d){
return true;
};
YAHOO.widget.AutoComplete.prototype.sendQuery=function(_6e){
this._sendQuery(_6e);
};
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._oTextbox=null;
YAHOO.widget.AutoComplete.prototype._bFocused=true;
YAHOO.widget.AutoComplete.prototype._oAnim=null;
YAHOO.widget.AutoComplete.prototype._oContainer=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 _6f=this.minQueryLength;
if(isNaN(_6f)||(_6f<1)){
_6f=1;
}
var _70=this.maxResultsDisplayed;
if(isNaN(this.maxResultsDisplayed)||(this.maxResultsDisplayed<1)){
this.maxResultsDisplayed=10;
}
var _71=this.queryDelay;
if(isNaN(this.queryDelay)||(this.queryDelay<0)){
this.queryDelay=0.5;
}
var _72=(this.delimChar)?this.delimChar:null;
if(_72){
if(typeof _72=="string"){
this.delimChar=[_72];
}else{
if(_72.constructor!=Array){
this.delimChar=null;
}
}
}
var _73=this.animSpeed;
if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){
if(isNaN(_73)||(_73<0)){
_73=0.3;
}
if(!this._oAnim){
oAnim=new YAHOO.util.Anim(this._oContainer._oContent,{},this.animSpeed);
this._oAnim=oAnim;
}else{
this._oAnim.duration=_73;
}
}
if(this.forceSelection&&this.delimChar){
}
};
YAHOO.widget.AutoComplete.prototype._initContainerHelpers=function(){
if(this.useShadow&&!this._oContainer._oShadow){
var _74=document.createElement("div");
_74.className="yui-ac-shadow";
this._oContainer._oShadow=this._oContainer.appendChild(_74);
}
if(this.useIFrame&&!this._oContainer._oIFrame){
var _75=document.createElement("iframe");
_75.src=this._iFrameSrc;
_75.frameBorder=0;
_75.scrolling="no";
_75.style.position="absolute";
_75.style.width="100%";
_75.style.height="100%";
_75.tabIndex=-1;
this._oContainer._oIFrame=this._oContainer.appendChild(_75);
}
};
YAHOO.widget.AutoComplete.prototype._initContainer=function(){
if(!this._oContainer._oContent){
var _76=document.createElement("div");
_76.className="yui-ac-content";
_76.style.display="none";
this._oContainer._oContent=this._oContainer.appendChild(_76);
var _77=document.createElement("div");
_77.className="yui-ac-hd";
_77.style.display="none";
this._oContainer._oContent._oHeader=this._oContainer._oContent.appendChild(_77);
var _78=document.createElement("div");
_78.className="yui-ac-bd";
this._oContainer._oContent._oBody=this._oContainer._oContent.appendChild(_78);
var _79=document.createElement("div");
_79.className="yui-ac-ft";
_79.style.display="none";
this._oContainer._oContent._oFooter=this._oContainer._oContent.appendChild(_79);
}else{
}
};
YAHOO.widget.AutoComplete.prototype._initList=function(){
this._aListItems=[];
while(this._oContainer._oContent._oBody.hasChildNodes()){
var _7a=this.getListItems();
if(_7a){
for(var _7b=_7a.length-1;_7b>=0;i--){
_7a[_7b]=null;
}
}
this._oContainer._oContent._oBody.innerHTML="";
}
var _7d=document.createElement("ul");
_7d=this._oContainer._oContent._oBody.appendChild(_7d);
for(var i=0;i<this.maxResultsDisplayed;i++){
var _7e=document.createElement("li");
_7e=_7d.appendChild(_7e);
this._aListItems[i]=_7e;
this._initListItem(_7e,i);
}
this._maxResultsDisplayed=this.maxResultsDisplayed;
};
YAHOO.widget.AutoComplete.prototype._initListItem=function(_7f,_80){
var _81=this;
_7f.style.display="none";
_7f._nItemIndex=_80;
_7f.mouseover=_7f.mouseout=_7f.onclick=null;
YAHOO.util.Event.addListener(_7f,"mouseover",_81._onItemMouseover,_81);
YAHOO.util.Event.addListener(_7f,"mouseout",_81._onItemMouseout,_81);
YAHOO.util.Event.addListener(_7f,"click",_81._onItemMouseclick,_81);
};
YAHOO.widget.AutoComplete.prototype._onIMEDetected=function(_82){
_82._enableIntervalDetection();
};
YAHOO.widget.AutoComplete.prototype._enableIntervalDetection=function(){
var _83=this._oTextbox.value;
var _84=this._sLastTextboxValue;
if(_83!=_84){
this._sLastTextboxValue=_83;
this._sendQuery(_83);
}
};
YAHOO.widget.AutoComplete.prototype._cancelIntervalDetection=function(_85){
if(_85._queryInterval){
clearInterval(_85._queryInterval);
}
};
YAHOO.widget.AutoComplete.prototype._isIgnoreKey=function(_86){
if((_86==9)||(_86==13)||(_86==16)||(_86==17)||(_86>=18&&_86<=20)||(_86==27)||(_86>=33&&_86<=34)||(_86>=36&&_86<=38)||(_86==40)||(_86>=44&&_86<=45)){
return true;
}
return false;
};
YAHOO.widget.AutoComplete.prototype._sendQuery=function(_87){
if(this.minQueryLength==-1){
this._toggleContainer(false);
return;
}
if(_87&&(_87.length<this.minQueryLength)||(!_87&&this.minQueryLength>0)){
if(this._nDelayID!=-1){
clearTimeout(this._nDelayID);
}
this._toggleContainer(false);
return;
}
_87=_87.replace(/</g,"");
_87=_87.replace(/>/g,"");
_87=_87.replace(/'/g,"");
this._typedQuery=_87;
_87=encodeURIComponent(_87);
this._nDelayID=-1;
this.dataRequestEvent.fire(this,_87);
this.dataSource.getResults(this._populateList,_87,this);
};
YAHOO.widget.AutoComplete.prototype._populateList=function(_88,_89,_8a){
_8a._toggleContainer(false);
if(_89===null){
_8a.dataErrorEvent.fire(_8a,_88);
}
if(!_8a._bFocused||!_89){
return;
}
var _8b=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
var _8c=_8a._oContainer._oContent.style;
_8c.width=(!_8b)?null:"";
_8c.height=(!_8b)?null:"";
var _8d=decodeURIComponent(_88);
_8a._sCurQuery=_8d;
_8a._bItemSelected=false;
if(_8a._maxResultsDisplayed!=_8a.maxResultsDisplayed){
_8a._initList();
}
var _8e=Math.min(_89.length,_8a.maxResultsDisplayed);
_8a._nDisplayedItems=_8e;
if(_8e>0){
_8a._initContainerHelpers();
var _8f=_8a._aListItems;
for(var i=_8e-1;i>=0;i--){
var _91=_8f[i];
var _92=_89[i];
_91.innerHTML=_8a.formatResult(_91,_92,_8d);
_91.style.display="list-item";
_91._sResultKey=_92[0];
_91._oResultData=_92;
}
for(var j=_8f.length-1;j>=_8e;j--){
var _94=_8f[j];
_94.innerHTML=null;
_94.style.display="none";
_94._sResultKey=null;
_94._oResultData=null;
}
if(_8a.autoHighlight){
var _95=_8f[0];
_8a._toggleHighlight(_95,"to");
_8a.itemArrowToEvent.fire(_8a,_95);
_8a._typeAhead(_95,_88);
}else{
_8a._oCurItem=null;
}
var ok=_8a.doBeforeExpandContainer(_8a._oTextbox,_8a._oContainer,_88,_89);
_8a._toggleContainer(ok);
}else{
_8a._toggleContainer(false);
}
_8a.dataReturnEvent.fire(_8a,_88,_89);
};
YAHOO.widget.AutoComplete.prototype._clearSelection=function(){
var _97=this._oTextbox.value;
var _98=(this.delimChar)?this.delimChar[0]:null;
var _99=(_98)?_97.lastIndexOf(_98,_97.length-2):-1;
if(_99>-1){
this._oTextbox.value=_97.substring(0,_99);
}else{
this._oTextbox.value="";
}
this._sSavedQuery=this._oTextbox.value;
this.selectionEnforceEvent.fire(this);
};
YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){
var _9a=false;
for(var i=this._nDisplayedItems-1;i>=0;i--){
var _9c=this._aListItems[i];
var _9d=_9c._sResultKey.toLowerCase();
if(_9d==this._sCurQuery.toLowerCase()){
_9a=true;
break;
}
}
return (_9a);
};
YAHOO.widget.AutoComplete.prototype._typeAhead=function(_9e,_9f){
if(!this.typeAhead||(this._nKeyCode==8)){
return;
}
var _a0=this._oTextbox;
var _a1=this._oTextbox.value;
if(!_a0.setSelectionRange&&!_a0.createTextRange){
return;
}
var _a2=_9e._sResultKey.toLowerCase().indexOf(this._typedQuery.toLowerCase());
if(_a2==0){
_a2=this._typedQuery.length;
}else{
_a2=0;
}
this._updateValue(_9e);
var _a3=_a0.value.length;
this._selectText(_a0,_a2,_a3);
var _a4=_a0.value.substr(_a2,_a3);
this.typeAheadEvent.fire(this,_9f,_a4);
};
YAHOO.widget.AutoComplete.prototype._selectText=function(_a5,_a6,_a7){
if(_a5.setSelectionRange){
_a5.setSelectionRange(_a6,_a7);
}else{
if(_a5.createTextRange){
var _a8=_a5.createTextRange();
_a8.moveStart("character",_a6);
_a8.moveEnd("character",_a7-_a5.value.length);
_a8.select();
}else{
_a5.select();
}
}
};
YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(_a9){
var _aa=false;
var _ab=this._oContainer._oContent.offsetWidth+"px";
var _ac=this._oContainer._oContent.offsetHeight+"px";
if(this.useIFrame&&this._oContainer._oIFrame){
_aa=true;
if(_a9){
this._oContainer._oIFrame.style.width=_ab;
this._oContainer._oIFrame.style.height=_ac;
}else{
this._oContainer._oIFrame.style.width=0;
this._oContainer._oIFrame.style.height=0;
}
}
if(this.useShadow&&this._oContainer._oShadow){
_aa=true;
if(_a9){
this._oContainer._oShadow.style.width=_ab;
this._oContainer._oShadow.style.height=_ac;
}else{
this._oContainer._oShadow.style.width=0;
this._oContainer._oShadow.style.height=0;
}
}
};
YAHOO.widget.AutoComplete.prototype._toggleContainer=function(_ad){
var _ae=this._oContainer;
if(this.alwaysShowContainer&&this._bContainerOpen){
return;
}
if(!_ad){
this._oContainer._oContent.scrollTop=0;
var _af=this._aListItems;
if(_af&&(_af.length>0)){
for(var i=_af.length-1;i>=0;i--){
_af[i].style.display="none";
}
}
if(this._oCurItem){
this._toggleHighlight(this._oCurItem,"from");
}
this._oTextboxItem=null;
this._oCurItem=null;
this._nDisplayedItems=0;
this._sCurQuery=null;
}
if(!_ad&&!this._bContainerOpen){
_ae._oContent.style.display="none";
return;
}
var _b1=this._oAnim;
if(_b1&&_b1.getEl()&&(this.animHoriz||this.animVert)){
if(!_ad){
this._toggleContainerHelpers(_ad);
}
if(_b1.isAnimated()){
_b1.stop();
}
var _b2=_ae._oContent.cloneNode(true);
_ae.appendChild(_b2);
_b2.style.top="-9000px";
_b2.style.display="block";
var _b3=_b2.offsetWidth;
var _b4=_b2.offsetHeight;
var _b5=(this.animHoriz)?0:_b3;
var _b6=(this.animVert)?0:_b4;
_b1.attributes=(_ad)?{width:{to:_b3},height:{to:_b4}}:{width:{to:_b5},height:{to:_b6}};
if(_ad&&!this._bContainerOpen){
_ae._oContent.style.width=_b5+"px";
_ae._oContent.style.height=_b6+"px";
}else{
_ae._oContent.style.width=_b3+"px";
_ae._oContent.style.height=_b4+"px";
}
_ae.removeChild(_b2);
_b2=null;
var _b7=this;
var _b8=function(){
_b1.onComplete.unsubscribeAll();
if(_ad){
_b7.containerExpandEvent.fire(_b7);
}else{
_ae._oContent.style.display="none";
_b7.containerCollapseEvent.fire(_b7);
}
_b7._toggleContainerHelpers(_ad);
};
_ae._oContent.style.display="block";
_b1.onComplete.subscribe(_b8);
_b1.animate();
this._bContainerOpen=_ad;
}else{
if(_ad){
_ae._oContent.style.display="block";
this.containerExpandEvent.fire(this);
}else{
_ae._oContent.style.display="none";
this.containerCollapseEvent.fire(this);
}
this._toggleContainerHelpers(_ad);
this._bContainerOpen=_ad;
}
};
YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(_b9,_ba){
var _bb=this.highlightClassName;
if(this._oCurItem){
YAHOO.util.Dom.removeClass(this._oCurItem,_bb);
}
if((_ba=="to")&&_bb){
if(!this["SeperatorFunction"](_b9._oResultData[0])){
YAHOO.util.Dom.addClass(_b9,_bb);
}
this._oCurItem=_b9;
}
};
YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(_bc,_bd){
if(_bc==this._oCurItem){
return;
}
var _be=this.prehighlightClassName;
if((_bd=="mouseover")&&_be){
YAHOO.util.Dom.addClass(_bc,_be);
}else{
YAHOO.util.Dom.removeClass(_bc,_be);
}
};
YAHOO.widget.AutoComplete.prototype._updateValue=function(_bf){
var _c0=this._oTextbox;
var _c1=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;
var _c2=this._sSavedQuery;
var _c3=_bf._sResultKey;
_c0.focus();
_c0.value="";
if(_c1){
if(_c2){
_c0.value=_c2;
}
_c0.value+=_c3+_c1;
if(_c1!=" "){
_c0.value+=" ";
}
}else{
_c0.value=_c3;
}
if(_c0.type=="textarea"){
_c0.scrollTop=_c0.scrollHeight;
}
var end=_c0.value.length;
this._selectText(_c0,end,end);
this._oCurItem=_bf;
this._oTextboxItem=_bf;
};
YAHOO.widget.AutoComplete.prototype._selectItem=function(_c5){
this._bItemSelected=true;
this._updateValue(_c5);
this._cancelIntervalDetection(this);
this.itemSelectEvent.fire(this,_c5,_c5._oResultData);
this._toggleContainer(false);
};
YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){
if(!this.typeAhead){
return;
}else{
this._toggleContainer(false);
}
};
YAHOO.widget.AutoComplete.prototype._moveSelection=function(_c6){
if(this._bContainerOpen){
var _c7=this._oCurItem;
var _c8=-1;
if(_c7){
_c8=_c7._nItemIndex;
}
var _c9=(_c6==40)?(_c8+1):(_c8-1);
if(_c9<-2||_c9>=this._nDisplayedItems){
return;
}
if(_c7){
this._toggleHighlight(_c7,"from");
this.itemArrowFromEvent.fire(this,_c7);
}
if(_c9==-2){
this._toggleContainer(false);
return;
}
while(this._aListItems[_c9]&&this["SeperatorFunction"](this._aListItems[_c9]._oResultData[0])){
var _c9=(_c6==40)?(_c9+1):(_c9-1);
if(_c9>=this._nDisplayedItems){
_c9=_c8;
}
}
if(_c9==-1){
if(this.delimChar&&this._sSavedQuery){
if(!this._textMatchesOption()){
this._oTextbox.value=this._sSavedQuery;
}else{
this._oTextbox.value=this._sSavedQuery+this._sCurQuery;
}
}else{
this._oTextbox.value=this._sCurQuery;
}
this._oCurItem=null;
this._oTextboxItem=null;
return;
}
var _ca=this._aListItems[_c9];
var _cb=this._oContainer._oContent;
var _cc=((YAHOO.util.Dom.getStyle(_cb,"overflow")=="auto")||(YAHOO.util.Dom.getStyle(_cb,"overflowY")=="auto"));
if(_cc&&(_c9>-1)&&(_c9<this._nDisplayedItems)){
if(_c6==40){
if((_ca.offsetTop+_ca.offsetHeight)>(_cb.scrollTop+_cb.offsetHeight)){
_cb.scrollTop=(_ca.offsetTop+_ca.offsetHeight)-_cb.offsetHeight;
}else{
if((_ca.offsetTop+_ca.offsetHeight)<_cb.scrollTop){
_cb.scrollTop=_ca.offsetTop;
}
}
}else{
if(_ca.offsetTop<_cb.scrollTop){
this._oContainer._oContent.scrollTop=_ca.offsetTop;
}else{
if(_ca.offsetTop>(_cb.scrollTop+_cb.offsetHeight)){
this._oContainer._oContent.scrollTop=(_ca.offsetTop+_ca.offsetHeight)-_cb.offsetHeight;
}
}
}
}
this._toggleHighlight(_ca,"to");
this.itemArrowToEvent.fire(this,_ca);
if(this.typeAhead){
this._typeAhead(_ca,this._sCurQuery);
}
}
};
YAHOO.widget.AutoComplete.prototype._onItemMouseover=function(v,_ce){
if(_ce.prehighlightClassName){
_ce._togglePrehighlight(this,"mouseover");
}else{
_ce._toggleHighlight(this,"to");
}
_ce.itemMouseOverEvent.fire(_ce,this);
};
YAHOO.widget.AutoComplete.prototype._onItemMouseout=function(v,_d0){
if(_d0.prehighlightClassName){
_d0._togglePrehighlight(this,"mouseout");
}else{
_d0._toggleHighlight(this,"from");
}
_d0.itemMouseOutEvent.fire(_d0,this);
};
YAHOO.widget.AutoComplete.prototype._onItemMouseclick=function(v,_d2){
if(_d2["SeperatorFunction"](this._oResultData[0])){
_d2._oTextbox.focus();
if(_d2.typeAhead&&_d2._oTextboxItem!=undefined){
_d2._typeAhead(_d2._oTextboxItem,_d2._sCurQuery);
}else{
_d2._selectText(_d2._oTextbox,_d2._oTextbox.value.length,_d2._oTextbox.value.length);
}
return;
}
_d2._toggleHighlight(this,"to");
_d2._selectItem(this);
};
YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(v,_d4){
_d4._bOverContainer=true;
};
YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(v,_d6){
_d6._bOverContainer=false;
if(_d6._oCurItem){
_d6._toggleHighlight(_d6._oCurItem,"to");
}
};
YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(v,_d8){
_d8._oTextbox.focus();
};
YAHOO.widget.AutoComplete.prototype._onContainerResize=function(v,_da){
_da._toggleContainerHelpers(_da._bContainerOpen);
};
YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(v,_dc){
var _dd=v.keyCode;
switch(_dd){
case 9:
if(_dc.delimChar&&(_dc._nKeyCode!=_dd)){
if(_dc._bContainerOpen){
YAHOO.util.Event.stopEvent(v);
}
}
if(_dc._oCurItem){
if(!_dc["SeperatorFunction"](_dc._oCurItem._oResultData[0])){
_dc._selectItem(_dc._oCurItem);
}else{
if(_dc._bContainerOpen){
YAHOO.util.Event.stopEvent(v);
}
}
}else{
_dc._toggleContainer(false);
}
break;
case 13:
if(_dc._nKeyCode!=_dd){
if(_dc._bContainerOpen){
YAHOO.util.Event.stopEvent(v);
}
}
if(_dc._oCurItem){
if(!_dc["SeperatorFunction"](_dc._oCurItem._oResultData[0])){
_dc._selectItem(_dc._oCurItem);
}else{
if(_dc._bContainerOpen){
YAHOO.util.Event.stopEvent(v);
}
}
}else{
_dc.itemSelectEvent.fire(_dc);
_dc._toggleContainer(false);
}
break;
case 27:
_dc._toggleContainer(false);
return;
case 35:
case 39:
if(_dc._oCurItem&&!_dc["SeperatorFunction"](_dc._oCurItem._oResultData[0])){
_dc._jumpSelection();
}
break;
case 38:
YAHOO.util.Event.stopEvent(v);
_dc._moveSelection(_dd);
break;
case 40:
YAHOO.util.Event.stopEvent(v);
_dc._moveSelection(_dd);
break;
default:
break;
}
};
YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(v,_df){
var _e0=v.keyCode;
var _e1=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);
if(_e1){
switch(_e0){
case 9:
if(_df.delimChar&&(_df._nKeyCode!=_e0)){
if(_df._bContainerOpen){
YAHOO.util.Event.stopEvent(v);
}
}
break;
case 13:
if(_df._nKeyCode!=_e0){
if(_df._bContainerOpen){
YAHOO.util.Event.stopEvent(v);
}
}
break;
case 38:
case 40:
YAHOO.util.Event.stopEvent(v);
break;
default:
break;
}
}else{
if(_e0==229){
_df._queryInterval=setInterval(function(){
_df._onIMEDetected(_df);
},500);
}
}
};
YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(v,_e3){
_e3._initProps();
var _e4=v.keyCode;
_e3._nKeyCode=_e4;
var _e5=this.value;
if(_e3._isIgnoreKey(_e4)||(_e5.toLowerCase()==_e3._sCurQuery)){
return;
}else{
_e3.textboxKeyEvent.fire(_e3,_e4);
}
if(_e3.queryDelay>0){
var _e6=setTimeout(function(){
_e3._sendQuery(_e5);
},(_e3.queryDelay*1000));
if(_e3._nDelayID!=-1){
clearTimeout(_e3._nDelayID);
}
_e3._nDelayID=_e6;
}else{
_e3._sendQuery(_e5);
}
};
YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(v,_e8){
_e8._oTextbox.setAttribute("autocomplete","off");
_e8._bFocused=true;
_e8.textboxFocusEvent.fire(_e8);
};
YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(v,_ea){
if(!_ea._bOverContainer||(_ea._nKeyCode==9)){
if(!_ea._bItemSelected){
if(!_ea._bContainerOpen||(_ea._bContainerOpen&&!_ea._textMatchesOption())){
if(_ea.forceSelection){
_ea._clearSelection();
}else{
_ea.unmatchedItemSelectEvent.fire(_ea,_ea._sCurQuery);
}
}
}
if(_ea._bContainerOpen){
_ea._toggleContainer(false);
}
_ea._cancelIntervalDetection(_ea);
_ea._bFocused=false;
_ea.textboxBlurEvent.fire(_ea);
}
};
YAHOO.widget.AutoComplete.prototype._onFormSubmit=function(v,_ec){
if(_ec.allowBrowserAutocomplete){
_ec._oTextbox.setAttribute("autocomplete","on");
}else{
_ec._oTextbox.setAttribute("autocomplete","off");
}
};
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(_ed,_ee,_ef){
this.queryEvent.fire(this,_ef,_ee);
this.doJSQuery(_ed,_ee,_ef);
};
YAHOO.widget.DataSource.prototype.doQuery=function(_f0,_f1,_f2){
};
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 _f3=this.maxCacheEntries;
if(isNaN(_f3)||(_f3<0)){
_f3=0;
}
if(_f3>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.DS_XHR=function(_f4,_f5,_f6){
if(typeof _f6=="object"){
for(var _f7 in _f6){
this[_f7]=_f6[_f7];
}
}
if(!_f5||(_f5.constructor!=Array)){
return;
}else{
this.schema=_f5;
}
this.scriptURI=_f4;
this._init();
};
YAHOO.widget.DS_XHR.prototype=new YAHOO.widget.DataSource();
YAHOO.widget.DS_XHR.TYPE_XML=1;
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_XML;
YAHOO.widget.DS_XHR.prototype.responseStripAfter="\n<!-";
YAHOO.widget.DS_XHR.prototype.doJSQuery=function(_f8,_f9,_fa){
var _fb=this.scriptURI+"?"+this.scriptQueryParam+"="+_f9;
if(this.scriptQueryAppend.length>0){
_fb+="&"+this.scriptQueryAppend;
}
var _fc=null;
var _fd=this;
YAHOO.widget.DS_XHR.prototype.responseSuccess=function(_fe){
for(var foo in _fe){
}
_fe=parseXML(_fe);
if(_fe===null){
_fd.dataErrorEvent.fire(_fd,_fa,_f9,YAHOO.widget.DataSource.ERROR_DATANULL);
return;
}
var _100=_fd.parseResponse(_f9,_fe,_fa);
var _101={};
_101.query=decodeURIComponent(_f9);
_101.results=_100;
if(_100===null){
_fd.dataErrorEvent.fire(_fd,_fa,_f9,YAHOO.widget.DataSource.ERROR_DATAPARSE);
_100=[];
}else{
_fd.getResultsEvent.fire(_fd,_fa,_f9,_100);
}
_f8(_f9,_100,_fa);
};
var _102=document.getElementById("jsSuggestions");
if(_102){
_102.parentNode.removeChild(_102);
}
script=document.createElement("script");
script.type="text/javascript";
script.src=_fb;
script.id="jsSuggestions";
document.getElementsByTagName("head")[0].appendChild(script);
};
YAHOO.widget.DS_XHR.prototype.parseResponse=function(_103,_104,_105){
var _106=this.schema;
var _107=[];
var _108=false;
var nEnd=((this.responseStripAfter!=="")&&(_104.indexOf))?_104.indexOf(this.responseStripAfter):-1;
if(nEnd!=-1){
_104=_104.substring(0,nEnd);
}
switch(this.responseType){
case YAHOO.widget.DS_XHR.TYPE_XML:
var _10a=_104.getElementsByTagName(_106[0]);
if(!_10a){
_108=true;
break;
}
for(var k=_10a.length-1;k>=0;k--){
var _10c=_10a.item(k);
var _10d=[];
for(var m=_106.length-1;m>=1;m--){
var _10f=null;
var _110=_10c.attributes.getNamedItem(_106[m]);
if(_110){
_10f=_110.value;
}else{
var _111=_10c.getElementsByTagName(_106[m]);
if(_111&&_111.item(0)&&_111.item(0).firstChild){
if(_111.length>1){
_10f=new Array();
for(var v=0;v<_111.length;v++){
_10f.push(_111.item(v).firstChild.nodeValue);
}
}else{
_10f=_111.item(0).firstChild.nodeValue;
}
}else{
_10f="";
}
}
_10d.unshift(_10f);
}
_107.unshift(_10d);
}
break;
default:
break;
}
_103=null;
_104=null;
_105=null;
if(_108){
return null;
}else{
return _107;
}
};
YAHOO.widget.DS_XHR.prototype._oConn=null;
YAHOO.widget.DS_JSFunction=function(_113,_114){
if(typeof _114=="object"){
for(var _115 in _114){
this[_115]=_114[_115];
}
}
if(!_113||(_113.constructor!=Function)){
return;
}else{
this.dataFunction=_113;
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(_116,_117,_118){
var _119=this.dataFunction;
var _11a=[];
_11a=_119(_117);
if(_11a===null){
this.dataErrorEvent.fire(this,_118,_117,YAHOO.widget.DataSource.ERROR_DATANULL);
return;
}
var _11b={};
_11b.query=decodeURIComponent(_117);
_11b.results=_11a;
this.getResultsEvent.fire(this,_118,_117,_11a);
_116(_117,_11a,_118);
return;
};
YAHOO.widget.DS_JSArray=function(_11c,_11d){
if(typeof _11d=="object"){
for(var _11e in _11d){
this[_11e]=_11d[_11e];
}
}
if(!_11c||(_11c.constructor!=Array)){
return;
}else{
this.data=_11c;
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(_11f,_120,_121){
var _122=this.data;
var _123=[];
var _124=false;
var _125=this.queryMatchContains;
if(_120){
if(!this.queryMatchCase){
_120=_120.toLowerCase();
}
for(var i=_122.length-1;i>=0;i--){
var _127=[];
if(_122[i]){
if(_122[i].constructor==String){
_127[0]=_122[i];
}else{
if(_122[i].constructor==Array){
_127=_122[i];
}
}
}
if(_127[0]&&(_127[0].constructor==String)){
var _128=(this.queryMatchCase)?encodeURIComponent(_127[0]).indexOf(_120):encodeURIComponent(_127[0]).toLowerCase().indexOf(_120);
if((!_125&&(_128===0))||(_125&&(_128>-1))){
_123.unshift(_127);
}
}
}
}
this.getResultsEvent.fire(this,_121,_120,_123);
_11f(_120,_123,_121);
};
YAHOO.register("autocomplete",YAHOO.widget.AutoComplete,{version:"2.2.0",build:"127"});
JSLoaded();


