//////////////////////////////////////////////////////////////////
//																//
//	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/cornellsurgery/colonrectal/nav1_on.gif";
	one_off = new Image; one_off.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav1.gif";
	one_active = new Image; one_active.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav1_on.gif";
	
	two_on = new Image; two_on.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav2_on.gif";
	two_off = new Image; two_off.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav2.gif";
	two_active = new Image; two_active.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav2_on.gif";

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

	four_on = new Image; four_on.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav4_on.gif";
	four_off = new Image; four_off.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav4.gif";
	four_active = new Image; four_active.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav4_on.gif";
	
	five_on = new Image; five_on.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav5_on.gif";
	five_off = new Image; five_off.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav5.gif";
	five_active = new Image; five_active.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav5_on.gif";
	
	six_on = new Image; six_on.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav6_on.gif";
	six_off = new Image; six_off.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav6.gif";
	six_active = new Image; six_active.src="http://images.med.cornell.edu/headers/navbar/cornellsurgery/colonrectal/nav6_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/cornellsurgery/colonrectal/cornellsurgery_colonrectal/pano_home.swf";
} else { //default to this just in case
	panoLoc = "http://media.med.cornell.edu/panoramas/cornellsurgery/colonrectal/cornellsurgery_colonrectal/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/cornellsurgery_colonrectal/pano_home.jpg";
} else { //default to this just in case
	altPanoLoc = "http://images.med.cornell.edu/panoramas/cornellsurgery_colonrectal/pano.jpg";
}		
	
siteURL 			= "http://www.cornellsurgery.org/colonrectal/";

// set xml data for pano flash here
dataLoc				= "http://global.med.cornell.edu/panoramas/cornellsurgery_colonrectal/data.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.cornell.edu/panoramas/cornellsurgery/colonrectal/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 (7, "http://wo-pub2.med.cornell.edu/cgi-bin/WebObjects/POPSPublic");
buttonArray[1]		= new createButtonObject (5, "http://www.med.cornell.edu/search/search_advanced.html");
buttonArray[2]		= new createButtonObject (5, "http://www.cornellsurgery.org/colonrectal/contact.html");
buttonArray[3]		= new createButtonObject (7, "http://www.cornellsurgery.org/colonrectal/maps.html");

