//定義全局變數
var g_DomainName = "http://big5.fmprc.gov.cn/gate/big5/www.fmprc.gov.cn/";   //域名
var g_DomainSiteName   = g_DomainName + "/fra";     //本站名

//????
function position(){
	document.write("????");
}

function header()
{
	document.write("<TABLE cellSpacing=0 cellPadding=0 width=770 border=0>");
	document.write("<TBODY>");
	document.write("<TR>");
	document.write("<TD width=381><IMG height=13 src='"+g_DomainSiteName+"/images/top-1.gif' width=413 RELATED='1' OLDID='542' OLDSRC='top-1.gif'></TD>");
	document.write("<TD width=389><IMG height=13 src='"+g_DomainSiteName+"/images/top-2.gif' width=357 useMap=#Map border=0 RELATED='1' OLDID='543' OLDSRC='top-2.gif'></TD></TR></TBODY></TABLE>");
	document.write("<TABLE cellSpacing=0 cellPadding=0 width=770 border=0>");
	document.write("<TBODY>");
	document.write("<TR>");
	document.write("<TD vAlign=top align=left width=328 height=55><IMG height=60 src='"+g_DomainSiteName+"/images/top-3.gif' width=451 RELATED='1' OLDID='544' OLDSRC='top-3.gif'></TD>");
	document.write("<TD vAlign=top align=left width=442 height=55>");
	document.write("<OBJECT height=60 width=319><PARAM NAME='_cx' VALUE='8440'><PARAM NAME='_cy' VALUE='1588'><PARAM NAME='FlashVars' VALUE='8440'><PARAM NAME='Movie' VALUE='images/top-flash1.swf'><PARAM NAME='Src' VALUE='images/top-flash1.swf'><PARAM NAME='WMode' VALUE='Window'><PARAM NAME='Play' VALUE='-1'><PARAM NAME='Loop' VALUE='-1'><PARAM NAME='Quality' VALUE='High'><PARAM NAME='SAlign' VALUE=''><PARAM NAME='Menu' VALUE='-1'><PARAM NAME='Base' VALUE=''><PARAM NAME='AllowScriptAccess' VALUE='always'><PARAM NAME='Scale' VALUE='ShowAll'><PARAM NAME='DeviceFont' VALUE='0'><PARAM NAME='EmbedMovie' VALUE='0'><PARAM NAME='BGColor' VALUE=''><PARAM NAME='SWRemote' VALUE=''>");
	document.write("<embed src='"+g_DomainSiteName+"/images/top-flash1.swf' quality=high type='application/x-shockwave-flash' width='319' height='60'></embed>");
	document.write("</OBJECT></TD></TR></TBODY></TABLE>");
	document.write("<TABLE height=4 cellSpacing=0 cellPadding=0 width=770 border=0>");
	document.write("<TBODY><TR>");
	document.write("<TD vAlign=top align=left height=2><IMG height=4 src='"+g_DomainSiteName+"/images/top-4.gif' width=770 RELATED='1' OLDID='545' OLDSRC='top-4.gif'></TD></TR></TBODY></TABLE>");
	document.write("<TABLE height=35 cellSpacing=0 cellPadding=0 width=770 border=0>");
	document.write("<TBODY><TR>");
	document.write("<TD vAlign=top align=left bgColor=#001582 height=35>");
	document.write("<TABLE height=35 cellSpacing=0 cellPadding=0 width=770 border=0><TBODY><TR align=middle>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=87 height=35 default.htm? lm-waijiaobu><A href='"+g_DomainSiteName+"/wjb/default.htm'><FONT color=#ffffff>Minist&#232;re</FONT></A></TD>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=125 height=35 #?><A href='"+g_DomainSiteName+"/wjdt/default.htm'><FONT color=#ffffff>Politiques et Activit&#233;ss</FONT></A></TD>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=128 height=35 #?><A href='"+g_DomainSiteName+"/xwfw/default.htm'><FONT color=#ffffff>Services presses m&#233;dias</FONT></A></TD>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=102 height=35 #?><A href='"+g_DomainSiteName+"/gjhdq/default.htm'><FONT color=#ffffff>Pays et r&#233;gions</FONT></A></TD>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=132 height=35 #?><A href='"+g_DomainSiteName+"/gjwt/default.htm'><FONT color=#ffffff>Questions internationales</FONT></A></TD>");         
    document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=128 height=35 #?><A href='"+g_DomainSiteName+"/ljzg/default.htm'><FONT color=#ffffff>Sur la Chine</FONT></A></TD>");
	document.write("<TD width=68 height=35><A href='"+g_DomainSiteName+"/ziliao/default.htm'><FONT color=#ffffff>Archives</FONT></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>");
	document.write("<map name='Map'>");
	document.write("<area shape='rect' coords='19,1,74,11' href='"+g_DomainName+"/chn/default.htm'>");
	document.write("<area shape='rect' coords='148,0,190,11' href='"+g_DomainName+"/eng/default.htm'>");
	document.write("<area shape='rect' coords='86,0,135,11' href='http://big5.fmprc.gov.cn/gate/big5/www1.fmprc.gov.cn/chn/'>");
	document.write("<area shape='rect' coords='199,1,250,11' href='"+g_DomainName+"/rus/default.htm'>");
	document.write("<area shape='rect' coords='258,0,296,11' href='"+g_DomainName+"/esp/default.htm'>");
	document.write("<area shape='rect' coords='304,0,337,11' href='"+g_DomainName+"/ara/default.htm'>");
	document.write("</map>");
}

