/*
//This script is available to use for any purpose as long as these lines of comment existed.
//This script is created by Axile on his free time at home and will work with IE6, FF1.5, and 
//probably with Netscape 8, Opera 8.5

//You may include an external stylesheet to define individual cells style - just remember to set the style to the cell ;)
//If you have the intention to swap individual image, please refer to the example below
	case "menuwithseparateimage":{
		tblsub = tblsub + "<tr>";
		tblsub = tblsub + "<td valign='top' align='left'>";
		tblsub = tblsub + "<a href='mylink.htm' onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image1','','images/myimage1_changed.jpg',1)\"><img id='Image1' src='images/myimage1_normal.jpg' border='0'></a>";
		tblsub = tblsub + "</td>";
		tblsub = tblsub + "</tr>";
	}
//Take note at the line: id='Image1' -> this is crucial as it identify the image to be swap with the image at this line: 'Image1','','images/myimage1_changed.jpg',1).

//If you do not want to use an image, and wanted to use hyperlinks only, consider the example below
	case "menuwithnoimage":{
		tblsub = tblsub + "<tr>";
		tblsub = tblsub + "<td valign='top' align='left'>";
		tblsub = tblsub + "<a href='mylink.htm'><span>My Link 1</span></a>";
		tblsub = tblsub + "</td>";
		tblsub = tblsub + "</tr>";
	}
*/


