//////////////////////////////////////////////////////////////////
//																//
//	Weill Cornell Medical College								//
//	cornellsurgery.org site javascript							//
//	cornellsurgery.js											//
//	Version 1.5 												//											
//																//
//////////////////////////////////////////////////////////////////

// ::::::::::::::::::::::::::: SECTION I: preload top nav images: three state rollovers

// fill in the absolute paths for all the images
if (browser) {
	one_on= new Image; one_on.src="http://images.med.cornell.edu/headers/wmc/nav1_on.gif";
	one_off= new Image; one_off.src="http://images.med.cornell.edu/headers/wmc/nav1.gif";

	two_on= new Image; two_on.src="http://images.med.cornell.edu/headers/wmc/nav2_on.gif";
	two_off= new Image; two_off.src="http://images.med.cornell.edu/headers/wmc/nav2.gif";

	three_on= new Image; three_on.src="http://images.med.cornell.edu/headers/wmc/nav3_on.gif";
	three_off= new Image; three_off.src="http://images.med.cornell.edu/headers/wmc/nav3.gif";

	four_on= new Image; four_on.src="http://images.med.cornell.edu/headers/wmc/nav4_on.gif";
	four_off= new Image; four_off.src="http://images.med.cornell.edu/headers/wmc/nav4.gif";	
	
	five_on= new Image; five_on.src="http://images.med.cornell.edu/headers/wmc/nav5_on.gif";
	five_off= new Image; five_off.src="http://images.med.cornell.edu/headers/wmc/nav5.gif";
		
	// include all additional section types to avoid errors. Set them to null.
	_on= new Image; _on.src=null;
	toolbar_1_on= new Image; toolbar_1_on.src=null;
	toolbar_2_on= new Image; toolbar_2_on.src=null;
	toolbar_3_on= new Image; toolbar_3_on.src=null;
	toolbar_4_on= new Image; toolbar_4_on.src=null;
	toolbar_5_on= new Image; toolbar_5_on.src=null;
	toolbar_6_on= new Image; toolbar_6_on.src=null;
	toolbar_7_on= new Image; toolbar_7_on.src=null;
	toolbar_8_on= new Image; toolbar_8_on.src=null;
	toolbar_9_on= new Image; toolbar_9_on.src=null;
}


// ::::::::::::::::::::::::::: SECTION II: set values for panos, use absolute paths for all file locations

// flash pano: use this if using only one pano for the whole site
//panoLoc				= "http://media.med.cornell.edu/panoramas/nyp/pano_home.swf";

// flash pano: use this if using different pano for each section
if (active == "home") {
	panoLoc = "http://www.med.cornell.edu/media/panoramas/wmc/pano_home_test.swf";
} else if (active == "one") {
	panoLoc = "http://media.med.cornell.edu/panoramas/wmc/cumc/pano_one.swf";	
} else if (active == "five") {
	panoLoc = "http://media.med.cornell.edu/panoramas/wmc/cumc/pano_five.swf";	
} else { //default to this just in case
	panoLoc = "http://media.med.cornell.edu/panoramas/wmc/cumc/pano.swf";
}	
		
// set animation to true or false		
inAnimation			= "false";

// static pano: use this if using one pano for the whole site
//altPanoLoc = "http://images.med.cornell.edu/panoramas/test/pano_" + active + ".jpg";
// static pano: use this if using different pano for each section
if (active == "home") {
	altPanoLoc = "http://global.med.cornell.edu/oac/images/panoramas/pano_home.jpg";
} else if (active == "one") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/wmc/cumc/pano_one.jpg";
} else if (active == "two") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/wmc/education/pano_home.jpg";
} else if (active == "three") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/wmc/research/home.jpg";
} else  if (active == "four") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/cornellphysicians/pano_home.jpg";
} else  if (active == "five") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/wmc/cumc/pano_five.jpg";
} else { //default to this just in case
	altPanoLoc = "http://images.med.cornell.edu/panoramas/wmc/cumc/pano.jpg";
}		
	
	

