var Class={create:function(){
return function(){
this.initialize.apply(this,arguments);
};
}};
function $(){
var _1=[],_2;
for(var i=0;i<arguments.length;i++){
_2=arguments[i];
if(typeof _2=="string"){
_2=document.getElementById(_2);
}
_1.push(_2);
}
return _1.length<2?_1[0]:_1;
}
var $A=function(_4){
if(!_4){
return [];
}
if(_4.toArray){
return _4.toArray();
}else{
var _5=[];
for(var i=0;i<_4.length;i++){
_5.push(_4[i]);
}
return _5;
}
};
Object.extend=function(_7,_8){
for(var _9 in _8){
_7[_9]=_8[_9];
}
return _7;
};
Function.prototype.bind=function(){
var _a=this,_b=$A(arguments),_c=_b.shift();
return function(){
return _a.apply(_c,_b.concat($A(arguments)));
};
};
Function.prototype.bindAsEventListener=function(_d){
var _e=this;
return function(_f){
return _e.call(_d,_f||window.event);
};
};
if(!window.Element){
var Element=new Object();
}
Element.Methods={visible:function(_10){
return $(_10).style.display!="none";
},hide:function(){
for(var i=0;i<arguments.length;i++){
var _12=$(arguments[i]);
_12.style.display="none";
}
},show:function(){
for(var i=0;i<arguments.length;i++){
var _14=$(arguments[i]);
_14.style.display="";
}
},getHeight:function(_15){
_15=$(_15);
return _15.offsetHeight;
},addClassName:function(_16,_17){
if(!(_16=$(_16))){
return;
}
_16.className=""==_16.className?_17:_16.className+" "+_17;
},removeClassName:function(_18,_19){
if(!(_18=$(_18))){
return;
}
var _1a=new RegExp("(^| )"+_19+"( |$)");
_18.className=_18.className.replace(_1a,"$1").replace(/ $/,"");
}};
Object.extend(Element,Element.Methods);
if(!window.Event){
var Event=new Object();
}
Object.extend(Event,{element:function(_1b){
return _1b.target||_1b.srcElement;
},observers:false,_observeAndCache:function(_1c,_1d,_1e,_1f){
if(!this.observers){
this.observers=[];
}
if(_1c.addEventListener){
this.observers.push([_1c,_1d,_1e,_1f]);
_1c.addEventListener(_1d,_1e,_1f);
}else{
if(_1c.attachEvent){
this.observers.push([_1c,_1d,_1e,_1f]);
_1c.attachEvent("on"+_1d,_1e);
}
}
},unloadCache:function(){
if(!Event.observers){
return;
}
for(var i=0;i<Event.observers.length;i++){
Event.stopObserving.apply(this,Event.observers[i]);
Event.observers[i][0]=null;
}
Event.observers=false;
},observe:function(_21,_22,_23,_24){
var _21=$(_21);
_24=_24||false;
if(_22=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_21.attachEvent)){
_22="keydown";
}
this._observeAndCache(_21,_22,_23,_24);
},stopObserving:function(_25,_26,_27,_28){
var _25=$(_25);
_28=_28||false;
if(_26=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_25.detachEvent)){
_26="keydown";
}
if(_25.removeEventListener){
_25.removeEventListener(_26,_27,_28);
}else{
if(_25.detachEvent){
_25.detachEvent("on"+_26,_27);
}
}
}});
if(navigator.appVersion.match(/\bMSIE\b/)){
Event.observe(window,"unload",Event.unloadCache,false);
}
var Position={cumulativeOffset:function(_29){
var _2a=0,_2b=0;
do{
_2a+=_29.offsetTop||0;
_2b+=_29.offsetLeft||0;
_29=_29.offsetParent;
}while(_29);
return [_2b,_2a];
}};
var KEY=Class.create();
Object.extend(KEY,{BACKSPACE:8,TAB:9,RETURN:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,INSERT:45,SHIFT:16,CTRL:17,ALT:18});
var timeoutInt=10;
var upDownTimeOut=10000;
var queryURL="/suggest/suggest.s?query=";
var indexAttr="aa_index";
var highlightStyle="aa_highlight";
var onSelAttr="onSelect";
var overcount=0;
var pxlf=1,pxtd=1;
var CONSTANTDOTJS=1;
var CtrlZNum=10;
var paras;
var func=null;
var AutoComplete=Class.create();
AutoComplete.prototype={initialize:function(_2c,_2d,_2e,_2f,_30){
this.txtBox=$(_2d);
this.txtBox.onkeyup=this.onkeyup.bindAsEventListener(this);
this.txtBox.onkeydown=this.onkeydown.bindAsEventListener(this);
this.txtBox.onblur=this.hide.bindAsEventListener(this);
Event.observe(this.txtBox,"dblclick",this.doRequestAndSel.bindAsEventListener(this));
Event.observe(document,"click",this.hide2.bindAsEventListener(this));
this.func=_2e;
this.paras=_2f;
this.objectName="aa";
this.moreParas="";
this.count=0;
this.suggestServer="";
this.searchServer="";
this.keyfrom="yodaoweb";
this.queryName="q";
this.suggestImage="suggestImage";
if(_30){
this.suggestImage=_30;
}
this.suggestFlag=true;
this.downFlag=true;
this.clickEnabled=true;
this.iframe=document.createElement("iframe");
this.iframe.style.position="absolute";
this.iframe.style.margin="1px 0 0 0";
this.iframe.style.padding="0";
this.iframe.id="myId1";
Element.hide(this.iframe);
document.body.appendChild(this.iframe);
this.scriptDiv=document.createElement("div");
document.body.appendChild(this.scriptDiv);
this.toShowDiv=document.createElement("div");
this.toShowDiv.style.position="absolute";
this.toShowDiv.id="myId2";
this.selectCallBack="null";
Element.hide(this.toShowDiv);
document.body.appendChild(this.toShowDiv);
this.bufferDiv=document.createElement("div");
this.visible=false;
this.lastQueryStr="";
this.initView=0;
this.oldInputValue="";
this.oldInputValueForCtrlZ=new Array(CtrlZNum);
this.oldInputValueForCtrlZnum=0;
this.hasPressCtrlZFlag=false;
this.selFlag=false;
this.firstShowFlag=true;
this.isOnsubmitFlag=false;
this.pressCtrlCFlag=false;
this.hasPressCtrlFlag=false;
this.keyReturnDownFlag=false;
window.onresize=this.winReSize.bind(this);
this.myform=_2c;
this.myform.onsubmit=this.submitFunction.bind(this);
this.txtBox.onsubmit=this.submitFunction.bind(this);
setInterval(this.showSuggestIcon.bind(this),200);
this.cleanup();
},init:function(){
},setMoreParas:function(_31){
this.moreParas=_31;
},setSuggestImageId:function(id){
this.suggestImage=id;
},setObjectName:function(_33){
this.objectName=_33;
},setQueryName:function(_34){
this.queryName=_34;
},setSelectCallBack:function(_35){
this.selectCallBack=_35;
},setInputId:function(id){
this.txtBox=$(id);
this.txtBox.onkeyup=this.onkeyup.bindAsEventListener(this);
this.txtBox.onkeydown=this.onkeydown.bindAsEventListener(this);
this.txtBox.onblur=this.hide.bindAsEventListener(this);
Event.observe(this.txtBox,"dblclick",this.doRequestAndSel.bindAsEventListener(this));
Event.observe(document,"click",this.hide2.bindAsEventListener(this));
},setKeyFrom:function(_37){
this.keyfrom=_37;
},suggestCtLog:function(_38,q,_3a){
var i=new Image();
i.src="http://"+document.domain+"/ctlog?q="+encodeURIComponent(q)+"&url="+encodeURIComponent(_38)+"&action="+_3a+"&type="+this.keyfrom;
return true;
},getAbsolutePos:function(e){
var l=e.offsetLeft;
var t=e.offsetTop;
while(e=e.offsetParent){
l+=e.offsetLeft;
t+=e.offsetTop;
}
var pos=new Object();
pos.x=l;
pos.y=t;
return pos;
},showSuggestIcon:function(){
var _40=document.getElementById(this.suggestImage);
if(_40){
var _41=this.txtBox;
var _42=this.getAbsolutePos(_41);
_40.style.left=(_42.x+_41.offsetWidth-13*1.5)+"px";
_40.style.top=(_42.y+(_41.offsetHeight-10)/2)+"px";
_40.style.display="";
}
},doRequestAndSel:function(){
this.doRequest();
if(this.txtBox.createTextRange){
}else{
if(this.txtBox.setSelectionRange){
}
}
return true;
},hide2:function(){
if(this.clickEnabled){
this.downFlag=true;
this.hide();
this.clickEnabled=false;
setTimeout(this.enableClick.bind(this),100);
}
},enableClick:function(){
this.clickEnabled=true;
},submitFunction:function(){
this.hide();
this.isOnsubmitFlag=true;
},winReSize:function(){
if(this.visible){
this.show();
}
if(this.func!=null){
this.func(this.paras);
}
},onkeyup:function(key){
switch(key.keyCode){
case KEY.PAGE_UP:
case KEY.PAGE_DOWN:
case KEY.END:
case KEY.HOME:
case KEY.INSERT:
case KEY.CTRL:
case KEY.ALT:
case KEY.LEFT:
return false;
case KEY.SHIFT:
break;
case KEY.BACKSPACE:
this.firstShowFlag=true;
break;
case KEY.TAB:
this.hide();
return true;
case KEY.RIGHT:
if(!this.selFlag){
if(this.currentNodeIndex==-1){
return false;
}else{
break;
}
}else{
this.selFlag=false;
}
break;
case KEY.UP:
return false;
case KEY.DOWN:
if(!this.visible){
if(this.toShowDiv.childNodes.length>0){
if(this.txtBox.value==this.lastQueryStr){
this.show();
return false;
}else{
break;
}
}
break;
}else{
return false;
}
case KEY.ESC:
this.hide();
return false;
case 32:
if(this.hasPressCtrlFlag){
this.hasPressCtrlFlag=false;
return true;
}
break;
case KEY.RETURN:
if(this.lastQueryStr!=this.txtBox.value&&this.currentNodeIndex==-1){
this.keyReturnDownFlag=false;
break;
}else{
if(this.visible&&this.currentNodeIndex>-1){
this.select();
this.keyReturnDownFlag=false;
return false;
}else{
if(this.currentNodeIndex==-1){
if(!this.visible){
if(!this.isOnsubmitFlag){
this.show();
}else{
this.isOnsubmitFlag=false;
}
}
this.keyReturnDownFlag=false;
return true;
}else{
this.keyReturnDownFlag=false;
return true;
}
}
}
default:
}
if(this.timeoutId!=0){
clearTimeout(this.timeoutId);
}
this.timeoutId=setTimeout(this.doRequest.bind(this),timeoutInt);
},onkeydown:function(key){
if(key.ctrlKey){
this.hasPressCtrlFlag=true;
}else{
this.hasPressCtrlFlag=false;
}
if(key.ctrlKey&&(key.keyCode==67||key.keyCode==99)){
this.pressCtrlCFlag=true;
return true;
}else{
if(key.ctrlKey&&(key.keyCode==90||key.keyCode==122)){
if(this.oldInputValueForCtrlZnum>0){
this.txtBox.value=this.oldInputValueForCtrlZ[--this.oldInputValueForCtrlZnum];
this.hasPressCtrlZFlag=true;
}
return false;
}else{
if(key.ctrlKey&&(key.keyCode==16)){
return true;
}else{
if(key.ctrlKey&&key.keyCode==32){
return true;
}
}
}
}
switch(key.keyCode){
case KEY.RIGHT:
return true;
case KEY.TAB:
return true;
case KEY.UP:
if(this.visible){
this.up();
}
return false;
case KEY.DOWN:
if(this.visible){
this.down();
}
return false;
case KEY.RETURN:
if(this.visible&&this.currentNodeIndex>-1){
this.keyReturnDownFlag=true;
return false;
}
return true;
case KEY.ESC:
return false;
default:
}
},isValidNode:function(_45){
return (_45.nodeType==1)&&(_45.getAttribute(onSelAttr));
},getSiteResult:function(str){
var re=new RegExp("<[s][p][a][n].*>.*</[s][p][a][n]>");
m=re.exec(str);
if(m==null){
re=new RegExp("<[aA].*>.*</[aA]>");
m=re.exec(str);
}
if(m==null){
var _48=str.indexOf("HREF=\"");
if(_48!=-1){
var end=str.indexOf("\"",_48+6);
var res=str.substring(_48+6,end);
return res;
}
return null;
}else{
var re1=new RegExp("[hH][rR][eE][fF]=.*><[fF][oO][nN][tT]");
var m1=re1.exec(m);
if(m1[0].length<=13){
return null;
}
var t=m1[0].split(" ");
var res;
if(t.length>1){
res=t[0].substr(6,t[0].length-7);
}else{
res=t[0].substr(6,t[0].length-13);
}
return res;
}
},select:function(){
if(this.currentNode()){
var str=this.currentNode().innerHTML;
var _4f=this.getSiteResult(str);
if(_4f!=null){
this.suggestCtLog(_4f,this.txtBox.value,"suggest.direct");
document.location=_4f;
this.hide();
}else{
var _50=this.currentNode().getAttribute(onSelAttr);
try{
eval(_50);
if(this.oldInputValue!=this.txtBox.value){
if(this.oldInputValueForCtrlZnum<CtrlZNum){
this.oldInputValueForCtrlZ[this.oldInputValueForCtrlZnum]=this.oldInputValue;
this.oldInputValueForCtrlZnum++;
}else{
for(var i=0;i<CtrlZNum-1;++i){
this.oldInputValueForCtrlZ[i]=this.oldInputValueForCtrlZ[i+1];
}
this.oldInputValueForCtrlZ[9]=this.oldInputValue;
}
}
this.oldInputValue=this.txtBox.value;
}
catch(e){
}
this.hide();
if(this.selectCallBack!="null"){
this.selectCallBack(this.txtBox.value);
}else{
var _52=this.getSearchPrefix();
var _53=encodeURI(_52+this.keyfrom+".suggest&"+this.queryName+"="+this.txtBox.value+this.moreParas);
document.location=_53;
}
}
}
},doRequest:function(_54){
this.firstShowFlag=true;
this.count++;
if(this.oldInputValue!=this.txtBox.value&&!this.hasPressCtrlZFlag){
if(this.oldInputValueForCtrlZnum<CtrlZNum){
this.oldInputValueForCtrlZ[this.oldInputValueForCtrlZnum]=this.oldInputValue;
this.oldInputValueForCtrlZnum++;
}else{
for(var i=0;i<=CtrlZNum-1;++i){
this.oldInputValueForCtrlZ[i]=this.oldInputValueForCtrlZ[i+1];
}
this.oldInputValueForCtrlZ[9]=this.oldInputValue;
}
}
this.hasPressCtrlZFlag=false;
this.oldInputValue=this.txtBox.value;
if(typeof (_54)!="undefined"&&(_54==","||_54==";")){
this.queryStr=_54;
}else{
this.queryStr=this.txtBox.value;
}
if(this.lastQueryStr==this.queryStr){
if(this.toShowDiv.childNodes.length!=0){
if(!this.visible&&this.queryStr!=""){
if(!this.pressCtrlCFlag){
this.show();
this.initView=0;
}else{
this.pressCtrlCFlag=false;
}
}else{
this.highlightOff();
}
return;
}else{
return;
}
}
if(!this.visible){
this.cleanup();
}
if(this.queryStr==""){
this.lastQueryStr="";
this.hide();
return;
}
this.lastQueryStr=this.queryStr;
if(this.suggestFlag==false){
return;
}
this.initView=0;
var _56={method:"get",onComplete:this.onComplete.bindAsEventListener(this),onFailure:this.onFailure.bindAsEventListener(this)};
var _57=this.getSuggestPrefix();
var _58=encodeURIComponent(document.URL);
var URL=encodeURI(_57+this.queryStr+"&gobackurl="+_58+"&o="+this.objectName+"&"+getTimeSuffix()+this.count);
this.bufferDiv.innerHTML="";
this.excuteCall(URL);
},onFailure:function(){
this.log("onFailure");
},cleanup:function(){
if(this.keyReturnDownFlag){
return;
}
this.size=0;
this.currentNodeIndex=-1;
this.toShowDiv.innerHTML="";
this.bufferDiv.innerHTML="";
},onComplete:function(){
setTimeout(this.updateContent.bind(this,arguments[0]),5);
},cleanScript:function(){
while(this.scriptDiv.childNodes.length>0){
this.scriptDiv.removeChild(this.scriptDiv.firstChild);
}
},onCompleteHit:function(){
setTimeout(this.showSuggestHit.bind(this,arguments[0]),5);
},updateContent:function(){
var _5a;
var _5b=false;
this.cleanScript();
if(this.bufferDiv.innerHTML==""){
if(this.toShowDiv.innerHTML!=""&&(this.toShowDiv.getElementsByTagName("div")[0]).getAttribute("id")==this.txtBox.value){
return;
}else{
this.hide();
this.cleanup();
return;
}
}
if((this.bufferDiv.getElementsByTagName("div")[0]).getAttribute("id")!=this.txtBox.value){
if(this.toShowDiv.innerHTML!=""&&(this.toShowDiv.getElementsByTagName("div")[0]).getAttribute("id")==this.txtBox.value){
return;
}else{
this.hide();
return;
}
}
var _5c=(((this.bufferDiv.getElementsByTagName("table"))[1]).getElementsByTagName("tr"));
for(var i=0;i<_5c.length;i++){
_5a=_5c[i];
if(this.isValidNode(_5a)){
_5b=true;
break;
}
}
if(_5b){
this.toShowDiv.innerHTML=this.bufferDiv.innerHTML;
_5c=(((this.toShowDiv.getElementsByTagName("table"))[1]).getElementsByTagName("tr"));
this.size=0;
this.currentNodeIndex=-1;
this.children=new Array();
for(var i=0;i<_5c.length;i++){
_5a=_5c[i];
if(this.isValidNode(_5a)){
_5a.setAttribute(indexAttr,this.size);
Event.observe(_5a,"mousemove",this.onmousemove.bindAsEventListener(this));
Event.observe(_5a,"mouseover",this.onmouseover.bindAsEventListener(this));
Event.observe(_5a,"mouseout",this.onmouseout.bindAsEventListener(this));
Event.observe(_5a,"click",this.select.bindAsEventListener(this));
this.children.push(_5a);
this.size++;
}
}
if(this.toShowDiv.getElementsByTagName("table").length>=3){
var c2=(((this.toShowDiv.getElementsByTagName("table"))[2]).getElementsByTagName("A"));
for(var i=0;i<c2.length;i++){
_5a=c2[i];
Event.observe(_5a,"click",this.onclick2.bindAsEventListener(this));
Event.observe(_5a,"mouseover",this.onmouseover2.bindAsEventListener(this));
Event.observe(_5a,"mouseout",this.onmouseout2.bindAsEventListener(this));
}
}
this.firstShowFlag=true;
this.show();
}else{
this.hide();
this.cleanup();
}
},setInputField:function(_5f){
this.txtBox.value=_5f;
},updateInputField:function(){
var _60=this.txtBox.value;
if(_60.toUpperCase().indexOf(this.oldInputValue.toUpperCase())==0){
if(this.txtBox.createTextRange){
var u=this.txtBox.createTextRange();
u.moveStart("character",this.oldInputValue.length);
u.select();
this.selFlag=true;
}else{
if(this.txtBox.setSelectionRange){
this.txtBox.setSelectionRange(this.oldInputValue.length,_60.length);
this.selFlag=true;
}
}
}
},show:function(){
if(this.toShowDiv.childNodes.length<1){
return;
}
if(this.suggestFlag){
if((this.toShowDiv.getElementsByTagName("div")[0]).getAttribute("id")!=this.txtBox.value){
return;
}
}
this.upPoint();
var _62=Position.cumulativeOffset(this.txtBox);
this.toShowDiv.style.top=_62[1]+this.txtBox.offsetHeight-1+"px";
this.toShowDiv.style.left=_62[0]+"px";
this.toShowDiv.style.cursor="default";
var _63=(navigator&&navigator.userAgent.toLowerCase().indexOf("msie")==-1);
this.toShowDiv.style.width=this.txtBox.offsetWidth+"px";
this.iframe.style.width=this.toShowDiv.style.width;
this.iframe.style.top=this.toShowDiv.style.top;
this.iframe.style.left=this.toShowDiv.style.left;
Element.show(this.toShowDiv);
this.iframe.style.height=_63?Element.getHeight(this.toShowDiv)-3+"px":Element.getHeight(this.toShowDiv)+"px";
this.visible=true;
if(this.firstShowFlag){
this.currentNodeIndex=-1;
this.firstShowFlag=false;
}
},showSuggestHit:function(){
if(this.toShowDiv.childNodes.length<1){
return;
}
var _64=Position.cumulativeOffset(this.txtBox);
this.toShowDiv.style.top=_64[1]+this.txtBox.offsetHeight-1+"px";
this.toShowDiv.style.left=_64[0]+"px";
this.toShowDiv.style.cursor="default";
var _65=(navigator&&navigator.userAgent.toLowerCase().indexOf("msie")==-1);
this.toShowDiv.style.width=_65?this.txtBox.offsetWidth-3+"px":this.txtBox.offsetWidth+"px";
this.iframe.style.width=this.toShowDiv.style.width;
this.iframe.style.top=this.toShowDiv.style.top;
this.iframe.style.left=this.toShowDiv.style.left;
Element.show(this.toShowDiv);
this.iframe.style.height=_65?Element.getHeight(this.toShowDiv)-3+"px":Element.getHeight(this.toShowDiv)+"px";
this.visible=true;
if(this.firstShowFlag){
this.currentNodeIndex=-1;
this.firstShowFlag=false;
}
},hide:function(){
if(this.keyReturnDownFlag){
return;
}
this.visible=false;
this.selFlag=false;
this.highlightOff();
Element.hide(this.toShowDiv);
Element.hide(this.iframe);
this.currentNodeIndex=-1;
this.firstShowFlag=true;
},onmousemove:function(_66){
this.initView=1;
this.onmouseover(_66);
},onmouseover:function(_67){
this.txtBox.onblur=null;
var _68=Event.element(_67);
if(this.initView==0){
this.initView=1;
return;
}
while(_68.parentNode&&(!_68.tagName||(_68.getAttribute(indexAttr)==null))){
_68=_68.parentNode;
}
var _69=(_68.tagName)?_68.getAttribute(indexAttr):-1;
if(_69==-1||_69==this.currentNodeIndex){
return;
}
this.highlightOff();
this.currentNodeIndex=_69;
this.highlight();
},onmouseout:function(){
this.highlightOff();
this.currentNodeIndex=-1;
this.txtBox.value=this.oldInputValue;
this.txtBox.onblur=this.hide.bindAsEventListener(this);
this.initView=1;
},onmouseover2:function(_6a){
this.txtBox.onblur=null;
this.intView=1;
},onmouseout2:function(){
this.initView=1;
this.txtBox.onblur=this.hide.bindAsEventListener(this);
},onclick2:function(){
this.initView=1;
return true;
},getNode:function(i){
if(this.children){
return this.children[i];
}else{
return undefined;
}
},currentNode:function(){
if(this.children){
return this.children[this.currentNodeIndex];
}else{
return undefined;
}
},highlight:function(){
if(this.currentNode()){
var t_c=this.currentNode().getElementsByTagName("td");
this.procInstantResult();
for(var i=0;i<t_c.length;++i){
Element.addClassName(t_c[i],highlightStyle);
}
var _6e=this.currentNode().getAttribute(onSelAttr);
try{
eval(_6e);
this.selFlag=false;
this.updateInputField();
}
catch(e){
}
}
},highlightOff:function(){
if(this.keyReturnDownFlag){
return;
}
if(this.currentNode()){
var t_c=this.currentNode().getElementsByTagName("td");
for(var i=0;i<t_c.length;++i){
Element.removeClassName(t_c[i],highlightStyle);
}
this.procInstantResultBack();
this.currentNodeIndex=-1;
}
},procInstantResult:function(){
var _71=this.currentNode().innerHTML;
if(_71.indexOf("red_font")==-1){
return;
}
var _72=document.getElementById("red_font");
if(_72){
_72.setAttribute("color","#ffffff");
}
_72=document.getElementById("gray_font");
if(_72){
_72.setAttribute("color","#ffffff");
}
},procInstantResultBack:function(){
var _73=this.currentNode().innerHTML;
if(_73.indexOf("red_font")==-1){
return;
}
var _74=document.getElementById("red_font");
if(_74){
_74.setAttribute("color","red");
}
_74=document.getElementById("gray_font");
if(_74){
_74.setAttribute("color","#008000");
}
},up:function(){
var _75=this.currentNodeIndex;
if(this.currentNodeIndex>0){
this.highlightOff();
this.currentNodeIndex=_75-1;
this.highlight();
}else{
if(this.currentNodeIndex==0){
this.highlightOff();
this.currentNodeIndex=--_75;
this.txtBox.value=this.oldInputValue;
}else{
this.currentNodeIndex=this.size-1;
this.highlight();
}
}
},down:function(){
var _76=this.currentNodeIndex;
if(this.currentNodeIndex==-1){
this.currentNodeIndex=++_76;
this.highlight();
}else{
if(this.currentNodeIndex<this.size-1){
this.highlightOff();
this.currentNodeIndex=++_76;
this.highlight();
}else{
this.highlightOff();
this.currentNodeIndex=-1;
this.txtBox.value=this.oldInputValue;
}
}
},excuteCall:function(URL){
var _78=document.createElement("script");
_78.src=URL;
this.scriptDiv.appendChild(_78);
},updateCall:function(_79){
_79=unescape(_79);
_79=_79.replace(/&lt;/g,"<");
_79=_79.replace(/&gt;/g,">");
_79=_79.replace(/&quot;/g,"\"");
_79=_79.replace(/&amp;/g,"&").replace(/&#39;/g,"'");
this.bufferDiv.innerHTML=_79;
if(this.bufferDiv.childNodes.length<2){
this.toShowDiv.innerHTML=this.bufferDiv.innerHTML;
this.downFlag=true;
}else{
this.onComplete();
}
},setSuggestFlag:function(_7a){
this.suggestFlag=_7a;
},upPoint:function(){
this.downFlag=false;
},downPoint:function(){
this.downFlag=true;
},pressPoint:function(img){
if(this.clickEnabled){
this.clickEnabled=false;
setTimeout(this.enableClick.bind(this),100);
if(!Element.visible(this.toShowDiv)&&((this.txtBox.value=="")||!this.suggestFlag)){
this.downFlag=true;
}
if(this.downFlag){
if(this.suggestFlag){
if(this.txtBox.value==""){
this.insertInputHit();
}else{
if(this.toShowDiv.innerHTML==""){
this.doRequest(this.txtBox.value);
setTimeout(this.showNoSuggest.bind(this),200);
}else{
if(this.toShowDiv.childNodes.length<2){
if(this.txtBox.value==this.lastQueryStr){
this.insertNoSuggestHit();
}else{
this.lastQueryStr=this.txtBox.value;
this.doRequest(this.txtBox.value);
}
}else{
this.onComplete();
}
}
}
}else{
this.insertSuggestHit();
}
this.downFlag=false;
}else{
if(this.suggestFlag){
this.hide();
}else{
}
this.downFlag=true;
}
}
},showNoSuggest:function(){
if(this.toShowDiv.childNodes.length<2){
this.insertNoSuggestHit();
}
this.downFlag=false;
},setSuggestServer:function(_7c){
this.suggestServer=_7c;
this.cleanup();
if(this.txtBox.value==""){
}else{
}
},setSearchServer:function(_7d){
this.searchServer=_7d;
},getSuggestPrefix:function(){
var _7e;
if(this.suggestServer!=""){
_7e=this.suggestServer+queryURL;
}else{
_7e="http://"+document.domain+queryURL;
}
return _7e;
},getSearchPrefix:function(){
var _7f;
if(this.searchServer!=""){
return this.searchServer+"?keyfrom=";
}else{
_7f="http://"+document.domain+"/search?keyfrom=";
}
return _7f;
},bindMouseEvent:function(c2){
for(var i=0;i<c2.length;i++){
var _82=c2[i];
Event.observe(_82,"click",this.onclick2.bindAsEventListener(this));
Event.observe(_82,"mouseover",this.onmouseover2.bindAsEventListener(this));
Event.observe(_82,"mouseout",this.onmouseout2.bindAsEventListener(this));
}
},bindATagWithMouseEvent:function(){
var _83=this.toShowDiv.getElementsByTagName("table")[2];
var c2=_83.getElementsByTagName("A");
this.bindMouseEvent(c2);
},insertSuggestHit:function(){
this.toShowDiv.innerHTML="<div style='z-index:12'><table cellpadding=0 cellspacing=1 border=0 width=100% bgcolor=#979797 align=center><tr><td valign=top><table cellpadding=0 cellspacing=0 border=0 width=100% align=center><tr onSelect=\"this.txtBox.value=''\"><td align=left bgcolor=white class=remindtt752>\u63d0\u793a\u529f\u80fd\u5df2\u5173\u95ed</td></tr></table><table onSelect=\"this.txtBox.value=''\" cellpadding=0 cellspacing=0 border=0 width=100% align=center><tr><td height=1px bgcolor=#ECF0EF class=jstxhuitiaoyou></td><td align=right height=17px bgcolor=#ECF0EF class=jstxhuitiaoyou align=right><a onclick=turnOnSuggest() class=jstxlan>\u6253\u5f00\u63d0\u793a\u529f\u80fd</a></td></tr></table></td></tr></table></div>";
this.bindATagWithMouseEvent();
this.onCompleteHit();
},insertInputHit:function(){
this.toShowDiv.innerHTML="<div style='z-index:12'><table cellpadding=0 cellspacing=1 border=0 width=100% bgcolor=#979797 align=center><tr><td valign=top><table cellpadding=0 cellspacing=0 border=0 width=100% align=center><tr onSelect=\"this.txtBox.value=''\"><td align=left  bgcolor=white class=remindtt752 color=#9E9E9E>\u5728\u641c\u7d22\u6846\u4e2d\u8f93\u5165\u5173\u952e\u5b57\uff0c\u5373\u4f1a\u5728\u8fd9\u91cc\u51fa\u73b0\u63d0\u793a</td></tr></table><table onSelect=\"this.txtBox.value=''\" cellpadding=0 cellspacing=0 border=0 width=100% align=center><tr><td height=1px bgcolor=#ECF0EF class=jstxhuitiaoyou></td><td align=right height=17px bgcolor=#ECF0EF class=jstxhuitiaoyou align=right><a onclick=turnOffSuggest() class=jstxlan>\u5173\u95ed\u63d0\u793a\u529f\u80fd</a></td></tr></table></td></tr></table></div>";
this.bindATagWithMouseEvent();
this.onCompleteHit();
},insertNoSuggestHit:function(){
this.toShowDiv.innerHTML="<div style='z-index:12'><table cellpadding=0 cellspacing=1 border=0 width=100% bgcolor=#979797 align=center><tr><td valign=top><table cellpadding=0 cellspacing=0 border=0 width=100% align=center><tr onSelect=\"this.txtBox.value=''\"><td align=left bgcolor=white align=left class=remindtt752>\u6ca1\u6709\u53ef\u7528\u7684\u63d0\u793a</td></tr></table><table onSelect=\"this.txtBox.value=''\" cellpadding=0 cellspacing=0 border=0 width=100% align=center><tr><td height=1px bgcolor=#ECF0EF class=jstxhuitiaoyou></td><td align=right height=17px bgcolor=#ECF0EF class=jstxhuitiaoyou align=right><a onclick=turnOffSuggest() class=jstxlan>\u5173\u95ed\u63d0\u793a\u529f\u80fd</a></td></tr></table></td></tr></table></div>";
this.bindATagWithMouseEvent();
this.onCompleteHit();
}};
function turnOffSuggest(){
var i=new Image();
aa.setSuggestFlag(false);
var _86;
var _87="/suggest/setpref.s?";
if(this.suggestServer!=""){
_86=aa.suggestServer+_87;
}else{
_86="http://"+document.domain+queryURL;
}
var _88=encodeURI(_86+getTimeSuffix());
i.src=_88;
aa.downPoint();
return false;
}
function getTimeSuffix(){
return "timeflag="+new Date();
}
function turnOnSuggest(){
var i=new Image();
aa.setSuggestFlag(true);
var _8a;
var _8b="/suggest/setpref.s?suggest=suggest";
if(this.suggestServer!=""){
_8a=aa.suggestServer+_8b;
}else{
_8a="http://"+document.domain+queryURL;
}
var _8c=encodeURI(_8a+"&"+getTimeSuffix());
i.src=_8c;
aa.cleanup();
aa.downPoint();
i.onLoad=onLoad();
return false;
}
function pressPoint(){
aa.pressPoint();
}
function closeSuggest(){
aa.setSuggestFlag(false);
aa.cleanScript();
}
function openSuggest(){
aa.setSuggestFlag(true);
}
function updateCall(_8d){
aa.updateCall(_8d);
}
function setSuggestServer(_8e){
aa.setSuggestServer(_8e);
}
function setSerachServer(_8f){
aa.setSearchServer(_8f);
}

