//////////////////////////////////////////////////////////////////

//																//

//	Weill Cornell Medical College								//

//	cornellanesthesia.org site javascript						//

//	cornellanesthesia.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.cornellanesthesia.org/images/header/abo_on.gif";

	one_off= new Image; one_off.src="http://www.cornellanesthesia.org/images/header/abo_off.gif";



	two_on= new Image; two_on.src="http://www.cornellanesthesia.org/images/header/ane_exp_on.gif";

	two_off= new Image; two_off.src="http://www.cornellanesthesia.org/images/header/ane_exp_off.gif";



	three_on= new Image; three_on.src="http://www.cornellanesthesia.org/images/header/research_on.gif";

	three_off= new Image; three_off.src="http://www.cornellanesthesia.org/images/header/research_off.gif";

	

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

	four_off= new Image; four_off.src="http://www.cornellanesthesia.org/images/header/residency_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 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/cornellanesthesia/pano_home1.swf";

} else if (active == "one") {

	panoLoc = "http://media.med.cornell.edu/panoramas/cornellanesthesia/pano_" + active + ".swf";

} else if (active == "two") {

	panoLoc = "http://media.med.cornell.edu/panoramas/cornellanesthesia/pano_" + active + ".swf";

} else if (active == "three") {

	panoLoc = "http://media.med.cornell.edu/panoramas/cornellanesthesia/pano_" + active + ".swf";

} else if (active == "four") {

	panoLoc = "http://media.med.cornell.edu/panoramas/cornellanesthesia/pano_" + active + ".swf";

} else { //default to this just in case

	panoLoc = "http://media.med.cornell.edu/panoramas/cornellanesthesia/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://www.cornellanesthesia.org/images/panoramas/images/panoramas/pano_home.jpg";

} else if (active == "one") {

	altPanoLoc = "http://www.cornellanesthesia.org/images/panoramas/images/panoramas/pano_" + active + ".jpg";

} else if (active == "two") {

	altPanoLoc = "http://www.cornellanesthesia.org/images/panoramas/images/panoramas/pano_" + active + ".jpg";

} else if (active == "three") {

	altPanoLoc = "http://www.cornellanesthesia.org/images/panoramas/pano_" + active + ".jpg";

} else  if (active == "four") {

	altPanoLoc = "http://www.cornellanesthesia.org/images/panoramas/pano_" + active + ".jpg";

} else  if (active == "five") {

	altPanoLoc = "http://www.cornellanesthesia.org/images/panoramas/pano_" + active + ".jpg";

} else  if (active == "six") {

	altPanoLoc = "http://www.cornellanesthesia.org/images/panoramas/pano_" + active + ".jpg";

} else { //default to this just in case

	altPanoLoc = "http://www.cornellanesthesia.org/images/panoramas/images/panoramas/pano.jpg";

}		

	



// set xml data for pano flash here

dataLoc				= "http://www.cornellanesthesia.org/data/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";



// 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://www.cornellanesthesia.org/abo_us/fac_ros.html?name1=Faculty+Roster&type1=2Active");

buttonArray[1]		= new createButtonObject ( 5, "http://www.med.cornell.edu/search/");

buttonArray[2]		= new createButtonObject ( 8, "http://www.cornellanesthesia.org/maps.html");

buttonArray[3]		= new createButtonObject ( 5, "http://www.cornellanesthesia.org/contact.html");



// setting the array, don't touch

additionalMapArray	= new Array ();



// lefthand nav homepage link

