/* ****************************** */
/* this file is dependent upon the file common.js -- It assumes that common.js will be called ahead of it.
 */



/* ********* Workshop Tabs ********* */

function tabOff(selected){
	if(isTagFoundInPage(selected)){
		var styleOff = document.getElementById(selected).style;
/*		styleOff.color = "#b49c63"; */
		styleOff.color = "#000000";
		styleOff.borderBottom = "1px solid #b49c63"; 
	}
	
}
function tabOn(selected){
	if(isTagFoundInPage(selected)){
		var styleOn = document.getElementById(selected).style;
		styleOn.color = "#d9541d";
		styleOn.borderBottom = "1px solid #fffbeb";
	}
}

function hideAllTrackDescriptions() {
	hide("emLeaderListing");
	hide("emExecListing");
	hide("execListing");
	hide("entreListing");
	hide("RoadToMyResultsListing");
}	


function hideAllBanners() {
	hide("bannerSun1");
	hide("bannerSun2");
	hide("bannerSun3");
	hide("bannerSun4");
	hide("bannerSun4b");
	hide("bannerSun5");
	hide("bannerMon1");
	hide("bannerMon2");
	hide("bannerMon3");
	hide("bannerTue4");
	hide("bannerWed");
	hide("bannerExF");
}
function showAllBanners() {
	show("bannerSun1");
	show("bannerSun2");
	show("bannerSun3");
	show("bannerSun4");
	show("bannerSun4b");
	show("bannerSun5");
	show("bannerMon1");
	show("bannerMon2");
	show("bannerMon3");
	show("bannerTue4");
	show("bannerWed");
	show("bannerExF");
}

function hideAllWorshopItems() {

	hideAllTrackDescriptions();
	hideAllBanners();
	hide("EL1");
	hide("EL2");
	hide("EL3");
	hide("EL4");

	hide("EE1");
	hide("EE2");
	hide("EE3");
	hide("EE4");

	hide("Ex1");
	hide("Ex2");
	hide("Ex3");
	hide("Ex4");
	hide("ExF");


	hide("En1");
	hide("En2");
	hide("En3");
	hide("Sun4");
	hide("Sun4b");
	hide("Sun5");

	hide("EY1");
}




function showEntreBanners(){
	show("bannerSun1");
	show("bannerSun2");
	show("bannerSun3");
	show("bannerSun4b");
}

function showEmergingBanners(){
	show("bannerSun4b");
	show("bannerSun5");
	show("bannerMon1");
	show("bannerMon2");
	show("bannerMon3");
	show("bannerTue4");
}

function showExecBanners(){
	show("bannerSun4b");
	show("bannerSun4");
	show("bannerMon1");
	show("bannerMon2");
	show("bannerMon3");
	show("bannerTue4");
	show("bannerExF");
}

function showWedBanners(){
	show("bannerWed");
}
	

function showTrackEL() {
	show("Sun4b");
	show("Sun5");
	show("EL1");
	show("EL2");
	show("EL3");
	show("EL4");
}	

function showTrackEE() {
	show("Sun4b");
	show("Sun5");
	show("EE1");
	show("EE2");
	show("EE3");
	show("EE4");

}	

function showTrackEx() {
	show("Sun4b");
	show("Sun4");
	show("Ex1");
	show("Ex2");
	show("Ex3");
	show("Ex4");
	show("ExF");
}	

function showTrackEn() {
	show("En1");
	show("En2");
	show("En3");
	show("Sun4b");

}	

function showTrackEY() {
	show("EY1");
}

function showAllWorkshops() {
	/* show all tracks, but without track descriptions */
	showTrackEn();
	showTrackEL();
	showTrackEE();
	showTrackEx();
	showTrackEY();	
}	
	
	
	


function workshopTabSelected(selected,selectedTab){
	
	hideAllWorshopItems();
	if(selected=="EL"){
		hideAllBanners();
		showEmergingBanners();
		show("emLeaderListing");
		showTrackEL();
		}
	else if(selected=="EE"){
		hideAllBanners();
		showEmergingBanners();
		show("emExecListing");
		showTrackEE();
		}
	else if(selected == "Ex"){
		hideAllBanners();
		showExecBanners();
		show("execListing");
		showTrackEx();
		}
	else if(selected == "En"){
		hideAllBanners();
		showEntreBanners();
		show("entreListing");
		showTrackEn();
		}
	else if(selected == "EY"){
		hideAllBanners();
		showWedBanners();
		show("RoadToMyResultsListing");
		showTrackEY();
		}
	else if(selected =="Al"){
		showAllBanners();
		showAllWorkshops();
		}
		

	/* handle the tabs */
	tabOff("tabEL");	
	tabOff("tabEE");	
	tabOff("tabEx");	
	tabOff("tabEn");	
	tabOff("tabEY");
	tabOff("tabAl");
	tabOn(selectedTab);
}	


/* The initialize() function is called for every page using the standard template.  
 * This function checks its page to see if it is one that requires initialization, and if it is, this function orchestrates that. 
 */ 
function initializeStdPage() {
	if(isTagFoundInPage("workshopPage")){ 
		hideAllWorshopItems();
	}

}

/* document.onLoad=initializeStdPage; */