// 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") {
		var navc = 0;
	    
		navLinks[navc++] = new LeftLink('Our Physicians', 'http://www.cornellsurgery.org/colonrectal/about/mee_our.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Our Staff', 'http://www.cornellsurgery.org/colonrectal/about/our_sta.html', '2', '', '');

	}  else if (active == "four") {
		var navc = 0;
		
		navLinks[navc++] = new LeftLink('Contact Us', 'http://www.cornellsurgery.org/colonrectal/visit/con_us.html', '2', '', '');	
		navLinks[navc++] = new LeftLink('Map and Directions', 'http://www.cornellsurgery.org/colonrectal/visit/dir.html', '2', '', '');	
		navLinks[navc++] = new LeftLink('Insurance Information', 'http://www.cornellsurgery.org/colonrectal/visit/ins_inf.html', '2', '', '');	
		navLinks[navc++] = new LeftLink('FAQ', 'http://www.cornellsurgery.org/colonrectal/visit/faq.html', '2', '', '');	
		

	} else if (active == "five") {
		var navc = 0;
	
		navLinks[navc++] = new LeftLink("Colon Cancer Prevention: Diet and Disease", 'http://www.cornellsurgery.org/colonrectal/instructions/guide.html', '2', '', '');
	
		navLinks[navc++] = new LeftLink("A Patient's Guide to Having Colon and Rectal Surgery", 'http://www.cornellsurgery.org/colonrectal/instructions/wha_var.html', '2', '', '');	
		navLinks[navc++] = new LeftLink("A Patient's Guide to Having Emergency Colon and Rectal Surgery", 'http://www.cornellsurgery.org/colonrectal/instructions/scl.html', '2', '', '');	
		navLinks[navc++] = new LeftLink('How to Prepare for Your Tests or Surgery', 'http://www.cornellsurgery.org/colonrectal/instructions/how.html', '2', '', '');
		navLinks[navc++] = new LeftLink("Colonoscopy (Fleet's Phospho-soda)", 'http://www.cornellsurgery.org/colonrectal/instructions/col_fle.html', '3', 'How to Prepare for Your Tests or Surgery', '');	
		navLinks[navc++] = new LeftLink('Colonoscopy (GoLytely Preparation)', 'http://www.cornellsurgery.org/colonrectal/instructions/col_gol.html', '3', 'How to Prepare for Your Tests or Surgery', '');
		navLinks[navc++] = new LeftLink('Colorectal Laparoscopic Procedures', 'http://www.cornellsurgery.org/colonrectal/instructions/col_lap.html', '3', 'How to Prepare for Your Tests or Surgery', '');

		navLinks[navc++] = new LeftLink('Instructions for After Your Test or Surgery', 'http://www.cornellsurgery.org/colonrectal/instructions/ins_for.html', '2', '', '');	
		navLinks[navc++] = new LeftLink('Anal Surgery', 'http://www.cornellsurgery.org/colonrectal/instructions/ana_sur.html', '3', 'Instructions for After Your Test or Surgery', '');	
		navLinks[navc++] = new LeftLink('Abdominal Surgery', 'http://www.cornellsurgery.org/colonrectal/instructions/abd_sur.html', '3', 'Instructions for After Your Test or Surgery', '');	
		navLinks[navc++] = new LeftLink('Abdominal Surgery, Ileal Pouch', 'http://www.cornellsurgery.org/colonrectal/instructions/abd_sur_ile.html', '3', 'Instructions for After Your Test or Surgery', '');	
		navLinks[navc++] = new LeftLink('Caring for Surgical Drains', 'http://www.cornellsurgery.org/colonrectal/instructions/car_for.html', '3', 'Instructions for After Your Test or Surgery', '');	
		navLinks[navc++] = new LeftLink('Dressing Your Open Wound', 'http://www.cornellsurgery.org/colonrectal/instructions/dre_you.html', '3', 'Instructions for After Your Test or Surgery', '');	
		navLinks[navc++] = new LeftLink('Hemorrhoidectomy Discharge Instructions', 'http://www.cornellsurgery.org/colonrectal/instructions/hem_dis.html', '3', 'Instructions for After Your Test or Surgery', '');	
		navLinks[navc++] = new LeftLink('Ostomy Care', 'http://www.cornellsurgery.org/colonrectal/instructions/ost_car.html', '3', 'Instructions for After Your Test or Surgery', '');	
		navLinks[navc++] = new LeftLink('Ulcerative Colitis Surgery', 'http://www.cornellsurgery.org/colonrectal/instructions/ulc_col.html', '3', 'Instructions for After Your Test or Surgery', '');	
		
		navLinks[navc++] = new LeftLink('Diets', 'http://www.cornellsurgery.org/colonrectal/instructions/die.html', '2', '', '');	
		navLinks[navc++] = new LeftLink('High Fiber', 'http://www.cornellsurgery.org/colonrectal/instructions/hig_fib.html', '3', 'Diets', '');	
		navLinks[navc++] = new LeftLink('Clear Liquid', 'http://www.cornellsurgery.org/colonrectal/instructions/cle_liq.html', '3', 'Diets', '');	
		//navLinks[navc++] = new LeftLink('Ileostomy', 'http://www.cornellsurgery.org/colonrectal/instructions/ile.html', '3', 'Diets', '');	
		navLinks[navc++] = new LeftLink('Fiber-Restricted', 'http://www.cornellsurgery.org/colonrectal/instructions/fib_res.html', '3', 'Diets', '');	
				
	} else if (active == "six") {
		var navc = 0;
		
		navLinks[navc++] = new LeftLink('How to Refer a Patient', 'http://www.cornellsurgery.org/colonrectal/pro/index.html', '2', '', '');	
		navLinks[navc++] = new LeftLink('Continuing Medical Education', 'http://www.cornellsurgery.org/colonrectal/pro/com_med.html', '2', '', '');	

	} 
	// returning the value here, don't touch
	return (navLinks);
}


