function getTopMenu(){
	document.writeln('<tr><td height="27" background="'+locationPath+'images/nav_bg.jpg">');
	document.writeln('<table height="27" cellpadding=0 cellspacing=0 border=0><tr>');
	document.writeln('<td><img src="'+locationPath+'images/nav_pix_01.gif" width="14" height="27"></td>');
	for(var i=1;i<8;i++){
		var currentNode = MapRootNode.child[i];
		/*
		document.writeln('<td onMouseout="MM_swapImgRestore();" ');
		document.writeln('onMouseover="MM_swapImage(\'topMenuImg'+i+'\',\'\',\''+currentNode.getImgOver()+'\',1);"');
		document.writeln('>');
		document.writeln('<span ');
		document.writeln('onMouseover="');
		if(currentNode.getBranch() > 0){
			document.writeln('dropdownmenu(this, event, \'topMenu'+i+'\'); ');
		}
		document.writeln('MM_swapImage(\'topMenuImg'+i+'\',\'\',\''+currentNode.getImgOver()+'\',1);');
		document.writeln('"');
		document.writeln('><img src="'+currentNode.getImg()+'" name="topMenuImg'+i+'" height="27"></span>');
		if(currentNode.getBranch() > 0){
			document.writeln('<div id="topMenu'+i+'" class="topMenu">');
			for(var j=0;j<currentNode.getBranch();j++){
				var secondNode = currentNode.child[j];
				document.writeln('<a href="#">'+secondNode.getName()+'</a>');
			}
			document.writeln('</div>');
		}
		document.writeln('</td>');
		*/
		
		//To solve the "line break problem"
		var tempString = '';
		tempString += '<td onMouseout="MM_swapImgRestore();" ';
		tempString += 'onMouseover="MM_swapImage(\'topMenuImg'+i+'\',\'\',\''+currentNode.getImgOver()+'\',1);"';
		tempString += '>';
		tempString += '<span style="cursor: pointer;"';
		tempString += 'onMouseover="';
		if(currentNode.getBranch() > 0){
			tempString += 'dropdownmenu(this, event, \'topMenu'+i+'\'); ';
		}
		tempString += 'MM_swapImage(\'topMenuImg'+i+'\',\'\',\''+currentNode.getImgOver()+'\',1);';
		tempString += '" ';
		if(currentNode.getLink() != null && currentNode.getLink() != ""){
			tempString += 'onclick="javascript: location.href=\''+currentNode.getLink()+'\'" ';
		}
		tempString += '><img src="'+currentNode.getImg()+'" name="topMenuImg'+i+'" height="27" alt="'+currentNode.getName()+'"></span>';
		if(currentNode.getBranch() > 0){
			tempString += '<div id="topMenu'+i+'" class="topMenu">';
			for(var j=0;j<currentNode.getBranch();j++){
				var secondNode = currentNode.child[j];
				var tempLink = "";
				if(secondNode.getLink() != null && secondNode.getLink() != ""){
					tempLink = secondNode.getLink();
				}
				else{
					tempLink = "#";
				}
				tempString += '<a href="'+tempLink+'">'+secondNode.getName()+'</a>';
			}
			tempString += '</div>';
		}
		tempString += '</td>';
             
		document.writeln(tempString);
	}
	document.writeln('</tr></table>');
	document.writeln('</td></tr>');
}

function getTopBanner(){
    document.writeln('   <tr>');
	document.writeln('        <td background="'+languagePath+'images/index_vis_bg.jpg"><img src="'+languagePath+'images/index_mainVis_02.jpg" width="556" height="183" alt="New Modern Technology Ltd."></td>');
	document.writeln('   </tr>');
}

function getSubTopBanner(){
	var temp = (mainSection<=noOfBanner)?mainSection:1;
    document.writeln('   <tr>');
	document.writeln('         <td background="'+languagePath+'images/sub_mainVisbg_'+temp+'.jpg"><img src="'+languagePath+'images/sub_mainVis_02_'+temp+'.jpg" width="552" height="142" alt="New Modern Technology Ltd."></td>');
	document.writeln('   </tr>');
}

function getLeftLogo(){
	document.writeln('    <td width="223" background="'+locationPath+'images/left_bg.gif"><img src="'+languagePath+'images/logo.jpg" width="223" height="100" alt="New Modern Technology Ltd."><img src="'+locationPath+'images/index_mainVis_01.jpg" width="223" height="123" alt="New Modern Technology Ltd."></td>');
}

