function zcm_wo(id)
{
window.open("../news/announcement.asp?id="+id,"zcmWin","width=250,height=200");
}
function chg_img(id)
{

var img=document.getElementById("img_"+id+"1");
if(img.src.indexOf("add")==-1) {img.src=img.src.replace("minus","add");img.title="展开";}
else {img.src=img.src.replace("add","minus");img.title="收起";};
var img=document.getElementById("img_"+id+"2");
if(img.src.indexOf("add")==-1) 
{img.src=img.src.replace("minus","add");
for(var i=1;i<20;i++)
{
var td=document.getElementById("td_"+id+i);
td.style.display="none";
}}
else
{img.src=img.src.replace("add","minus");
for(var i=1;i<20;i++)
{
var td=document.getElementById("td_"+id+i);
td.style.display="block";
}
}}

function view(id)
{
var cell=document.getElementById(id);
cell.style.borderTop="1px solid white";
cell.style.borderLeft="1px solid white";
cell.style.borderRight="1px solid #999";
cell.style.borderBottom="1px solid #999";
}
function unview(id)
{
var cell=document.getElementById(id);
cell.style.border="0px";
}
function zDate(today,sFormat,haveZero)
{ 
 if(today=="now")//判断时间为当前时间还是特定时间
  {today=new Date();}
 else
 {
  var arrDate=new Array();
  arrDate=today.split("-");
  if(3==arrDate.length)
   {today=new Date(arrDate[0],arrDate[1]-1,arrDate[2])}
  else
   if(6==arrDate.length)
    {today=new Date(arrDate[0],arrDate[1]-1,arrDate[2],arrDate[3],arrDate[4],arrDate[5])}
   else
    {return false;}
 }
 var mDate=today.getDate();
 var mMonth=today.getMonth()+1;
 var mYear=today.getYear();
 var mHours=today.getHours();
 var mMinutes=today.getMinutes();
 var mSeconds=today.getSeconds();
 var aDay=new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
 var mDay=today.getDay();
 if(true==haveZero)
 {
  function addZero(data)//在小于9的数字前加0
  {
   if(data<10)
    {return("0"+data);}
   else
    {return data;}
  }
  mDate=addZero(mDate);
  mMonth=addZero(mMonth);
  mHours=addZero(mHours);
  mMinutes=addZero(mMinutes);
  mSeconds=addZero(mSeconds);
 }
 
 if(sFormat.indexOf("yyyy")!=-1) {sFormat=sFormat.replace("yyyy",mYear);}
 if(sFormat.indexOf("yy")!=-1) {sFormat=sFormat.replace("yy",(mYear.toString().substr(2,2)));}//短年份
 if(sFormat.indexOf("mm")!=-1) {sFormat=sFormat.replace("mm",mMonth);}
 if(sFormat.indexOf("dd")!=-1) {sFormat=sFormat.replace("dd",mDate);}
 if(sFormat.indexOf("day")!=-1) {sFormat=sFormat.replace("day",aDay[mDay]);}
 if(sFormat.indexOf("h")!=-1) {sFormat=sFormat.replace("h",mHours);}
 if(sFormat.indexOf("m")!=-1) {sFormat=sFormat.replace("m",mMinutes);}
 if(sFormat.indexOf("s")!=-1) {sFormat=sFormat.replace("s",mSeconds);}
 return sFormat;
}
function imgMarquee()
	{
	var speed=30; //数字越大速度越慢
	var tab=document.getElementById("marquee_images");
	var tab1=document.getElementById("demo1");
	var tab2=document.getElementById("demo2");
	tab2.innerHTML=tab1.innerHTML; //克隆demo1为demo2
	function Marquee(){
	if(tab2.offsetTop-tab.scrollTop<=0)//当滚动至demo1与demo2交界时
	tab.scrollTop-=tab1.offsetHeight //demo跳到最顶端
	else{
	tab.scrollTop++
	}
	}
	var MyMar=setInterval(Marquee,speed);
	tab.onmouseover=function() {clearInterval(MyMar)};//鼠标移上时清除定时器达到滚动停止的目的
	tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};//鼠标移开时重设定时器
	}