var sPath=location.href;
if(location.pathname.toString().indexOf("/email.html") < 0 &&
location.pathname.toString().indexOf("/emailSubmit.asp") < 0 &&
location.pathname.toString().indexOf("/emailSubmitSc.asp") < 0){
	if (sPath.indexOf('https://') >= 0)
	{
		location.href = sPath.replace('https://', 'http://');
	}
}


function jump(num){
	if (num == 101){
		location.href = 'sec1a.html';
	} else if (num == 102){
		location.href = 'sec1b.html';
	} else if (num == 201){
		location.href = 'sec2a.html';
	} else if (num == 202){
		location.href = 'sec2b.html';
	} else if (num == 203){
		location.href = 'sec2c.html';
	} else if (num == 301){
		location.href = 'sec3a.html';
	} else if (num == 302){
		location.href = 'sec3b9.html';
	} else if (num == 303){
		location.href = 'sec3c1.html';
	} else if (num == 304){
		location.href = 'sec3d3.html';
	} else if (num == 401){
		location.href = 'sec4a.html';
	} else if (num == 402){
		location.href = 'sec4b2.html';
	} else if (num == 501){
		location.href = 'sec5.html';
	} else if (num == 601){
		location.href = 'sec6.html';
	} else if (num == 701){
		location.href = 'sec7a4.html';
	} else if (num == 702){
		location.href = 'sec7b4.html';
	} else if (num == 801){
		location.href = 'sec8.html';
	} else if (num == 901){
		location.href = 'sec9.html';
	}
}

var Section;
var SubSection;

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];}
}

/****************************** Common Variable Declaration Start ***************************************/
var locationPath;
var graphicPath;
var swfPath;
var langID;
var langPath;
var txt_disclaimer;
var txt_sitemap;
var txt_contactus;
var txt_tc;
var txt_sc;
var txt_en;
var txt_copyright;
var txt_hotline;
var txt_toll_free;
var txt_enquiry;
/****************************** Common Variable Declaration Finsih *************************************/
/****************************** Common Setting when Page Load Start **********************************/
//Set LangID
if(document.URL.toString().search('/en/')!=-1 || location.search.toString().indexOf('lang=en')!=-1){
	langPath = 'en/';
	langID=2;
	txt_disclaimer='Disclaimer';
	txt_sitemap='Sitemap';
	txt_contactus='Contact Us';
	txt_tc='Traditional Chinese Version';
	txt_sc='Simplified Chinese Version';
	txt_en='English';
	txt_copyright='Copyright &copy; 2005-2006 Nova Taipa - Urbaniza&ccedil;&otilde;es, Limitada All rights reserved.';
	txt_hotline='hotline: ';
	txt_toll_free='Toll Free (Hong Kong): 800-903-888 / (China): 10800 153 0068';
	txt_enquiry='Enquiry Form';
}else if(document.URL.toString().search('/tc/')!=-1 || location.search.toString().indexOf('lang=tc')!=-1){
	langPath = 'tc/';
	langID=1;
	txt_disclaimer='砫羘';
	txt_sitemap='呼玭';
	txt_contactus='羛蹈и';
	txt_tc='鉽砰いゅ';
	txt_sc='虏砰いゅ';
	txt_en='English';
	txt_copyright='&copy;2005-2006 &#27705;穝カ祇甶Τそ 帝舦┮Τ';
	txt_hotline='琩高荐絬';
	txt_toll_free='禣盡絬(翠): 800-903-888 / (瓣ず): 10800 153 0068';
	txt_enquiry='琩高';
}else{
	langPath = 'sc/';
	langID=3;
	txt_disclaimer='免责声明';
	txt_sitemap='网页指南';
	txt_contactus='联络我们';
	txt_tc='綮体版';
	txt_sc='简体版';
	txt_en='English';
	txt_copyright='&copy;2005-2006 &#27705;仔新城市发展有限公司 著作权所有';
	txt_hotline='查询热线：';
	txt_toll_free='免费专线(香港): 800-903-888 / (国内): 10800 153 0068';
	txt_enquiry='查询表格';
}

