//////////////////////////////////////////////////////////////////
//																//
//	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.cornelldermatology.org/images/header/abo_us_on.gif";
	one_off= new Image; one_off.src="http://www.cornelldermatology.org/images/header/abo_us_off.gif";

	two_on= new Image; two_on.src="http://www.cornelldermatology.org/images/header/cli_ser_on.gif";
	two_off= new Image; two_off.src="http://www.cornelldermatology.org/images/header/cli_ser_off.gif";

	three_on= new Image; three_on.src="http://www.cornelldermatology.org/images/header/der_az_on.gif";
	three_off= new Image; three_off.src="http://www.cornelldermatology.org/images/header/der_az_off.gif";

	four_on= new Image; four_on.src="http://www.cornelldermatology.org/images/header/residency_on.gif";
	four_off= new Image; four_off.src="http://www.cornelldermatology.org/images/header/residency_off.gif";

	five_on= new Image; five_on.src="http://www.cornelldermatology.org/images/header/research_on.gif";
	five_off= new Image; five_off.src="http://www.cornelldermatology.org/images/header/research_off.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/cornelldermatology/pano_home.swf";
	//http://media.med.cornell.edu/panoramas/cornelldermatology/pano_home.swf";
} else if (active == "one") {
	//panoLoc = "http://media.med.cornell.edu/panoramas/cornelldermatology/pano_" + active + ".swf";
	panoLoc = "http://media.med.cornell.edu/panoramas/wmc/cumc/pano_one.swf";
} else if (active == "two") {
	//panoLoc = "http://media.med.cornell.edu/panoramas/cornelldermatology/pano_" + active + ".swf";
	panoLoc = "http://media.med.cornell.edu/panoramas/wmc/cumc/pano_one.swf";
} else if (active == "three") {
	//panoLoc = "http://media.med.cornell.edu/panoramas/cornelldermatology/pano_" + active + ".swf";
	panoLoc = "http://media.med.cornell.edu/panoramas/wmc/cumc/pano_one.swf";
} else if (active == "four") {
	//panoLoc = "http://media.med.cornell.edu/panoramas/cornelldermatology/pano_" + active + ".swf";
	panoLoc = "http://media.med.cornell.edu/panoramas/wmc/cumc/pano_one.swf";
} else if (active == "five") {
	//panoLoc = "http://media.med.cornell.edu/panoramas/cornelldermatology/pano_" + active + ".swf";
	panoLoc = "http://media.med.cornell.edu/panoramas/wmc/cumc/pano_one.swf";
} else { //default to this just in case
	//panoLoc = "http://media.med.cornell.edu/panoramas/cornelldermatology/pano.swf";
	panoLoc = "http://media.med.cornell.edu/panoramas/wmc/cumc/pano_one.swf";
}
		
// set animation to true or false		
inAnimation			= "true";

// static pano: use this if using one pano for the whole site
//altPanoLoc = "http://images.med.cornell.edu/panoramas/www/pano_" + active + ".jpg";
// static pano: use this if using different pano for each section

if (active == "home") {
	altPanoLoc = "http://www.cornelldermatology.org/images/panoramas/pano_home.jpg";
} else if (active == "one") {
	altPanoLoc = "http://www.cornelldermatology.org/images/panoramas/pano_" + active + ".jpg";
} else if (active == "two") {
	altPanoLoc = "http://www.cornelldermatology.org/images/panoramas/pano_" + active + ".jpg";
} else if (active == "three") {
	altPanoLoc = "http://www.cornelldermatology.org/images/panoramas/pano_" + active + ".jpg";
} else  if (active == "four") {
	altPanoLoc = "http://www.cornelldermatology.org/images/panoramas/pano_" + active + ".jpg";
} else  if (active == "five") {
	altPanoLoc = "http://www.cornelldermatology.org/images/panoramas/pano_" + active + ".jpg";
} else { //default to this just in case
	altPanoLoc = "http://www.cornelldermatology.org/images/panoramas/pano.jpg";
}		
		
// set xml data for pano flash here
dataLoc				= "http://global.med.cornell.edu/panoramas/cornelldermatology/pano.xml";

//set to allow script access

allowScriptAccess = "always";




// set this line to the location of the temp toolbar when working on the www server. comment it out to move to production
toolBarLoc			= "http://media.med.cornell.edu/panoramas/framework_toolbar" + homeWrapper + ".swf";
//http://www.med.cornell.edu/development/media/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, "#");
buttonArray[1]		= new createButtonObject ( 3, "#");
buttonArray[2]		= new createButtonObject ( 3, "http://www.cornelldermatology.com/contact.html");
buttonArray[3]		= new createButtonObject ( 10, "#");

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

siteURL 			= "http://www.cornelldermatology.org";	

