function displayWeek()
{
	var enabled = 0; 
	today = new Date();
	var day;
	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 = "星期六"
	Todays = new Date();	
	TheWeek = day
	return (TheWeek);
}

function displayDate()
{
	Todays = new Date();
	Mnth = Todays.getMonth()+ 1;
	year = Todays.getYear();
	TheDate ="" +year+""+"年" +"" +Mnth +""+"月"+""+Todays.getDate() + "" +"日"+" ";
	theWeeks = displayWeek();
	
	return (TheDate);
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function header(){
	
	document.write("<tr><td width=7% rowspan=2 align=center valign=middle><a href=/default.htm><font color=#FFFFFF>主<br>页</font></a></td>");
	document.write("<td width=10% height=25 align=center valign=bottom><font color=#FFFFFF>|</font> <a href=/hdzc><font color=#FFFFFF>花都之窗</font></a></td>");
	document.write("<td width=10% align=center valign=bottom class=cn> <Font color=#FFFFFF>|</font> <a href=/hdzw><font color=#FFFFFF>花都政务</font></a></td>");
	document.write("<td width=10% align=center valign=bottom><font color=#FFFFFF>|</font> <a href=/hdxw><font color=#FFFFFF>花都新闻</font></a></td>");
        document.write("<td width=10% align=center valign=bottom><font color=#FFFFFF>|</font> <a href=/tpxw><font color=#FFFFFF>图片新闻</font></a></td>");
        document.write("<td width=10% align=center valign=bottom><font color=#FFFFFF>|</font> <a href=/bmfw><font color=#FFFFFF>便民服务</font></a></td>");	
        document.write("<td width=10% align=center valign=bottom><font color=#FFFFFF>|</font> <a href=/wsbs><font color=#FFFFFF>网上办事</font></a></td>");
        document.write("<td width=10% align=center valign=bottom><font color=#FFFFFF>|</font> <a href=/tzhd><font color=#FFFFFF>投资花都</font></a></td>");
        document.write("<td width=10% align=center valign=bottom><font color=#FFFFFF>|</font> <a href=/zfzl><font color=#FFFFFF>政法专栏</font></a></td>");
        document.write("<td width=13% align=left valign=bottom><font color=#FFFFFF>|</font> <a href=/zwgk><font color=#FFFFFF>政务公开</font></a></td></tr>");
        document.write("<tr><td height=25 align=center><font color=#FFFFFF>|</font> <a href=/hdzw/qzxx><font color=#FFFFFF>区长信箱</font></a></td>");
        document.write("<td align=center><font color=#FFFFFF>|</font> <a href='http://hdcj.huadu.gov.cn/cglfdj_input0.asp' target=_blank><font color=#FFFFFF>区长专线</font></a></td>");
        document.write("<td align=center><font color=#FFFFFF>|</font> <a href=http://isc.huadu.gov.cn/><font color=#FFFFFF>在线审批</font></a></td>");
        document.write("<td align=center><font color=#FFFFFF>|</font> <a href=/czfm><font color=#FFFFFF>村镇风貌</font></a></td>");
        document.write("<td align=center><font color=#FFFFFF>|</font> <a href=/hdzw/rsxx><font color=#FFFFFF>人事信息</font></a></td>");
        document.write("<td align=center><font color=#FFFFFF>|</font> <a href=/xczl><font color=#FFFFFF>宣传专栏</font></a></td>");
        document.write("<td align=center><font color=#FFFFFF>|</font> <a href=/zmhd/wzjy><font color=#FFFFFF>网站建议</font></a></td>");
        document.write("<td align=center><font color=#FFFFFF>|</font> <a href=/rdzt><font color=#FFFFFF>热点专题</font></a></td>");
        document.write("<td align=left><font color=#FFFFFF>|</font> <a href=/zwryzq><font color=#FFFFFF>政务人员专区</font></a></td></tr>");
}

function header1(){
	
	document.write("<tr><td width=7% rowspan=2 align=center valign=middle><a href=/default.htm>主<br>页</a></td>");
	document.write("<td width=10% height=25 align=center valign=bottom>| <a href=/hdzc>花都之窗</a></td>");
	document.write("<td width=10% align=center valign=bottom class=cn> | <a href=/hdzw>花都政务</a></td>");
	document.write("<td width=10% align=center valign=bottom>| <a href=/hdxw>花都新闻</a></td>");
        document.write("<td width=10% align=center valign=bottom>| <a href=/tpxw>图片新闻</a></td>");
        document.write("<td width=10% align=center valign=bottom>| <a href=/bmfw>便民服务</a></td>");	
        document.write("<td width=10% align=center valign=bottom>| <a href=/wsbs>网上办事</a></td>");
        document.write("<td width=10% align=center valign=bottom>| <a href=/tzhd>投资花都</a></td>");
        document.write("<td width=10% align=center valign=bottom>| <a href=/zfzl>政法专栏</a></td>");
        document.write("<td width=13% align=left valign=bottom>| <a href=/zwgk>政务公开</a></td></tr>");
        document.write("<tr><td height=25 align=center>| <a href=/hdzw/qzxx/>区长信箱</a></td>");
        document.write("<td align=center>| <a href='http://hdcj.huadu.gov.cn/cglfdj_input0.asp' target=_blank>区长专线</a></td>");
        document.write("<td align=center>| <a href=http://isc.huadu.gov.cn/><font color=#FFFFFF>在线审批</font></a></td>");
        document.write("<td align=center>| <a href=/czfm>村镇风貌</a></td>");
        document.write("<td align=center>| <a href=/hdzw/rsxx>人事信息</a></td>");
        document.write("<td align=center>| <a href=/xczl>宣传专栏</a></td>");
        document.write("<td align=center>| <a href=/zmhd/wzjy>网站建议</a></td>");
        document.write("<td align=center>| <a href=/rdzt>热点专题</a></td>");
        document.write("<td align=left>| <a href=/zwryzq>政务人员专区</a></td></tr>");
}

//系统常量
var BIG5_CHARACTER_STRING = ":1980/b5/www.huadu.gov.cn/default.htm";	//繁简通的特征字符串

//取得特征字符串在当前页面的位置
function getBIG5CharacterIndex(strURL){  
  return strURL.indexOf(BIG5_CHARACTER_STRING);
}

function getRelativeURL(strURL){
  var sUrl = strURL;
  
  var CHAR_SLASH_TIME;		//斜杠字符'/'次数
  if (getBIG5CharacterIndex(sUrl)>0)	//当前页面URL是翻译过的页面URL
    CHAR_SLASH_TIME = 3;	//为3.因为http://big5.huadu.gov.cn/default.htm
  else
    CHAR_SLASH_TIME = 3;	//为3.因为http://www.huadu.gov.cn/default.htm
   
   
  var i = 0;
  var iCount = 0; 
  while(i<sUrl.length){
    if (sUrl.charAt(i)=='/'){
      ++iCount;
      if (iCount==CHAR_SLASH_TIME)//停止点
        break;
    }
    i++;
  }
       
  if (i>=sUrl.length)		//如URL串为http://www.huadu.gov.cn时，可能使i>=strURL.length
    sUrl = "";
  else    
    sUrl = sUrl.substring(i,sUrl.length);  
  
  return sUrl;
}

function toBIG5(){
  var strURL = document.URL;
  
  if (getBIG5CharacterIndex(strURL)>=0)		//如果已经是繁体页面，则不用翻译
    return;
  
  //var strWebSite = getWebSite(strURL);
  //var strRelativeURL = getRelativeURL(strURL);     
  window.location.href = "http://hpm.huadu.gov.cn:1980/b5/www.huadu.gov.cn/default.htm";  
}

function toGB(){
  var strURL = document.URL;
  var c="htt";
  var d="p://";
  var a="www.huadu";
  var b=".gov.cn/default.htm";
  
  //alert(strURL);
  if (getBIG5CharacterIndex(strURL)<0)	
  	//如果已经是简体页面，则不用翻译
  
    return; 
  
  //var strWebSite = getWebSite(strURL);
  //var strRelativeURL = getRelativeURL(strURL);

  window.location.href= c+d+a+b;
}

function toEng(){
  var strURL = document.URL;
  var c="htt";
  var d="p://";
  var a="www.huadu";
  var b=".gov.cn/english/default.htm";
  
  //alert(strURL);
  //if (getBIG5CharacterIndex(strURL)<0)	
  	//如果已经是简体页面，则不用翻译
  
    //return; 
  
  //var strWebSite = getWebSite(strURL);
  //var strRelativeURL = getRelativeURL(strURL);

  window.location.href= c+d+a+b;
}

function toja(){
  var strURL = document.URL;
  var c="htt";
  var d="p://";
  var a="www.huadu";
  var b=".gov.cn/Japanese/default.htm";
  
  //alert(strURL);
  //if (getBIG5CharacterIndex(strURL)<0)	
  	//如果已经是简体页面，则不用翻译
  
    //return; 
  
  //var strWebSite = getWebSite(strURL);
  //var strRelativeURL = getRelativeURL(strURL);

  window.location.href= c+d+a+b;
}