function tailer()
{
	document.write("<TABLE cellSpacing='0' cellPadding='0' width='770' border='0'><TBODY>");
	document.write("<TR><TD colSpan='3' height='2'>&nbsp;</TD></TR>");
	document.write("<TR><TD width='135' bgColor='#efefef' height='17'>&nbsp;</TD>");
	document.write("<TD align='center' bgColor='#efefef' height='17'>");
	document.write("Le Minist&#232;re des Affaires Etrang&#232;res de la R&#233;publique populaire de Chine 1998-2005 Tous droits r&#233;serv&#233;s");
	document.write(" </TD>");
	document.write("<TD width='135' bgColor='#efefef' height='17'>&nbsp;</TD></TR>");
	document.write("<TR vAlign=center align=middle>");
	document.write("<TD colSpan='3' height='37'><a href='mailto:webmaster@mfa.gov.cn'><img src='"+g_DomainSiteName+"/images/mail.gif' border='0' align='absmiddle'><font color='#000000'>");
	document.write("Contactez-nous");
	document.write("</font></a> &nbsp;&nbsp;");
	document.write("L'adresse: 2 Chao Yang Men Nan Da Jie,Arrondissement Chao Yang, P&#233;kin Code Postal 100701 Num&#233;ro de T&#233;l&#233;phone:86-10-65961114");
	document.write("</TD>");
	document.write("</TR></TBODY></TABLE>");
}



