function off1(){document.getElementById("n1").className="";}
function on1(){document.getElementById("n1").className="on";}
function off2(){document.getElementById("n2").className="";}
function on2(){document.getElementById("n2").className="on";}
function off3(){document.getElementById("n3").className="";}
function on3(){document.getElementById("n3").className="on";}
function off4(){document.getElementById("n4").className="";}
function on4(){document.getElementById("n4").className="on";}
function off5(){document.getElementById("n5").className="";}
function on5(){document.getElementById("n5").className="on";}

function AddFavorite(sURL, sTitle)
{
	try
	{
		window.external.addFavorite(sURL, sTitle);
	}
	catch (e)
	{
		try
		{
			window.sidebar.addPanel(sTitle, sURL, "");
		}
		catch (e)
		{
			 alert( "您的浏览器不支持该操作，请使用浏览器菜单手动设置." );
		}
	}
}


function SetHome(obj,vrl)
{
	try
	{
			obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
	}
	catch(e){
			if(window.netscape) {
				try {
						netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
				} 
				catch (e) { 
						alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'"); 
				}
				var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
				prefs.setCharPref('browser.startup.homepage',vrl);
			 }else{
			alert( "您的浏览器不支持该操作，请使用浏览器菜单手动设置." );
 
			 }

	}
}

//定义日期函数
function getHeadDate(){
	var enabled = 0;
	var today = new Date();
	var day,date1,date2;
	  var centry ;
	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 = "六";

	date1 = (today.getFullYear()+"年" + (today.getMonth() + 1 ) + "月" + today.getDate() + "日&nbsp;" );
	date2 = "&nbsp;星期" +  day;
	return date1+date2;
}

//搜索验证函数
function form_submit() {
	var sw_value = document.getElementById("searchwords").value;
	if(sw_value == '' || sw_value == '请输入查询关键字'){
		alert("搜索内容不能为空");
	}
	else{
		var type = document.getElementById("type").value;
		if(type =='title'){
			sw_value = "doctitle = '%"+sw_value+"%'";
		}
		document.getElementById("searchword").value = sw_value;	
		//document.charset='gb2312';
		document.getElementById("searchform").submit();
		//document.charset='utf-8';
	}
}

//iframe跨子域
//document.domain = "fshealth.gov.cn";
var curDate= getHeadDate();

var siteRoot="http://www.fshealth.gov.cn";
document.writeln(''
	+'<div class="mod-flash">'
		+'<im'+'g src="'+siteRoot+'/images/jkw_top.jpg" remote=yes />'
	+'</div>'
	+'<div class="mod-top">'
		+'<div class="mod-fav">'
			+'<ul>'
				+'<li><a class="t1" href="#">繁体</a></li>'
				+'<li><a class="t2" href="#">简体</a></li>'
				+'<li><a class="t3"  href="#">English</a></li>'
				+'<li><a href="#" onclick="SetHome(this,window.location)">设为首页</a></li>'
				+'<li><a href="#" onclick="AddFavorite(window.location,document.title)">收藏本站</a></li>'
				+'<li><a href="#">短信订阅</a></li>'
			+'</ul>'
		+'</div>'
	+'</div>'
		+'<div class="mod-bar">'
		+'<div class="mod-date" style="width:150px;">'+curDate+'</div>'
		+'<div class="weather" id="weatherString"></div>'
		+'<div class="search">'
			+'<form action="http://219.130.221.60:8080/was40/search" method="post" id="searchform" name="searchform" target="_blank">'
			+'<input type="text" value="请输入查询关键字" id="searchwords" name="searchwords" class="text" onfocus="if(this.value==\'请输入查询关键字\')this.value=\'\';" />'
			+'<input style="display:none" id="channelid" name="channelid" value="5059" />'
			+'<input type="hidden" id="type" name="type" value="title" />'
			+'<input style="display:none" id="searchword" name="searchword" />'
			+'<a href="javascript:void(0)" onClick="document.charset=\'gb2312\';form_submit();document.charset=\'utf-8\'"><im'+'g alt src="'+siteRoot+'/images/jkw_search.gif" remote=yes /></a>'
			+'</form>'
		+'</div>'
	+'</div>'
	+'<div class="mod mod-nav">'
		+'<ul>'
			+'<li><a href="'+siteRoot+'/">首页</a></li>'
			+'<li id="n1"><a onmouseout="off1();" onmouseover="on1();" href="'+siteRoot+'/zxpt" TARGET=_BLANK>资讯平台</a></li>'
			+'<li id="n2"><a onmouseout="off2();" onmouseover="on2();" href="'+siteRoot+'/dzdt" TARGET=_BLANK>电子医疗</a></li>'
			+'<li id="n3"><a onmouseout="off3();" onmouseover="on3();" href="'+siteRoot+'/jkfw" TARGET=_BLANK>健康服务</a></li>'
			+'<li id="n4"><a onmouseout="off4();" onmouseover="on4();" href="'+siteRoot+'/fwez" TARGET=_BLANK>服务E站</a></li>'
			+'<li id="n5"><a onmouseout="off5();" onmouseover="on5();" href=http://live.fshealth.gov.cn/smjkfw/wsyygh/index.action TARGET=_BLANK>预约挂号</a></li>'
			+'<li style="width:115px;"><a href=http://www.fshealth.gov.cn/search/01/ TARGET=_BLANK>查询中心</a></li>'
			+'<li style="width:100px;"><a href=http://www.fshealth.gov.cn/pj/ TARGET=_BLANK>评价中心</a></li>'
			+'<li style="width:90px;"><a href=http://www.fshealth.gov.cn/hdjl/zxzx/ TARGET=_BLANK>交流中心</a></li>'
		+'</ul>'
	+'</div>');
	

	document.writeln('<scr'+'ipt type="text/javascript" src="http://www.citygf.com/weather_fshealth.php" remote=yes ignoreapd="1" charset="GB2312"></script>');
