if(location.href.search('ogcio.devprj.com/')!=-1){
	cv_nonsc_base_path = "ht"+"tp"+":/"+"/ogcio.devprj.com/20090204_lwb1/test/";
	cv_sc_base_path = cv_nonsc_base_path;
	basic_path = cv_nonsc_base_path;
}else{
	cv_nonsc_base_path = "http:" + "//" + "www.lwb.gov.hk";
	cv_sc_base_path = cv_nonsc_base_path;
	basic_path = cv_nonsc_base_path;
}

content=window.location.pathname;
if (location.href.toString().search('/gb/') != -1) {
	content = content.substring(18 , content.length);
	}
	
function changeVer(lang) {
	var langKey = ["c", "simp", "eng"];
	var langs = ["chi", "chs", "eng"];
	var fromLang = '';
	var toLang = '';
	for(counter = 0; counter < langKey.length; counter++){
		if(location.href.search('/'+langs[counter]+'/')!= -1){
			fromLang = langs[counter];
		}
	}
	for(counter = 0; counter < langKey.length; counter++){
		if(langKey[counter]==lang){
			toLang = langs[counter];
		}
	}
	location.href = location.href.replace('/'+fromLang+'/', '/'+toLang+'/');
}

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_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_findObj(n, d) { //v3.0
  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); 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];}
}

if (flashPath == null) {
	var flashPath = "";
} 

cookiename = 'lwb';  
cookieval= '123';  

function GetCookie(cookieName) {
thisCookie = document.cookie.split("; ")
for (i = 0; i < thisCookie.length; i++) {
	if (cookieName == thisCookie[i].split("=")[0]) {
		return thisCookie[i].split("=")[1];
	}
}
return "";
}