// ::::::::::::::::::::::::::: 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('Clinical Faculty and Physicians','http://www.cornelldermatology.com/abo_us/our_fac.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Research Faculty','http://www.cornelldermatology.com/abo_us/rea_fac.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Residents and Fellows','http://www.cornelldermatology.com/abo_us/res_fel.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Maps and Directions','http://www.cornelldermatology.com/abo_us/map_dir.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Our New Headquarters','http://www.cornelldermatology.com/abo_us/new_hea.html', '2', '', '');
		navLinks[navc++] = new LeftLink('News and Events','http://www.cornelldermatology.com/abo_us/new_eve.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Schedule of Grand Rounds and Conferences','http://www.cornelldermatology.com/abo_us/sch_gra_rou.html', '3', 'News and Events', '');
		
	}  else if (active == "two") {
	
		var navc = 0;
		
		navLinks[navc++] = new LeftLink('General Dermatology','#', '2', '', '');
		navLinks[navc++] = new LeftLink('Cosmetic and Laser Dermatology','#', '2', '', '');
		navLinks[navc++] = new LeftLink('Dermatologic and Mohs Micrographic Surgery','#', '2', '', '');
		navLinks[navc++] = new LeftLink('Pediatric Dermatology','#', '2', '', '');
		navLinks[navc++] = new LeftLink('Pigmented Lesion Unit','#', '2', '', '');
		navLinks[navc++] = new LeftLink('Sexually Transmitted Diseases','#', '2', '', '');


	}  else if (active == "four") {
	
		var navc = 0;
		
		navLinks[navc++] = new LeftLink('Training Program Goals','http://www.cornelldermatology.com/residency/tra_pro_goa.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Training Facilities','http://www.cornelldermatology.com/residency/tra_fac.html', '2', '', '');
		navLinks[navc++] = new LeftLink('The Clinical Experience','http://www.cornelldermatology.com/residency/cli_exp.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Resident Rotations','http://www.cornelldermatology.com/residency/res_rot.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Schedule of Grand Rounds and Conferences','http://www.cornelldermatology.com/residency/sch_gra_rou.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Stipends and Benefits','http://www.cornelldermatology.com/residency/sti_ben.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Resident/Faculty Evaluations','http://www.cornelldermatology.com/residency/res_fac.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Career Paths of Program Graduates','http://www.cornelldermatology.com/residency/car_pat_pro_gra.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Application and Interview','http://www.cornelldermatology.com/residency/app_int.html', '2', '', '');

	} else if (active == "five") {
	
		var navc = 0;
	
		navLinks[navc++] = new LeftLink('Laboratory Investigations','http://www.cornelldermatology.com/research/lab_inv.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Clinical Research','http://www.cornelldermatology.com/research/cli_res.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Recent Publications','http://www.cornelldermatology.com/research/rec_pub.html', '2', '', '');
		navLinks[navc++] = new LeftLink('Research Faculty','http://www.cornelldermatology.com/research/rea_fac.html', '2', '', ''); 
				
	}
		
	// 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 twoNav4Links = new Array();
