///CK: DropDownMenu for Home
var menu1=new Array()

///CK: DropDownMenu for About Us
var menu2=new Array()
menu2[0]='<a href="../about_us.asp"> &raquo; About Cetheus MSC</a>'
menu2[1]='<a href="../about_us.asp#CORPORATEMISSION"> &raquo; Corporate Mission</a>'
menu2[2]='<a href="../about_us.asp#VALUEPROPOSITION"> &raquo; Value Proposition</a>'
menu2[3]='<a href="../about_us.asp#BUSINESSINTENT"> &raquo;Business Intent</a>'

///CK: DropDownMenu for Products & Solution
var menu3=new Array()
menu3[0]='<a href="../ProductsSolutions/products_solutions.asp"> &raquo; Overview</a>'
menu3[1]='<a href="../ProductsSolutions/solutions_bpm.asp"> &raquo; Solutions</a>'
menu3[2]='<a href="../ProductsSolutions/products_rpm.asp"> &raquo; Products</a>'

///CK: DropDownMenu for Services & Training
var menu4=new Array()
menu4[0]='<a href="../services_training/professional_services.asp"> &raquo; Professional Services</a>'
menu4[1]='<a href="../services_training/project_management_implementation.asp"> &raquo; Project Management & Implementation</a>'
menu4[2]='<a href="../services_training/DW_DM_BI.asp"> &raquo; DW/DM/BI Consultancy</a>'
menu4[3]='<a href="../services_training/training.asp"> &raquo; Training</a>'

///CK: DropDownMenu for News & Events
var menu5=new Array()
menu5[0]='<a href="../NewsEvents/in_the_news.asp"> &raquo; In the News</a>'
menu5[1]='<a href="../NewsEvents/press_releases.asp"> &raquo; Press Releases</a>'
menu5[2]='<a href="../NewsEvents/events.asp"> &raquo; Events</a>'

///CK: DropDownMenu for Partners
var menu6=new Array()
menu6[0]='<a href="../Partners/hyperion.asp"> &raquo; Hyperion Solutions Corporation</a>'
menu6[1]='<a href="../Partners/itapps.asp"> &raquo; ITApps Sdn Bhd</a>'
menu6[2]='<a href="../Partners/kzen.asp"> &raquo; Kzen Berhad</a>'
menu6[3]='<a href="../Partners/sunopsis.asp"> &raquo; Sunopsis</a>'

///CK: DropDownMenu for Customers
var menu7=new Array()
menu7[0]='<a href="../list_of_customers.asp"> &raquo; List of Customers</a>'

///CK: DropDownMenu for Resources
var menu8=new Array()
menu8[0]='<a href="../Resources/resources.asp"> &raquo; Resources Download</a>'

///CK: DropDownMenu for Career
var menu9=new Array()
menu9[0]='<a href="../recruitment.asp"> &raquo; Recruitment</a>'

///CK: DropDownMenu for Career
var menu10=new Array()
menu10[0]='<a href="../contact_us.asp"> &raquo; Contact Us</a>'


