//////////////////////////////////////////////////////////////////
//																//
//	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://www.cornellradiology.com/images/header/nav1_on.gif";
	one_off= new Image; one_off.src="http://www.cornellradiology.com/images/header/nav1.gif";

	two_on= new Image; two_on.src="http://www.cornellradiology.com/images/header/nav2_on.gif";
	two_off= new Image; two_off.src="http://www.cornellradiology.com/images/header/nav2.gif";

	three_on= new Image; three_on.src="http://www.cornellradiology.com/images/header/nav3_on.gif";
	three_off= new Image; three_off.src="http://www.cornellradiology.com/images/header/nav3.gif";

	four_on= new Image; four_on.src="http://www.cornellradiology.com/images/header/nav4_on.gif";
	four_off= new Image; four_off.src="http://www.cornellradiology.com/images/header/nav4.gif";
	
	five_on= new Image; five_on.src="http://www.cornellradiology.com/images/header/nav5_on.gif";
	five_off= new Image; five_off.src="http://www.cornellradiology.com/images/header/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 different pano for each section
if (active == "home") {
	panoLoc = "http://media.med.cornell.edu/panoramas/cornellradiology/pano_home.swf";
} else if (active == "one") {
	panoLoc = "http://media.med.cornell.edu/panoramas/cornellradiology/pano_" + active + ".swf";
} else if (active == "two") {
	panoLoc = "http://media.med.cornell.edu/panoramas/cornellradiology/pano_" + active + ".swf";
} else if (active == "three") {
	panoLoc = "http://media.med.cornell.edu/panoramas/cornellradiology/pano_" + active + ".swf";
} else if (active == "four") {
	panoLoc = "http://media.med.cornell.edu/panoramas/cornellradiology/pano_" + active + ".swf";
} else if (active == "five") {
	panoLoc = "http://media.med.cornell.edu/panoramas/cornellradiology/pano_" + active + ".swf";
} else { //default to this just in case
	panoLoc = "http://media.med.cornell.edu/panoramas/cornellradiology/pano.swf";
}
		
// set animation to true or false		
inAnimation			= "false";

// static pano: use this if using different pano for each section
if (active == "home") {
	altPanoLoc = "http://www.cornellradiology.com/images/panoramas/pano_home.jpg";
} else if (active == "one") {
	altPanoLoc = "http://www.cornellradiology.com/images/panoramas/pano_" + active + ".jpg";
} else if (active == "two") {
	altPanoLoc = "http://www.cornellradiology.com/images/panoramas/pano_" + active + ".jpg";
} else if (active == "three") {
	altPanoLoc = "http://www.cornellradiology.com/images/panoramas/pano_" + active + ".jpg";
} else  if (active == "four") {
	altPanoLoc = "http://www.cornellradiology.com/images/panoramas/pano_" + active + ".jpg";
} else  if (active == "five") {
	altPanoLoc = "http://www.cornellradiology.com/images/panoramas/pano_" + active + ".jpg";
} else { //default to this just in case
	altPanoLoc = "http://www.cornellradiology.com/images/panoramas/pano.jpg";
}		
	
// set xml data for pano flash here
dataLoc				= "http://global.med.cornell.edu/panoramas/cornellradiology/pano.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";

// lefthand nav homepage link
siteURL = "http://www.cornellradiology.com/index.html";

// 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 (9, "http://popspublic.med.cornell.edu");
buttonArray[1]		= new createButtonObject (6, "http://www.cornellradiology.com/fellowships/rounds.html?name1=Grand+Rounds+Schedule&type1=2Active");
buttonArray[2]		= new createButtonObject (4, "http://www.med.cornell.edu/search/search_advanced.html");
buttonArray[3]		= new createButtonObject (6, "http://www.cornellradiology.com/toolbar/give.html");
buttonArray[4]		= new createButtonObject (5, "http://www.cornellradiology.com/toolbar/contact.html?name1=Contact+Us&type1=2Active");

// setting the array, don't touch
additionalMapArray	= new Array ();

