//*********************************************
// Tree Menu Copyright Simon Rycroft
// For more scripts go to:
// http://www.d-zineworx.co.uk
//*********************************************

// opens menu section - do not alter
function openMenu(cat) {
this.cat = cat;
document.write('<span class = "level1">');
if (cat == 'Securities'){
document.write('<a href = "'+dirname+'securities/index.html?page=securities" target="_top" class="sidehead">');
}
else if (cat == 'Investment Banking'){
document.write('<a href = "'+dirname+'invest_bank/index.html?page=inv_bank" target="_top" class="sidehead">');
}
else if (cat == 'Investment Management'){
document.write('<a href = "'+dirname+'invest_management/index.html?page=asset" target="_top" class="sidehead">');
}
else if (cat == 'Research'){
document.write('<a href = "'+dirname+'research/index.html?page=research" target="_top" class="sidehead">');
}
else if (cat == 'Services for Small U.S.<br>&nbsp;&nbsp;Businesses'){
document.write('<a href = "'+dirname+'small_business.html?page=services" target="_top" class="sidehead">');
}
else if (cat == 'Private Wealth<br>&nbsp;&nbsp;Management'){
document.write('<a href = "http://www.morganstanleyindividual.com/pwm/" target="_top" class="sidehead">');
}
else {
document.write('<a href = "' + thisPage + '?page=null" target="_top" class="sidehead">');
}
if (lev1img=='yes') {
document.write('<img src="' + imgPath + lev1OpName +'" width="' + lev1OpWidth + '" height="' + lev1OpHeight + '"border="0">');
}
document.write(cat + '</a><span><br>');
for (x=0;x<thisMenu.length;x++){
 document.write('<span class = "level2">');
 if (lev2img=='yes') {
 document.write('<img src="' + imgPath + lev2Name +'" width="' + lev2Width + '" height="' + lev2Height + '">');
 }
 if (lev2Char=='yes') {
 document.write(bullet);
 }
 document.write('<a href="' + thisMenu[x].linkb + '" class="sidesub">' + thisMenu[x].name + '</a><span><br>');
}
}

// closes menu section - do not alter
function closeMenu(cat,pass) {
this.cat = cat;
this.pass = pass;
document.write('<span class = "level1">');
if (cat == 'Securities'){
document.write('<a href = "'+dirname+'securities/index.html?page='+pass+'" target="_top" class="sidehead">');
}
else if (cat == 'Investment Banking'){
document.write('<a href = "'+dirname+'invest_bank/index.html?page='+pass+'" target="_top" class="sidehead">');
}
else if (cat == 'Investment Management'){
document.write('<a href = "'+dirname+'invest_management/index.html?page='+pass+'" target="_top" class="sidehead">');
}
else if (cat == 'Research'){
document.write('<a href = "'+dirname+'research/index.html?page=" target="_top" class="sidehead">');
}
else if (cat == 'Services for Small U.S.<br>&nbsp;&nbsp;Businesses'){
document.write('<a href = "'+dirname+'small_business.html?page='+pass+'" target="_top" class="sidehead">');
}
else if (cat == 'Private Wealth<br>&nbsp;&nbsp;Management'){
document.write('<a href = "http://www.morganstanleyindividual.com/pwm/" target="_top" class="sidehead">');
}
else{
document.write('<a href = "' + thisPage + '?page='+pass+'" class="sidehead" target="_top">');
}
if (lev1img=='yes') {
document.write('<img src="' + imgPath + lev1ClosName +'" width="' + lev1ClosWidth + '" height="' + lev1ClosHeight + '"border="0">');
}
document.write(cat + '</a><span><br>');
}

function printLink(cat,pass) {
this.cat = cat;
this.pass = pass;
document.write('<span class = "level1">');
document.write('<a href = "' + pass+'" class="sidehead" target="_top">');
if (lev1img=='yes') {
document.write('<img src="' + imgPath + lev1ClosName +'" width="' + lev1ClosWidth + '" height="' + lev1ClosHeight + '"border="0">');
}
document.write(cat + '</a><span><br>');
}