if (cookieval == GetCookie(cookiename)) {
document.write ("勞工及福利局<br><br><font size=\"-1\"><a href=\"/chi/text.htm\">回到目錄頁</a></font><br><br>");
} else {
document.write ("<form method=\"post\" action=\"/cgi-bin/lwb/chver_old.cgi\" name=\"chver\">");
document.write ("<input type=\"hidden\" name=\"lang\">");
document.write ("<input type=\"hidden\" name=\"section\">");
document.write ("<input type=\"hidden\" name=\"content\">");
document.write ("</form>");

document.write("<table width=\"760\" border=\"0\" height=\"87\" cellpadding=\"0\" cellspacing=\"0\" background=\"/chi/images/bkgdtexture.gif\"><form name=\"form1\" method=\"get\" action=\"http://search.gov.hk/search.html\" target=_blank><input name=\"tpl_id\" type=\"hidden\" value=\"stdsearch\"><input name=\"gp0\" type=\"hidden\" value=\"lwb_home\"><input name=\"gp1\" type=\"hidden\" value=\"lwb_home\"><input name=\"web\" type=\"hidden\" value=\"this\"><input name=\"ui_charset\" type=\"hidden\" value=\"big5\"><input name=\"ui_lang\" type=\"hidden\" value=\"zh-hk\">");
document.write("<tr align=\"left\" valign=\"top\">");
document.write("<td height=\"66\" colspan=\"6\" background=\"/chi/images/bkgdtexture.gif\"><a href=\"/\"><img src=\"/chi/images/branding.gif\" width=\"500\" height=\"66\" alt=\"中華人民共和國香港特別行政區政府 勞工及福利局\" border=\"0\"></a></td>");
document.write("<td height=\"66\" background=\"/chi/images/bkgdtexture.gif\" width=\"97\" colspan=\"5\"><a href=\"http://www.brandhk.gov.hk/brandhk/index.htm\" target=\"_blank\"><img name=\"brandhk\" src=\"/chi/images/BrandHK.gif\" width=\"190\" height=\"60\" border=\"0\" alt=\"亞洲國際都會 - 香港\"></a></td></tr>");
document.write("<tr align=\"left\" valign=\"top\">");
document.write("<td height=\"19\" width=\"153\" background=\"/chi/images/bkgdtexture.gif\" valign=bottom><a href=\"http://www.gov.hk/tc/residents/\" target=\"_blank\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar1','','/chi/images/mainbar1_f2.gif',1);\"><img name=\"mainbar1\" src=\"/chi/images/mainbar1.gif\" height=\"19\" border=\"0\" alt=\"香港政府一站通\"></a></td>");
if (atgb) {
document.write("<td align=\"left\" valign=\"bottom\" height=\"19\" width=\"77\" background=\"/chi/images/bkgdtexture.gif\"><a href=\"../text.htm\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar2','','/chi/images/mainbar2_f2.gif',1);\"><img name=\"mainbar2\" src=\"/chi/images/mainbar2.gif\" width=\"77\" height=\"19\" border=\"0\" alt=\"簡體純文字\"></a></td>");
document.write("<td align=\"left\" valign=\"bottom\" height=\"19\" width=\"49\" background=\"/chi/images/bkgdtexture.gif\"><a href=\"javascript:changeVer('chi');\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar3','','/chi/images/mainbar3_f2.gif',1);\" ><img name=\"mainbar3\" src=\"/chi/images/mainbar3.gif\" width=\"49\" height=\"19\" border=\"0\" alt=\"繁體版\"></a></td>");
} else {
document.write("<td align=\"left\" valign=\"bottom\" height=\"19\" width=\"77\" background=\"/chi/images/bkgdtexture.gif\"><a href=\"../text.htm\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar2','','/chi/images/mainbar2_f2.gif',1);\"><img name=\"mainbar2\" src=\"/chi/images/mainbar2.gif\" width=\"77\" height=\"19\" border=\"0\" alt=\"繁體純文字\"></a></td>");
document.write("<td align=\"left\" valign=\"bottom\" height=\"19\" width=\"49\" background=\"/chi/images/bkgdtexture.gif\"><a href=\"javascript:changeVer('simp');\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar3','','/chi/images/mainbar3_f2.gif',1);\" ><img name=\"mainbar3\" src=\"/chi/images/mainbar3.gif\" width=\"49\" height=\"19\" border=\"0\" alt=\"簡體版\"></a></td>");
}
document.write("<td align=\"left\" valign=\"bottom\" height=\"19\" width=\"56\" background=\"/chi/images/bkgdtexture.gif\"><a href=\"javascript:changeVer('eng');\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar4','','/chi/images/mainbar4_f2.gif',1);\"><img name=\"mainbar4\" src=\"/chi/images/mainbar4.gif\" width=\"56\" height=\"19\" border=\"0\" alt=\"ENGLISH\"></a></td>");
document.write("<td height=\"19\" width=\"185\" background=\"/chi/images/bkgdtexture.gif\" valign=bottom><img name=\"mainbar5\" src=\"/chi/images/mainbar5.gif\" height=\"19\" border=\"0\"></td>");
document.write("<td height=\"19\" width=\"36\" background=\"/chi/images/bkgdtexture.gif\"valign=bottom><a href=\"/chi/search/index.htm\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar6','','/chi/images/mainbar6_f2.gif',1);\"><img name=\"mainbar6\" src=\"/chi/images/mainbar6.gif\" width=\"36\" height=\"19\" border=\"0\" alt=\"搜尋\"></a></td>");
document.write("<td height=\"19\" valign=\"bottom\" background=\"/chi/images/bkgdtexture.gif\" width=\"84\">");
IE = (document.all) ? 1 : 0;
	if (IE) { document.write("<input class=\"search\" type=\"text\" name=\"query\" size=\"22\">");
	} else {
	document.write("<input class=\"search\" type=\"text\" name=\"query\" size=\"10\">");
	}
document.write("</td>");
document.write("<td height=\"19\" width=\"22\" background=\"/chi/images/bkgdtexture.gif\" valign=bottom><input type=\"Image\" src=\"/chi/images/mainbar8.gif\" value=\"search\" alt=\"搜尋\" border=0></td>");
document.write("<td height=\"19\" width=\"49\" background=\"/chi/images/bkgdtexture.gif\" valign=bottom><a href=\"/chi/sitemap/index.htm\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar9','','/chi/images/mainbar9_f2.gif',1);\"><img name=\"mainbar9\" src=\"/chi/images/mainbar9.gif\" width=\"67\" height=\"19\" border=\"0\" alt=\"網頁指南\"></a></td>");
document.write("<td height=\"19\" width=\"29\" background=\"/chi/images/bkgdtexture.gif\" valign=bottom><a href=\"/chi/contact/index.htm\" onMouseOut=\"MM_swapImgRestore()\"  onMouseOver=\"MM_swapImage('mainbar10','','/chi/images/mainbar10_f2.gif',1);\"><img name=\"mainbar10\" src=\"/chi/images/mainbar10.gif\" width=\"29\" height=\"19\" border=\"0\" alt=\"聯絡我們\"></a></td></tr>");
document.write("<tr align=\"left\" valign=\"bottom\" bgcolor=\"#CC3333\">");
document.write("<td height=\"2\" colspan=\"10\"><img src=\"/chi/images/reddot.gif\" width=\"760\" height=\"2\" valign=bottom></td></tr></form></table>");
document.write("<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" WIDTH=\"779\" HEIGHT=\"70\"><PARAM NAME=movie VALUE=\"/banner.swf\"><PARAM NAME=loop VALUE=true><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=best><param name=\"wmode\" value=\"transparent\"><PARAM NAME=bgcolor VALUE=\"#FFFFFF\"><EMBED src=\"/banner.swf\" loop=false menu=false quality=best bgcolor=\"#FFFFFF\" WIDTH=\"779\" HEIGHT=\"70\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></EMBED></OBJECT><img src=\"/images/top.jpg\"><br>");
}
