var kanhan;
var filepath;

kanhan = (document.location.toString().search("/sc/") != -1)
if (kanhan)
	filepath = "/SC/";
else
	filepath = "/TC/";

function simg(obj,src)
{
	if (kanhan)
		src = src.replace("/FileManager/SC/", "/FileManager/SC/");
	if (document.images){
		obj.src = src;
	}
}

function overTopMenu(obj)
{
	if (document.images){
		eval("document.images." + obj + ".src = '/FileManager" + filepath + "UTIL_UTEMPLATE/06bc/" + obj + "_over.gif'");
	}
}

function outTopMenu(obj)
{
	if (document.images){
		eval("document.images." + obj + ".src = '/FileManager" + filepath + "UTIL_UTEMPLATE/06bc/" + obj + ".gif'");
	}
}

function initObj()
{
	var nodeid = oThisNode.NodeID;
	if (oThisNode.LevelNo > 2)
	{
		for( var i = 0; i < oPageVar.Parents.length; i++ ){
			if( oPageVar.Parents[i].LevelNo == 2){
				nodeid = oPageVar.Parents[i].NodeID;
				break;
			}
		}
	}
	var obj = document.getElementById("head_img");
	if (obj) obj.src = "/FileManager" + filepath + "UTIL_UTEMPLATE/06bc/hd_" + nodeid + ".gif";
	
	obj = document.getElementById("pic"+nodeid);
	if (obj) obj.src = "/FileManager" + filepath + "UTIL_UTEMPLATE/06bc/sub_nav_" + nodeid + "_over.gif";

	obj = document.getElementById("link"+nodeid);
	if (obj) obj.onmouseout = "";

	if (kanhan)
	{
		var arrLinks = document.getElementsByTagName("a");
		for (var i=0;i<arrLinks.length;i++)
		{
			if (arrLinks[i].name == "" || arrLinks[i].name == null)
				arrLinks[i].href = arrLinks[i].href.replace("/FileManager/SC/", "/FileManager/SC/");
		}
	}

	if(window.name=='PrintPage')
		window.print();
}

function styleSheet(){
	var styleType='style.css';
	
	if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) <= 4)) {
		document.writeln('<link href="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/css/nt_'+styleType+'" rel="STYLESHEET" type="text/css">');
	}else{
		document.writeln('<link href="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/css/'+styleType+'" rel="STYLESHEET" type="text/css">');
	}
}

function getRevisionDate(){
	var rDate = oDateTimeInfo.StartTime;
	var rDateText = "修订日期： ";
	if (oDateTimeInfo.ReviewTime > rDate) {
		rDate = oDateTimeInfo.ReviewTime;
		rDateText = "覆检日期： ";
	}
	if (oDateTimeInfo.RevisionTime > rDate) {
		rDate = oDateTimeInfo.RevisionTime;
		rDateText = "修订日期： ";
	}
	rDateText += rDate.getFullYear()+'年'+(rDate.getMonth()+1)+'月'+rDate.getDate()+'日';
	document.write(rDateText);
}

function showChiLangBtn()
{
	if (kanhan)
	{
		langid = 2;
		langAlt = "中文繁体";
	} else {
		langid = 3;
		langAlt = "中文简体";
	}
	document.write('<td><A onmouseover=\"overTopMenu(\'lang_btn1\')\" onmouseout=\"outTopMenu(\'lang_btn1\')\" href=\"javascript:changeLanguage(' + langid + ')"><IMG id=lang_btn1 alt=' + langAlt + ' src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/lang_btn1.gif" border=0 name=lang_btn1></A></td>');
}