// set xml data for pano flash here
dataLoc				= "http://www.med.cornell.edu/data/content.xml";

// set this line to the location of the temp toolbar when working on the test server. comment it out to move to production
//toolBarLoc			= "http://media.med.cornell.edu/panoramas/framework_toolbar" + homeWrapper + ".swf";

// set loading value here: wmc or nyp
brand				= "wmc";

// setting the array, don't touch
buttonArray			= new Array ();

// set absolute paths for all the pano toolbar links [image map for static pano]
buttonArray[0]		= new createButtonObject ( 16, "http://popspublic.med.cornell.edu");
buttonArray[1]		= new createButtonObject ( 4, "http://www.med.cornell.edu/search/search_advanced.html");
buttonArray[2]		= new createButtonObject ( 5, "http://www.med.cornell.edu/contact/phone.html");
buttonArray[3]		= new createButtonObject ( 8, "http://www.med.cornell.edu/jobs/");
buttonArray[4]		= new createButtonObject ( 4, "http://www.med.cornell.edu/calendar/index.html");
buttonArray[5]		= new createButtonObject ( 6, "http://www.med.cornell.edu/contact/donation.html");
buttonArray[6]		= new createButtonObject ( 7, "http://www.med.cornell.edu/contact/maps.html");


// setting the array, don't touch
additionalMapArray	= new Array ();

// lefthand nav homepage link
siteURL = "http://www.med.cornell.edu/";

// ::::::::::::::::::::::::::: SECTION III: set 2nd and 3rd level navigation links here, customize according to section

// needed for 4th level links grey line, don't touch
var num4thLevelLinks = 0;

// load 2nd and 3rd level navigation here
function loadLinks() {
	
	// setting the array, don't touch this line
	var navLinks = new Array();
	
if (active == "") {	    
				
		navLinks[0] = new LeftLink('WCMC News', 'http://global.med.cornell.edu/news/wcmc/', '2', '', '');

	}	
	
	if (active == "one") {	    
				

	}  else if (active == "two") {		
		

	} else if (active == "three") {		
	
		
	} else if (active == "four") {
		
	
	} else if (active == "five") {
	
				
	} else if (active == "six") {
	
			
	} else if (active == "seven") {
	
		
	} else if (active == "toolbar_1") {
		
		
	} else if (active == "toolbar_2") {
		
		
	} else if (active == "toolbar_3") {

		
	} else if (active == "toolbar_4") {
	
		
	} else if (active == "toolbar_5") {
	
		
	} else if (active == "toolbar_6") {
	
		
	} else if (active == "toolbar_7") {
		
	
	} else if (active == "toolbar_8") {
		
		
	} else if (active == "toolbar_9") {
		
		
	}
		
	// returning the value here, don't touch
	return (navLinks);
}


// fourth-level navigation code begins here


function loadNav4Pages() {
 
 // setting the array, don't touch
 
var oneNav4Links = new Array();
var allNav4Pages = new Array();

 if (active == "one") {
 
 // customize 4th level navigation links here
	
 
 
 } else if (active == "two") { 
 
 // customize 4th level navigation links here
	

	
 } else if (active == "three") { 
 
 // customize 4th level navigation links here
	
 
	
 } else if (active == "four") { 
 
 // customize 4th level navigation links here
	
 
	
 } else if (active == "five") { 
 
 // customize 4th level navigation links here
	
 
	
 } else if (active == "six") { 
 
 // customize 4th level navigation links here
	
 
	
 } else if (active == "seven") { 
 
 // customize 4th level navigation links here
	
 	
}
	
 
// returning the value here, don't touch
return (allNav4Pages);
 
}

function popup_tour(pg) {
       tourpopup=window.open(pg,"popupwindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizeable=no,width=600,height=350");
       tourpopup.focus();
}