function adbanner()
{

  var how_many_ads = 3;   //显示广告条的数目，随便改，只要与下面的程序对应即可
  var width=468;          //广告条宽度
  var height=60;          //广告条高度
  var now = new Date();
  var sec = now.getSeconds();
  var ad = sec % how_many_ads;

  if(how_many_ads!=1)
  {
  ad +=1;
  if (ad==1)  //第一条广告条代码
  {                         
    url="/aosai/index.asp";     //相应的URL连接
    alt="广告条";
    banner="/banner/xxxas.gif";          //广告条图片的URL 

  document.write('<div align="center">');
  document.write('<a href=' + url + ' target="_blank">');
  document.write('<img src=' + banner + ' width=')
  document.write(width + ' height=' + height + ' ');
  document.write('alt=' + alt + ' border=0>');
  document.write('</a></div>');
  }

  if (ad==2)  //第二条广告条代码
  {                   
  document.write('<div align="center">');
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="468" height="60">');
  document.write('<param name=movie value="/banner/sgyy01.swf">');
   document.write('<param name=quality value=high>');
  document.write('<embed src="/banner/sgyy01.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="468" height="60">');
  document.write('</embed>');
  document.write('</object>');
  document.write('</div>');

  }

  if (ad==3)  //第三条广告条代码
  {                         
    url="/xspd/index.asp";
    alt="广告条";
    banner="/banner/xspd.gif";

  document.write('<div align="center">');
  document.write('<a href=' + url + ' target="_blank">');
  document.write('<img src=' + banner + ' width=')
  document.write(width + ' height=' + height + ' ');
  document.write('alt=' + alt + ' border=0>');
  document.write('</a></div>');
  }

    }
  else
  {
    url="/2002fjjy/2002_ml.htm";     //相应的URL连接
    alt="广告条";
    banner="banner/logo_fjjy.gif";          //广告条图片的URL 
 

  document.write('<div align="center">');
  document.write('<a href=' + url + ' target="_blank">');
  document.write('<img src=' + banner + ' width=')
  document.write(width + ' height=' + height + ' ');
  document.write('alt=' + alt + ' border=0>');
  document.write('</a></div>');
}

/*  
  document.write('<div align="center">');
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="468" height="60">');
  document.write('<param name=movie value="/banner/jycp.swf">');
   document.write('<param name=quality value=high>');
  document.write('<embed src="/banner/jycp.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="468" height="60">');
  document.write('</embed>');
  document.write('</object>');
  document.write('</div>');
*/
}

function channel_lnk()
{
  //设置栏目的script,for ns4
  var mywidth

  if(screen.width>799) mywidth=screen.width/2;
  else mywidth=800/2;
  
  var d = 10;
  var h = -4; 
  var top = 74;
  var left;
  var width = 68-d;
  var height = 13;
  var layerOffset;
//  var left_a = new Array(-400,-311,-301,-233,-165,-97,-29,39,107,117,141,151,219,299,367);
//  var left_c = new Array(-400,-301,-233,-165,-97,-29,39,151,219,299);


  for (var i = 1; i <num; i++)
  {
    left=mywidth+left_c[i]+d;
    if(i==8) width = 80-d-2;
    oneLayer = "<LAYER NAME=" + channel[i]  + " TOP=" + top + " LEFT=" + left;
    oneLayer += " WIDTH=" + width + " HEIGHT=" + height ;
    oneLayer += " BGCOLOR=#99cc99>" + "<a class='titlelink' href=" + channel_link[i] + ".asp>";
    oneLayer += channel_name[i] + "</a></LAYER>\n";
    document.write(oneLayer);
    width = 68-d;
    layerOffset=eval("document."+channel[i]+".clip");
    layerOffset.top=h;
    layerOffset.left=-d+2;
  }
}

function setColor(e)
{
  //这是一个设置层背景色的script.
  //channel为栏目名称，num为栏目数
  for(var i=0;i<num;i++)
    if(e.target.name==channel[i])
    {
      e.target.bgColor = myyellow;
      break;      
    }  
}

function setColorOrg(e) 
{
  //这是一个设置层背景色的script.
  //channel为栏目名称，num为栏目数
  for(var i=0;i<num;i++)
    if(e.target.name==channel[i])
    {
      e.target.bgColor = mygreen;
      break;      
    }  
}