siteURL = "http://www.cornellanesthesia.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('News and Events', 'http://www.cornellanesthesia.org/abo_us/new_eve.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Pain Medicine Center', 'http://www.med.cornell.edu/painmedicine/', '2', '', '');

		navLinks[navc++] = new LeftLink('Weill Cornell Anesthesiology Associates', 'http://www.cornellanesthesia.org/abo_us/cor_ane.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Our Faculty', 'http://www.cornellanesthesia.org/abo_us/fac_ros.html', '2', '', '');

	



	}  else if (active == "two") {

		

	    var navc = 0;

	    

	    navLinks[navc++] = new LeftLink('Patient Guide to the Anesthetic Experience', 'http://www.cornellanesthesia.org/ane_exp/guide.html', '2', '', '');

	    navLinks[navc++] = new LeftLink('Types of Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/types.html', '2', 'The Anesthetic Experience', '');

		navLinks[navc++] = new LeftLink('Moderate (formerly Conscious) Sedation', 'http://www.cornellanesthesia.org/ane_exp/mod_sed.html', '3', 'The Anesthetic Experience', '');	

		navLinks[navc++] = new LeftLink('Regional Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/reg_ane.html', '3', 'The Anesthetic Experience', '');	

		navLinks[navc++] = new LeftLink('General Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/gen_ane.html', '3', 'The Anesthetic Experience', '');	

		navLinks[navc++] = new LeftLink('Pain Management', 'http://www.cornellanesthesia.org/ane_exp/pai_man.html', '2', 'The Anesthetic Experience', '');	

		navLinks[navc++] = new LeftLink('Billing Help', 'http://www.cornellanesthesia.org/ane_exp/billing.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Pre-admission Testing', 'http://www.cornellanesthesia.org/ane_exp/pre_test.html', '2', '', '');

	    navLinks[navc++] = new LeftLink('Before Your Procedure Visit EMMI Online', 'http://www.cornellanesthesia.org/ane_exp/emmi.html', '2', '', '');	

	    

		/* Old Subspecialties

		navLinks[navc++] = new LeftLink('Pediatric Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/ped_ane.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Obstetric Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/obs_ane.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Cardiothoracic Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/car_ane.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Vascular Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/vas_ane.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Neuroanesthesia', 'http://www.cornellanesthesia.org/ane_exp/neu_ane.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Orthopedic Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/ort_ane.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Ambulatory Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/amb_ane.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Geriatric Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/ger_ane.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Bariatric Anesthesia', 'http://www.cornellanesthesia.org/ane_exp/bar_ane.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Critical Care', 'http://www.cornellanesthesia.org/ane_exp/cri_car.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Pain Management', 'http://www.cornellanesthesia.org/ane_exp/pai_man.html', '2', '', '');	

		*/	

	} else if (active == "three") {

		

	    var navc = 0;

	    /* Old Links as of April 21st 2008

		navLinks[navc++] = new LeftLink('Faculty Publications', 'http://www.cornellanesthesia.org/research/fac_pub.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Research Faculty', 'http://www.cornellanesthesia.org/research/res_inf.html', '2', '', '');

		*/
		
		/* New Links as of April 21st 2008 */
		
		navLinks[navc++] = new LeftLink('Research Faculty', '/research/res_inf.html', '2', '', '');
		
		navLinks[navc++] = new LeftLink('Basic Science Research', '/research/bas_sci_res.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Clinical Research', '/research/cli_res.html', '2', '', '');
		
		navLinks[navc++] = new LeftLink('Publications', '/research/pubs.html', '2', '', '');
		
			navLinks[navc++] = new LeftLink('2008', '/research/pubs-2008.html', '3', '', '');
			navLinks[navc++] = new LeftLink('2007', '/research/pubs.html', '3', '', '');
		
			navLinks[navc++] = new LeftLink('2006', '/research/pubs-2006.html', '3', '', '');
		
			navLinks[navc++] = new LeftLink('2005', '/research/pubs-2005.html', '3', '', '');

			navLinks[navc++] = new LeftLink('2004', '/research/pubs-2004.html', '3', '', '');
		
			navLinks[navc++] = new LeftLink('2003', '/research/pubs-2003.html', '3', '', '');
		
			navLinks[navc++] = new LeftLink('2002', '/research/pubs-2002.html', '3', '', '');
		
			navLinks[navc++] = new LeftLink('2001', '/research/pubs-2001.html', '3', '', '');
			
			navLinks[navc++] = new LeftLink('2000', '/research/pubs-2000.html', '3', '', '');
		
		navLinks[navc++] = new LeftLink('Conferences', '/research/cons.html', '2', '', '');
		
		navLinks[navc++] = new LeftLink('Expo 2008', '/research/expo2008.html', '2', '', '');
		
		//navLinks[navc++] = new LeftLink('Residents & Fellow Research', '/research/res_fel_res.html', '2', '', '');
		

	} else if (active == "four") {



	    var navc = 0;

	    

		navLinks[navc++] = new LeftLink('Mission', 'http://www.cornellanesthesia.org/residency/mission.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Welcome from the Chairman', 'http://www.cornellanesthesia.org/residency/let_fro_cha.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Rotations', 'http://www.cornellanesthesia.org/residency/rotations.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Conferences', 'http://www.cornellanesthesia.org/residency/conferences.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Anesthesiology Research Scholarship', 'http://www.cornellanesthesia.org/residency/scholarship.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Residency Classes', 'http://www.cornellanesthesia.org/residency/cur_res.html', '2', '', '');
		
		navLinks[navc++] = new LeftLink('Class of 2012', 'http://www.cornellanesthesia.org/residency/2012.html', '3', 'Current Residents', '');
		
		navLinks[navc++] = new LeftLink('Class of 2011', 'http://www.cornellanesthesia.org/residency/2011.html', '3', 'Current Residents', '');
		
		navLinks[navc++] = new LeftLink('Class of 2010', 'http://www.cornellanesthesia.org/residency/pgy1.html', '3', 'Current Residents', '');
		
		navLinks[navc++] = new LeftLink('Class of 2009', 'http://www.cornellanesthesia.org/residency/ca1.html', '3', 'Current Residents', '');
		
		navLinks[navc++] = new LeftLink('Class of 2008', 'http://www.cornellanesthesia.org/residency/ca2.html', '3', 'Current Residents', '');
		
		navLinks[navc++] = new LeftLink('Class of 2007', 'http://www.cornellanesthesia.org/residency/ca3.html', '3', 'Current Residents', '');
		

		navLinks[navc++] = new LeftLink('Class of 2006', 'http://www.cornellanesthesia.org/residency/rec_pla_2006.html', '3', 'Current Residents', '');

		navLinks[navc++] = new LeftLink('Class of 2005', 'http://www.cornellanesthesia.org/residency/rec_pla_2005.html', '3', 'Current Residents', '');

		navLinks[navc++] = new LeftLink('Class of 2004', 'http://www.cornellanesthesia.org/residency/rec_pla_2004.html', '3', 'Current Residents', '');

		navLinks[navc++] = new LeftLink('Class of 2003', 'http://www.cornellanesthesia.org/residency/rec_pla_2003.html', '3', 'Current Residents', '');

		navLinks[navc++] = new LeftLink('Class of 2002', 'http://www.cornellanesthesia.org/residency/rec_pla_2002.html', '3', 'Current Residents', '');

		//navLinks[navc++] = new LeftLink('Internship Year', 'http://www.cornellanesthesia.org/residency/int_yea.html', '3', '', '');

		navLinks[navc++] = new LeftLink('Fellowships', 'http://www.cornellanesthesia.org/residency/fellowships.html', '2', '', '');

		//navLinks[navc++] = new LeftLink('Fellowship Application ', 'http://www.cornellanesthesia.org/pdf/fellowship_application.doc', '3', 'Fellowships', '');

		//navLinks[navc++] = new LeftLink('Thoracic Anesthesia ', 'http://www.cornellanesthesia.org/residency/fel_thoracic.html', '3', 'Fellowships', '');

		navLinks[navc++] = new LeftLink('Medical Students', 'http://www.cornellanesthesia.org/residency/med_stu.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Benefits and Salary', 'http://www.cornellanesthesia.org/residency/ben_sal.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Our Neighborhood', 'http://www.cornellanesthesia.org/residency/neighborhood.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Application FAQs', 'http://www.cornellanesthesia.org/residency/app_faq.html', '2', '', '');

		//navLinks[navc++] = new LeftLink('Contact Us', 'http://www.cornellanesthesia.org/residency/contact.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 allNav4Pages = new Array();

	if (active == "five") { 

 	// customize 4th level navigation links here

 	/*

 	Cardiac Anesthesia

	Obstetrical Anesthesia

	Pediatric Anesthesiology

	Anesthesia for Burns

	Neuroanesthesia

	Thoracic Anesthesia

	Vascular Anesthesia

	Critical Care

	Acute & Chronic Pain Management

	Orthopedic & Regional Anesthesia

	Memorial Sloan-Kettering Cancer Center 

	*/



	var navc = 0;

 

	oneNav4Links[0] = new LeftLink('Cardiac Anesthesia', 'http://www.cornellanesthesia.org/residency/car_ane.html', '4', 'Rotations', '');

	oneNav4Links[1] = new LeftLink('Obstetrical Anesthesia', 'http://www.cornellanesthesia.org/residency/obs_ane.html', '4', 'Rotations', '');

	oneNav4Links[2] = new LeftLink('Pediatric Anesthesiology', 'http://www.cornellanesthesia.org/residency/ped_ane.html', '4', 'Rotations', '');

	oneNav4Links[3] = new LeftLink('Anesthesia for Burns', 'http://www.cornellanesthesia.org/residency/ane_bur.html', '4', 'Rotations', '');

	oneNav4Links[4] = new LeftLink('Neuroanesthesia', 'http://www.cornellanesthesia.org/residency/neu_ane.html', '4', 'Rotations', '');

	oneNav4Links[5] = new LeftLink('Thoracic Anesthesia', 'http://www.cornellanesthesia.org/residency/tho_ane.html', '4', 'Rotations', '');

	oneNav4Links[6] = new LeftLink('Vascular Anesthesia', 'http://www.cornellanesthesia.org/residency/vas_ane.html', '4', 'Rotations', '');

	oneNav4Links[7] = new LeftLink('Critical Care', 'http://www.cornellanesthesia.org/residency/cri_car.html', '4', 'Rotations', '');

	oneNav4Links[8] = new LeftLink('Acute and Chronic Pain Management', 'http://www.cornellanesthesia.org/residency/acu_chr_pai.html', '4', 'Rotations', '');

	oneNav4Links[9] = new LeftLink('Hospital for Special Surgery', 'http://www.cornellanesthesia.org/residency/ort_reg.html', '4', 'Rotations', '');

	oneNav4Links[10] = new LeftLink('Memorial Sloan-Kettering Cancer Center', 'http://www.cornellanesthesia.org/residency/mem_slo.html', '4', 'Rotations', '');



	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/car_ane.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/obs_ane.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/ped_ane.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/ane_bur.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/neu_ane.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/tho_ane.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/vas_ane.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/cri_car.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/acu_chr_pai.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/ort_reg.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/mem_slo.html', oneNav4Links);

	allNav4Pages[navc++] = new Nav4Page('http://www.cornellanesthesia.org/residency/rotations.html', oneNav4Links);



	

 

 } 

 

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

}