function header_1()
{
	document.write("<TABLE cellSpacing=0 cellPadding=0 width=770 border=0>");
	document.write("<TBODY>");
	document.write("<TR>");
	document.write("<TD width=381><IMG height=13 src='"+g_DomainSiteName+"/images/top-1.gif' width=413 RELATED='1' OLDID='542' OLDSRC='top-1.gif'></TD>");
	document.write("<TD width=389><IMG height=13 src='"+g_DomainSiteName+"/images/top-2.gif' width=357 useMap=#Map border=0 RELATED='1' OLDID='543' OLDSRC='top-2.gif'></TD></TR></TBODY></TABLE>");
	document.write("<TABLE cellSpacing=0 cellPadding=0 width=770 border=0>");
	document.write("<TBODY>");
	document.write("<TR>");
	document.write("<TD vAlign=top align=left width=328 height=55><IMG height=60 src='"+g_DomainSiteName+"/images/top-3.gif' width=451 RELATED='1' OLDID='544' OLDSRC='top-3.gif'></TD>");
	document.write("<TD vAlign=top align=left width=442 height=55>");
	document.write("<OBJECT height=60 width=319><PARAM NAME='_cx' VALUE='8440'><PARAM NAME='_cy' VALUE='1588'><PARAM NAME='FlashVars' VALUE='8440'><PARAM NAME='Movie' VALUE='http://big5.fmprc.gov.cn/gate/big5/www.mfa.gov.cn/fra/images/top-flash1.swf'><PARAM NAME='Src' VALUE='http://big5.fmprc.gov.cn/gate/big5/www.mfa.gov.cn/fra/images/top-flash1.swf'><PARAM NAME='WMode' VALUE='Window'><PARAM NAME='Play' VALUE='-1'><PARAM NAME='Loop' VALUE='-1'><PARAM NAME='Quality' VALUE='High'><PARAM NAME='SAlign' VALUE=''><PARAM NAME='Menu' VALUE='-1'><PARAM NAME='Base' VALUE=''><PARAM NAME='AllowScriptAccess' VALUE='always'><PARAM NAME='Scale' VALUE='ShowAll'><PARAM NAME='DeviceFont' VALUE='0'><PARAM NAME='EmbedMovie' VALUE='0'><PARAM NAME='BGColor' VALUE=''><PARAM NAME='SWRemote' VALUE=''>");
	document.write("<embed src='"+g_DomainSiteName+"/images/top-flash1.swf' quality=high type='application/x-shockwave-flash' width='319' height='60'></embed>");
	document.write("</OBJECT></TD></TR></TBODY></TABLE>");
	document.write("<TABLE height=4 cellSpacing=0 cellPadding=0 width=770 border=0>");
	document.write("<TBODY><TR>");
	document.write("<TD vAlign=top align=left height=2><IMG height=4 src='"+g_DomainSiteName+"/images/top-4.gif' width=770 RELATED='1' OLDID='545' OLDSRC='top-4.gif'></TD></TR></TBODY></TABLE>");
	document.write("<TABLE height=35 cellSpacing=0 cellPadding=0 width=770 border=0>");
	document.write("<TBODY><TR>");
	document.write("<TD vAlign=top align=left bgColor=#001582 height=35>");
	document.write("<TABLE height=35 cellSpacing=0 cellPadding=0 width=770 border=0><TBODY><TR align=middle>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid' width=64 height=35><a href='"+g_DomainSiteName+"/default.htm'><FONT color=#ffffff>Page d'accueil</a></FONT></TD>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=118 height=35><A href='"+g_DomainSiteName+"/wjb/default.htm'><FONT color=#ffffff>Minist&#232;re</FONT></A></TD>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=104 height=35><A href='"+g_DomainSiteName+"/wjdt/default.htm'><FONT color=#ffffff >Politiques et Activit&#233;ss</FONT></A></TD>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=101 height=35><A href='"+g_DomainSiteName+"/xwfw/default.htm'><FONT color=#ffffff >Services presses m&#233;dias</FONT></A></TD>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=100 height=35><A href='"+g_DomainSiteName+"/gjhdq/default.htm'><FONT color=#ffffff >Pays et r&#233;gions</FONT></A></TD>");
	document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=93 height=35><A href='"+g_DomainSiteName+"/gjwt/default.htm'><FONT color=#ffffff >Questions internationales</FONT></A></TD>");         
    document.write("<TD style='BORDER-RIGHT: #ffffff 1px solid; a: ' width=122 height=35><A href='"+g_DomainSiteName+"/ljzg/default.htm'><FONT color=#ffffff >Sur la Chine</FONT></A></FONT></TD>");
	document.write("<TD width=68 height=35><A href='"+g_DomainSiteName+"/ziliao/default.htm'><FONT color=#ffffff >Archives</FONT></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>");
	document.write("<map name='Map'>");
	document.write("<area shape='rect' coords='19,1,74,11' href='"+g_DomainName+"/chn/default.htm'>");
	document.write("<area shape='rect' coords='148,0,190,11' href='"+g_DomainName+"/eng/default.htm'>");
	document.write("<area shape='rect' coords='86,0,135,11' href='http://big5.fmprc.gov.cn/gate/big5/www1.fmprc.gov.cn/chn/'>");
	document.write("<area shape='rect' coords='199,1,250,11' href='"+g_DomainName+"/rus/default.htm'>");
	document.write("<area shape='rect' coords='258,0,296,11' href='"+g_DomainName+"/esp/default.htm'>");
	document.write("<area shape='rect' coords='304,0,337,11' href='"+g_DomainName+"/ara/default.htm'>");
	document.write("</map>");
}

//相關鏈接