function settitle()
{
//设置栏目
  document.write("<table width='777' border='0' cellspacing='0' cellpadding='0' height='17'><tr valign='bottom'>"); 

//<!-- for ie and ns -->
  document.write("<td width='64' height='17' align='center'><font color='#ff0000'>　</font></td>");
  document.write("<td width='10' height='17' align='center'><font color='#ff0000'>　</font></td>");
  document.write("<td width='64' height='17' align='center' background='images/bian_2.gif'><font color='#ff0000'> 首　页</font></td>");

//<!-- for ie only -->
//  if(!ns4)
  {
    for(var i=1;i<8;i++)
    {
        document.write("<td width='68' id='titleClass'><div align='center'><a class='titlelink' href='" +channel_link[i]+ ".asp'>"+channel_name[i]+"</a></div></td>");
    }
        document.write("<td width='78' id='titleClass'><div align='center'><a class='titlelink' href='" +channel_link[i]+ ".asp'>"+channel_name[i]+"</a></div></td>");
        i++;
        document.write("<td width='68' id='titleClass'><div align='center'><a class='titlelink' href='" +channel_link[i]+ ".asp'>"+channel_name[i]+"</a></div></td>");

  }

//<!-- for ns only-->
/*
  else
    document.write("<td width='408'></td>");
*/

//<!-- for ie and ns -->
//  document.write("<td width='10'><img src='../images/0905-1_03.gif' width='10' height='17'></td>")
//  document.write("<td width='24' align='center' bgcolor='#ffffff'>　</td>")
//  document.write("<td width='10'><img src='../images/0905-1_02.gif' width='10' height='17'></td>")

//<!-- for ie only -->
/*
  if(!ns4)
    for(var i=7;i<10;i++)
      document.write("<td width='68' id='titleClass' onMouseOver='this.style.background=overtitleBgColor' onMouseOut='this.style.background=titleBgColor'><div align='center'><a class='titlelink' href='../" +channel_link[i]+ ".asp'>"+channel_name[i]+"</a></div></td>");
*/
//<!-- for ns only -->
/*
  else
    document.write("<td width='216' align='center'>　</td>");
*/
//  document.write("<td width='10'><img src='../images/0905-1_03.gif' width='10' height='17'></td>");
  document.write("<td width='19'>");
  document.write("</tr></table>");
}

function makeObj(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
    this.css=(document.layers) ? eval(nest+'document.'+obj):eval(obj+'.style')
	this.scrollHeight=document.layers?this.css.document.height:eval(obj+'.offsetHeight')
	this.up=goUp
    this.obj = obj + "Object"
    eval(this.obj + "=this")

    return this
}

function goUp(speed){
	if(parseInt(this.css.top)>-this.scrollHeight){
		this.css.top=parseInt(this.css.top)-pr_step
		setTimeout(this.obj+".up("+speed+")",speed)
	}else if(loop) {
		this.css.top=lstart
		eval(this.obj+".up("+speed+")")
	  }
}

function slideInit(){
	oSlide=makeObj('divNews','divCont')
	oSlide.css.top=lstart
	oSlide.up(speed)
}

function locate(layer_1)
{
  layer_1.left=screen.width/2
}
//onload=slideInit

function showDay()
{
  var enable=0;                                    
  var day;                                    
  var date;  
  var time_start = new Date();                                    
  var clock_start = time_start.getTime();                                    

  today=new Date();                                    

  if(today.getDay()==0)  day="星期日";                                    
  if(today.getDay()==1)  day="星期一";                                          
  if(today.getDay()==2)  day="星期二";                                    
  if(today.getDay()==3)  day="星期三";                                    
  if(today.getDay()==4)  day="星期四";                                    
  if(today.getDay()==5)  day="星期五";                                    
  if(today.getDay()==6)  day="星期六";                                    

  date=(today.getYear())+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日 "; 
  document.write("<font color='#ffffff'>今天是"+date+day+"</font>");

}

function sayHello()
{
  mydate = new Date();
  myyear = mydate.getYear();
  if(myyear < 300) myyear = 1900 + myyear ;
  mymonth = mydate.getMonth()+1;
  today = mydate.getDate();
  myhour = mydate.getHours();
  if(myhour<6)            
    welcomestring="凌晨好";
  else if(myhour<9)
    welcomestring="早上好";
  else if(myhour<12)
    welcomestring="上午好";
  else if(myhour<14)
    welcomestring="中午好";
  else if(myhour<17)
    welcomestring="下午好";
  else if(myhour<19)
    welcomestring="傍晚好";
  else if(myhour<22)
    welcomestring="晚上好";
  else
    welcomestring="早点休息吧";
  document.write("<font color='#ffffff'>"+welcomestring+"！"+"</font>");
}