function getSubLeftLogo(){
	var temp = (mainSection<=noOfBanner)?mainSection:1;
	document.writeln('    <td width="223" background="'+locationPath+'images/left_bg.gif"><img src="'+languagePath+'images/logo.jpg" width="223" height="100" alt="New Modern Technology Ltd." ><img src="'+locationPath+'images/sub_mainVis_01_'+temp+'.jpg" width="223" height="82" alt="New Modern Technology Ltd." class="notPrint"></td>');

}
function getLeftMenu(){
	
	document.writeln('<tr><td>');
    document.write('<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image13\',\'\',\''+languagePath+'images/btn_home_over.gif\',1)"><img ');
	document.write('   src="'+languagePath+'images/btn_home.gif" name="Image13" width="63" height="30" border="0" alt="Home"></a>');	
	document.write('<a href="'+getNodeObject(9).getLink()+'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image15\',\'\',\''+languagePath+'/images/btn_staff_over.gif\',1)"><img ');
	document.write('   src="'+languagePath+'images/btn_staff.gif" name="Image15" width="96" height="30" border="0" alt="Staff-Net"></a>');
	document.write('<img src="'+languagePath+'images/btn_sitemap.gif" name="Image14" width="64" height="30" border="0">');
	//document.write('<a href="'+getNodeObject(8).getLink()+'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image14\',\'\',\''+languagePath+'/images/btn_sitemap_over.gif\',1)"><img ');
	//document.write('   src="'+languagePath+'images/btn_sitemap.gif" name="Image14" width="64" height="30" border="0" alt="Sitemap"></a>');
	//document.writeln('	  src="'+languagePath+'images/btn_staff.gif" name="Image15" width="96" height="30" border="0" alt="STAFF-NET"></a></td>');
    document.writeln('</td></tr>');
}
function getSubLeftMenu(){
	document.writeln('<tr><td>');
    document.write('<a href="'+getNodeObject(0).getLink()+'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image13\',\'\',\''+languagePath+'images/btn_sub_home_over.gif\',1)"><img ');
	document.write('src="'+languagePath+'images/btn_sub_home.gif" name="Image13" width="63" height="29" border="0" alt="Home"></a>');
	document.write('<a href="'+getNodeObject(9).getLink()+'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image14\',\'\',\''+languagePath+'images/btn_sub_staff_over.gif\',1)"><img ');
	document.write('src="'+languagePath+'images/btn_sub_staff.gif" name="Image14" width="90" height="29" border="0" alt="Staff-Net"></a>');    
	document.write('<img src="'+languagePath+'images/btn_sub_sitemap.gif" name="Image15" width="70" height="29" border="0">');
	//document.write('<a href="'+getNodeObject(8).getLink()+'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image14\',\'\',\''+languagePath+'images/btn_sub_sitemap_over.gif\',1)"><img ');
	//document.write('   src="'+languagePath+'images/btn_sub_sitemap.gif" name="Image14" width="70" height="29" border="0" alt="Sitemap"></a>');
	//document.writeln('src="'+languagePath+'images/btn_sub_staff.gif" name="Image15" width="90" height="29" border="0" alt="STAFF-NET"></a></td>');
    document.writeln('</td></tr>');
}

function getLanguageBar(){
	var currentHref = location.href.toLowerCase();
	document.writeln('  <tr>');
	if(currentHref.match('/en/')){
		document.writeln('	<td><div align="right"><img src="'+locationPath+'images/pix_lang_01.gif" width="14" height="22"><a><img ');
		document.writeln('	src="'+locationPath+'images/btn_en_over.gif" name="Image16" width="50" height="22" border="0" alt="English"></a><a href="javascript: languageSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image17\',\'\',\''+locationPath+'/images/btn_chi_over.gif\',1)"><img ');
		document.writeln('	src="'+locationPath+'images/btn_chi.gif" name="Image17" width="40" height="22" border="0" alt="Simplified Chinese"></a><img src="'+locationPath+'images/pix_lang_02.gif" width="15" height="22"></div></td>');
	}
	else if(currentHref.match('/sc/')){
		document.writeln('	<td><div align="right"><img src="'+locationPath+'images/pix_lang_01.gif" width="14" height="22"><a href="javascript: languageSwitch(\'en\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image16\',\'\',\''+locationPath+'/images/btn_en_over.gif\',1)"><img ');
		document.writeln('	src="'+locationPath+'images/btn_en.gif" name="Image16" width="50" height="22" border="0" alt="English"></a><a><img ');
		document.writeln('	src="'+locationPath+'images/btn_chi_over.gif" name="Image17" width="40" height="22" border="0" alt="Simplified Chinese"></a><img src="'+locationPath+'images/pix_lang_02.gif" width="15" height="22"></div></td>');
	}
	document.writeln('  </tr>');
}