function rel_link(_obj) {
	var jmpURL=_obj.options[_obj.selectedIndex].value; 
	if( jmpURL!='' ) {
		window.open( jmpURL );
	}
	else {
		_obj.selectedIndex=0;
	}
}
	
function RelatedLinks()
{
	document.write("<STYLE TYPE='TEXT/CSS'> FORM {width:157}</STYLE><FORM action='' method=post>");
	document.write("<TABLE cellSpacing='0' cellPadding='0' width='157' border='0'><TBODY>");
	document.write("<TR><TD align='middle' bgColor='#c0c0c0' height='30'>");
	document.write("<SELECT size=1 style='width:136' name=select onchange='javascript:rel_link( this );'>");
	document.write("<OPTION align=center value='http://big5.fmprc.gov.cn/gate/big5/www.fmprc.gov.cn/eng/' selected>--Links--</OPTION>");
	document.write("<OPTION value='http://big5.fmprc.gov.cn/gate/big5/www.fmprc.gov.cn/eng/xglj/t25286.htm'>Missions Overseas</OPTION>");
	document.write("<OPTION value='http://big5.fmprc.gov.cn/gate/big5/www.fmprc.gov.cn/eng/xglj/t25285.htm'>Central Governments</OPTION>");
	document.write("<OPTION value='http://big5.fmprc.gov.cn/gate/big5/www.fmprc.gov.cn/eng/xglj/t25284.htm'>Local Governments</OPTION>");
	document.write("<OPTION value='http://big5.fmprc.gov.cn/gate/big5/www.fmprc.gov.cn/eng/xglj/t25283.htm'>Local Foreign Affairs Offices</OPTION>");
	document.write("<OPTION value='http://big5.fmprc.gov.cn/gate/big5/www.fmprc.gov.cn/eng/xglj/t25282.htm'>Press</OPTION>");
	document.write("<OPTION value='http://big5.fmprc.gov.cn/gate/big5/www.fmprc.gov.cn/eng/xglj/t25281.htm'>Other Websites</OPTION>");
	document.write("</SELECT>");
	document.write("</TD></TR>");
	document.write("</TBODY></TABLE>");
	document.write("</FORM>");
}

//??????
function dateSearch()
{		
	var now = new Date();
	var nowYear = now.getYear();
	var nowMonth = (now.getMonth() + 1);
	var nowDate = now.getDate();

	var nowDate = new Date();

	document.write("<form name=\"frmSearch\" action=\"http://big5.fmprc.gov.cn/gate/big5/192.168.115.234:8080/se/eng_sse.jsp\" method=\"post\">");
	document.write("<TABLE borderColor='#ffffff' cellSpacing='0' cellPadding='0' width='768' border='1' bFontSize='FALSE' styleType='0'><TR height=10>");
    document.write("      <TD>&nbsp;&nbsp;</TD></TR>");   
    document.write("<TR height=15>");
    document.write("<TD>&nbsp;&nbsp;");

	document.write("<select name=yf>");
    var i;
    for( i=1998;i<=nowYear;i++ ){
		document.write("<option value=\"" + i + "\" " + ((i == nowYear)?"selected":"") + ">" + i + "</option>");
    }
	document.write("</select>");
    document.write("Year");

    document.write("<select name=mf>");
    for( i=1;i<=12;i++ ){
		document.write("<option value=\"" + i + "\" " + ((i == nowMonth)?"selected":"") + ">" + i + "</option>");
    }
	document.write("</select>");
    document.write("Month");

	document.write("<select name=df>");
    for( i=1;i<=31;i++ ){
		document.write("<option value=\"" + i + "\" " + ((i == nowDate)?"selected":"") + ">" + i + "</option>");
    }    
	document.write("</select>Day&nbsp;To&nbsp;");

	document.write("<select name=yt>");
    for( i=1998;i<=nowYear;i++ ){
		document.write("<option value=\"" + i + "\" " + ((i == nowYear)?"selected":"") + ">" + i + "</option>");
    }    
	document.write("</select>");
	document.write("Year");

    document.write("<select name=mt>");
    for( i=1;i<=12;i++ ){
		document.write("<option value=\"" + i + "\" " + ((i == nowMonth)?"selected":"") + ">" + i + "</option>");
    }
    document.write("</select>Month");

	document.write("<select name=dt>");
    for( i=1;i<=31;i++ ){
		document.write("<option value=\"" + i + "\" " + ((i == nowDate)?"selected":"") + ">" + i + "</option>");
    }
	document.write("</select>");

    document.write("Day&nbsp;&nbsp;");
	document.write("<input type='hidden' name='website' value='eng'><input type='hidden' name='select' value='1'><input type='hidden' name='sw' value='%'><input type='hidden' name='urlname' value=''><input type='submit' name='Submit' value='Search'>");
	document.write("</TD></TR>");
	document.write("</TABLE>");
	document.write("</form>");
	var strUrl=window.location.href;
	strUrl=strUrl.substring(7);
	var nPos=strUrl.lastIndexOf("/");
	if( nPos >=0 )
	{
		strUrl=strUrl.substring( 0, nPos);
	}
	frmSearch.urlname.value = strUrl; 
}