//Set Location Path
locationPath = getAbsPath();
if (document.URL.toString().search('westcom')!=-1){
	graphicPath = locationPath +langPath + 'images/';
	swfPath = locationPath +langPath + 'images/';
	if (swfPath.indexOf('https://') >= 0)
	{
		swfPath = swfPath.replace('https://', 'http://');
	}
} else {
	graphicPath = locationPath + 'images/';
	swfPath = locationPath + 'images/';
	if (swfPath.indexOf('https://') >= 0)
	{
		swfPath = swfPath.replace('https://', 'http://');
	}
}
//graphicPath = locationPath  + 'images/';
function getAbsPath() {
	var s_path = location.href.toString();
	var a_vp = s_path.split('/');
//alert (a_vp);
//	if (a_vp.length > 3) s_path = a_vp[0] + '//' + a_vp[2] + '/' ;
	if (a_vp.length > 3) s_path = a_vp[0] + '//' + a_vp[2] + '/' + a_vp[3] + '/';
//	alert (a_vp[3]);
	return s_path;
}



function langSwitch(lang) {
	var goPath;
	var pagePath=document.location.pathname;
	var temptemp;
	temptemp=document.location.toString();
	if (langID ==1){
		temptemp=temptemp.indexOf('/tc');
	} else if (langID == 2){
		temptemp=temptemp.indexOf('/en');
	} else if (langID == 3){
		temptemp=temptemp.indexOf('/sc');
	} else {
		temptemp=temptemp.indexOf('/tc');
	}
	var tempPath=window.location;
	var tempLocationPath;
	tempPath = tempPath.toString();
	tempLocationPath = document.location.toString().substring(0, temptemp+1);
	if (lang=='en') { //change to English version
		goPath=tempLocationPath+'en/'+tempPath.substring(temptemp+4, tempPath.length);
	}
	if (lang=='tc') { //change to traditional chinese version
		goPath=tempLocationPath+'tc/'+tempPath.substring(temptemp+4, tempPath.length);
	}
	if (lang=='sc') { //change to simplified chinese version
		goPath=tempLocationPath+'sc/'+tempPath.substring(temptemp+4, tempPath.length);
	}
	document.location=goPath;
}