var threeNav4Links = new Array();
var fourNav4Links = new Array();
var fiveNav4Links =  new Array();
var allNav4Pages = new Array();

  if (active == "five") {
 
 // customize 4th level navigation links here
	
 	oneNav4Links[0] = new LeftLink('Mission Statements','http://www.cornelldermatology.com/res_pro/cen_mul_min_hea2.html', '4', 'Center for Multicultural and Minority Health', '');
	oneNav4Links[1] = new LeftLink('Our Medicine Residents','http://www.cornelldermatology.com/res_pro/cen_mul_min_hea3.html', '4', 'Center for Multicultural and Minority Health', '');
	oneNav4Links[2] = new LeftLink('Minority House Staff Mentorship System','http://www.cornelldermatology.com/res_pro/cen_mul_min_hea4.html', '4', 'Center for Multicultural and Minority Health', '');
	
	allNav4Pages[0] = new Nav4Page('http://www.cornelldermatology.com/res_pro/cen_mul_min_hea.html', oneNav4Links);
	allNav4Pages[1] = new Nav4Page('http://www.cornelldermatology.com/res_pro/cen_mul_min_hea2.html', oneNav4Links);
	allNav4Pages[2] = new Nav4Page('http://www.cornelldermatology.com/res_pro/cen_mul_min_hea3.html', oneNav4Links);
	allNav4Pages[3] = new Nav4Page('http://www.cornelldermatology.com/res_pro/cen_mul_min_hea4.html', oneNav4Links);
 
 } else if (active == "six") {
 
 // customize 4th level navigation links here
	
 	oneNav4Links[0] = new LeftLink('Training Overview', 'http://www.cornelldermatology.com/fellowships/car_tra_ove.html', '4', 'Cardiology', '');
	oneNav4Links[1] = new LeftLink('Programs and Research Activities', 'http://www.cornelldermatology.com/fellowships/car_pro_res.html', '4', 'Cardiology', '');
	oneNav4Links[2] = new LeftLink('Basic Research and Molecular Cardiology','http://www.cornelldermatology.comfellowships/car_bas_res.html', '4', 'Cardiology', '');
	
	twoNav4Links[0] = new LeftLink('About the Program', 'http://www.cornelldermatology.com/fellowships/gas_abo.html', '4', 'Gastroenterology and Hepatology', '');
	twoNav4Links[1] = new LeftLink('Application Process', 'http://www.cornelldermatology.com/fellowships/gas_des.html', '4', 'Gastroenterology and Hepatology', '');
	
	threeNav4Links[0] = new LeftLink('Research Project', 'http://www.cornelldermatology.com/fellowships/gen_res_pro.html', '4', 'General Internal Medicine', '');
	threeNav4Links[1] = new LeftLink('Master of Science Degree', 'http://www.cornelldermatology.com/fellowships/gen_mas_sci.html', '4', 'General Internal Medicine', '');
	threeNav4Links[2] = new LeftLink('Trainees', 'http://www.cornelldermatology.com/fellowships/gen_tra.html', '4', 'General Internal Medicine', '');
	threeNav4Links[3] = new LeftLink('Application Process', 'http://www.cornelldermatology.com/fellowships/gen_app_pro.html', '4', 'General Internal Medicine', '');
	
	fourNav4Links[0] = new LeftLink('Application Process', 'http://www.cornelldermatology.com/fellowships/imm_app.html', '4', 'Immunology', '');
	
	fiveNav4Links[0] = new LeftLink('International Health Care Service (IHCS)', 'http://www.cornelldermatology.com/fellowships/ihcs.html', '4', 'International Medicine and Infectious Diseases', '');
	
	allNav4Pages[0] = new Nav4Page('http://www.cornelldermatology.com/fellowships/gas_hep.html', twoNav4Links);
	allNav4Pages[1] = new Nav4Page('http://www.cornelldermatology.com/fellowships/gas_des.html', twoNav4Links);
	allNav4Pages[2] = new Nav4Page('http://www.cornelldermatology.com/fellowships/gas_abo.html', twoNav4Links);	
	allNav4Pages[3] = new Nav4Page('http://www.cornelldermatology.com/fellowships/car_tra_ove.html', oneNav4Links);
	allNav4Pages[4] = new Nav4Page('http://www.cornelldermatology.com/fellowships/car_pro_res.html', oneNav4Links);
	allNav4Pages[5] = new Nav4Page('http://www.cornelldermatology.com/fellowships/car_bas_res.html', oneNav4Links);
	allNav4Pages[6] = new Nav4Page('http://www.cornelldermatology.com/fellowships/cardiology.html', oneNav4Links);
	allNav4Pages[7] = new Nav4Page('http://www.cornelldermatology.com/fellowships/adu_ech.html', oneNav4Links);
	allNav4Pages[8] = new Nav4Page('http://www.cornelldermatology.com/fellowships/car_cat.html', oneNav4Links);
	allNav4Pages[9] = new Nav4Page('http://www.cornelldermatology.com/fellowships/car_ele.html', oneNav4Links);
	allNav4Pages[10] = new Nav4Page('http://www.cornelldermatology.com/fellowships/car_gra.html', oneNav4Links);
	allNav4Pages[11] = new Nav4Page('http://www.cornelldermatology.com/fellowships/cli_car.html', oneNav4Links);
	allNav4Pages[12] = new Nav4Page('http://www.cornelldermatology.com/fellowships/nuc_car.html', oneNav4Links); 	
	allNav4Pages[13] = new Nav4Page('http://www.cornelldermatology.com/fellowships/gen_res_pro.html', threeNav4Links);
	allNav4Pages[14] = new Nav4Page('http://www.cornelldermatology.com/fellowships/gen_mas_sci.html', threeNav4Links);
	allNav4Pages[15] = new Nav4Page('http://www.cornelldermatology.com/fellowships/gen_tra.html', threeNav4Links);
	allNav4Pages[16] = new Nav4Page('http://www.cornelldermatology.com/fellowships/gen_app_pro.html', threeNav4Links);
	allNav4Pages[17] = new Nav4Page('http://www.cornelldermatology.com/fellowships/gen_int_med.html', threeNav4Links);	
	allNav4Pages[18] = new Nav4Page('http://www.cornelldermatology.com/fellowships/immunology.html', fourNav4Links);
	allNav4Pages[19] = new Nav4Page('http://www.cornelldermatology.com/fellowships/imm_app.html', fourNav4Links);	
	allNav4Pages[20] = new Nav4Page('http://www.cornelldermatology.com/fellowships/ihcs.html', fiveNav4Links);
	allNav4Pages[21] = new Nav4Page('http://www.cornelldermatology.com/fellowships/int_med_inf_dis.html', fiveNav4Links);
 } 
	
 
// 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();
}