function createSubMenu(sid){
	var tblsub, submenu, menu2, mainmenu;
	switch(sid)
	{				
		case "student":{
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='1' style=background-color:'#fbd12d' style='position:absolute;visibility:hidden;border-color:#0b0101;width:80;' class='tbl'>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='DSES.aspx' style='color:#2c771b;text-decoration:none;'>DSES</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='DSLM.aspx' style='color:#2c771b;text-decoration:none;'>DSLM</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='DOAL.aspx' style='color:#2c771b;text-decoration:none;'>DOAL</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			
			break;
				}
				
			case "adult":{
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='1' style=background-color:'#fbd12d' style='position:absolute;visibility:hidden;border-color:#0b0101;width:80;' class='tbl'>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='SD-SES.aspx' style='color:#2c771b;text-decoration:none;'>SDSES</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='SD-SLM.aspx' style='color:#2c771b;text-decoration:none;'>SDSLM</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='SDOAL.aspx' style='color:#2c771b;text-decoration:none;'>SDOAL</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			
			break;
				}
				
		case "dipsubmenu":{
			submenu = "student";
			submenu2 = "adult";
			mainmenu = "tblnav";
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='1' style=background-color:'#fbd12d' style='position:absolute;visibility:hidden;width:90;border-color:#0b0101;' class='tbl'>"
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center' onmouseover=\"DynShowMenu('" + submenu + "')\" onmouseout=\"DynHideMenu('" + submenu + "')\">";
			tblsub = tblsub + "<a style='color:#f30503'>Students</a>";
			tblsub = tblsub + createSubMenu(submenu);
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'  onmouseover=\"DynShowMenu('" + submenu2 + "')\" onmouseout=\"DynHideMenu('" + submenu2 + "')\">";
			tblsub = tblsub + "<a style='color:#f30503'>Working Adults</a>";
			tblsub = tblsub + createSubMenu(submenu2);
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			
			break;
				}
				
			case "ce":{
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0'  border='1' style=background-color:'#fbd12d' style='position:absolute;visibility:hidden;width:170;background-color:#FFFFFF;border-color:#0b0101;' class='tbl'>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='VisionCoreAward.aspx' style='color:#2c771b;text-decoration:none;'>Grants And Award</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='keyProject.aspx' style='color:#2c771b;text-decoration:none;'>Key Projects</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			
			break;
				}
 
			case "ProductsMenu":{
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='1' style=position:absolute;visibility:hidden;width:80;background-color:#FFFFFF;border-color:#0b0101;' class='tbl'>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='products_gowns_accessories.aspx' class='submenu'>Gowns</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='products_accessories_gowns.aspx' class='submenu'>Accessories</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";

			
			break;
				}
				
				case "ContactUsMenu":{
			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='1' style=position:absolute;visibility:hidden;width:85;background-color:#FFFFFF;border-color:#0b0101;' class='tbl'>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='contactUs_fashion_boutique.aspx' class='submenu'>Contact Us</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='top' align='center'>";
			tblsub = tblsub + "<a href='enquiryForm_fashion_boutique.aspx' class='submenu'>Enquiry Form</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			tblsub = tblsub + "<tr>";

			
			break;
				}
	}
	tblsub = tblsub + "</table>";
	//alert(tblsub);
	return tblsub;
}


			
	function fixMenu(show){
	var tbl, submenu, mainmenu;
	switch(show)
	{
		case "DipMenu":{
			submenu = "dipsubmenu";
			mainmenu = "tblnav";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td valign='bottom' align='left' width='82' height='13' class='tbldyn' onmouseover=\"DynShowMenu('" + submenu + "')\" onmouseout=\"DynHideMenu('" + submenu + "')\">";
			tbl = tbl + "&nbsp;&nbsp;&nbsp;<a class='menu'>DIPLOMAS</a>";
			tbl = tbl + "<br/><br/>"; //This line will make the submenu appear below the main one
			tbl = tbl + createSubMenu(submenu);
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
					
		case "CDMenu":{
			submenu = "ce";
			mainmenu = "tblnav";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td valign='bottom' align='left' width='174' height='13' class='tbldyn' onmouseover=\"DynShowMenu('" + submenu + "')\" onmouseout=\"DynHideMenu('" + submenu + "')\">";
			tbl = tbl + "&nbsp;&nbsp;&nbsp;<a class='menu'>CAPABILITY DEVELOPMENT</a>";
			tbl = tbl + "<br/><br/>"; //This line will make the submenu appear below the main one
			tbl = tbl + createSubMenu(submenu);
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
					
		case "IPMenu":{
			submenu = "dipsubmenu";
			mainmenu = "tblnav";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td valign='bottom' align='left' class='tbldyn' width='164' height='13' onmouseover=\"DynHideMenu('" + submenu + "')\" onmouseout=\"DynHideMenu('" + submenu + "')\">";
			tbl = tbl + "&nbsp;&nbsp;&nbsp;<a href='IOP.aspx' class='menu'>INDUSTRIAL PROGRAMME</a>";
			tbl = tbl + "<br>"; //This line will make the submenu appear below the main one
			tbl = tbl + createSubMenu(submenu);
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
					
		case "LabMenu":{
			submenu = "dipsubmenu";
			mainmenu = "tblnav";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td valign='bottom' align='left' class='tbldyn' width='99' height='13' onmouseover=\"DynHideMenu('" + submenu + "')\" onmouseout=\"DynHideMenu('" + submenu + "')\">";
			tbl = tbl + "&nbsp;&nbsp;&nbsp;<a href='laboratories.aspx' class='menu'>LABORATORIES</a>";
			tbl = tbl + "<br>"; //This line will make the submenu appear below the main one
			tbl = tbl + createSubMenu(submenu);
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
					
		case "ProductsMenu":{
			submenu = "ProductsMenu";
			mainmenu = "tblnav";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' width='' height='22' onmouseover=\"DynShowMenu('" + submenu + "')\" onmouseout=\"DynHideMenu('" + submenu + "')\">";
			tbl = tbl + "<a class='topmenu'>PRODUCTS</a>";
			tbl = tbl + "<br>"; //This line will make the submenu appear below the main one
			tbl = tbl + createSubMenu(submenu);
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}	
					
		case "ContactUsMenu":{
			submenu = "ContactUsMenu";
			mainmenu = "tblnav";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' width='' height='22' onmouseover=\"DynShowMenu('" + submenu + "')\" onmouseout=\"DynHideMenu('" + submenu + "')\">";
			tbl = tbl + "<a class='topmenu'>CONTACT US</a>";
			tbl = tbl + "<br>"; //This line will make the submenu appear below the main one
			tbl = tbl + createSubMenu(submenu);
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
		
		case "ServicesMenu":{
			//submenu = "AboutUsMenu";
			mainmenu = "partner";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' width='' height='22'>";
			tbl = tbl + "<a href='services_made_to_measure.aspx' class='topmenu'>SERVICES</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
					
		case "ProfileMenu":{
			//submenu = "FMenu";
			mainmenu = "faq";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' width='' height='22'>";
			tbl = tbl + "<a href='profile_fashion_boutique_in_singapore.aspx' class='topmenu'>PROFILE</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
		
		case "HomeMenu":{
			//submenu = "AboutUsMenu";
			mainmenu = "home";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' width='' height='22'>";
			tbl = tbl + "<a href='home_chim_culture.aspx' class='topmenu'>HOME</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
					
		case "AdminMenu":{
			//submenu = "AboutUsMenu";
			mainmenu = "adminMenu";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' width='' height='22'>";
			tbl = tbl + "<a href='adminMenu.aspx' class='topmenu'>Admin Menu</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
					
							case "AdminProducts":{
			//submenu = "AboutUsMenu";
			mainmenu = "adminProducts";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' width='' height='22'>";
			tbl = tbl + "<a href='adminAccess.aspx' class='topmenu'>Products Admin</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
					
							case "AdminNews":{
			//submenu = "AboutUsMenu";
			mainmenu = "adminNews";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' width='' height='22'>";
			tbl = tbl + "<a href='adminNews.aspx' class='topmenu'>News Admin</a>";
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
					}
					
	
		}
		dt.write(tbl);
		//alert(tbl);
	}





function changenewnavi(ori, newsrc)
	{
		//x = Math.random()*350;
		//y = Math.random()*350;
		//imgobj.style.position='absolute';
		ori.src = newsrc
	}
function changebacknavi(ori, newsrc)
	{
		//x = Math.random()*350;
		//y = Math.random()*350;
		//imgobj.style.position='absolute';
		ori.src = newsrc
	}

function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible"
}

function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden"
}

function displayImage(picName, windowName, windowWidth, windowHeight)
{
  return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20)  + ",height=" + (parseInt(windowHeight)+20))
}

			   function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

			 
			 function checkHeight(){
				 if (findPosY(anchor1)>340){
			 document.getElementById("bodyTd2").style.height=findPosY(anchor1)-300; 
				 }
				 else {
				 document.getElementById("bodyTd2").style.height=340;
				 }
				 
				 if (eval(document.getElementById("panelDiv"))){
				 	 document.getElementById("panelDiv").style.left=findPosX(anchor1)+515; 
					}
			 }
  
function doNothing(){}