root_path	=	'/';
text_path	=	'content.html';
search_path	=	'/text/search/';
sitemap_path = 'sitemap.html';
enquiry_path =	'mailto:victimsupport@swd.gov.hk';
gic_path	= 'http://www.gov.hk/tc/residents/';
img_path	=	'/images/top/';

function ChangeVersion(lang) {
	org_path=parent.location.pathname;
	org_path_start=org_path.lastIndexOf('/');
	org_path_end=org_path.length;
	org_path=org_path.substring(org_path_start+1, org_path_end);
		
	switch (lang){
		case "simp":		//(lang == 'simp') {
			//base_path = cv_sc_base_path;
			//org_path="/test.info.gov.hk"+parent.location.pathname;		
			//base_path = base_path + "/www.swd.gov.hk/vs/chinese/";
			base_path = cv_nonsc_base_path;
			base_path = base_path + "/sc/";
			break;
		case "chi":
			base_path = cv_nonsc_base_path;
			base_path = base_path + "/chinese/";
			break;
		case "txtchi":
			base_path = cv_nonsc_base_path;
			base_path = base_path + "/text_tc/";
			break;
		case "txtsimp":
			//base_path = cv_sc_base_path;
			//base_path = base_path + "/www.swd.gov.hk/vs/text_tc/";
			base_path = cv_nonsc_base_path;
			base_path = base_path + "/text_sc/";
			break;
		case "eng":
			base_path = cv_nonsc_base_path;
			base_path = base_path + "/english/";
			break;
		case "txteng":
			base_path = cv_nonsc_base_path;
			base_path = base_path + "/text_en/";
			break;
	}
	//document.write(base_path + "/cgi-bin/labour/changever.cgi?lang="+lang_arg+"&path=" + org_path);
	//parent.location.href = base_path + "/cgi-bin/swd/changever.cgi?lang="+lang_arg+"&path=" + org_path;
	parent.location.href = base_path + org_path;
}

//=====================================
// Display
//document.write("<table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=0><tr>");
//document.write("<tr>");
//document.write("<td>");
document.write("<form name=\"search\" action=\"http://search.gov.hk/search.html\" method=\"get\" target=\"_blank\">");
document.write("<input type=\"hidden\" name=\"tpl_id\" value=\"stdsearch\">");
document.write("<input type=\"hidden\" name=\"ui_lang\" value=\"zh-hk\">");
document.write("<input type=\"hidden\" name=\"ui_charset\" value=\"big5\">");
document.write("<input type=\"hidden\" name=\"gp0\" value=\"swd_vs_home\">");
document.write("<input type=\"hidden\" name=\"gp1\" value=\"swd_vs_home\">");
document.write("<input type=\"hidden\" name=\"web\" value=\"this\">");
document.write("<input type=\"hidden\" name=\"txtonly\" value=\"1\">");
document.write(" | <a href=\""+text_path+"\"> 网 页 目 录 </a> ");

document.write(" | <a href=\"javascript:ChangeVersion('txtchi');\"> 繁 体 版 </a> ");

document.write(" | <a href=\"javascript:ChangeVersion('txteng');\"> English </a> ");

document.write(" | <a href=\"javascript:ChangeVersion('simp');\"> 图 像 版 本 </a> ");

document.write(" | <br>");
document.write(" | <a href=\""+sitemap_path+"\"> 网 页 指 南 </a> ");
document.write(" | <a href=\""+enquiry_path+"\"> 联 络 我 们 </a> ");
document.write(" | <a href=\""+gic_path+"\"> 香 港 政 府 一 站 通 </a> ");
document.write(" |  搜 寻 ");
IE = (document.all) ? 1 : 0;
	if (IE) { document.write("<input class=\"search\" type=\"text\" name=\"query\" size=\"12\">");
	} else {
	document.write("<input class=\"search\" type=\"text\" name=\"query\" size=\"9\">");
	}
//document.write(" | <a href=\"javascript:window.print();\" class=\"in\">Print</a> ");
document.write(" | ");
document.write("</form>");
//document.write("</td></tr>");