function doPrint()
{
	var str="<html>";
	var article;
	var css;
	var strAdBegin="<!--NEWSZW_HZH_BEGIN-->";
	var strAdEnd="<!--NEWSZW_HZH_END-->";
	var strFontSize='【<A href="javascript:doZoom(16)">大</A> <A href="javascript:doZoom(14)">中</A> <A href="javascript:doZoom(12)">小</A>】'
	var strdoPrint="doPrint()";
	var strTmp;
	
	css="<style>"
	+"td,.f12{font-size:12px}"
	+".f24 {font-size:24px;}"
	+".f14 {font-size:14px;}"
	+".title14 {font-size:14px;line-height:130%}"
	+".l17 {line-height:170%;}"
	+"</style>";
	
	str +=	css;
	str +=	'<meta http-equiv="content-type" content="text/html; charset=gb2312">';
	str +=	'<title>'+document.title+'</title>';
	str +=	"<body bgcolor=#ffffff topmargin=5 leftmargin=5 marginheight=5 marginwidth=5 onLoad='window.print()'>";
	str +=	"<center>";
	str +=	"<table width=660 border=0 cellpadding=0 cellspacing=20 bgcolor=#EDF0F5><tr><td>";
	
	//wsw@2004-4-27 修改處理div的方式
	var arDivs = document.getElementsByTagName('DIV');
	for (var t=0; t<arDivs.length; t++)
	{
		var objDiv = arDivs[t];
		if(objDiv.style.width == "600")
		{
			objDiv.removeAttribute('style');
			break;
		}
	}

	article=document.getElementById('article').innerHTML;
	if(article.indexOf(strAdBegin)!=-1){
		str +=article.substr(0,article.indexOf(strAdBegin));
		strTmp=article.substr(article.indexOf(strAdEnd)+strAdEnd.length, article.length);
	}else{
		strTmp=article
	}
	//str +=strTmp.substr(0,strTmp.indexOf(strFontSize));
	//strTmp=strTmp.substr(strTmp.indexOf(strFontSize)+strFontSize.length, strTmp.length);
	
	//wsw@2004-4-26 正則運算式中字符串提取功能([\s\S]*?)需要IE5.5以上版本才能支援
	//strTmp = strTmp.replace(/<div[^>]*>([\s\S]*?)<\/div>/ig,"$1");	//過濾</DIV>
	//wsw@2004-4-26 分開處理替換<div>可以在IE5.0實現預覽列印
	//strTmp = strTmp.replace(/<div[^>]*>/ig,"");
	//strTmp = strTmp.replace(/<\/div>/ig,"");
	
	str += strTmp;
	//str +=strTmp.substr(0,strTmp.indexOf(strdoPrint));
	//str +="window.print()";
	//str +=strTmp.substr(strTmp.indexOf(strdoPrint)+strdoPrint.length, strTmp.length);
	str +=	"</td></tr></table>";
	str += "<br><TABLE cellSpacing=0 cellPadding=0 width=660 border=0 align=center><TBODY><TR><TD height=10><IMG height='1' alt='' src='http://big5.fmprc.gov.cn/gate/big5/www.mfa.gov.cn/fra/zxxx/7_c.gif' width='1' border='0'></TD></TR><TR><TD align=center bgColor=#efefef>Copyright &copy; 2003, Ministry of Foreign Affairs of the People's Republic of China</TD></TR>	<TR><TD height=10><IMG height='1' alt='' src='http://big5.fmprc.gov.cn/gate/big5/www.mfa.gov.cn/fra/zxxx/7_c.gif' width='1' border='0'></TD></TR><TR><TD align=center>Contact us Address: No. 2, Chaoyangmen Nandajie, Chaoyang District, Beijing, 100701 Tel: 86-10-65961114 </TD></TR></TBODY></TABLE></CENTER></TD></TR></TBODY></TABLE>";
	str += "</center>";
	str +=	"</body></html>";
	document.write(str);
	document.close();
}

