var location_set;
var occupation_set;

function show(swap_occupation){

	var projects = document.getElementById("execDivs");
	var images = document.getElementById("execImgs");
	var nav = document.getElementById("execList");
	var links = nav.getElementsByTagName("a")
	var li = nav.getElementsByTagName("li")
	var properties = projects.getElementsByTagName("div");
	var properties2 = images.getElementsByTagName("img");

		for (var i = 0; i < properties.length; i++) { 
		
		   var properties_occupation = properties[i].getAttribute("title");
		   var properties_occupation2 = properties_occupation.split(",");
		   
		   for (var j = 0; j < properties_occupation2.length; j++) {
				//status
			  
					properties[i].className = "";

				if (properties_occupation2[j]==swap_occupation){
		
					properties[i].className = "on";
				}
		   }
		}
		
		for (var i = 0; i < properties2.length; i++) { 
		
		   var properties2_occupation = properties2[i].getAttribute("title");
		   var properties2_occupation2 = properties2_occupation.split(",");
		
		   for (var j = 0; j < properties2_occupation2.length; j++) {
				//status
			  
					properties2[i].className = "";

				if (properties2_occupation2[j]==swap_occupation){
		
					properties2[i].className = "on";
				}
		   }
		}
		occupation_set=swap_occupation;
		   
		//make clicked li "selected"			   
		for (var e=0; e<links.length; e++){
			
			li[e].className = "";	
			if (links[e].getAttribute("title")==swap_occupation){
				//status
				li[e].className = "on";
			}
		}
	
	thisMovie("execFlash").execNum(occupation_set);
	
	var execIntro = document.getElementById("execIntro");
	execIntro.style["display"] = "none";
}

function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}