function getHeader(){
	document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.write('	<tr><td align="center"><div align="center">');
	document.write('		<table width="774" border="0" cellspacing="0" cellpadding="0">');
//	document.write('			');
	if (langID == 1){
		document.write('				<tr><td align="right"><div align="right"><IMG SRC="'+graphicPath+'btn_tc_over.gif" ALT="'+txt_tc+'" title="'+txt_tc+'" name="btn_tc" border="0"><a href="javascript:langSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_sc\',\'\',\''+graphicPath+'btn_sc_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_sc.gif" ALT="'+txt_sc+'" title="'+txt_sc+'" name="btn_sc" border="0"></a><a href="javascript:langSwitch(\'en\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_en\',\'\',\''+graphicPath+'btn_en_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_en.gif" ALT="'+txt_en+'" title="'+txt_en+'" name="btn_en" border="0"></a></div></td></tr>');
	} else if (langID == 2){
		document.write('				<tr><td align="right"><div align="right"><a href="javascript:langSwitch(\'tc\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_tc\',\'\',\''+graphicPath+'btn_tc_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_tc.gif" ALT="'+txt_tc+'" title="'+txt_tc+'" name="btn_tc" border="0"></a><a href="javascript:langSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_sc\',\'\',\''+graphicPath+'btn_sc_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_sc.gif" ALT="'+txt_sc+'" title="'+txt_sc+'" name="btn_sc" border="0"></a><IMG SRC="'+graphicPath+'btn_en_over.gif" ALT="'+txt_en+'" title="'+txt_en+'" name="btn_en" border="0"></div></td></tr>');
	} else if (langID == 3){
		document.write('				<tr><td align="right"><div align="right"><a href="javascript:langSwitch(\'tc\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_tc\',\'\',\''+graphicPath+'btn_tc_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_tc.gif" ALT="'+txt_tc+'" title="'+txt_tc+'" name="btn_tc" border="0"></a><IMG SRC="'+graphicPath+'btn_sc_over.gif" ALT="'+txt_sc+'" title="'+txt_sc+'" name="btn_sc" border="0"><a href="javascript:langSwitch(\'en\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_en\',\'\',\''+graphicPath+'btn_en_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_en.gif" ALT="'+txt_en+'" title="'+txt_en+'" name="btn_en" border="0"></a></div></td></tr>');
	} else {
		document.write('				<tr><td align="right"><div align="right"><IMG SRC="'+graphicPath+'btn_tc.gif" ALT="'+txt_tc+'" title="'+txt_tc+'" name="btn_tc" border="0"><a href="javascript:langSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_sc\',\'\',\''+graphicPath+'btn_sc_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_sc.gif" ALT="'+txt_sc+'" title="'+txt_sc+'" name="btn_sc" border="0"></a><a href="javascript:langSwitch(\'en\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_en\',\'\',\''+graphicPath+'btn_en_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_en.gif" ALT="'+txt_en+'" title="'+txt_en+'" name="btn_en" border="0"></a></div></td></tr>');
	}
//	document.write('			');
	document.write('			<tr><td>');
	document.write('				<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="774" height="141">');
	if (langID == 1){
		document.write('					<param name="movie" value="'+swfPath+'nav_tc.swf?section='+Section+'&part='+SubSection+'">');
	} else if (langID == 2){
		document.write('					<param name="movie" value="'+swfPath+'nav_en.swf?section='+Section+'&part='+SubSection+'">');
	} else if (langID == 3){
		document.write('					<param name="movie" value="'+swfPath+'nav_sc.swf?section='+Section+'&part='+SubSection+'">');
	} else {
		document.write('					<param name="movie" value="'+swfPath+'nav_tc.swf?section='+Section+'&part='+SubSection+'">');
	}
	document.write('					<param name="quality" value="high">');
	if (langID == 1){
		document.write('					<embed src="'+swfPath+'nav_tc.swf?section='+Section+'&part='+SubSection+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="774" height="141"></embed>');
	} else if (langID == 2){
		document.write('					<embed src="'+swfPath+'nav_en.swf?section='+Section+'&part='+SubSection+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="774" height="141"></embed>');
	} else if (langID == 3){
		document.write('					<embed src="'+swfPath+'nav_sc.swf?section='+Section+'&part='+SubSection+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="774" height="141"></embed>');
	} else {
		document.write('					<embed src="'+swfPath+'nav_tc.swf?section='+Section+'&part='+SubSection+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="774" height="141"></embed>');
	}
//	document.write('					<embed src="'+graphicPath+'nav_tc.swf?section='+Section+'&part='+SubSection+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="774" height="141"></embed>');
	document.write('				</object>');
	document.write('			</td></tr>');
	document.write('			<tr><td>');
}

function getFooter(){
	document.write('			</td></tr>');
	document.write('			<tr><td>');
	document.write('				<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.write('					<tr valign="top">');
	document.write('						<td align="left">');
	document.write('							<table cellpadding="0" cellspacing="0" border="0">');
	document.write('								<tr>');
	document.write('									<td><a href="sitemap.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_sitemap\',\'\',\''+graphicPath+'btn_sitemap_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_sitemap.gif" ALT="'+txt_sitemap+'" title="'+txt_sitemap+'" name="btn_sitemap" border="0"></a></td>');
	document.write('									<td><a href="disclaimer.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_disclaimer\',\'\',\''+graphicPath+'btn_disclaimer_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_disclaimer.gif" ALT="'+txt_disclaimer+'" title="'+txt_disclaimer+'" name="btn_disclaimer" border="0"></a></td>');
	document.write('									<td><a href="email.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'btn_contactus\',\'\',\''+graphicPath+'btn_contactus_over.gif\',1)"><IMG SRC="'+graphicPath+'btn_contactus.gif" ALT="'+txt_contactus+'" title="'+txt_contactus+'" name="btn_contactus" border="0"></a></td>');
	document.write('								</tr>');
	document.write('							</table>');
	document.write('						</td>');
	document.write('						<td align="right" class="footer"><div align="right">'+txt_copyright+'<br>'+ txt_hotline +'(853) 2883-3128 | '+txt_toll_free+'</div></td>');
	document.write('						<td width="12"><img src="'+graphicPath+'spacer.gif" width="12" height="29" border="0"></td>');
	document.write('					</tr>');
	document.write('				</table>');
	document.write('			</td></tr>');
	document.write('		</table>');
	document.write('	</div></td></tr>');
	document.write('</table>');
	document.write('</body>');
	document.write('</html>');
}

function over(imgname, filname){
	if (document.images)
		{imgname.src = filname;}
}

function out(imgname, filname){
	if (document.images)
		{imgname.src = filname;}
}
