//////////////////////////////////////////////////////////////////
//																//
//	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/navbar/iriscantor/nav1_on.gif";
	one_off = new Image; one_off.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav1.gif";
	one_active = new Image; one_active.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav1_on.gif";
	
	two_on = new Image; two_on.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav2_on.gif";
	two_off = new Image; two_off.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav2.gif";
	two_active = new Image; two_active.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav2_on.gif";

	three_on = new Image; three_on.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav3_on.gif";
	three_off = new Image; three_off.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav3.gif";
	three_active = new Image; three_active.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav3_on.gif";

	four_on = new Image; four_on.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav4_on.gif";
	four_off = new Image; four_off.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav4.gif";
	four_active = new Image; four_active.src="http://images.med.cornell.edu/headers/navbar/iriscantor/nav4_on.gif";
}

// ::::::::::::::::::::::::::: 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 == "" && activeHome == "home") {
	panoLoc = "http://media.med.cornell.edu/panoramas/iriscantor/pano_home.swf";
} else if (active == "one") {
	panoLoc = "http://media.med.cornell.edu/panoramas/iriscantor/pano_" + active + ".swf";
} else if (active == "two") {
	panoLoc = "http://media.med.cornell.edu/panoramas/iriscantor/pano_" + active + ".swf";
} else if (active == "three") {
	panoLoc = "http://media.med.cornell.edu/panoramas/iriscantor/pano_" + active + ".swf";
} else if (active == "four") {
	panoLoc = "http://media.med.cornell.edu/panoramas/iriscantor/pano_" + active + ".swf";
} else { //default to this just in case
	panoLoc = "http://media.med.cornell.edu/panoramas/iriscantor/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 == "" && activeHome == "home") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/iriscantor/home.jpg";
} else if (active == "one") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/iriscantor/pano_" + active + ".jpg";
} else if (active == "two") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/iriscantor/pano_" + active + ".jpg";
} else if (active == "three") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/iriscantor/pano_" + active + ".jpg";
} else  if (active == "four") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/iriscantor/pano_" + active + ".jpg";
} else { //default to this just in case
	altPanoLoc = "http://images.med.cornell.edu/panoramas/iriscantor/pano.jpg";
}		
	
// lefthand nav homepage link
siteURL = "http://www.cornellwomenshealth.com/";

// set xml data for pano flash here
dataLoc				= "http://global.med.cornell.edu/panoramas/iriscantor/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 ( 8, "http://popspublic.med.cornell.edu");
buttonArray[1]		= new createButtonObject ( 5, "http://www.cornellwomenshealth.com/contact.html?name1=Contact+Us&type1=2Active");
buttonArray[2]		= new createButtonObject ( 5, "http://test.med.cornell.edu/search/search_advanced.html");
buttonArray[3]		= new createButtonObject ( 8, "http://www.cornellwomenshealth.com/maps.html?name1=Maps+and+Directions&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") {
	    
		// customize section one, 2nd and 3rd level navigation links here
		navLinks[0] = new LeftLink('About the Center', 'http://www.cornellwomenshealth.com/about.html', '2', '', '');
	    navLinks[1] = new LeftLink('About Iris Cantor', 'http://www.cornellwomenshealth.com/about_iris.html', '2', '', '');
		navLinks[2] = new LeftLink('Our Healthcare Team', 'http://www.cornellwomenshealth.com/about_physicians.html', '2', '', '');
		navLinks[3] = new LeftLink('Contact Us', 'http://www.cornellwomenshealth.com/contact.html', '2', '', '');
	    
	}  else if (active == "two") {
		
		// customize section three, 2nd and 3rd level navigation links here
	    navLinks[0] = new LeftLink('Breast Surgery', 'http://www.cornellwomenshealth.com/services/pre_for_sur.html', '2', '', '');	
		navLinks[1] = new LeftLink('Cardiology', 'http://www.cornellwomenshealth.com/services/index.html', '2', '', '');	
		navLinks[2] = new LeftLink('Dermatology', 'http://www.cornellwomenshealth.com/services/medicare_ab.html', '2', '', '');	
		navLinks[3] = new LeftLink('Gastroenterology and Hepatology', 'http://www.cornellwomenshealth.com/services/hmo.html', '', '', '');	
		navLinks[4] = new LeftLink('Gynecology', 'http://www.cornellwomenshealth.com/services/commercial.html', '2', '', '');	
		navLinks[5] = new LeftLink('Gynecological Ultrasound', 'http://www.cornellwomenshealth.com/services/medicaid.html', '2', '', '');	
		navLinks[6] = new LeftLink('Internal Medicine', 'http://www.cornellwomenshealth.com/services/hospital/', '2', '', '');
		navLinks[7] = new LeftLink('Medical Oncology', 'http://www.cornellwomenshealth.com/services/planning/index.html', '', '', '');
	    navLinks[8] = new LeftLink('Neurology', 'http://www.cornellwomenshealth.com/services/settlin/index.html', '2', '', '');
		navLinks[9] = new LeftLink('Nutrition', 'http://www.cornellwomenshealth.com/services/index.html', '2', '', '');
		navLinks[10] = new LeftLink('Physical Therapy', 'http://www.cornellwomenshealth.com/services/medical.html', '', '', '');
	    navLinks[11] = new LeftLink('Radiology', 'http://www.cornellwomenshealth.com/services/donor.html', '2', '', '');

	} else if (active == "three") {
		
		navLinks[0] = new LeftLink('The Health Education Resource Center', 'http://www.cornellwomenshealth.com/info_resource.html', '2', '', '');
		navLinks[1] = new LeftLink('Seminars', 'http://www.cornellwomenshealth.com/info_seminar.html', '2', '', '');
		navLinks[2] = new LeftLink('Health Newsletters', 'http://www.cornellwomenshealth.com/info_web.html', '2', '', '');
		
	} else if (active == "four") {
		
		navLinks[0] = new LeftLink('Clinical Trials', 'http://www.cornellwomenshealth.com/research_trials.html', '2', '', '');
		navLinks[1] = new LeftLink('Research for Patients', 'http://www.cornellwomenshealth.com/research_for_patients.html', '2', '', '');
		
	} else if (active == "") {
		
		if (activeTool == "contact") {
			navLinks[0] = new LeftLink('Contact Us', 'http://www.cornellwomenshealth.com/contact.html', '2', '', '');
		} else if (activeTool == "maps") {
			navLinks[0] = new LeftLink('Maps and Directions', 'http://www.cornellwomenshealth.com/maps.html', '2', '', '');			
		}
	}
	// returning the value here, don't touch
	return (navLinks);
}