function getSubLanguageBar(){
	var currentHref = location.href.toLowerCase();
	document.writeln('  <tr>');
	if(currentHref.match('/en/')){
		document.writeln('	<td bgcolor="#FFFFFF"><div align="right"><img src="'+locationPath+'images/pix_lang_01.gif" width="14" height="22"><a><img ');
		document.writeln('	src="'+locationPath+'images/btn_en_over.gif" name="Image16" width="50" height="22" border="0" alt="English"></a><a href="javascript: languageSwitch(\'sc\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image17\',\'\',\''+locationPath+'images/btn_chi_over.gif\',1)"><img ');
		document.writeln('	src="'+locationPath+'images/btn_chi.gif" name="Image17" width="40" height="22" border="0" alt="Simplified Chinese"></a><img src="'+locationPath+'images/pix_lang_02.gif" width="15" height="22"></div></td>');
	}
	else if(currentHref.match('/sc/')){
		document.writeln('	<td bgcolor="#FFFFFF"><div align="right"><img src="'+locationPath+'images/pix_lang_01.gif" width="14" height="22"><a href="javascript: languageSwitch(\'en\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image16\',\'\',\''+locationPath+'images/btn_en_over.gif\',1)"><img ');
		document.writeln('	src="'+locationPath+'images/btn_en.gif" name="Image16" width="50" height="22" border="0" alt="English"></a><a><img ');
		document.writeln('	src="'+locationPath+'images/btn_chi_over.gif" name="Image17" width="40" height="22" border="0" alt="Simplified Chinese"></a><img src="'+locationPath+'images/pix_lang_02.gif" width="15" height="22"></div></td>');
	}
	document.writeln('  </tr>');
}

function getNewsTitle(){
	document.writeln('          <tr>');
    document.writeln('          <td width="20" rowspan="3"><img src="'+locationPath+'images/spacer.gif" width="20" height="50"></td>');
    document.writeln('          <td><img src="'+languagePath+'images/title_news.gif" width="128" height="23" alt="Latest News"></td>');
    document.writeln('          <td width="20" rowspan="3"><img src="'+locationPath+'images/spacer.gif" width="20" height="50"></td>');
	document.writeln('          </tr>');
}

function getNewsMore(){
	document.writeln('          <p align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image23\',\'\',\''+languagePath+'images/btn_more_over.gif\',1)"><img src="'+languagePath+'images/btn_more.gif" name="Image23" width="87" height="13" border="0" alt="More"></a></p></td>');
}


function getSubMenu(){
    
	var nodePtr = getNodeObject(mainSection);
	//add by midas for remove the left side navigation in product page
	if (mainSection == 4)
	{
		return;
	}

	var ctr = nodePtr.child.length;
	var tempString = ""; 
	if(ctr > 0){
		document.writeln('<tr bgcolor="#538EC4">');
		document.writeln('<td>&nbsp;</td><td>');
		document.writeln('<ul class="sec_nav"><br>');
		for(var i=0;i<ctr;i++){
			var liClass = 'sec_nav_li';
			var aLink = 'href="'+nodePtr.child[i].getLink()+'"';
			if(subSection != null){
				if((subSection-1) == i){
					liClass += '2';
					aLink = '';
				}
			}
			if(i == ctr-1){
				liClass += 'L';
			}
			
			
			tempString += '<li class="'+liClass+'"><a '+aLink+'>'+nodePtr.child[i].getName();
			tempString += '</a></li>'
			
		}
		document.writeln(tempString);
		document.writeln('<br></ul>');
		document.writeln('</td><td>&nbsp;</td>');
		document.writeln('</tr>');
	}
}