//文章推薦使用的函數
function openSendMail( sDocTitle ) {
	var sUrl = "http://big5.fmprc.gov.cn/gate/big5/www.fmprc.gov.cn/wcm/customize/messages/send_mail.jsp?DocTitle="+sDocTitle+"&URL="+window.location.href;

	nWidth  = 460;
	nHeight = 260;

	var winMsg = open( sUrl,"",
							  "left=300,top=250,width="+nWidth+",height="+nHeight+
							  ",menubar=no,status=no,titlebar=no,resizable=no,scrollbars=yes" );
			
	if( winMsg.opener==null ) {
		winMsg.opener = window;
	}
	winMsg.focus();
}

//about site search
function fh_writeSiteSearch(){
	fh_writeSiteSearchEx( 10 );
}

var g_SiteName = "fra";
var g_Encoding = "ISO-8859-1";
var g_Keywords = "";

function getChnlPath(_lang){
	var sValue = window.location.href;
	sValue = sValue.substring(sValue.indexOf(_lang)-1);
	if(sValue.indexOf(".htm")>0)
		sValue = sValue.substring(0, sValue.lastIndexOf("/")+1);
	return sValue;
}

function fh_writeSiteSearchEx( p_nInputSize ){
	var sHtml = "<form name=\"frmSiteSearch\" action=\"http://big5.fmprc.gov.cn/gate/big5/wcm.fmprc.gov.cn/wcm/extapp/site_search.jsp\" method=\"POST\" style=\"margin-bottom:0\" onsubmit=\"javascript:return hr_onSiteSearch();\"> \n"
			  + "<input type=\"hidden\" name=\"SiteName\" value=\"fra\">\n"
			  + "<input type=\"hidden\" name=\"Encoding\" value=\"ISO-8859-1\">\n"
			  + "<INPUT TYPE=\"text\" NAME=\"Keywords\" style=\"border:solid 1px #000000\" SIZE=\""+p_nInputSize+"\">&nbsp;"
			  + "<INPUT TYPE=\"image\" BORDER=\"0\" SRC=\"http://big5.fmprc.gov.cn/gate/big5/www.mfa.gov.cn/fra/images/y-sousuo.gif\" NAME=\"image\" align=\"absmiddle\"> \n"
			  + "</form> \n";
	document.write( sHtml );
}

