//Contents for utility menu
var util1=new Array()

//util1[0]=' <div style="position:absolute;">'
util1[0]='<table border="0" cellpadding="0" cellspacing="0" id="globalOfficesDD" width="300" onmouseover="globaloffdropdownH1();" onmouseout="globaloffdropdownS1();">'
util1[0]+='	<tr>'
util1[0]+='		<td valign="top" width="50%">'
//util1[0]+='			<a href="'+imgpref+'about/offices/argentina.html">Argentina</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/australia.html">Australia</a>'
//util1[0]+='			<a href="'+imgpref+'about/offices/brazil.html">Brazil</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/canada.html">Canada</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/china.html">China</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/france.html">France</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/germany.html">Germany</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/greece.html">Greece</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/hk.html">Hong Kong</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/hungary.html">Hungary</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/india.html">India</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/israel.html">Israel</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/italy.html">Italy</a>'
util1[0]+='			<a href="http://morganstanley.co.jp/index_e.html" target="_blank" >Japan</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/latin-america.html">Latin America</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/netherlands.html">Netherlands</a>'

//util1[0]+='			<a href="'+imgpref+'about/offices/lux.html">Luxembourg</a>'
util1[0]+='		</td>'
util1[0]+='		<td valign="top" width="50%">'
//util1[0]+='			<a href="'+imgpref+'about/offices/mexico.html">Mexico</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/russia.html">Russia</a>'

//added on 25th Sept//
util1[0]+='			<a href="'+imgpref+'about/offices/saudiarabia.html">Saudi Arabia</a>'

//
util1[0]+='			<a href="'+imgpref+'about/offices/seasia.html">Singapore</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/south-africa.html">South Africa</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/south-korea.html">South Korea</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/spain.html">Spain</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/sweden.html">Sweden</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/swiss.html">Switzerland</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/taiwan.html">Taiwan</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/turkey.html">Turkey</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/uae.html">United Arab Emirates</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/uk.html">United Kingdom</a>'
util1[0]+='			<a href="'+imgpref+'about/offices/usa.html">United States</a>'
util1[0]+='			<a href="#">&nbsp;</a>'
util1[0]+='		</td>'
util1[0]+='	</tr>'
util1[0]+='</table>'
//util1[0]=' </div>

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="'+imgpref+'views/gef/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-gef-off.gif" border="0" alt=""></a>'
//menu1[1]='<a href="'+imgpref+'views/gsb/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-gsb-off.gif" border="0" alt=""></a>'
menu1[1]='<a href="'+imgpref+'views/jacf/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-jacf-off.gif" border="0" alt=""></a>'
menu1[2]='<a href="'+imgpref+'views/perspectives/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-perspective-off.gif" border="0" alt=""></a>'
menu1[3]='<a href="'+imgpref+'views/gsr/index.html" onclick="" onmouseover="mouseOverDD(this);" onmouseout="mouseOutDD(this);"><img src="'+imgpref+'img/dropdown-gsr-off.gif" border="0" alt=""></a>'

//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="http://www.morganstanleyindividual.com/ourcommitment/" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-wt-off.gif" border="0" alt=""></a>'
menu2[1]='<a href="http://www.morganstanleyindividual.com/planning/" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-planning-off.gif" border="0" alt=""></a>'
menu2[2]='<a href="http://www.morganstanleyindividual.com/investmentproducts/" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-invprod-off.gif" border="0" alt=""></a>'
menu2[3]='<a href="http://www.morganstanleyindividual.com/accountoptions/" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-accounts-off.gif" border="0" alt=""></a>'
menu2[4]='<a href="http://www.morganstanleyindividual.com/markets/" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-markets-off.gif" border="0" alt=""></a>'
menu2[5]='<a href="http://www.morganstanleyindividual.com/customerservice/" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-service-off.gif" border="0" alt=""></a>'


//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="'+imgpref+'institutional/sales/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-sales-off.gif" border="0" alt=""></a>'
menu3[1]='<a href="'+imgpref+'institutional/invest_bank/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-invbank-off.gif" border="0" alt=""></a>'
menu3[2]='<a href="'+imgpref+'institutional/invest_management/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-im-off.gif" border="0" alt=""></a>'
menu3[3]='<a href="'+imgpref+'institutional/primebrokerage/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-pb-off.gif" border="0" alt=""></a>'
menu3[4]='<a href="'+imgpref+'institutional/research/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-research-off.gif" border="0" alt=""></a>'




//Contents for menu 4
var menu4=new Array()
//menu4[0]='<a href="'+imgpref+'global/microfin/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-micro-off.gif" border="0" alt=""></a>'












