var neverModules=window.neverModules||{};var _registerNS=_registerNS||function(C){var D=C.split(".");var A=neverModules;for(var B=(D[0]=="neverModules")?1:0;B<D.length;B++){A[D[B]]=A[D[B]]||{};A=A[D[B]]}return A};var _createjsClass=_createjsClass||function(){return function(){this._defaultInitializer.apply(this,arguments)}};_registerNS("neverModules.modules");_registerNS("neverModules.browser");_registerNS("neverModules.configuration");neverModules.browser={isMozilla:(typeof document.implementation!="undefined")&&(typeof document.implementation.createDocument!="undefined")&&(typeof HTMLDocument!="undefined"),isIE:window.ActiveXObject?true:false,isOpera:(navigator.userAgent.toLowerCase().indexOf("opera")!=-1)};if(!neverModules.browser.isIE){HTMLElement.prototype.click=function(){var A=this.ownerDocument.createEvent("MouseEvents");A.initMouseEvent("click",true,true,this.ownerDocument.defaultView,1,0,0,0,0,false,false,false,false,0,null);this.dispatchEvent(A)}}String.prototype.rgEncode=function(){var A=this;if(A=="undefined"){return""}A=A.replace(/\\/g,"\\\\");A=A.replace(/\//g,"\\/");A=A.replace(/\^/g,"\\^");A=A.replace(/\*/g,"\\*");A=A.replace(/\?/g,"\\?");A=A.replace(/\+/g,"\\+");A=A.replace(/\./g,"\\.");A=A.replace(/\|/g,"\\|");A=A.replace(/\[/g,"\\[");A=A.replace(/\]/g,"\\]");A=A.replace(/\(/g,"\\(");A=A.replace(/\)/g,"\\)");A=A.replace(/\{/g,"\\{");A=A.replace(/\}/g,"\\}");return A};function getAbsoluteCoords(E){var C=E.offsetTop;var B=E.offsetLeft;var A=E.offsetWidth>200?E.offsetWidth:200;var D=E.offsetHeight;while(E=E.offsetParent){C+=E.offsetTop;B+=E.offsetLeft}return{top:C,left:B,width:A,height:D,bottom:C+D,right:B+A}}if(typeof addEvent!="function"){var addEvent=function(B,J,F,E){var G="addEventListener",C="on"+J,I=B,H=J,D=F,A=E;if(B[G]&&!E){return B[G](J,F,false)}if(!B._evts){B._evts={}}if(!B._evts[J]){B._evts[J]=B[C]?{b:B[C]}:{};B[C]=new Function("e",'var r = true, o = this, a = o._evts["'+J+'"], i; for (i in a) {o._f = a[i]; r = o._f(e||window.event) != false && r; o._f = null;} return r');if(J!="unload"){addEvent(window,"unload",function(){removeEvent(I,H,D,A)})}}if(!F._i){F._i=addEvent._i++}B._evts[J][F._i]=F};addEvent._i=1;var removeEvent=function(E,B,C,A){var D="removeEventListener";if(E[D]&&!A){return E[D](B,C,false)}if(E._evts&&E._evts[B]&&C._i){delete E._evts[B][C._i]}}}neverModules.configuration.autocomplete={defaultAnimateImage:{src:"http://i.66fund.com/i/images/animated_loading.gif"},defaultSliceRange:{low:0,high:200},defaultIsUseContent:false,defaultAutoSlice:true,defaultIgnoreSpeed:false,defaultIgnoreCase:true,defaultIgnoreWhere:true,defaultUseSpaceMatch:true,defaultIsUseArrow:true,defaultCallbackHdle:function(){},defaultDataSource:[],defaultHeight:200,defaultMaxSlice:200,defaultSpaceMatchRg:".{1,}",_defaultInvalidCode:[13,38,40,27,9,17,16],_defaultSelectedIdx:-1,_defaultStatus:0,_defaultInitObject:null,_defaultStyleCss:"neverModules-auto",_defaultHighlightTag:{start:"<strong>",end:"</strong>"},type:"type"};neverModules.modules.autocomplete=_createjsClass();neverModules.modules.autocomplete.prototype={_defaultInitializer:function(A){this.name=A.instanceName;this.textbox=A.textbox;this.returnBox=A.returnBox||this.textbox;this.maxSlice=neverModules.configuration.autocomplete.defaultMaxSlice;this.sliceRange=neverModules.configuration.autocomplete.defaultSliceRange;this.ignoreSpeed=!!neverModules.configuration.autocomplete.defaultIgnoreSpeed;this.ignoreCase=!!neverModules.configuration.autocomplete.defaultIgnoreCase;this.ignoreWhere=!!neverModules.configuration.autocomplete.defaultIgnoreWhere;this.autoSlice=!!neverModules.configuration.autocomplete.defaultAutoSlice;this.useContent=!!neverModules.configuration.autocomplete.defaultIsUseContent;this.useArrow=!!neverModules.configuration.autocomplete.defaultIsUseArrow;this.useSpaceMatch=!!neverModules.configuration.autocomplete.defaultUseSpaceMatch;this.spaceMatchRg=neverModules.configuration.autocomplete.defaultSpaceMatchRg;this.animateImage=neverModules.configuration.autocomplete.defaultAnimateImage;this.callback=neverModules.configuration.autocomplete.defaultCallbackHdle;this.scrollHeight=isNaN(parseInt(A.height))?neverModules.configuration.autocomplete.defaultHeight:parseInt(A.height);this._currentVer=0.12;this._formatData=[];this._inTheCacheData=false;this._cacheValue="$NEVERMODULES_NULL_STRING$";this._selectedIdx=neverModules.configuration.autocomplete._defaultSelectedIdx;this._currentStatus=neverModules.configuration.autocomplete._defaultStatus;this._cacheData=neverModules.configuration.autocomplete._defaultInitObject;this._completeContainer=neverModules.configuration.autocomplete._defaultInitObject;this._completeIframe=neverModules.configuration.autocomplete._defaultInitObject;this._completeStyle=A.style||neverModules.configuration.autocomplete._defaultStyleCss;this._dataSource=A.dataSource||neverModules.configuration.autocomplete._defaultDataSource;this._highlightTag=neverModules.configuration.autocomplete._defaultHighlightTag;this._invalidKeyCode=neverModules.configuration.autocomplete._defaultInvalidCode;this._inputValue="$NEVERMODULES_NULL_STRING$"},_createAutocomplete:function(){with(this){if(!document.body){throw new Error(["neverModules Error","Document <BODY> not loaded£¬Can not create autoComplete"])}textbox.setAttribute("autocomplete","off");_completeContainer=document.createElement("DIV");document.body.appendChild(_completeContainer);_completeContainer.setAttribute("id","JAYSON_COMPLETE_ID",0);_completeContainer.className=this._completeStyle;with(_completeContainer.style){height=scrollHeight+"px";overflow="auto";zIndex="2";position="absolute";display="none"}var self=this;_completeContainer.onscroll=function(){self.textboxFocus()};if(neverModules.browser.isIE){_completeIframe=document.createElement("iframe");_completeIframe.setAttribute("id","JAYSON_COMPLETE_ID",0);document.body.appendChild(_completeIframe);with(_completeIframe.style){position="absolute";display="none";zIndex="1";overflow="hidden";frameBorder="0";scrolling="no";marginHeight="0";marginWidth="0"}_completeContainer.onselectstart=function(){window.returnValue=false}}addEvent(document,"mousedown",function(evt){e=window.event?window.event.srcElement:evt.target;try{if(!self._queryTheContainer(e)){self.close()}else{self.textboxFocus()}}catch(ex){}});addEvent(document,"keyup",function(evt){e=window.event?window.event.srcElement:evt.target;try{if(!self._queryTheContainer(e)){self.close()}else{self.textboxFocus()}}catch(ex){}});if(this._currentStatus){this.show()}}},_encode:function(A){A=A+"";A=A.replace(/\&nbsp;/g," ");A=A.replace(/\&nbsp/g," ");return A},_decode:function(A){A=A+"";A=A.replace(/ /g,"&nbsp;");return A},_queryTheContainer:function(A){while(A&&A.tagName!="BODY"){if(!A){return false}if(A==this.textbox||A==this._completeContainer){return true}A=A.parentNode}return false},_fireCallbackHdle:function(){if(typeof (this.callback)=="function"){this.callback.apply(this,arguments)}},_hdleFactory:function(A,B){B=B||[];if("formatDatasource"==A){return this.useContent==true?this._formatMutiDataSource.apply(this,B):this._formatSingleDataSource.apply(this,B)}else{if("query"==A){return this.useContent==true?this._queryMutiDataSource.apply(this,B):this._querySingleDataSource.apply(this,B)}else{if("toggle"==A){return this.useContent==true?this._hdleMutiToggle.apply(this,B):this._hdleSingleToggle.apply(this,B)}else{if("arrow"==A){return this.useContent==true?this._hdleMutiArrow.apply(this,B):this._hdleSingleArrow.apply(this,B)}}}}},_hdleQuery:function(A){if(!A){return false}return this._hdleFactory("query",arguments)},_hdleToggle:function(D,C,B,A){this._hdleFactory("toggle",arguments)},_hdleClick:function(A,B){var D=this.getSelectedValue(A).text;var C=this.getSelectedValue(A).content;this._inputValue=D;this.returnBox.value=D;this._fireCallbackHdle(D,C);if(B==2000){selectAfterEvt_(B,D,C)}else{selectAfterEvt(B)}this.close();this.textboxFocus()},_hdleFormatDataSource:function(){return this._hdleFactory("formatDatasource",arguments)},_hdleSingleArrow:function(nKeyCode){with(this){var r=_completeContainer.getElementsByTagName("div");switch(nKeyCode){case 13:r[this._selectedIdx]?r[this._selectedIdx].click():null;break;case 38:this._selectedIdx--;break;case 40:this._selectedIdx++;break;case 27:this.close();break;default:return }this._selectedIdx<=-1?this._selectedIdx=0:this._selectedIdx>r.length-1?this._selectedIdx=r.length-1:"";if(!r[this._selectedIdx]){return }this._completeContainer.scrollTop=this._getRelativeScrollTop(r[this._selectedIdx]);this._hdleToggle(r[this._selectedIdx],"over");this._selectedIdx>0?this._hdleToggle(r[this._selectedIdx-1],"out"):"";this._hdleToggle(r[this._selectedIdx+1],"out");this._createRange(r[this._selectedIdx])}},_hdleMutiArrow:function(C){var A=this._completeContainer.childNodes[0];var B=A.getElementsByTagName("TR");switch(C){case 13:B[this._selectedIdx]?B[this._selectedIdx].click():"";break;case 38:this._selectedIdx--;break;case 40:this._selectedIdx++;break;case 27:this.close();break;default:return }this._selectedIdx<=-1?this._selectedIdx=0:this._selectedIdx>B.length-1?this._selectedIdx=B.length-1:"";if(!B[this._selectedIdx]){return }this._completeContainer.scrollTop=this._getRelativeScrollTop(B[this._selectedIdx]);this._hdleToggle(B[this._selectedIdx],"over","autot-over","autoc-over");this._selectedIdx>0?this._hdleToggle(B[this._selectedIdx-1],"out","autot","autoc"):"";B[this._selectedIdx+1]?this._hdleToggle(B[this._selectedIdx+1],"out","autot","autoc"):"";this._createRange(B[this._selectedIdx])},_createRange:function(C){if(!C){return }var A;var D=this.getSelectedValue(C).text;this.returnBox.value=D;if(neverModules.browser.isIE){try{A=this.textbox.createTextRange();A.moveStart("character",this._inputValue.length);A.select();A=null}catch(B){}}else{}},_tg:function(A){this._hdleToggle.apply(this,arguments)},_hdleMutiToggle:function(G,E,D,C,A){if(!G){return }var B=this._completeContainer;G.tagName=="TR"?G.className=E:"";var B=G.childNodes;for(var F=0;F<B.length;F++){if(B[F].nodeType==1){if(B[F].className.toLowerCase().indexOf("autot")>-1){B[F].className=D}else{if(B[F].className.toLowerCase().indexOf("autoc")>-1){B[F].className=C}else{if(B[F].className.toLowerCase().indexOf("autothird")>-1){B[F].className=A}}}}}},_hdleSingleToggle:function(B,A){if(!B){return }B.className=A},_hc:function(A,B){this._hdleClick.apply(this,arguments,B)},_ckSpaceMatchQuery:function(A){A=A+"";if(!this.useSpaceMatch){return A}A=this.useSpaceMatch?A.replace(/ /g,"|"):A;return A},_getRelativeScrollTop:function(A){return A.offsetTop},_querySingleDataSource:function(E){var A=this._ckSpaceMatchQuery(E);E=this.useSpaceMatch?E.replace(/ /g,this.spaceMatchRg):E;var D=new RegExp().compile("<div[^<>]+?>"+(this.ignoreWhere?"[^<>]*?":"")+E+"[^<>]*?</div>",this.ignoreCase?"ig":"g");var C=(this._inTheCacheData?this._cacheData:this._hdleFormatDataSource())+"";var B=C.match(D);D=null;if(!B){this.close();return false}if(this.ignoreSpeed==true){D=new RegExp().compile("(?:>)([^<>]*?)("+A+")",this.ignoreCase?"ig":"g");return this._cacheData=(this.autoSlice&&B.length>this.maxSlice?B.slice(this.sliceRange.low,this.sliceRange.high).join(""):B.join("")).replace(D,">$1"+this._highlightTag.start+"$2"+this._highlightTag.end+"")}else{return this._cacheData=this.autoSlice&&B.length>this.maxSlice?B.slice(this.sliceRange.low,this.sliceRange.high).join(""):B.join("")}},_queryMutiDataSource:function(F){var D=this._ckSpaceMatchQuery(F);F=this.useSpaceMatch?F.replace(/ /g,this.spaceMatchRg):F;var H=(this._inTheCacheData?(this._cacheData||[]).length>0?this._cacheData:this._dataSource:this._dataSource)||[];var J,E,A,B,I;this._formatData=[];I=new RegExp().compile(this.ignoreWhere?"(.*?)("+F+")(.*?)":"^("+F+")(.*?)",this.ignoreCase?"ig":"g");var G;for(var C=0;C<H.length;C++){J=H[C].text?H[C].text:"";E=H[C].content?H[C].content:"";A=H[C].hints?H[C].hints:"";B="";J=this._encode(J);if(isDigit(D)){G=J}else{if(isLetter(D)||(isDigitAndLetter(D))){G=A}else{G=E}}if(G.match(I)){var I=new RegExp(this.ignoreWhere?"(.*?)("+D+")(.*?)":"^("+D+")(.*?)",this.ignoreCase?"ig":"g");B=J.replace(I,this.ignoreWhere?"$1"+this._highlightTag.start+"$2"+this._highlightTag.end+"$3":""+this._highlightTag.start+"$1"+this._highlightTag.end+"$2");this._formatData.push({text:J,content:E,hints:A,rText:B})}}this._cacheData=[];this._cacheData=this._cacheData.concat(this._formatData);this._formatData=this.autoSlice&&this._formatData.length>this.maxSlice?this._formatData.slice(this.sliceRange.low,this.sliceRange.high):this._formatData;return this._hdleFormatDataSource()},_formatSingleDataSource:function(){var B="";var A=this._dataSource||[];if(A.length==1){B='<div class="out" onclick="'+this.name+'._hc(this)" onmouseover="'+this.name+"._tg(this,'over')\" onmouseout=\""+this.name+"._tg(this,'out')\">"+A[0]+"</div>"}else{B='<div class="out" onclick="'+this.name+'._hc(this)" onmouseover="'+this.name+"._tg(this,'over')\" onmouseout=\""+this.name+"._tg(this,'out')\">\n"+A.join('</div>\n<div class="out" onclick="'+this.name+'._hc(this)" onmouseover="'+this.name+"._tg(this,'over')\" onmouseout=\""+this.name+"._tg(this,'out')\">\n")+"\n</div>"}return B},_formatMutiDataSource:function(){var A=this._formatData||[];var D=[];var H,G,E,F,B;for(var C=0;C<A.length&&C<9;C++){G=A[C].rText?A[C].rText:A[C].text;H=this._encode(A[C].text?A[C].text:"");E=this._encode(A[C].content?A[C].content:"");F=this._encode(A[C].hints?A[C].hints:"");G=this._decode(G);D.push('\n<tr title="'+F+'" uid="'+C+'" class="out" txt="'+H+'" content="'+E+'" onclick="'+this.name+"._hc(this,"+this.type+')" onmouseover="'+this.name+"._tg(this,'over','autot-over','autoc-over')\" onmouseout=\""+this.name+"._tg(this,'out','autot','autoc')\">\n<td class=\"autot\">"+G+'</td>\n<td class="autoc">'+E+"</td>\n</tr>\n")}B='<table border="0" id="'+this.name+'_complete_table" cellspacing="0" cellpadding="0" width="100%">';strThead='<thead><td class="out1">´úÂë</td><td class="out2">Ãû³Æ</td></thead>';B+=strThead;B+=D.join("");B+="</table>";return B},_showAnimateImage:function(src,width,height){if(!!src){this.setAnimateImage.apply(this,arguments)}var o=this.animateImage;var p=new Image();var ig;var self=this;p.src=o.src;p.width=o.width?o.width:p.width;p.height=o.height?o.height:p.height;if(document.getElementById("autocompleteAnimateImageId")&&document.getElementById("autocompleteAnimatecontainerId")){ig=document.getElementById("autocompleteAnimateImageId");c=document.getElementById("autocompleteAnimatecontainerId");ig.src=p.src;ig.width=p.width;ig.height=p.height;animateImageShow();return }var c=document.createElement("DIV");c.id="autocompleteAnimatecontainerId";ig=document.createElement("IMG");ig.id="autocompleteAnimateImageId";ig.src=p.src;ig.width=p.width;ig.height=p.height;c.style.display="none";document.body.appendChild(c);c.appendChild(ig);animateImageShow();function animateImageShow(){var os=getAbsoluteCoords(self.textbox);with(c.style){left=os.left+os.width-p.width-2+"px";top=os.top+Math.round((os.height-p.height)/2)-(neverModules.browser.isIE?-1:2)+"px";zIndex="10";position="absolute";display="block"}}},_setCacheValue:function(A){this._inTheCacheData=false;if(this._cacheValue==""||(!this._cacheData)){this._inTheCacheData=false;this._cacheValue=A;return }if(this._cacheValue==A.substring(0,this._cacheValue.length)){this._inTheCacheData=true}this._cacheValue=A},show:function(){this._currentStatus=1;var E=getAbsoluteCoords(this.textbox);var A=this._completeContainer.style;A.left=E.left+"px";A.top=E.top+E.height+"px";A.width=E.width+"px";A.display="block";if(neverModules.browser.isIE){var C=this._completeIframe.style;C.display="block";C.left=E.left+"px";C.top=E.top+E.height+"px";C.width=E.width+"px";C.height=this._completeContainer.offsetHeight+"px"}try{var B=document.getElementById(this.name+"_complete_table");if(B.offsetHeight>=this._completeContainer.offsetHeight){B.setAttribute("width",this.textbox.offsetWidth-18);B.setAttribute("height",this.scrollHeight)}}catch(D){}this._completeContainer.scrollTop="0px"},close:function(B){try{if(neverModules.browser.isIE){this._completeIframe.style.display="none"}this._completeContainer.style.display="none";this._currentStatus=0}catch(A){}},clearDataSource:function(){this._dataSource=[];this._cacheData=[]},setDataSource:function(A){if(A.constructor!=Array){return }this.close();this.clearDataSource();this._dataSource=A},getSelectedValue:function(A){if(!A){return{text:"null",content:"null"}}var C=this.useContent?A.getAttribute("txt"):A.innerHTML.replace(/<[^<>]*>/g,"");var B=this.useContent?A.getAttribute("content"):"";return{text:C,content:B}},expandAllItem:function(){this._formatData=this._dataSource;this._completeContainer.innerHTML=this._hdleFormatDataSource();this.show()},hdleEvent:function(A){var D=this.textbox.value.rgEncode();var B;var C=window.event?event.keyCode:A.which;if(D==""&&this._currentStatus==0){this.close();return }if(this.isValidKey(A)==false){if((!this._currentStatus)||(this.useArrow!=true&&C!=27)){return }this._hdleFactory("arrow",[C]);return }this._inputValue=D;this._setCacheValue(D);this._completeContainer.innerHTML="";this._selectedIdx=-1;B=this._hdleQuery(D);if(B!=false){this._completeContainer.innerHTML=B;this.show()}else{this.close();this._inTheCacheData=false}},isValidKey:function(A){var C=window.event?event.keyCode:A.which;for(var B in this._invalidKeyCode){if(C==this._invalidKeyCode[B]){return false}}return true},showAnimateImage:function(C,B,A){this._showAnimateImage.apply(this,arguments)},closeAnimateImage:function(){try{document.getElementById("autocompleteAnimatecontainerId").style.display="none"}catch(A){}},setAnimateImage:function(C,B,A){if(!C){return }this.animateImage={src:C,width:B,height:A}},isRequireAjax:function(){return(!this._inTheCacheData)},isinCache:function(){return this.isRequireAjax()},dispose:function(){try{this._completeContainer.parentNode.removeChild(this._completeContainer);if(neverModules.browser.isIE){this._completeIframe.parentNode.removeChild(this._completeIframe)}}catch(A){}},create:function(){this._createAutocomplete()},textboxFocus:function(){return ;if(this.textbox){this.textbox.focus()}}};function isDigit(B){var A=/^[0-9]+$/;if(!B.match(A)){return false}return true}function isLetter(B){var A=/^[a-zA-Z]+$/;if(!A.exec(B)){return false}return true}function isDigitAndLetter(B){var A=/^([a-zA-Z]+)([0-9]+)$/;if(!A.exec(B)){return false}return true};