function fh_writeDateSearch( p_nInputSize ){
	var now = new Date();
	var nowYear = now.getYear();
	var nowMonth = (now.getMonth()+1);
	var nowDate = now.getDate();

	var ChnlPath = getChnlPath(g_SiteName);

	var sHtml = "<form name=\"frmSiteSearch\" action=\"http://big5.fmprc.gov.cn/gate/big5/wcm.fmprc.gov.cn/wcm/extapp/site_search.jsp\" method=\"POST\" style=\"margin-bottom:0\" onsubmit=\"javascript:return hr_onSiteSearch();\"> \n"
			  + "<input type=\"hidden\" name=\"SiteName\" value=\""+g_SiteName+"\">\n"
			  + "<input type=\"hidden\" name=\"Encoding\" value=\""+g_Encoding+"\">\n"
			  + "<input type=\"hidden\" name=\"ChnlPath\" value=\""+ChnlPath+"\">\n"
			  + "<INPUT TYPE=\"text\" NAME=\"Keywords\" style=\"border:solid 1px #000000\" SIZE=\""+p_nInputSize+"\">&nbsp;";


		sHtml += "<SELECT name='yf'>";
		for(var i=1998;i<=nowYear;i++ ){
			sHtml += "<option value='" + i + "' " + ((i == nowYear)?"selected":"") + ">" + i + "</option>";
		}
		sHtml += "</SELECT>Year";

		sHtml += "<SELECT name='mf'>";
		for(var i=1;i<=12;i++ ){
			sHtml += "<option value='" + i + "' " + ((i == nowMonth)?"selected":"") + ">" + i + "</option>";
		}
		sHtml += "</SELECT>Month";

		sHtml += "<SELECT name='df'>";
		for(var i=1;i<=31;i++ ){
			sHtml += "<option value='" + i + "' " + ">" + i + "</option>";
		}
		sHtml += "</SELECT>Day&nbsp;To&nbsp;";

		sHtml += "<SELECT name='yt'>";
		for(var i=1998;i<=nowYear;i++ ){
			sHtml += "<option value='" + i + "' " + ((i == nowYear)?"selected":"") + ">" + i + "</option>";
		}
		sHtml += "</SELECT>Year";

		sHtml += "<SELECT name='mt'>";
		for(var i=1;i<=12;i++ ){
			sHtml += "<option value='" + i + "' " + ((i == nowMonth)?"selected":"") + ">" + i + "</option>";
		}
		sHtml += "</SELECT>Month";

		sHtml += "<SELECT name='dt'>";
		for(var i=1;i<=31;i++ ){
			sHtml += "<option value='" + i + "' " + ((i == nowDate)?"selected":"") + ">" + i + "</option>";
		}
		sHtml += "</SELECT>Day&nbsp;&nbsp;";

		sHtml += "<INPUT TYPE=\"image\" BORDER=\"0\" SRC=\"http://big5.fmprc.gov.cn/gate/big5/www.mfa.gov.cn/fra/images/y-sousuo.gif\" NAME=\"image\" align=\"absmiddle\"> \n" + "</form> \n";

		document.write(sHtml);
}

function hr_onSiteSearch(){
	var frm = document.frmSiteSearch;

	//check the data valid
	var sValue = frm.Keywords.value;
	sValue = sValue.replace(/(^\s*)|(\s*$)/g, "");
	g_Keywords = sValue;
	if( sValue.length==0 ){
		alert( "Please input the keywords!" );
		frm.Keywords.focus();
		return false;
	}
	return true;
	//return false;  //why@2003-08-26 ??????? 
}


//推薦給朋友的新函數
function validate_form() {

	var str0,str1,str2,str3,str4,str;

	validity = true; // assume valid

	if (!check_email(document.Form2000.FriendEmail.value)) {
		validity = false;
		alert('Invalid Email Address!');
	}

	if( validity ) {
		str0="MFA Web Site Suggests This News";
		str1="Hello!";
		str2="Your Friend Suggests You To Read This New:";
		str3="“"+document.title+"”"+"\n\nLink Url:";
		str4=this.location;
		str=str0+"\n"+str1+"\n"+str2+"\n"+str3+"\n"+str4+"\n";
		document.Form2000.Context.value=str;

		document.Form2000.action="mailto:"+document.Form2000.FriendEmail.value+"?Subject=MFA Web Site News";
	}
	return validity;
}

//推薦給朋友的新函數2
function validate_form2() {

	var str0,str1,str2,str3,str4,str;

	validity = true; // assume valid

	if (!check_email(document.Form2003.FriendEmail.value)) {
		validity = false;
		alert('Invalid Email Address!');
	}

	if( validity ) {
		str0="MFA Web Site Suggests This News";
		str1="Hello!";
		str2="Your Friend Suggests You To Read This New:";
		str3="“"+document.title+"”"+"\n\nLink Url:";
		str4=this.location;
		str=str0+"\n"+str1+"\n"+str2+"\n"+str3+"\n"+str4+"\n";
		document.Form2003.Context.value=str;

		document.Form2003.action="mailto:"+document.Form2003.FriendEmail.value+"?Subject=MFA Web Site News";
	}
	return validity;
}

//判斷用戶填寫的EMail是否有效函數
function check_email( address ) {
	if( (address=="")||(address.indexOf('@')==-1)||(address.indexOf('.')==-1) )
		return false;

	return true;
}