<!--
//JavaScript for this site carefully hand-coded by absoluteTHINKING.com

//set var to track if the image preloads are complete - this makes sure there are no errors if the rollovers aren't yet loaded
var preloadsComplete = false

//get browser name, version, and agent
var browserName = navigator.appName;
var browserVersion = parseInt(navigator.appVersion);
var browserAgent = navigator.userAgent;

mainPortfolioImageNames = new Array();
mainPortfolioImageNames[1] = "commercial"
mainPortfolioImageNames[2] = "portrait"
mainPortfolioImageNames[3] = "showcase"

//this var need to be altered should the most sub menu choices increase (interface allows for 10 max)
var mostSubSectionChoices = 6

function preLoadImagesFromHomepage(){

//preload all necessary menu images - start with portfolio items
if (document.images){
	//define image prefix URL
	var imagePrefixURL

	selectionStates = new Array();
	selectionStates[1] = "off"
	selectionStates[2] = "rollover"
	selectionStates[3] = "on"

	//main portfolio menu items dir
	imagePrefixURL = "../images/interface/menu_items/portfolio/"

	//define portfolio submenu choices arrays for each main section

	commercialSubMenuChoices = new Array();
	commercialSubMenuChoices[1] = "advertising"
	commercialSubMenuChoices[2] = "editorial"
	commercialSubMenuChoices[3] = "celebrity"
	commercialSubMenuChoices[4] = "performing_arts"
	commercialSubMenuChoices[5] = "fashion_modeling"
	commercialSubMenuChoices[6] = "professional"
	
	portraitSubMenuChoices = new Array();
	portraitSubMenuChoices[1] = "relationships"
	portraitSubMenuChoices[2] = "love_story"
	portraitSubMenuChoices[3] = "graduate"
	portraitSubMenuChoices[4] = "beginnings"
	portraitSubMenuChoices[5] = "none"
	portraitSubMenuChoices[6] = "none"
	
	showcaseSubMenuChoices = new Array();
	showcaseSubMenuChoices[1] = "fine_art"
	showcaseSubMenuChoices[2] = "award_winners"
	showcaseSubMenuChoices[3] = "celebrity"
	showcaseSubMenuChoices[4] = "none"
	showcaseSubMenuChoices[5] = "none"
	showcaseSubMenuChoices[6] = "none"

	//load all portfolio submenu items for both "off" state and "rollover" state
	for (var x=1; x<mainPortfolioImageNames.length; x++){
		
		for (var y=1; y<(mostSubSectionChoices+1); y++){			

			//write a catch for a "none" subMenuChoice - do not try to preload if "none" exists
			//we use none to be able to preload everything in an equal number array loop
			if (eval(mainPortfolioImageNames[x] + "SubMenuChoices")[y].indexOf("none") < 0){			
				//"none" IS NOT present - write link as normal
				for (var z=1; z<(selectionStates.length - 1); z++){
					eval(eval(mainPortfolioImageNames[x] + "SubMenuChoices")[y] + "_" + selectionStates[z] + " = new Image()");	
					
					eval(eval(mainPortfolioImageNames[x] + "SubMenuChoices")[y] + "_" + selectionStates[z]).src = imagePrefixURL + "submenus/" + mainPortfolioImageNames[x] + "/" + selectionStates[z] + "/" + eval(mainPortfolioImageNames[x] + "SubMenuChoices")[y] + ".gif"
					
				}
			}
		}
	}


	//now - preload all main menu images

	mainMenuImageNames = new Array();
	mainMenuImageNames[1] = "profile"
	mainMenuImageNames[2] = "events"
	mainMenuImageNames[3] = "essentials"
	mainMenuImageNames[4] = "exhibitions"
	mainMenuImageNames[5] = "contact"
	mainMenuImageNames[6] = "site_map"
	
	for (var x=1; x<mainMenuImageNames.length; x++){
		for (var y=1; y<(selectionStates.length - 1); y++){
			imagePrefixURL = "../images/interface/menu_items/" + mainMenuImageNames[x] + "/" + selectionStates[y] + "/"
			
			eval("main_menu_choice" + x + "_" + selectionStates[y] + " = new Image()");
			eval("main_menu_choice" + x + "_" + selectionStates[y]).src = imagePrefixURL + mainMenuImageNames[x] + ".gif"
		}
	}
	

	preloadsComplete = true
}

}

// -->