function changeLanguage(langid) {
	var lh = parent.location.href;
	var l = "";
	var was_ch = ((lh.search("index_tc")!=-1)?true:false);
	if (langid == 1) {
		l = "en";
		if (was_ch) lh = lh.replace("index_tc", "index");
	}
	if (langid == 2) {
		l = "tc";
		if (!was_ch) lh = lh.replace("index", "index_tc");
	}
	if (langid == 3) {
		l = "sc";
		if (!was_ch) lh = lh.replace("index", "index_tc");
	}
	lh = lh.replace("/sc/", "/"+l+"/");
	lh = lh.replace("/sc/", "/"+l+"/");
	lh = lh.replace("/en/", "/"+l+"/");
	parent.location.href = lh;
}
/*
function changeLanguage(langid)
{
	var sUrl = document.location.toString();
	if (kanhan)
	{
		sUrl = sUrl.replace("/gb/", "//");
		sUrl = sUrl.replace("/gb/", "//");
		sUrl = sUrl.substring(0, sUrl.indexOf("/", sUrl.indexOf("//")+2 ));
	} else {
		sUrl = document.location.protocol + "//" + document.location.host;
	}
	if (langid == 1)
	{
		sUrl += oPageVar.NodeFullLink_EN;
	}
	if (langid == 2)
	{
		sUrl += oPageVar.NodeFullLink_TC;
	}
	if (langid == 3)
	{
		sUrl = oPageVar.NodeFullLink_SC;
		if (sUrl.search("westcomzivo.com") != -1)
			sUrl = sUrl.replace("/", "/");
	}
	document.location.href=sUrl;
}
*/
function showCopyRight()
{
	document.write("&copy;");
}

function PopImg(img, nodeid, page,x,y){
	var url = "/sc/popup/index_tc.htm";
	var sUrl = document.location.toString();
	if (sUrl.search("/gb/") != -1)
		url = sUrl.substring(0, sUrl.indexOf("/", sUrl.indexOf("/gb/")+4 )) + url;
	url += ((url.indexOf("?")==-1)?"?":"&") + "img="+img+"&fromnodeID="+nodeid;
	eval("nw = window.open(url, page,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,pageXOffset=0,pageYOffset=0,top=0,left=0,width=" + x + ",height=" + y + "')");
	if ( nw.focus != null)
	{nw.focus();}
}

function PrintDocument(){
	window.open(document.URL,'PrintPage','top=10,left=10,height=500,width=650,scrollbars=1');
}

function getLeftMenu(){
	if (window.name!='PrintPage')
	{
		document.writeln('<TD width=10><IMG alt="" src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_pix_left.jpg" border=0></TD>');
		document.writeln('<TD width=147>');
		document.writeln('<TABLE cellSpacing=0 cellPadding=0 border=0>');
		document.writeln('<TBODY><!-- need write a js for the effect of menu onmouse over -->');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><A href="/sc/index_tc.htm"><IMG alt="二零零六年中期人口统计" src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_logo.gif" border=0></A></TD></TR>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><A id=link939 onmouseover="simg(pic939, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_939_over.gif\');" onmouseout="simg(pic939, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_939.gif\');" href="/sc/whatsnew/index_tc.htm"><IMG id=pic939 alt=最新消息 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_939.gif" border=0 name=pic939></A></TD></TR>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><A id=link940 onmouseover="simg(pic940, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_940_over.gif\');" onmouseout="simg(pic940, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_940.gif\');" href="/sc/press/index_tc.htm"><IMG id=pic940 alt=新闻稿和演辞 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_940.gif" border=0 name=pic940></A></TD></TR>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><A id=link941 onmouseover="simg(pic941, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_941_over.gif\');" onmouseout="simg(pic941, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_941.gif\');" href="/sc/background/index_tc.htm"><IMG id=pic941 alt=背景资料 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_941.gif" border=0 name=pic941></A></TD></TR>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><A id=link942 onmouseover="simg(pic942, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_942_over.gif\');" onmouseout="simg(pic942, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_942.gif\');" href="/sc/data/index_tc.htm"><IMG id=pic942 alt=数据发布 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_942.gif" border=0 name=pic942></A></TD></TR>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><A id=link943 onmouseover="simg(pic943, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_943_over.gif\');" onmouseout="simg(pic943, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_943.gif\');" href="/sc/publicity/index_tc.htm"><IMG id=pic943 alt=宣传物品 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_943.gif" border=0 name=pic943></A></TD></TR>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><A id=link945 onmouseover="simg(pic945, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_945_over.gif\');" onmouseout="simg(pic945, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_945.gif\');" href="/sc/photo/index_tc.htm"><IMG id=pic945 alt=相片廊 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_945.gif" border=0 name=pic945></A></TD></TR>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><A id=link946 onmouseover="simg(pic946, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_946_over.gif\');" onmouseout="simg(pic946, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_946.gif\');" href="/sc/faq/index_tc.htm"><IMG id=pic946 alt=常见问题 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_946.gif" border=0 name=pic946></A></TD></TR>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><A id=link947 onmouseover="simg(pic947, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_947_over.gif\');" onmouseout="simg(pic947, \'/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_947.gif\');" href="/sc/links/index_tc.htm"><IMG id=pic947 alt=相关网址 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_947.gif" border=0 name=pic947></A></TD></TR>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><IMG alt="" src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_nav_pix_01.gif" border=0></TD></TR></TBODY></TABLE></TD>');
	}
}

