<!--
//JavaScript for this site carefully hand-coded by absoluteTHINKING.com

//define the array that will hold the submenu parameters passed by the function below
submenuChoice = new Array();

function buildPortfolioSubmenu(subMenuTitle, submenu_choice1,submenu_choice2, submenu_choice3, submenu_choice4, submenu_choice5, submenu_choice6) {
	if ((document.images) && (preloadsComplete = true)) {
		//first, set our global var for the portfolio section clicked on
		portfolioSelectionClicked = subMenuTitle

		//now, loop through our global array and set the submenu choice names of the current portfolio selection
		for (var x=1; x<=mostSubSectionChoices; x++){
			submenuChoice[x] = eval("submenu_choice" + [x])
		}

		//define some paths and a .gif extension
		var portfolioImagePrefix = "../images/interface/menu_items/portfolio/"
		var subMenuImagePrefix = "../images/interface/menu_items/portfolio/submenus/"
		var choiceDirectory = subMenuTitle + "/"
		var extension = ".gif"		

		//reset main portfolio choices and down arrow to off/empty state from a loop
		for (var x=1; x<mainPortfolioImageNames.length;x++){
			document.images[mainPortfolioImageNames[x]].src = portfolioImagePrefix + "off/" + mainPortfolioImageNames[x] + extension;
			document.images[mainPortfolioImageNames[x]  + "_dotted_down_arrow"].src = subMenuImagePrefix + "dotted_down_arrow_empty"  + extension;
		}
		
		//set main portfolio selection to "on" state
		document.images[subMenuTitle].src = portfolioImagePrefix + "on/" + subMenuTitle + extension;

		//show appropriate dotted down arrow
		document.images[subMenuTitle  + "_dotted_down_arrow"].src = subMenuImagePrefix + "dotted_down_arrow"  + extension;
		
		//set submenu title
		document.images['subMenuTitle'].src = subMenuImagePrefix + "titles/" + subMenuTitle + extension;

		//loop through submenu choices and set accordingly - loop until we hit 1 + the most submenu selections
		for (var x=1; x<=mostSubSectionChoices; x++){
			
			//check the submenu choice - if "none" - replace with an empty image
			//otherwise, replace with the submenu choice specified in the  list of parameters
			if (eval("submenu_choice" + [x]) == "none"){
				document.images["submenu_choice" + x].src = subMenuImagePrefix + "empty_placeholder" + extension;
				document.images["submenu_choice" + x].width = 0	
				document.images["submenu_choice" + x].height = 0
			}else{
				document.images["submenu_choice" + x].src = subMenuImagePrefix + choiceDirectory + "off/" + eval("submenu_choice" + [x])+ extension;
				document.images["submenu_choice" + x].width = 97	
				document.images["submenu_choice" + x].height = 5
			}
	
		}
	}
}
// -->