﻿window.JsModule=["../system/jqframe.js","../plugins/menutab/js/menutab.js","../plugins/betterTip/js/jquery.bettertip.js"];function WebMain2(){$('#ultj').SendMessage({callback:debuggerinfo,type:"DBSelect",id:"nlist",pm:"<~_2184~>%16",start:0,total:12})};function debuggerinfo(re){if(re){var arrhtml=[];for(i=0;i<re.length;i++){arrhtml.push("<li><a  href=\"../news/newsdetail.html?id="+re[i][0]+"\" target=\"_blank\" title=\""+re[i][1]+"\">"+re[i][1]+"</a></li>")}$("#ultj").html(arrhtml.join(""))}};function search(){var aimUrl;var kw=$("#keyword").val();aimUrl="newssearch.html?"+encodeURIComponent("{'tj':'"+kw+"'}");window.location=aimUrl};function BT_callback(id){$.SendMessage({type:"DBSelect",id:id,callback:function(re){$('#BTTipBT_content').html(re[0][0]||htmltext(re[0][1],100));$('#BTTip').show()},pm:"<~_2191~>"+id.replace("lista","")+"%16"},true)};var sortfield='ehaipf_news.altertime desc';function sortlist(o){var arrsort=["ehaipf_news.title","ehaipf_news.altertime"];var arrpre=sortfield.split(' ');sortfield=arrsort[o]+(arrpre[arrpre.length-1].indexOf('desc')>=0?' asc':' desc');pageMessage()};function pageMessage(){$.SetFormat("zh","newslist","<li><a id=\"lista#0#\" class=\"betterTip\" href=\"../news/newsdetail.html?id=#0#\" target=\"_blank\" style=\"width:400px;float:left;\" title=\"#1#\">#1#</a><span style=\"width:150px;float:right;\">#2#</span></li>","<li style=\"list-style-type: none;background:url(../images/header_bg.gif)\"><span style=\"width:400px;margin-left:80px;float:left;font-weight:bold;cursor:pointer;\" onclick=\"sortlist(0)\">标题</span><span style=\"width:150px;margin-right:0px;float:right;font-weight:bold;cursor:pointer;\" onclick=\"sortlist(1)\">时间</span></li>","");$("#ullist").SendMessage({type:"DBSelect",bRefresh:true,codetype:1,bDefCall:-1,callback:EhaiBetterTip.BT_init,id:"ullist",format:"newslist",start:$.PageParam.page?($.PageParam.page-1)*20:0,total:20,pm:"<~_2193~>"+sortfield+"<~_2194~>"+$.PageParam.mid+"%16"});$.SetFormat("zh","listpage","<span style=\"margin-right:10px;color:red;\">#3#</span>","<span style=\"margin-right:10px;\">第#0#/#1#页</span><span style=\"margin-right:10px;\">共#2#条记录</span>","");$("#pager").SendMessage({type:"DBSelect",bRefresh:true,format:"listpage",pm:"<~_2195~>"+$.PageParam.mid+"<~_2187~>"+$.PageParam.mid+"%16"+($.PageParam.page?$.PageParam.page:1)+"<~_2190~>"});$.Start()};function pageclick(page){$.PageParam.page=page;pageMessage()};function gotopage(obj,norefresh){var v=obj.value;if(v&&!isNaN(v)){if(norefresh||window.location.search.indexOf('?')>=0){$.PageParam.page=v;pageMessage()}else{var href=window.location.pathname.replace(/\\/g,"/");var arr=href.split('/');var fname=arr[arr.length-1];if(fname){var arr2=fname.split('.');var hrefnewv;if(fname.indexOf('_')>=0){hrefnewv=arr2[0].split('_')[0]+(Math.floor(v)==1?'':'_'+v)+'.'+arr2[1]}else hrefnewv=arr2[0]+(Math.floor(v)==1?'':'_'+v)+'.'+arr2[1];window.location.href=hrefnewv}}}};