function getTopMenu(){
	if (window.name!='PrintPage')
	{
		document.writeln('<TD>');
		document.writeln('<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>');
		document.writeln('<TBODY>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD width=9 height=32><IMG alt="" src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_pix_07.jpg" border=0></TD>');
		document.writeln('<TD vAlign=bottom height=32>');
		document.writeln('<TABLE height=22 cellSpacing=0 cellPadding=0 width="100%" border=0>');
		document.writeln('<TBODY>');
		document.writeln('<TR>');
		document.writeln('<TD width="100%" height=22>');
		document.writeln('<TABLE cellSpacing=0 cellPadding=0 border=0>');
		document.writeln('<TBODY>');
		document.writeln('<TR>');
		document.writeln('<SCR'+'IPT>showChiLangBtn()</SCR'+'IPT>');
		document.writeln('<TD><A onmouseover="overTopMenu(\'lang_btn2\')" onmouseout="outTopMenu(\'lang_btn2\')" href="javascript:changeLanguage(1)"><IMG id=lang_btn2 alt=English src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/lang_btn2.gif" border=0 name=lang_btn2></A></TD></TR></TBODY></TABLE></TD>');
		document.writeln('<TD width=239 height=22>');
		document.writeln('<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>');
		document.writeln('<TBODY>');
		document.writeln('<TR>');
		document.writeln('<TD><A onmouseover="overTopMenu(\'btn_print\')" onmouseout="outTopMenu(\'btn_print\')" href="javascript:PrintDocument();"><IMG alt=列印 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/btn_print.gif" border=0 name=btn_print></A></TD>');
		document.writeln('<TD><A onmouseover="overTopMenu(\'btn_sitemap\')" onmouseout="outTopMenu(\'btn_sitemap\')" href="/sc/sitemap/index_tc.htm"><IMG alt=网页指南 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/btn_sitemap.gif" border=0 name=btn_sitemap></A></TD>');
		document.writeln('<TD><A onmouseover="overTopMenu(\'btn_contact\')" onmouseout="outTopMenu(\'btn_contact\')" href="/sc/contactus/index_tc.htm"><IMG alt=联络我们 src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/btn_contact.gif" border=0 name=btn_contact></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>');
		document.writeln('<TR vAlign=top>');
		document.writeln('<TD><IMG alt="" src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_pix_08.jpg" border=0></TD>');
		document.writeln('<TD background=/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_main_vis.jpg height=96><IMG height=96 alt="" src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/spacer.gif" width=1 border=0></TD></TR>');
		document.writeln('<TR>');
		document.writeln('<TD width=9><IMG height=1 alt="" src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/spacer.gif" width=9 border=0></TD>');
		document.writeln('<TD background=/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/sub_bg.gif>');
		document.writeln('<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>');
		document.writeln('<TBODY>');
		document.writeln('<TR>');
		document.writeln('<TD width=20 rowSpan=2><IMG height=50 alt="" src="/FileManager' + filepath + 'UTIL_UTEMPLATE/06bc/spacer.gif" width=25></TD>');
	}
}