function screenSetting()
{
		var hgt = top.screen.height;
		var wdt = top.screen.width;
		var hgt2 = 250;
		var wdt2 = 400;         
		hgt = (hgt - hgt2)/2;
		wdt = (wdt - wdt2)/2;
		var winProp = "top="+hgt+",left="+wdt+",height="+hgt2+",width="+wdt2+",resizable=yes";
		var win = window.open("screenSetting.jsp","showScreenSetting",winProp);
		win.focus();
}
               
		
var menuwidth='165px' //default menu width
var menuwidth2='190px' //default menu width
var menubgcolor='#FFFFEA'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
{
document.write('<div id="dropmenudiv" class="DropDownEffect" style="visibility:hidden;width:'+menuwidth+'; background-color:'+menubgcolor+'; " onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
document.write('<iframe id="idropmenudiv" src="about:blank" scrolling="no" frameborder="0" style="position:absolute;width:'+menuwidth+';display:none;"></iframe>')
}

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth, iobj){
	if (ie4||ns6)
	{
		dropmenuobj.style.left=dropmenuobj.style.top=-500
		idropmenuobj.style.left=idropmenuobj.style.top=-500
	}
	if (menuwidth!=""){
		dropmenuobj.widthobj=dropmenuobj.style
		dropmenuobj.widthobj.width=menuwidth
		idropmenuobj.widthobj=idropmenuobj.style
		idropmenuobj.widthobj.width=menuwidth
	}


		if(menuLength == 0)
		{
			dropmenuobj.style.display = "none"
			idropmenuobj.style.visibility = "hidden"
		}else if(menuLength == 6)
		{
			dropmenuobj.style.height = "120 px"
			idropmenuobj.style.height = "120 px"
			dropmenuobj.style.display = ""
			idropmenuobj.style.visibility = ""
		}else if(menuLength == 5)
		{
			dropmenuobj.style.height = "95 px"
			idropmenuobj.style.height = "95 px"
			dropmenuobj.style.display = ""
			idropmenuobj.style.visibility = ""
		}else if(menuLength == 4)
		{    
			dropmenuobj.style.height = "80 px"
			idropmenuobj.style.height = "80 px"
			dropmenuobj.style.display = ""
			idropmenuobj.style.visibility = ""
		}else if(menuLength == 3)
		{    
			dropmenuobj.style.height = "60 px"
			idropmenuobj.style.height = "60 px"
			dropmenuobj.style.display = ""
			idropmenuobj.style.visibility = ""
		}else if(menuLength == 2)
		{    
			dropmenuobj.style.height = "40 px"
			idropmenuobj.style.height = "40 px"
			dropmenuobj.style.display = ""
			idropmenuobj.style.visibility = ""
		}else if(menuLength == 1)
		{    
			dropmenuobj.style.height = "20 px"
			idropmenuobj.style.height = "20 px"
			dropmenuobj.style.display = ""
			idropmenuobj.style.visibility = ""
		}else
		{
			dropmenuobj.style.height = ""
			idropmenuobj.style.height = "0px"
			dropmenuobj.style.display = ""
			idropmenuobj.style.visibility = ""
		}

	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
	{	
		obj.visibility=visible
		iobj.display = "block"
	}
	else if (e.type=="click")
	{
		obj.visibility=hidden
		iobj.display = "none"
	}
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")

}

var formTmp="";

function dropdownmenu(obj, e, menucontents, menuwidth, targetTD){
	menuLength = menucontents.length

	if(formTmp!="")clearColor();
	formTmp = "td"+targetTD;	
	overColor();

	if (window.event) event.cancelBubble=true
	else if (e.stopPropagation) e.stopPropagation()
	clearhidemenu()
	dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
	idropmenuobj=document.getElementById? document.getElementById("idropmenudiv") : dropmenudiv
	populatemenu(menucontents)

	if (ie4||ns6){
	showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth, idropmenuobj.style)
	dropmenuobj.x=getposOffset(obj, "left")
	dropmenuobj.y=getposOffset(obj, "top")
	dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
	dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"

	idropmenuobj.x=getposOffset(obj, "left")
	idropmenuobj.y=getposOffset(obj, "top")
	idropmenuobj.style.left=idropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
	idropmenuobj.style.top=idropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"

}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}


function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
idropmenuobj.style.display="none"
clearColor();
}
}

function delayhidemenu(){
	if (ie4||ns6){
	delayhide=setTimeout("hidemenu()",disappeardelay)		
	}	
}

function clearhidemenu(){
	if (typeof delayhide!="undefined")
	{
		clearTimeout(delayhide)	
	}
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

function overColor(){
	document.getElementById(formTmp).style.background = "FFCC00";
}

//CK: Added for clearing the Main selected bar
	function clearColor(){
		document.getElementById(formTmp).style.background = "";
	}
//CK ends: Added for clearing the Main selected bar