//Contents for menu 5
var menu5=new Array()
menu5[0]='<a href="'+imgpref+'about/company/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-company-off.gif" border="0" alt=""></a>'
menu5[1]='<a href="'+imgpref+'about/offices/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-offices-off.gif" border="0" alt=""></a>'
menu5[2]='<a href="'+imgpref+'about/ir/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-ir-off.gif" border="0" alt=""></a>'
menu5[3]='<a href="'+imgpref+'about/careers/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-careers-off.gif" border="0" alt=""></a>'
menu5[4]='<a href="'+imgpref+'about/awards/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-awards-off.gif" border="0" alt=""></a>'
menu5[5]='<a href="'+imgpref+'about/press/index.html" onclick="" onmouseover="mouseOverDD(this);globaloffdropdownH();" onmouseout="mouseOutDD(this);globaloffdropdownS();"><img src="'+imgpref+'img/dropdown-press-off.gif" border="0" alt=""></a>'

var menuN='';

//Contents for submenu 1
var submenu1=new Array()

//Contents for submenu 2
var submenu2=new Array()

//Contents for submenu 3
var submenu3=new Array()

//Contents for submenu 4
var submenu4=new Array()

		
var menuwidth='178px' //default menu width
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

var activeMenu = ""

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="position:absolute;" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

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, mc){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
//if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
//dropmenuobj.widthobj.width=menuwidth
//}
if (mc.length > 0){
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
	obj.visibility=visible
	else if (e.type=="click")
	obj.visibility=hidden
}
else{
	obj.visibility=hidden
}

}

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 topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-17
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what, mname, ln, tar){
if (ie4||ns6)
var pmenu = ''
for ( var j=0, wlen=what.length; j<wlen; ++j ){
	pmenu += what[j]
}
pmenu += ''

dropmenuobj.innerHTML=pmenu
}



//Global Offices Dropdown
function dropdownmenu(obj, e, menucontents, mtext, lnk, targ){
	if (activeNavNode != '') hideNavButton()
	
	if (window.event) event.cancelBubble=true
	else if (e.stopPropagation) e.stopPropagation()
		clearhidemenu()
		dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
		populatemenu(menucontents, mtext, lnk, targ)
		
	if (ie4||ns6){
	showhide(dropmenuobj.style, e, "visible", "hidden", menucontents)
	if (mtext == 'offices')
	dropmenuobj.x=getposOffset(obj, "left") +12
	
	else
	dropmenuobj.x=getposOffset(obj, "left") -1
	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"
	}
	return clickreturnvalue()
	}

//Global Offices Dropdown ends

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"
		if (activeNavNode != '') hideNavButton()
	}
}
//alert(e);
	document.getElementById("utilityLoginto").style.display = 'block';
	
}

function hideNavButton(){
	imgObj = getImageNode(activeNavNode);
	imgObj.setAttribute("src", activeTopNav);
	document.body.style.cursor='default';
	
	td = activeNavNode;
	td.className = "";
	td.leftRule = getAdjacentElement(td, td.nodeType, "previous");
	td.rightRule = getAdjacentElement(td, td.nodeType, "next");
	if (td.leftRule && (activeTNleft != 'dividerOn'))
	{
		td.leftRule.className = "divider";
	}
	if (td.rightRule && (activeTNright != 'dividerOn'))
	{
		td.rightRule.className = "divider";
	}
	
	activeImgName = '';
	activeNavNode = '';
}



function showGloff() {
		document.getElementById("gbmenuinn").style.display = "block";
		document.getElementById("utilityLoginto").style.display = "none";
		//document.getElementById("comboboxHS").style.visibility = "hidden";
		}

function hideGloff() {
		document.getElementById("gbmenuinn").style.display = "none";
		document.getElementById("utilityLoginto").style.display = "block";
		//document.getElementById("comboboxHS").style.visibility = "visible";
		
		}



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 globaloffdropdownH(){
	
	if (document.getElementById('comboboxHS') != null) {
	    document.getElementById("comboboxHS").style.visibility = "hidden";
	  } 
	  else {
	     return false;
	  }

	}
	
	
function globaloffdropdownS(){
	if (document.getElementById('comboboxHS') != null) {
	    document.getElementById("comboboxHS").style.visibility = "visible";
	  } 
	  else {
	     return false;
	  }
	}
	
	
function globaloffdropdownH1(){
	
	if (document.getElementById('comboboxHS1') != null) {
	    document.getElementById("comboboxHS1").style.visibility = "hidden";
	  } 
	  else {
	     return false;
	  }

	}
	
	
function globaloffdropdownS1(){
	if (document.getElementById('comboboxHS1') != null) {
	    document.getElementById("comboboxHS1").style.visibility = "visible";
	  } 
	  else {
	     return false;
	  }
	}