styleSheet()

function ShowHeader(){

// ----- ^ TTemplateText ^ -----
document.write('<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" bgColor=#ffffff border=0>\n');
document.write('<TBODY>\n');
document.write('<TR vAlign=top>\n');
document.write('<SCR'+'IPT>\n');
document.write('getLeftMenu();\n');
document.write('getTopMenu();\n');
document.write('</SCR'+'IPT>\n');
document.write('<TD width=554 height=80><!-- show the header image-->\n');
document.write('<P><IMG id=head_img alt=\"\" src=\"/FileManager/SC/UTIL_UTEMPLATE/06bc/spacer.gif\" align=top border=0></P></TD>\n');
document.write('<TD width=20 rowSpan=2><IMG height=50 alt=\"\" src=\"/FileManager/SC/UTIL_UTEMPLATE/06bc/spacer.gif\" width=25></TD></TR>\n');
document.write('<TR>\n');
document.write('<TD class=text><!-- content here!!!! -->\n');

// ----- v TTemplateText v -----
}

function ShowFooter(){

// ----- ^ TTemplateText ^ -----
document.write('<!-- content end --></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR><TR><TD colSpan=\"3\" background=\"/FileManager/SC/UTIL_UTEMPLATE/06bc/sub_pix_low_bg.gif\">\n');
document.write('<DIV align=right><IMG height=15 alt=\"\" src=\"/FileManager/SC/UTIL_UTEMPLATE/06bc/sub_pix_low.gif\" width=760></DIV></TD></TR><TR vAlign=\"top\"><TD colSpan=\"3\">\n');
document.write('<P>\n');
document.write('<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>\n');
document.write('<TBODY>\n');
document.write('<TR>\n');
document.write('<TD><IMG height=1 alt=\"\" src=\"/FileManager/SC/UTIL_UTEMPLATE/06bc/spacer.gif\" width=5 border=0></TD>\n');
document.write('<TD vAlign=top align=middle>\n');
document.write('<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>\n');
document.write('<TBODY>\n');
document.write('<TR bgColor=#ffffff>\n');
document.write('<TD bgColor=#ffffff height=15><B>2006</B> <IMG height=11 alt=\"\" src=\"/FileManager/SC/UTIL_UTEMPLATE/06bc/copy.gif\" width=12> | <A class=footer href=\"/sc/impnotices/index_tc.htm\"><STRONG>重要告示</STRONG></A>&nbsp;|&nbsp;&nbsp;<A class=text_link href=\"/sc/privacy_policy/index_tc.htm\"><STRONG>私隐政策</STRONG></A></TD><!-- show revision date -->\n');
document.write('<TD align=right bgColor=#ffffff height=15>\n');
document.write('<SCR'+'IPT>getRevisionDate()</SCR'+'IPT>\n');
document.write('</TD>\n');
document.write('<TD align=right width=25 bgColor=#ffffff height=15><IMG height=15 alt=\"\" src=\"/FileManager/SC/UTIL_UTEMPLATE/06bc/spacer.gif\" width=25></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR></P></TD></TR><TR><TD>&nbsp;</TD> <TD colSpan=\"2\" vAlign=\"top\"><SPAN class=copyright>版权所有 不得转载\n');
document.write('<SCR'+'IPT>showCopyRight()</SCR'+'IPT>\n');
document.write('2006 政府统计处</SPAN></TD></TR></TBODY></TABLE>\n');
document.write('<SCR'+'IPT>\n');
document.write('initObj()\n');
document.write('</SCR'+'IPT>\n');

// ----- v TTemplateText v -----


}