// Expanding Questions/Answers Javascript



var ids=new Array();



function QAinit(){

	if(document.getElementById) {

		var tids=document.getElementsByTagName('div');

		for(i=0;i<tids.length;i++)if(tids[i].className=="expand")ids[ids.length]=tids[i];

		for(i=0;i<ids.length;i++)ids[i].onmouseup=setstate;

	}

}



function setstate(){	



	for(i=0;i<ids.length;i++) {

		//ids[i].style.display="block";

		ids[i].style.visibility="";

		ids[i].style.height="";



	}

	

	if(this.className=="expand")this.style.visibility="hidden";

	if(this.className=="expand")this.style.height="0";



	

	for(i=0;i<ids.length;i++) {

	ids[i].parentNode.getElementsByTagName('div')[1].style.display="none";

	}

	

	for(i=0;i<ids.length;i++) {

		if(ids[i]==this){

			var d=this.parentNode.getElementsByTagName('div')[1];

		if(d.style.display=="block")d.style.display="none";

		else d.style.display="block";

		}

	}



}



function expandall(){

if(document.getElementById){

for(i=0;i<ids.length;i++)ids[i].parentNode.getElementsByTagName('div')[1].style.display="block";

}}



function collapseall(){

if(document.getElementById){

for(i=0;i<ids.length;i++)ids[i].parentNode.getElementsByTagName('div')[1].style.display="none";

}}