/**数组每项描述菜单条上一项,以'|'分割各属性，意义如下：
 * 0-菜单条上显示的文字串,
 * 1-页面的url,所在页面去除对此url的链接。
 * 2-在何显示页面 <_blank|_parent|_self>
*/
var columns=new Array(
  "首页|../index.html|_parent",
  "预报|../forecast/forecast.html|_parent",
  "实况|../record/surface.html|_parent",
  "自动站|../aws/aws.html|_parent",
  "预警|../warn/warning.html|_parent",
  "e频道|../channele/index.html|_parent",
  "防雷|../thunder/index.html|_parent",
  "政务|../newaffair/index.html|_parent"
)

function genColumn(title){
  document.writeln('<span style="float:right">');
//  document.writeln('「');
  for(var i=0;i<columns.length;i++){
    var s=columns[i].split('|');

    if(title==s[0])
      document.write('<b style="color:yellow">'+s[0]+'</b>');
    else
      document.write('<a class="nav" href="'+s[1]+'" target="'+s[2]+'">'+s[0]+'</a>');
    if(i!=columns.length-1)
	    document.writeln(' |');
	  else
	    document.writeln('&nbsp;');
  }
  document.writeln('</span>');
}

function genFoot(){
  document.writeln('<hr />');
  document.writeln('<div style="text-align:center;font-size:8pt">');
  document.writeln('<span>');
  document.writeln('<a href="/copyright.html" target="_blank">版权和免责声明</a>&copy;');
  document.writeln('佛山市气象局 ');
  document.writeln('地址:季华5路32号 邮编:528000');
  document.writeln('热线:12121(自动) 96806121(人工)');
  document.writeln('传真:83380266');
  //document.writeln('EMAIL: <a href="mailto:qxt@fscma.gov.cn">qxt@fscma.gov.cn</a>');
  document.writeln('<img src="http://www.fs121.com:8080/counter/counter?width=1&height=1" height="0" width="0">');
  document.writeln('<img src="http://www.fs121.com:8180/ncounter/counter?width=1&height=1" height="0" width="0"/>');
  document.writeln('</span>');
  document.writeln('</div>');
  document.writeln('<div style="text-align:center">');
  document.writeln('<a href="/copyright.html" target="_blank" style="font-size:9pt;color:red">警告：版权所有，本局对任何未经授权非法转载、传播本网站任何信息之行为保留法律追究权利</a>');
  document.writeln('</div>');
}
/** 页面题头广告图片
*/
var adpics=new Array(
/*	"../ad/images/ad_warning.gif|../ad/new_warning.htm|_blank",

	"../ad/images/ad_sms.gif|../ad/sms01.htm|_fixed",

	"../ad/images/ad_survey.gif|http://www.fs121.com:8080/meteosatis|_blank",

	"../ad/images/ad_07323a.gif|../ad/07323-1.html|_blank",

	"../ad/images/ad_07323b.gif|../ad/07323-1.html|_blank",

	"../ad/images/sms02.swf|../ad/sms01.htm|_fixed",

	"../ad/images/ad_xuanchuan.gif|http://www.fs121.com/channele/topic/xuanchuan/thunder.html|_blank",

	"../ad/images/shengyun.swf|http://www.fs121.com/channele/topic/shengyun/shengyun01.html|_blank",

	"../ad/images/ad_08323a.gif|../ad/wmd01.html|_blank",

	"../ad/images/ad_08323b.gif|../ad/wmd01.html|_blank",

	"../ad/images/ad_08323c.gif|../ad/wmd01.html|_blank",

	"../ad/images/ad_08323d.gif|../ad/wmd01.html|_blank",

	"../ad/images/ad_08323e.gif|../ad/wmd01.html|_blank"

	"../ad/images/ad_512.gif|http://www.cma.gov.cn/qxzt/kzjz/index.phtml|_blank"

	"../ad/images/ad_0808.jpg|#|_self"

	"../ad/images/ad_512-3.jpg|#|_self"

	"../ad/images/ad_2009323.gif|../ad/2009WMD01.html|_blank"

	"../ad/images/512.jpg|../channele/topic/xuanchuan/thunder.html|_blank",

	"../ad/images/ad-12121.png|../ad/12121-1.html|_blank"

	"../ad/images/ad_60y.gif|#|_self"

	"../ad/images/ad_2010chunyun2.jpg|http://www.fs121.com/sft2010.html|_blank",

	"../ad/images/ad_affair.jpg|http://www.fs121.com/newaffair/index.html|_blank"*/

	"../ad/images/ad_2010323.gif|../ad/01.html|_blank",

	"../ad/images/ad_yushu.jpg|http://www.weather.com.cn/zt/ty/94904.shtml|_blank"
);

function openAD(sUrl)
{
    var sty='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=760,height=660';
    var winNew=window.open(sUrl, "ad",sty);
    winNew.focus();
    return winNew;
}
function genAD(){
	var pic=adpics[Math.round(Math.random()*10)%adpics.length];
    var s=pic.split('|');
    var img=s[0];
    if(pic.lastIndexOf(".swf")>0){
      document.writeln('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
      document.writeln('WIDTH="515" HEIGHT="80" ALIGN="">');
      document.writeln('<PARAM NAME=movie VALUE="'+img+'">');
      document.writeln('<PARAM NAME=menu VALUE=false>');
      document.writeln('<PARAM NAME=quality VALUE=high>');
      document.writeln('<PARAM NAME=bgcolor VALUE=#000000>');
      document.writeln('<EMBED src="'+img+'" menu=false quality=high bgcolor=#000000  WIDTH="515" HEIGHT="80" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
      document.writeln('</OBJECT>');
    }
    else if(s[2]=="_fixed"){
      var url='\''+s[1]+'\'';
      var ss='<a href="#" onClick="openAD('+url+');">';
      document.write(ss);
	   document.write('<img src="'+img+'" border="0" height="80" width="515" />');
	   document.write('</a>');
    }
    else{
      document.write('<a href="'+s[1]+'" target="'+s[2]+'">');
	   document.write('<img src="'+img+'" border="0" height="80" width="515" />');
      document.write('</a>');
    }
}
/*
function genAD(){
	var pic=adpics[Math.round(Math.random()*10)%adpics.length];
    var s=pic.split('|');
    var img=s[0];
	document.writeln('<div style="margin-top:0"><img src="'+img+'" height="80" width="515" /></div>');
}
*/