//////////////////////////////////////////////////////////////////
//																//
//	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/nyp/nav1_on.gif";
	one_off = new Image; one_off.src="http://images.med.cornell.edu/headers/navbar/nyp/nav1_on.gif";

	two_on = new Image; two_on.src="http://images.med.cornell.edu/headers/navbar/nyp/nav2_on.gif";
	two_off = new Image; two_off.src="http://images.med.cornell.edu/headers/navbar/nyp/nav2.gif";

	three_on = new Image; three_on.src="http://images.med.cornell.edu/headers/navbar/nyp/nav3_on.gif";
	three_off = new Image; three_off.src="http://images.med.cornell.edu/headers/navbar/nyp/nav3.gif";

	four_on = new Image; four_on.src="http://images.med.cornell.edu/headers/navbar/nyp/nav4_on.gif";
	four_off = new Image; four_off.src="http://images.med.cornell.edu/headers/navbar/nyp/nav4.gif";

	five_on = new Image; five_on.src="http://images.med.cornell.edu/headers/navbar/nyp/nav5_on.gif";
	five_off = new Image; five_off.src="http://images.med.cornell.edu/headers/navbar/nyp/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://media.med.cornell.edu/panoramas/nyp/pano_home.swf";
} else if (active == "") {
	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/pano_one.swf";
} else if (active == "one") {
	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/pano_" + active + ".swf";
} else if (active == "two") {
	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/pano_" + active + ".swf";
} else if (active == "three") {
	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/pano_" + active + ".swf";
} else if (active == "four") {
	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/pano_" + active + ".swf";
} else if (active == "five") {
	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/pano_" + active + ".swf";
} else if (active == "six") {
	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/pano_" + active + ".swf";
} else if (active == "seven") {
	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/pano_" + active + ".swf";
} else { //default to this just in case
	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/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://images.med.cornell.edu/panoramas/nyp/home.jpg";
} else if (active == "one") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyp/pano_" + active + ".jpg";
} else if (active == "two") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyp/pano_" + active + ".jpg";
} else if (active == "three") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyp/pano_" + active + ".jpg";
} else  if (active == "four") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyp/pano_" + active + ".jpg";
} else  if (active == "five") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyp/pano_" + active + ".jpg";
} else  if (active == "six") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyp/pano_" + active + ".jpg";
} else  if (active == "seven") {
	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyp/pano_" + active + ".jpg";
} else { //default to this just in case
	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyp/pano_one.jpg";
}		
	

// set xml data for pano flash here
dataLoc				= "http://global.med.cornell.edu/panoramas/nyp/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				= "nyp";

// 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://www.beryl.net/custom/physref/nyp/start.asp");
buttonArray[1]		= new createButtonObject ( 4, "http://www.nyp.org/search/search_advanced.html");
buttonArray[2]		= new createButtonObject ( 5, "http://www.nyp.org/contactus/index.html?name1=Main+Addresses+and+Phone+Numbers&type1=2Active");
buttonArray[3]		= new createButtonObject ( 8, "http://www.nyp.org/careers/");
buttonArray[4]		= new createButtonObject ( 4, "http://wo-pub2.med.cornell.edu/cgi-bin/WebObjects/externalCalendar.woa/wa/getNypHealth?whichweek=0");
buttonArray[5]		= new createButtonObject ( 6, "http://www.nyp.org/give/index.html");
buttonArray[6]		= new createButtonObject ( 7, "http://www.nyp.org/maps/index.html");
// setting the array, don't touch
additionalMapArray	= new Array ();

// lefthand nav homepage link
siteURL = "http://www.nyp.org";

// START WEB TRENDS VARIABLES
//var gFpcDom=".nyp.org";
var gDomain="cds.nyp.org";
var gDcsId="dcs9e0rmek711roghvzx6gsg8_9s4x";


function sectionName() {
	activeSectionName = "Health in the News";
	return activeSectionName;
}
// END WEB TRENDS VARIABLES

// ::::::::::::::::::::::::::: 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();
		

		var navc = 0;	

		// customize section one, 2nd and 3rd level navigation links here
		navLinks[navc++] = new LeftLink('The Five Centers of NewYork-Presbyterian Hospital', 'http://www.nyp.org/about/our_loc.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Leading the Way', 'http://www.nyp.org/about/lea_way.html', '2', '', '');
	    navLinks[navc++] = new LeftLink('Patient Care', 'http://www.nyp.org/about/lea_way_pat.html', '3', 'Leading the Way', '');
		navLinks[navc++] = new LeftLink('Nursing', 'http://www.nyp.org/nursing/', '3', 'Leading the Way', '');
		
	    navLinks[navc++] = new LeftLink('Facilities and Populations Served', 'http://www.nyp.org/about/lea_way_pop.html', '3', 'Leading the Way', '');
		navLinks[navc++] = new LeftLink('Mission', 'http://www.nyp.org/about/mission.html', '3', 'Leading the Way', '');
	    navLinks[navc++] = new LeftLink('Education', 'http://www.nyp.org/about/lea_way_edu.html', '3', 'Leading the Way', '');
	    navLinks[navc++] = new LeftLink('Research and Clinical Trials', 'http://www.nyp.org/about/lea_way_res.html', '3', 'Leading the Way', '');
	    navLinks[navc++] = new LeftLink('Vision', 'http://www.nyp.org/about/lea_way_vis.html', '3', 'Leading the Way', '');
	    navLinks[navc++] = new LeftLink('Awards and Recognition', 'http://www.nyp.org/about/awards.html', '3', 'Leading the Way', '');
	    navLinks[navc++] = new LeftLink('History of Achievement', 'http://www.nyp.org/about/lea_way_ach.html', '3', 'Leading the Way', '');
		navLinks[navc++] = new LeftLink('Office of External Relations', 'http://www.nyp.org/oer', '2', '', '');    
		navLinks[navc++] = new LeftLink('Healthcare System', 'http://www.nyp.org/about/hea_sys.html', '2', '', '');
		navLinks[navc++] = new LeftLink('News', 'http://www.nyp.org/about/news.html', '2', '', '');
	    navLinks[navc++] = new LeftLink('Hospital News', 'http://news.med.cornell.edu/nyp/index.shtml?name1=News&type1=2Select&name2=Hospital+News&type2=3Active', '3', 'News', '');
	    navLinks[navc++] = new LeftLink('Health in the News', 'http://news.med.cornell.edu/nyp_health/index.shtml?name1=News&type1=2Select&name2=Health+in+the+News&type2=3Active', '3', 'News', '');
		navLinks[navc++] = new LeftLink('Hospital Leadership', 'http://www.nyp.org/about/hos_lea.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Board of Trustees', 'http://www.nyp.org/about/boa_tru.html', '3', 'Hospital Leadership', '');
	    navLinks[navc++] = new LeftLink('Life Trustees', 'http://www.nyp.org/about/hos_lea_lif_tru.html', '3', 'Hospital Leadership', '');
	    navLinks[navc++] = new LeftLink('Corporate Officers', 'http://www.nyp.org/about/hos_lea_sen_adm.html', '3', 'Hospital Leadership', '');
		navLinks[navc++] = new LeftLink('History', 'http://www.nyp.org/about/his.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Facts and Statistics', 'http://www.nyp.org/about/hos_stat.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Centers of Excellence', 'http://www.nyp.org/about/center.html', '2', '', '');
		
		
	// returning the value here, don't touch
	return (navLinks);
}


