<!--
var url = document.URL;
var locationx = top.location.pathname;
var filenme,filenmeNo;
chapterAry = new Array("about","elearning","products","partners","faq","sitemap","career","contact");
url = url.replace("file://","");
if (url.lastIndexOf("/") != -1) {
	shash = "/";
} else if (url.lastIndexOf("\\") != -1) {
	shash = "\\";
}
temp = url.substring(0,url.lastIndexOf(shash));
chapter = temp.substring(temp.lastIndexOf(shash)+1,temp.length);
filenme = url.substring(url.lastIndexOf(shash)+1,url.length);
filenmeNo = filenme.replace(".htm","");

   function changelang()
   {
     if (top.location.pathname.indexOf("/chinese/") != -1)
     {   top.location.replace(top.location.pathname.replace(/\/chinese\//,"/gb/"));
     }
     else if (top.location.pathname.indexOf("/gb/") != -1)
     {   top.location.replace(top.location.pathname.replace(/\/gb\//,"/chinese/"));     
      }
     else if (top.location.pathname.indexOf("\\chinese\\") != -1)
     {  
     	top.location.replace(top.location.pathname.replace(/\\chinese\\/,"\\gb\\"));     
      }
     else if (top.location.pathname.indexOf("\\gb\\") != -1)
     {   
         top.location.replace(top.location.pathname.replace(/\\gb\\/,"\\chinese\\"));     
      }
   }

function chinese_jan(){if (this.location.href.indexOf("/chinese/") != -1)
     {   this.location.replace(this.location.href.replace(/\/chinese\//,"/chinese_jan/"));
      }
     else if (this.location.href.indexOf("\\chinese\\") != -1)
     {  
     	this.location.replace(this.location.href.replace(/\\chinese\\/,"\\chinese_jan\\"));     
      }
}

function eng(){if (this.location.href.indexOf("/chinese/") != -1)
     {   this.location.replace(this.location.href.replace(/\/chinese\//,"/eng/"));
      }
     else if (this.location.href.indexOf("\\chinese\\") != -1)
     {  
     	this.location.replace(top.location.href.replace(/\\chinese\\/,"\\eng\\"));     
      }
}

var timer = "";
function resetTimer() {
	clearTimeout(timer);
}

function fireTimer() {
	timer = setTimeout('resetAllLayers()', 10);
}

function resetAllLayers() {
	hideAllLayers();
	turnOffImages();
}

function turnOffImages() {
	for (i=0;i<chapterAry.length;i++) {
		if (chapter == chapterAry[i])
			activeimg = "_f2";
		else
			activeimg = "";
		MM_swapImage('btn_'+chapterAry[i]+'','','../images_chi/ch_btn_'+chapterAry[i]+activeimg+'.gif',1);
}
}

function hideAllLayers() {
  MM_showHideLayers('elearning','','hide','products','','hide','faq','','hide');
}

function LayerObject(name, width, height, zindex, left, top, isVisible, MenuItemArray)
{
	/*
	if (document.all) {
		if (isVisible)		//visibility of the layer
			this.visibility = "show";
		else
 			this.visibility = "hidden";
	} else if (document.layers) {
			if (isVisible)		//visibility of the layer
				this.visibility = "show";
			else
 				this.visibility = "hide";
	}
	*/
	if (isVisible)		//visibility of the layer
		this.visibility = "show";
	else
		this.visibility = "hidden";

	this.left = left;		//left position of the layer
	this.top = top;		//top position of the layer
	this.name = name; 	//Name of Layer
	this.width = width; 		//Width of the layer
	this.height = height; 	//Height of the Layer
	this.zindex = zindex;	//z-index of the layer

	this.MenuItemArray = MenuItemArray;		//Menu Item Array
}

function MenuItem(name, href)
{
	this.name = name;		//name of the MenuItem
	this.href = href;		//name of the MenuItem
}

elearning_item1 = new MenuItem("ch1_01", "../elearning/01.htm");
elearning_item2 = new MenuItem("ch1_02", "../elearning/02.htm");
elearning_item3 = new MenuItem("ch1_03", "../elearning/03.htm");
//elearning_item4 = new MenuItem("ch1_04", "../elearning/04.htm");

elearning = new LayerObject("elearning", 145, 30, 1, 320, 41, false, Array(elearning_item1, elearning_item2, elearning_item3));

products_item1 = new MenuItem("ch3_01", "../products/01.htm");
products_item2 = new MenuItem("ch3_02", "../products/02.htm");
products_item3 = new MenuItem("ch3_03", "../products/03.htm");
//products_item4 = new MenuItem("ch3_04", "../products/04.htm");
//products_item5 = new MenuItem("ch3_05", "../products/05.htm");
//products_item6 = new MenuItem("ch3_06", "../products/06.htm");

//products = new LayerObject("products", 145, 30, 1, 385, 41, false, Array(products_item1, products_item2, products_item3, products_item4, products_item5, products_item6));
products = new LayerObject("products", 145, 30, 1, 385, 41, false, Array(products_item1, products_item2, products_item3));

faq_item1 = new MenuItem("ch5_01", "../faq/01.htm");
faq_item2 = new MenuItem("ch5_02", "../faq/02.htm");
faq_item3 = new MenuItem("ch5_03", "../faq/03.htm");

faq = new LayerObject("faq", 145, 30, 1, 515, 41, false, Array(faq_item1, faq_item2, faq_item3));

sitemap = Array(elearning, products);

//	HighLight the correct gif in the chapter ///
document.write ("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#E8E8E8\">\n");
document.write ("<tr>\n");
document.write ("<td>\n");
document.write ("<table width=\"740\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
document.write ("<tr>\n");
document.write ("<td rowspan=\"2\"><a href=\"../\"><img name=\"logo1\" src=\"../images_chi/ch_logo1.gif\" width=\"164\" height=\"69\" border=\"0\"></a></td>");
document.write ("<td width=\"100%\" bgcolor=\"#E5E5E5\">");
document.write ("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
document.write ("<tr>");
document.write ("<td><a href=\"javascript:eng()\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('ch_btn_eng','','../../images/ch_btn_eng_f2.gif',1)\" ><img name=\"ch_btn_eng\" src=\"../../images/ch_btn_eng.gif\" width=\"50\" height=\"20\" border=\"0\"></a>");
document.write ("<br><a href=\"javascript:chinese_jan()\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('ch_btn_jan','','../../images/ch_btn_jan_f2.gif',1)\" ><img name=\"ch_btn_jan\" src=\"../../images/ch_btn_jan.gif\" width=\"50\" height=\"20\" border=\"0\"></a></td>");
document.write ("<td><img src=\"../images_chi/shim.gif\" width=\"35\" height=\"1\"><img name=\"sidebar\" src=\"images/sidebar.gif\" width=\"6\" height=\"40\" border=\"0\"></td>");
for (i=0;i<chapterAry.length;i++) {
	if (chapter == chapterAry[i])
		activeimg = "_f2";
	else
		activeimg = "";
	document.write ("<td><a href=\"../"+chapterAry[i]+"/index.htm\" onMouseOut=\"fireTimer()\" onMouseOver=\"resetTimer();resetAllLayers();MM_swapImage('btn_"+chapterAry[i]+"','','../images_chi/ch_btn_"+chapterAry[i]+"_f2.gif',1);MM_showHideLayers('"+chapterAry[i]+"','','show')\" ><img name=\"btn_"+chapterAry[i]+"\" src=\"../images_chi/ch_btn_"+chapterAry[i]+activeimg+".gif\" border=\"0\"></a></td>");
}
document.write ("</tr>");
document.write ("</table>");
document.write ("</td>");
document.write ("<td rowspan=\"2\" width=\"30\"><img src=\"../images_chi/ch_logo2.gif\" width=\"30\" height=\"69\"></td>\n");
document.write ("</tr>\n");
document.write ("<tr>\n");
if (filenme == "index.htm") {
	document.write ("<td width=\"100%\" bgcolor=\"#CCCCCC\"><img src=\"images/shim.gif\" width=\"300\" height=\"28\"></td>\n");
} else {
	document.write ("<td width=\"100%\" bgcolor=\"#CCCCCC\"><img src=\"images/title_"+filenmeNo+".gif\" width=\"300\" height=\"28\"></td>\n");
}
document.write ("</tr>\n");
document.write ("</table>\n");
document.write ("</td>\n");
document.write ("</tr>\n");
document.write ("</table>\n");
//End of highlight//

for (i=0; i < sitemap.length; i++)
{
	/*
	if (document.all)
		document.writeln("<div id=\"" + sitemap[i].name + "\" style=\"position:absolute; width:" + sitemap[i].width + "px; height:" + sitemap[i].height + "px; z-index:" + sitemap[i].zindex + "; left: " + sitemap[i].left + "px; top: " + sitemap[i].top + "px; visibility: " + sitemap[i].visibility + "\">");
	else if (document.layers)
		document.write("<layer id=\"" + sitemap[i].name + "\" width=\"" + sitemap[i].width + "\" height=\"" + sitemap[i].height + "\" z-index=\"" + sitemap[i].zindex + "\" pagex=\"" + sitemap[i].left + "\" pagey=\"" + sitemap[i].top + "\" visibility=\""+sitemap[i].visibility+"\">");
	*/
	document.writeln("<div id=\"" + sitemap[i].name + "\" style=\"position:absolute; width:" + sitemap[i].width + "px; height:" + sitemap[i].height + "px; z-index:" + sitemap[i].zindex + "; left: " + sitemap[i].left + "px; top: " + sitemap[i].top + "px; visibility: " + sitemap[i].visibility + "\">");

	document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
		for (j=0; j<sitemap[i].MenuItemArray.length; j++)
		{
			document.write("<tr>")
			document.write("<td>");
			document.write("<a href=\"" + sitemap[i].MenuItemArray[j].href + "\" onMouseOut=\"fireTimer();MM_swapImgRestore()\" onMouseOver=\"resetTimer();MM_swapImage('"+sitemap[i].MenuItemArray[j].name+"','','../images_chi/"+sitemap[i].MenuItemArray[j].name+"_f2.gif',1)\"><img src=\"../images_chi/" + sitemap[i].MenuItemArray[j].name + ".gif\" border=\"0\" name=\""+sitemap[i].MenuItemArray[j].name+"\"></a>");
			document.write("</td>");
			document.write("</tr>")
		}
	document.write("</table>");

	/*
	if (document.all)
		document.write("</div>");
	else if (document.layers)
		document.write("</layer>");
	*/
	document.write("</div>");
}
//-->
