//*********************************************
// 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 == 'About Venture Partners'){
document.write('<a href = "'+dirname+'venturepartners/about/index.html?page=about_vp" target="_top" class="sidehead">');
}
else if (cat == 'Portfolio'){
document.write('<a href = "'+dirname+'venturepartners/portfolio/index.html?page=portfolio" target="_top" class="sidehead">');
}
else if (cat == 'Headlines'){
document.write('<a href = "'+dirname+'venturepartners/headlines/index.html?page=headlines" target="_top" class="sidehead">');
}
else if (cat == 'Frequently Asked<br>&nbsp;&nbsp;&nbsp;&nbsp;Questions'){
document.write('<a href = "'+dirname+'venturepartners/faq.html?page=faq" target="_top" class="sidehead">');
}
else if (cat == 'Contact Us'){
document.write('<a href = "'+dirname+'venturepartners/contact/index.html?page=contact_us" target="_top" class="sidehead">');
}
else if (cat == 'Team'){
document.write('<a href = "'+dirname+'venturepartners/about/team.html?page=team" 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 == 'About Venture Partners'){
document.write('<a href = "'+dirname+'venturepartners/about/index.html?page='+pass+'" target="_top" class="sidehead">');
}
else if (cat == 'Portfolio'){
document.write('<a href = "'+dirname+'venturepartners/portfolio/index.html?page='+pass+'" target="_top" class="sidehead">');
}
else if (cat == 'Headlines'){
document.write('<a href = "'+dirname+'venturepartners/headlines/index.html?page='+pass+'" target="_top" class="sidehead">');
}
else if (cat == 'Frequently Asked<br>&nbsp;&nbsp;&nbsp;&nbsp;Questions'){
document.write('<a href = "'+dirname+'venturepartners/faq.html?page='+pass+'" target="_top" class="sidehead">');
}
else if (cat == 'Contact Us'){
document.write('<a href = "'+dirname+'venturepartners/contact/index.html?page='+pass+'" target="_top" class="sidehead">');
}
else if (cat == 'Team'){
document.write('<a href = "'+dirname+'venturepartners/about/team.html?page='+pass+'" 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>');
}

function openWindow(mypage, myname, w, h, scroll) {
		if (!w){ w=750; }
		if (!h){ h=550; }
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		scroll = 'yes';
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=yes,menubar=yes,toolbar=yes,location=yes,directories=yes,status=yes'
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}  