// ::::::::::::::::::::::::::: 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 == "one") {
	    
		navLinks[0] = new LeftLink('Welcome from the Chair', 'http://www.cornellradiology.com/about/index.html', '2', '', '');
		navLinks[1] = new LeftLink('In the News', 'http://www.cornellradiology.com/about/in_news.html', '2', '', '');
		navLinks[2] = new LeftLink('Our Faculty', 'http://www.cornellradiology.com/about/our_faculty.html', '2', '', '');
		navLinks[3] = new LeftLink('Our Medical Practices', 'http://www.cornellradiology.com/about/practices.html', '2', '', '');
		navLinks[4] = new LeftLink('Our Distinguished History', 'http://www.cornellradiology.com/about/history.html', '2', '', '');
		
	}  else if (active == "four") {
		
		navLinks[0] = new LeftLink('Residency Program', 'http://www.cornellradiology.com/fellowships/residency.html', '2', '', '');	
		navLinks[1] = new LeftLink('Where Our Residents Have Gone', 'http://www.cornellradiology.com/fellowships/residents.html', '3', 'Residency Program', '');
		navLinks[2] = new LeftLink('Our Hospitals', 'http://www.cornellradiology.com/fellowships/hospitals.html', '3', 'Residency Program', '');
		navLinks[3] = new LeftLink('Residency Application Process', 'http://www.cornellradiology.com/fellowships/application.html', '3', 'Residency Program', '');
		navLinks[4] = new LeftLink('Nuclear Medicine / Molecular Imaging Residency Program', 'http://www.cornellradiology.com/fellowships/nuc_res.html', '2', '', '');
		navLinks[5] = new LeftLink('Fellowship Program Overview', 'http://www.cornellradiology.com/fellowships/fellowships.html', '2', '', '');	
		navLinks[6] = new LeftLink('Body Imaging Fellowships', 'http://www.cornellradiology.com/fellowships/body_fellowships.html', '2', '', '');
		navLinks[7] = new LeftLink('Body/MRI', 'http://www.cornellradiology.com/fellowships/abdominal.html', '3', 'Body Imaging Fellowships', '');	
		navLinks[8] = new LeftLink('Breast/Body/MRI', 'http://www.cornellradiology.com/fellowships/mammography.html', '3', 'Body Imaging Fellowships', '');	
		navLinks[9] = new LeftLink('MRI', 'http://www.cornellradiology.com/fellowships/mri.html', '3', 'Body Imaging Fellowships', '');	
		navLinks[10] = new LeftLink('Neuroradiology Fellowship', 'http://www.cornellradiology.com/fellowships/neuroradiology.html', '2', '', '');	
		navLinks[11] = new LeftLink('Application Process', 'http://www.cornellradiology.com/fellowships/neuro_application.html', '3', 'Neuroradiology Fellowship', '');
		navLinks[12] = new LeftLink('Interventional Neuroradiology Fellowship', 'http://www.cornellradiology.com/fellowships/int_neuro.html', '2', '', '');	
		navLinks[13] = new LeftLink('Vascular Interventional Fellowship', 'http://www.cornellradiology.com/fellowships/vascular.html', '2', '', '');
		navLinks[14] = new LeftLink('Application Process', 'http://www.cornellradiology.com/fellowships/vasc_application.html', '3', 'Vascular Interventional Fellowship', '');
		navLinks[15] = new LeftLink('Grand Rounds Schedule', 'http://www.cornellradiology.com/fellowships/rounds.html', '2', '', '');	
		navLinks[16] = new LeftLink('Radiology Links', 'http://www.cornellradiology.com/fellowships/links.html', '2', '', '');	
		navLinks[17] = new LeftLink('For Medical Students', 'http://www.cornellradiology.com/fellowships/students.html', '2', '', '');		
		
	}  else if (active == "five") {
		
		navLinks[0] = new LeftLink('Recent Publications', 'http://www.cornellradiology.com/research/index.html', '2', '', '');	
		
	} else if (active == "toolbar_1") {
		
		navLinks[0] = new LeftLink('Ways to Give', 'http://www.cornellradiology.com/toolbar/give.html', '2', '', '');	
		navLinks[1] = new LeftLink('Contact Us', 'http://www.cornellradiology.com/toolbar/contact.html', '2', '', '');
		
	} 
		
	// returning the value here, don't touch
	return (navLinks);
}
