<!--
var new_window;
function showmore(id,path,tkey,bkey) {  //reloads the window if Nav4 resized
wdwidth=700;
wdheight=600;
wdleft=(screen.width-wdwidth)/2;
wdtop=20;//(screen.height-wdheight)/2;
//同时考虑admin目录下的调用问题，所有../Show_more.php
if(path==null||path==1){
	path="./";
}else{
	if(path==2){
		path="../";
	}else{
		path="./";
	}
}
tkey=tkey==null?"":tkey;
bkey=bkey==null?"":bkey;
new_window =window.open(path+'show_more.php?tkey='+tkey+'&bkey='+bkey+'&doc_id='+id,'show_more','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width='+wdwidth+'px,height='+wdheight+'px,top='+wdtop+'px,left='+wdleft+'px');
window.setTimeout("focusWindow(new_window);",300);
}
function focusWindow(wd){
	if (wd==null){
		alert("您的IE插件程序拦截了本系统显示新闻的窗口，请关闭该插件的“拦截弹出窗口”功能后重试，否则新闻讲无法正常显示。");
	}else{wd.focus();}
}
function showleave(id,path) {  //reloads the window if Nav4 resized
wdwidth=700;
wdheight=600;
wdleft=(screen.width-wdwidth)/2;
wdtop=20;//(screen.height-wdheight)/2;
//同时考虑admin目录下的调用问题，所有../Show_more.php
if(path==null||path==1){
	path="./";
}else{
	if(path==2){
		path="../";
	}else{
		path="./";
	}
}
new_window =window.open(path+'show_leave.php?doc_id='+id,'show_more','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width='+wdwidth+'px,height='+wdheight+'px,top='+wdtop+'px,left='+wdleft+'px');
window.setTimeout("focusWindow(new_window);",300);
}
function gotoshow(pageid,docid,releaseid) {  //reloads the window if Nav4 resized
	var tourl="";
	if (pageid<0){
		switch (pageid) {
			case -1:
				tourl="oldnews.php";
				break;
			case -2:
				tourl="emailtous.php";
				break;
			default:
				tourl="index.php";
				break;
		}
	}else{
		tourl="index.php?release_id="+releaseid +"&page_id="+pageid;//+"#page_top";//
		if (docid!=0){tourl=tourl+"#link"+docid;}
	}
	
	location.href=tourl;
}
function moreshow(pageid,releaseid) {  //reloads the window if Nav4 resized
    url="more.php?release_id="+releaseid+"&page_id="+pageid;
    new_more_window =window.open(url,'moreshow','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=700px,height=600px,center=1');
	window.setTimeout("focusWindow(new_more_window);",300);
}
//---------------------------------------------click&scroll
var currentpos,timer;
function initialize()
{
	timer=setInterval("scrollwindow()",50);
}
function sc(){
	clearInterval(timer);
}
function scrollwindow()
{
	currentpos=document.body.scrollTop;
	window.scroll(0,++currentpos);
	if (currentpos != document.body.scrollTop)
	sc();
}
function release_onchange(release_id)
{
     href="oldnews.php?doc_release_id=" + release_id;
     location.href=href;
}
//------------------------------------------------
function NSI0BG(){
    ctl=document.getElementById("p_title");
    ctl.className='NavSearchInput0BG';
}
function ChkNSI(){
    ctl=document.getElementById("p_title");
    if (ctl.value=="")
    {ctl.className='NavSearchInput';}
}
//------------------------------------------------share define
var hd;var bd="";var pid="";var height=0;var width=0;
function editdiv(id,w,h){
hd=0;
if (h>550){h=550;}
wdwidth=800;
wdheight=h+190;	
height=h+40;
width=w+15;
par="dialogWidth:"+wdwidth+"px;dialogHeight:"+wdheight+"px;center:yes;status:no;";
window.showModalDialog("./admin/one_modify.php?model=modify&id="+id,window,par);
if (hd==1){
	vform.ddid.value=id;
	vform.ddbd.value=bd;
	vform.submit();}
}
function fonttoimg(ddid,w,h,clr){
//---------------------------
//root="http://paper.10dit.com/service/trans/";
//user="pku";
//user="local";
root="./lib/trans/";
user="localhost";
//---------------------------
hd=0;
wdwidth=800;
wdheight=600;	
height=h;
width=w;
par="dialogWidth:"+wdwidth+"px;dialogHeight:"+wdheight+"px;center:yes;status:no;";
window.showModalDialog("./admin/fonttoimg.php?root="+root+"&user="+user+"&width="+width+"&height="+height+"&ddid="+ddid+"&bgcolor="+clr,window,par);
if (hd==1){
    bd="<img src="+bd+" border=0></img>";
	vform.ddid.value=ddid;
	vform.ddbd.value=bd;
	vform.submit();
}
}
function addform(){
document.write("<div id=divform style=\"Z-INDEX: 0; POSITION: absolute; left: 1px; top: 1px; width: 1px; height: 1px\">");
document.write("<form name=\"vform\"  ACTION=\"./admin/one_modify.php\"  METHOD=POST>");
document.write("<input name=ddid type=hidden value=\"\">");
document.write("<input name=ddbd type=hidden value=\"\">");
document.write("</form>");
document.write("</div>");
}
addform();
function showreleaselist(){
scrwidth=screen.width;
left=scrwidth-350;
new3_window =window.open("./oldrelease.php",'show_releaselist','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=350px,height=500px,top=100px,left='+left+'px;');
window.setTimeout("focusWindow(new3_window);",300);
}
function gonext(url){location.href=url;}
//document.onmousedown=sc;
//document.ondblclick=initialize;
window.onerror = killErrors; 
function killErrors() { return true; } 

var sId="";
/* 坐标模式 */
function MouseOverMap(x1,y1,x2,y2,id) {
	var divElm = document.getElementById("leveldiv");
	var Left =x1+225;
	var Top = y1+205;
	var Right = parseInt(x2 - x1);
	var bottom = parseInt(y2 - y1);
	divElm.style.border = "dotted 3px #FF0000";
	divElm.style.left = Left;
	divElm.style.top = Top;
	divElm.style.width = Right;
	divElm.style.height = bottom;
	divElm.style.cursor = "pointer";
	if (id!=""){
		sId=id;
		var titleElem = document.getElementById("title"+id.toString());
		titleElem.style.backgroundColor="#99ff99";
	}else{
		sId="";
	}
}

function MouseOutMap() {
var divElm = document.getElementById("leveldiv");
divElm.style.border = "";
if (sId!=""){
	var titleElem = document.getElementById("title"+sId.toString());
	titleElem.style.backgroundColor="";
	sId="";
}
}

function js_callpage(htmlurl) { 
var newwin=window.open(htmlurl,"newWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=140px,left=245px,width=502,height=400 "); 
newwin.focus(); 
return false; 
} 
//-->
