function vsb_news_search_entry() { _searchthis = this; this.formname=""; this.formobj=""; this.news_search_obj; this.querytxtsize = 155; this.yzmts=""; this.qdstyle=""; this.qdname=""; this.qxstyle=""; this.qxname=""; this.showstr="请输入查询验证码"; this.searchCodestr = "searchCode"; } vsb_news_search_entry.prototype ={ checkdata:function(formname) { var base64 = new Base64(); _searchthis.formobj = formname; if(window.toFF==1) { var ssvalue = formname.INTEXT.value; formname.INTEXT2.value = Simplized(ssvalue); //new VsbFormFunc().disableAutoEnable(formname.INTEXT); formname.INTEXT2.value = base64.encode(formname.INTEXT2.value); formname.INTEXT.value =""; }else { formname.INTEXT2.value = formname.INTEXT.value; //new VsbFormFunc().disableAutoEnable(formname.INTEXT); formname.INTEXT2.value = base64.encode(formname.INTEXT2.value); formname.INTEXT.value =""; } if(_searchthis.news_search_obj.isShowCode==false) { NewsSearchDWR.isSearch(_searchthis.getSearchResult); }else { var searchCode = document.getElementById(_searchthis.searchCodestr+_searchthis.formname); if(searchCode) { if(searchCode.value=="") { searchCode.focus(); alert(_searchthis.showstr); return false; }else { formname.news_search_code.value=searchCode.value; _searchthis.news_search_obj.isShowCode = false; _searchthis.news_search_obj.exit(); return true; } }else { return true; } } return false; }, getSearchResult:function(data) { //alert(data); if(data && data==true) { _searchthis.news_search_obj.isShowCode = false; _searchthis.news_search_obj.exit(); if(!_searchthis.isIE()) { var openformname = _searchthis.formname+parseInt(Math.random()*99); var testopen = window.open("about:blank",openformname); if(testopen) { _searchthis.formobj.target=openformname; }else { _searchthis.formobj.target="_self" } } _searchthis.formobj.submit(); }else { _searchthis.news_search_obj.isShowCode = true; _searchthis.createDiv(); } }, createDiv:function() { var tagobj = _searchthis.formobj.INTEXT; if(tagobj) { var content = "
"+_searchthis.yzmts+"
"+_searchthis.qdname+""+_searchthis.qxname+"
"; _searchthis.news_search_obj.tooltip(content,tagobj); _searchthis.news_search_obj.addEvent(window,'resize',_searchthis.fixPosDiv,true); _searchthis.formobj.INTEXT.disabled=false; } }, fixPosDiv:function() { var obj = document.getElementById(_searchthis.news_search_obj.tooltipid); var tagobj = document.getElementById(_searchthis.news_search_obj.apptag); var tagframeobj = document.getElementById( _searchthis.news_search_obj.frametag); if(obj) { var showleft = _searchthis.news_search_obj.tgetAbsLeft(tagobj)+ 'px'; var showtop = _searchthis.news_search_obj.tgetAbsTop(tagobj) + _searchthis.formobj.INTEXT.clientHeight+3+ 'px'; obj.style.left = showleft; obj.style.top = showtop; tagframeobj.style.left = showleft; tagframeobj.style.top = showtop; } }, isIE:function() { if(navigator.userAgent.indexOf("MSIE")>0) { return true; } }, hiddenDiv:function() { _searchthis.news_search_obj.exit(); _searchthis.news_search_obj.isShowCode = false; } }