function getFunctionBar(){
	var nodePtr = getNodeObject(mainSection);
	//add by midas for Move the three porduct icon in Home page to Product page
	if (mainSection == 4 && subSection == '')
	{
		document.writeln('          <tr>');
		document.writeln('            <td background="'+locationPath+'images/shot_bg.jpg"><a href="'+getNodeObject(4,1).getLink()+'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image33\',\'\',\''+languagePath+'images/btn_LCMS_over.jpg\',1)"><img ');
		document.writeln('			  src="'+languagePath+'images/btn_LCMS.jpg" name="Image33" width="23%" height="79" border="0" alt="'+getNodeObject(4,1).getName()+'"></a>');
		document.writeln('            							  <a href="'+getNodeObject(4,2).getLink()+'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image31\',\'\',\''+languagePath+'images/btn_eGateway_over.jpg\',1)"><img ');
		document.writeln('			  src="'+languagePath+'images/btn_eGateway.jpg" name="Image31" width="23%" height="79" border="0" alt="'+getNodeObject(4,2).getName()+'"></a>');	
		document.writeln('								  <a href="'+getNodeObject(4,3).getLink()+'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image32\',\'\',\''+languagePath+'images/btn_HIS_over.jpg\',1)"><img ');
		document.writeln('			  src="'+languagePath+'images/btn_HIS.jpg" name="Image32" width="24%" height="79" border="0" alt="'+getNodeObject(4,3).getName()+'"></a>');
		document.writeln('								  <a href="'+getNodeObject(4,4).getLink()+'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image34\',\'\',\''+languagePath+'images/btn_Hrms_over.jpg\',1)"><img ');
		document.writeln('			  src="'+languagePath+'images/btn_HRMS.jpg" name="Image34" width="24%" height="79" border="0" alt="'+getNodeObject(4,4).getName()+'"></a></td>');
		document.writeln('          </tr>');
	}
}

function getSubBreadcrumb(){
	var tempString = '';
	tempString += '<td height="33">';
	tempString += '<a href="'+getNodeObject(0).getLink()+'"  style class="pathLink" >NMT</a> ';
	var pageLevel = getPageLevel();
	pageLevel--;
	if(pageLevel > 0){
		tempString += '&gt; <a href="'+getNodeObject(mainSection).getLink()+'" style class="pathLink">'+getNodeObject(mainSection).getName()+'</a> ';
	}
	else{
		tempString += '&gt; <span class="orangeOn">'+getNodeObject(mainSection).getName()+'</span>';
	}
	if(pageLevel > 0){
		pageLevel--;
		tempString += '&gt; <span class="orangeOn">'+getNodeObject(mainSection, subSection).getName()+'</span> ';
	}
	tempString += '</td>';
	document.writeln(tempString);
}

function getSubPrintButton(){
	document.writeln('<td valign="top" onclick="javascript: window.print();" class="notPrint"><div align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image29\',\'\',\''+languagePath+'images/btn_print_over.gif\',1)"><img src="'+languagePath+'images/btn_print.gif" name="Image29" width="52" height="16" border="0" alt="Print"></a></div></td>');

}

function getSubContentTitle(){
	document.writeln('<p><span class="hd">'+getThisNodeObject().getName()+'</span></p>');
}
	
function getFooter(){
  document.writeln('<tr height="100%">');
  document.writeln(' <td background="'+locationPath+'images/left_bg.gif">&nbsp;</td>');
  document.writeln('  <td</td>');
  document.writeln('</tr>');
  document.writeln('<tr>');
  document.writeln(' <td background="'+locationPath+'images/left_bg.gif">&nbsp;</td>');
  document.writeln('  <td class="copyright"><img src="'+locationPath+'images/spacer.gif" width="20" align="left"><span class="notPrint">Copyright &copy; 2010 New Modern Technology Ltd. All rights reserved.<br></td>');
  document.writeln('</tr>');
}

function getSubFooter(){
  document.writeln('<tr height="100%">');
  document.writeln('  <td bgcolor="#F2F2F2">&nbsp;</td>');
  document.writeln('  <td class="copyright"></td>');
  document.writeln('</tr>');
  document.writeln('<tr>');
  document.writeln(' <td bgcolor="#F2F2F2">&nbsp;</td>');
  document.writeln('  <td class="copyright"><img src="'+locationPath+'images/spacer.gif" width="20" align="left"><span class="notPrint">Copyright &copy; 2010 New Modern Technology Ltd. All rights reserved.<br></td>');
  document.writeln('</tr>');
}
