hkp_path = "http://www.hongkongpost.gov.hk/";

if (location.href.toString().search('/chinese_gb/') != -1) {
	atgb = 1
} else {
	atgb = 0;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_openDownloadWindow(theURL,winName){
	MM_openBrWindow(theURL,winName,'width=500,height=300,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes');
}

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_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_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 changeVer(lang) {
	var langs = ["chinese_big5", "english", "sc"];
	var fromLang = '';
	var toLang = '';
	for(counter = 0; counter < langs.length; counter++){
		if(location.href.search('/'+langs[counter]+'/')!= -1){
			fromLang = langs[counter];
		}
	}
	switch(lang){
		case 'c': toLang = langs[0]; break;
		case 'e': toLang = langs[1]; break;
		case 's': toLang = langs[2]; break;
	}
	newlocation = location.href.replace(fromLang, toLang);
	locationofmark = newlocation.indexOf("#");
	if (locationofmark!=-1)	{
		newlocation = newlocation.substring(0,locationofmark);
	}
	location.href = newlocation;
	return true;
}

function newGovHKTab() {
	document.write("<A onmouseover=\"MM_swapImage('info','','images/mainbar1_f2.gif',1)\" "); 
	document.write("onmouseout=\"MM_swapImgRestore()\" href=\"http://www.gov.hk/en/residents/\" "); 
	document.write("target=\"GovHK\" tabIndex=\"2\"><IMG id=\"info\" alt=\"GovHK\" title=\"GovHK\" "); 
	document.write("src=\"images/mainbar1.gif\" class=\"langImg\"></A>");
}

function newLangTCTab(){
	document.write("<a tabIndex=\"3\" href=\"javascript:changeVer('c');\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('mainbar3','','images/mainbar3_f2.gif',1)\"><img id=\"mainbar3\" src=\"images/mainbar3.gif\" alt=\"Traditional Chinese\" title=\"Traditional Chinese\" class=\"langImg\"></a></td>");
}
function newLangSCTab(){
	document.write("<a tabIndex=\"4\" href=\"javascript:changeVer('s');\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('mainbar4','','images/mainbar4_f2.gif',1)\"><img id=\"mainbar4\" src=\"images/mainbar4.gif\" alt=\"Simplified Chinese\" title=\"Simplified Chinese\" class=\"langImg\"></a></td>");
}
function newLangENTab(){	
	document.write("<a href=\"JAVASCRIPT:changeVer('e');\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('eng','','images/mainbar4_f2.gif',1)\" tabIndex=\"4\"><IMG id=\"eng\" alt=\"ENGLISH\" title=\"ENGLISH\" src=\"images/mainbar4.gif\" class=\"langImg\"></A></TD>");
}

function newSearchLabel(){ 
	document.write("<A tabIndex=\"5\" onmouseover=\"MM_swapImage('search1','','images/mainbar6_f2.gif',1)\" onmouseout=\"MM_swapImgRestore()\" href=\"javascript:document.forms[0].submit()\"><IMG id=\"search1\" alt=\"Search\" title=\"Search\" src=\"images/mainbar6.gif\" class=\"langImg\"></A>");
}

function newSearchButton(){
	document.write("<A tabIndex=\"7\" onmouseover=\"MM_swapImage('search2','','images/mainbar8_f2.gif',1)\" "); 
	document.write("onmouseout=\"MM_swapImgRestore()\" "); 
	document.write("href=\"javascript:document.forms[0].submit()\"><IMG "); 
	document.write("id=\"search2\" alt=\"Search\" title=\"Search\" src=\"images/mainbar8.gif\" class=\"langImg\"></A>");
}

function newSiteMapTab(){
	document.write("<A tabIndex=\"8\" onmouseover=\"MM_swapImage('sitemap','','images/mainbar9_f2.gif',1)\" "); 
	document.write("onmouseout=\"MM_swapImgRestore()\" href=\"sitemap.html\"><IMG ");  
	document.write("id=\"sitemap\" alt=\"Site Map\" title=\"Site Map\" src=\"images/mainbar9.gif\" class=\"langImg\"></A>"); 
}

function newContactUsTab(){
	document.write("<A tabIndex=\"9\" onmouseover=\"MM_swapImage('contact','','images/mainbar10_f2.gif',1)\" "); 
	document.write("onmouseout=\"MM_swapImgRestore()\" href=\"contact_us.html\"><IMG "); 
	document.write("id=\"contact\" alt=\"Contact Us\" title=\"Contact Us\" src=\"images/mainbar10.gif\" class=\"langImg\"></A>"); 
}

function newHomeButton(){
	document.write("<A tabIndex=\"12\" ");
	document.write("onmouseover=\"MM_swapImage('left_nav_02','','images/left_nav_02-over.gif',1)\" "); 
	document.write("onmouseout=\"MM_swapImgRestore()\" href=\"about_e_form_01.html\"><IMG ");
	document.write("class=\"sidebarImg\" id=\"left_nav_02\" alt=\"Home\" title=\"Home\" "); 
	document.write("src=\"images/left_nav_02.gif\"></A>");
}

function newWhatsNewButton(){
	document.write("<A tabIndex=\"13\" ");
	document.write("onmouseover=\"MM_swapImage('left_nav_03','','images/left_nav_03-over.gif',1)\" "); 
	document.write("onmouseout=\"MM_swapImgRestore()\" href=\"whatsnew_01.html\"><IMG class=\"sidebarImg\" ");
	document.write("alt=\"What's New : include our subsequent news to enhance services and cover more e-Forms\" "); 
	document.write("title=\"What's New : include our subsequent news to enhance services and cover more e-Forms\" ");
	document.write("id=\"left_nav_03\" "); 
	document.write("src=\"images/left_nav_03.gif\"></A>"); 
}

function newAboutButton(){
	document.write("<A tabIndex=\"14\" ");
	document.write("onmouseover=\"MM_swapImage('left_nav_04','','images/left_nav_04-over.gif',1)\" "); 
	document.write("onmouseout=\"MM_swapImgRestore()\" href=\"about_e_form_01.html\"><IMG class=\"sidebarImg\" ");
	document.write("id=\"left_nav_04\" alt=\"About e-Form : include introduction and the benefits\" "); 
	document.write("title=\"About e-Form : include introduction and the benefits\" ");
	document.write("src=\"images/left_nav_04.gif\"></A>");
}

function newUsingButton(){
	document.write("<A tabIndex=\"15\" ");
	document.write("onmouseover=\"MM_swapImage('left_nav_05','','images/left_nav_05-over.gif',1)\""); 
	document.write("onmouseout=\"MM_swapImgRestore()\" href=\"using_e_form_01.html\"><IMG class=\"sidebarImg\" ");
	document.write("id=\"left_nav_05\" ");
	document.write("alt=\"Using e-Form : include what are needed to use e-Form and step-by-step guidelines\" src=\"images/left_nav_05.gif\" ");
	document.write("title=\"Using e-Form : include what are needed to use e-Form and step-by-step guidelines\"></A>"); 
}

function newDownloadButton(){
	document.write("<A tabIndex=\"16\" ");
	document.write("onmouseover=\"MM_swapImage('left_nav_06','','images/left_nav_06-over.gif',1)\" ");
	document.write("onmouseout=\"MM_swapImgRestore()\" href=\"download.html\"><IMG class=\"sidebarImg\" "); 
	document.write("id=\"left_nav_06\" alt=\"Download Area : for downloading e-Form program files and the technical user guide\" "); 
	document.write("title=\"Download Area : for downloading e-Form program files and the technical user guide\" ");
	document.write("src=\"images/left_nav_06.gif\"></A>");
}

function newFAQButton(){
	document.write("<A tabIndex=\"17\" ");
	document.write("onmouseover=\"MM_swapImage('left_nav_07','','images/left_nav_07-over.gif',1)\" "); 
	document.write("onmouseout=\"MM_swapImgRestore()\" href=\"faq_01.html\"><IMG class=\"sidebarImg\" "); 
	document.write("id=\"left_nav_07\" alt=\"FAQ : include common questions\" ");
	document.write("title=\"FAQ : include common questions\" ");
	document.write("src=\"images/left_nav_07.gif\"></A>");
}

function newLinksButton(){
	document.write("<A tabIndex=\"18\" ");
	document.write("onmouseover=\"MM_swapImage('left_nav_08','','images/left_nav_08-over.gif',1)\" "); 
	document.write("onmouseout=\"MM_swapImgRestore()\" href=\"links.html\"><IMG class=\"sidebarImg\" "); 
	document.write("id=\"left_nav_08\" src=\"images/left_nav_08.gif\" ");
	document.write("alt=\"Related websites\" title=\"Related websites\"></A>");
}
