//////////////////////////////////////////////////////////////////

//																//

//	NewYork-Presbyterian Hospital								//

//	nyprehabmed.org site javascript	        					//

//	nyprehabmed.js										        //

//	Version 2.0													//

//																//

//////////////////////////////////////////////////////////////////



if ( browser )

{

		one_on= new Image; one_on.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav1_on.gif";

		one_off= new Image; one_off.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav1.gif";

		one_active= new Image; one_active.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav1_on.gif";

		

		two_on= new Image; two_on.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav2_on.gif";

		two_off= new Image; two_off.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav2.gif";

		two_active= new Image; two_active.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav2_on.gif";

		

		three_on= new Image; three_on.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav3_on.gif";

		three_off= new Image; three_off.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav3.gif";

		three_active= new Image; three_active.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav3_on.gif";

		

		four_on= new Image; four_on.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav4_on.gif";

		four_off= new Image; four_off.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav4.gif";

		four_active= new Image; four_active.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav4_on.gif";

		

		five_on= new Image; five_on.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav5_on.gif";

		five_off= new Image; five_off.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav5.gif";

		five_active= new Image; five_active.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav5_on.gif";

		

		six_on= new Image; six_on.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav6_on.gif";

		six_off= new Image; six_off.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav6.gif";

		six_active= new Image; six_active.src="http://images.med.cornell.edu/headers/navbar/nyprehabmed/nav6_on.gif";

						

}						



// ::::::::::::::::::::::::::: 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 == "" && activeHome == "home") {

	panoLoc = "http://media.med.cornell.edu/panoramas/nyprehabmed/homepage.swf";

} else if (active == "one") {

	panoLoc = "http://media.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".swf";

} else if (active == "two") {

	panoLoc = "http://media.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".swf";

} else if (active == "three") {

	panoLoc = "http://media.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".swf";

} else if (active == "four") {

	panoLoc = "http://media.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".swf";

} else if (active == "five") {

	panoLoc = "http://media.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".swf";

} else if (active == "six") {

	panoLoc = "http://media.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".swf";

} else { //default to this just in case

	panoLoc = "http://media.med.cornell.edu/panoramas/nyprehabmed/pano_home.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/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/nyprehabmed/homepage.jpg";

} else if (active == "one") {

	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".jpg";

} else if (active == "two") {

	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".jpg";

} else if (active == "three") {

	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".jpg";

} else  if (active == "four") {

	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".jpg";

} else  if (active == "five") {

	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".jpg";

} else  if (active == "six") {

	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyprehabmed/pano_" + active + ".jpg";

} else { //default to this just in case

	altPanoLoc = "http://images.med.cornell.edu/panoramas/nyprehabmed/pano_home.jpg";

}		

	

// insert homepage url here, this is for lefthand navs homepage link	

siteURL 			= "http://www.nyprehabmed.org";



// set xml data for pano flash here

dataLoc				= "http://global.med.cornell.edu/panoramas/nyprehabmed/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://www.nyprehabmed.org/media_temp/panoramas/framework_toolbar" + homeWrapper + ".swf";



// set loading value here: wmc or nyp

brand				= "nyp";



//for the flash color bar

barColor = "";



if (brand == "nyp") {

	if (active == "one") {

		barColor = "#999966";

	} else if (active == "two") {

		barColor = "#669999";

	} else if (active == "three") {

		barColor = "#aeae68";

	} else if (active == "four") {

		barColor = "#7796a6";

	} else if (active == "five") {

		barColor = "#7d8f74";

	} else if (active == "six") {

		barColor = "#7dad91";

	} else {

		barColor = "#677f7f";

	}

} else if (brand == "wmc") {

	barColor = "#A79D8E";

}



// 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/PhysSearchCriteria.asp");

buttonArray[1]		= new createButtonObject ( 4, "http://www.nyp.org/search/search_advanced.html");

buttonArray[2]		= new createButtonObject ( 6, "http://www.nyprehabmed.org/about/3_10-Contact_Us.html");

buttonArray[3]		= new createButtonObject ( 6, "http://www.nyprehabmed.org/about/3_8-Making_Gift.html");					

buttonArray[4]		= new createButtonObject ( 8, "http://www.nyp.org/maps/index.html");



// setting the array, don't touch

additionalMapArray	= new Array ();


// VARIABLES FOR WEB TRENDS
//var gFpcDom=".nyppsychiatry.org";
var gDomain="cds.nyprehabmed.org";
var gDcsId="dcsmql5hji711rsfjz0x8gsg8_6u6z";

function sectionName() {
	var activeSectionName = "";
	if (active == "one") {
		activeSectionName = "About Us";
	} else if (active == "two") {
		activeSectionName = "Rehabilitation Services";
	} else if (active == "three") {
		activeSectionName = "Rehabilitation A to Z";
	} else if (active == "four") {
		activeSectionName = "For Patients";
	} else if (active == "five") {
		activeSectionName = "For Professionals";
	} else if (active == "six") {
		activeSectionName = "Education";
	} else if (active == "") {
		if (activeHome == "home") {
			activeSectionName = "Home";
		} else {
			activeSectionName = "Toolbar:Quick Info";
		}
	} 
	return activeSectionName;
}


// ::::::::::::::::::::::::::: 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;
	    
		// customize section one, 2nd and 3rd level navigation links here

		navLinks[navc++] = new LeftLink('Message from the Chair', 'http://www.nyprehabmed.org/about/message.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Our Staff', 'http://www.nyprehabmed.org/about/3_1-Our_Staff.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Physiatrist-in-Chief', 'http://www.nyprehabmed.org/about/3_1_1-Physiatrist_in_Chief.html', '3', 'Our Staff', '');

		navLinks[navc++] = new LeftLink('Administration', 'http://www.nyprehabmed.org/about/3_1_2-About_Us_Admin.html', '3', 'Our Staff', '');

		navLinks[navc++] = new LeftLink('Our Doctors', 'http://www.nyprehabmed.org/about/Our_Doctors.html', '3', 'Our Staff', '');

		navLinks[navc++] = new LeftLink('Occupational Therapy', 'http://www.nyprehabmed.org/about/3_1_3-About_Us_OT.html', '3', 'Our Staff', '');

		navLinks[navc++] = new LeftLink('Physical Therapy', 'http://www.nyprehabmed.org/about/3_1_4-About_Us_PT.html', '3', 'Our Staff', '');

		navLinks[navc++] = new LeftLink('Speech-Language Pathology', 'http://www.nyprehabmed.org/about/3_1_5-About_Us_SLPTR.html', '3', 'Our Staff', '');

		navLinks[navc++] = new LeftLink('Therapeutic Recreation', 'http://www.nyprehabmed.org/about/3_1_6-About_Us_TR.html', '3', 'Our Staff', '');

		navLinks[navc++] = new LeftLink('Our Mission', 'http://www.nyprehabmed.org/about/3_2-Mission.html', '2', '', '');

		navLinks[navc++] = new LeftLink('News and Special Features', 'http://www.nyprehabmed.org/about/3_3-Features.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Publications, Projects, and Research', 'http://www.nyprehabmed.org/about/3_5-Publications_Research.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Our History: NewYork-Presbyterian Hospital/Columbia', 'http://www.nyprehabmed.org/about/3_6-CPMC_History.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Our History: NewYork-Presbyterian Hospital/Weill Cornell', 'http://www.nyprehabmed.org/about/3_7-NYWC_History.html', '2', '', '');

		navLinks[navc++] = new LeftLink('How to Volunteer', 'http://www.nyprehabmed.org/about/3_9-Volunteer.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Contact Us', 'http://www.nyprehabmed.org/about/3_10-Contact_Us.html', '2', '', '');

	    

	}  else if (active == "four") {

		var navc = 0;		

		// customize section four 2nd and 3rd level navigation links here

	    navLinks[navc++] = new LeftLink('Outpatient Therapy', 'http://www.nyprehabmed.org/patients/6_3-Patient_Outs.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Inpatient Rehabilitation', 'http://www.nyprehabmed.org/patients/6_1_Patient_IRU.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Your Hospitalization', 'http://www.nyprehabmed.org/patients/6_2-Patient_Acute.html', '2', '', '');

		navLinks[navc++] = new LeftLink('Frequently Asked Questions', 'http://www.nyprehabmed.org/about/3_4-FAQS.html', '2', '', '');

		

	}  else if (active == "five") {

		var navc = 0;

		// customize section five, 2nd and 3rd level navigation links here

	   /* navLinks[navc++] = new LeftLink('Referring a Patient for Outpatient Therapy', 'http://www.nyprehabmed.org/pro/7_1-Referring_Outs.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Referring a Patient to Inpatient Rehabilitation', 'http://www.nyprehabmed.org/pro/7_2-Admitting_IRU.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Referring a Patient for Acute Care Therapy Services', 'http://www.nyprehabmed.org/pro/7_3-Referring_Acute_Care.html', '2', '', '');	*/

		//navLinks[navc++] = new LeftLink('Inpatient Rehabilitation Units: Statistical Information', 'http://www.nyprehabmed.org/pro/stat_info.html', '2', '', '');		
		
		navLinks[navc++] = new LeftLink('Alumni Survey', 'http://www.nyprehabmed.org/education/res_pro_alu.html?name1=Residency+Program&type1=2Select&name2=Alumni+Survey&type2=3Active', '2', '', '');
		
		navLinks[navc++] = new LeftLink('Newsletters', 'http://www.nyprehabmed.org/pro/newsletters', '2', '', '');

	}  else if (active == "six") {
	
		var navc = 0;

		// customize section six, 2nd and 3rd level navigation links here

	    navLinks[navc++] = new LeftLink('Residency Program', 'http://www.nyprehabmed.org/education/8_1-Residency_Prog.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Structure', 'http://www.nyprehabmed.org/education/8_1_1-Res_Structure.html', '3', 'Residency Program','');	

		navLinks[navc++] = new LeftLink('Rotations PGY-2', 'http://www.nyprehabmed.org/education/8_1_2-Res_Rot_PGY2.html', '3', 'Residency Program','');

		navLinks[navc++] = new LeftLink('Rotations PGY-3', 'http://www.nyprehabmed.org/education/8_1_3-Res_Rot_PGY3.html', '3', 'Residency Program','');

		navLinks[navc++] = new LeftLink('Rotations PGY-4', 'http://www.nyprehabmed.org/education/8_1_4-Res_Rot_PGY4.html', '3', 'Residency Program','');

		navLinks[navc++] = new LeftLink('Curriculum', 'http://www.nyprehabmed.org/education/8_1_5-Res_Curriculum.html', '3', 'Residency Program','');

		navLinks[navc++] = new LeftLink('Application Process', 'http://www.nyprehabmed.org/education/8_1_6-Res_Application.html', '3', 'Residency Program','');	
		
		navLinks[navc++] = new LeftLink('Alumni Survey', 'http://www.nyprehabmed.org/education/res_pro_alu.html', '3', 'Residency Program','');	

		navLinks[navc++] = new LeftLink('Clinical Education Programs', 'http://www.nyprehabmed.org/education/8_2-Clin_Ed_Programs.html', '2', '', '');	

		navLinks[navc++] = new LeftLink('Occupational Therapy', 'http://www.nyprehabmed.org/education/8_2_1-Student_Prog_OT.html', '3', 'Clinical Education Programs', '');	

		navLinks[navc++] = new LeftLink('Physical Therapy', 'http://www.nyprehabmed.org/education/8_2_2-Student_Prog_PT.html', '3', 'Clinical Education Programs', '');

		navLinks[navc++] = new LeftLink('Speech-Language Pathology', 'http://www.nyprehabmed.org/education/8_2_3-Student_Prog_SLP.html', '3', 'Clinical Education Programs', '');

		navLinks[navc++] = new LeftLink('Therapeutic Recreation', 'http://www.nyprehabmed.org/education/8_2_4-Student_Prog-TR.html', '3', 'Clinical Education Programs', '');
		
		navLinks[navc++] = new LeftLink('Medical Student Electives', 'http://www.nyprehabmed.org/education/8_3-Student_Elect.html', '2', '', '');	
		
		
		

	}  else if (active == "") {

		

		if (activeTool == "maps") {

		

			navLinks[0] = new LeftLink('Directions to Columbia University Medical Center', 'http://www.nypdigestive.org/maps/cpmc_directions.html', '2', '', '');

			navLinks[1] = new LeftLink('Regional Map', 'http://www.nypdigestive.org/maps/cpmc_maps.html', '3', 'Directions to Columbia University Medical Center', '');

			navLinks[2] = new LeftLink('Campus Map', 'http://www.nypdigestive.org/maps/cpmc_campus.html', '3', 'Directions to Columbia University Medical Center', '');

			navLinks[3] = new LeftLink('Directions to NewYork Weill Cornell Medical Center', 'http://www.nypdigestive.org/maps/wcmc_directions.html', '2', '', '');

			navLinks[4] = new LeftLink('Area Map', 'http://www.nypdigestive.org/maps/wcmc_area_map.html', '3', 'Directions to NewYork Weill Cornell Medical Center', '');

			navLinks[5] = new LeftLink('Interactive Map', 'http://www.nypdigestive.org/maps/wcmc_int_map.html', '3', 'Directions to NewYork Weill Cornell Medical Center', '');

			

		} else if (activeTool == "contact") {

			

			// customize section one, 2nd and 3rd level navigation links here

			navLinks[0] = new LeftLink('Overview', 'http://www.nypdigestive.org/abo_us_ove.html', '2', '', '');

		    navLinks[1] = new LeftLink('New and Noteworthy', 'http://www.nypdigestive.org/abo_us_new_not.html', '2', '', '');

			navLinks[2] = new LeftLink('Medical Education', 'http://www.nypdigestive.org/abo_us_med_edu.html', '2', '', '');

			

		}

		

	}

	

	// returning the value here, don't touch

	return (navLinks);

		

}



function loadNav4Pages() {



	// setting the array, don't touch

	var oneNav4Links = new Array();

	var allNav4Pages = new Array();



	if (active == "one") {


		//oneNav4Links[0] = new LeftLink('Current Research Projects ', 'http://www.nyprehabmed.org/about/current.html', '4', 'Publications, Projects, and Research', '');
		
		oneNav4Links[0] = new LeftLink('Burn Therapy Research ', 'http://www.nyprehabmed.org/about/burn_rehab.html', '4', 'Publications, Projects, and Research', '');
		
		oneNav4Links[1] = new LeftLink('Cardiopulmonary Therapy Research ', 'http://www.nyprehabmed.org/about/cardio_pul.html', '4', 'Publications, Projects, and Research', '');
		
		oneNav4Links[2] = new LeftLink('Physical and Occupational Therapy Research ', 'http://www.nyprehabmed.org/about/pt_ot.html', '4', 'Publications, Projects, and Research', '');
		
		
		
		
		allNav4Pages[0] = new Nav4Page('http://www.nyprehabmed.org/about/3_5-Publications_Research.html', oneNav4Links);
		allNav4Pages[1] = new Nav4Page('http://www.nyprehabmed.org/about/current.html', oneNav4Links);
		allNav4Pages[2] = new Nav4Page('http://www.nyprehabmed.org/about/burn_rehab.html', oneNav4Links);
		allNav4Pages[3] = new Nav4Page('http://www.nyprehabmed.org/about/cardio_pul.html', oneNav4Links);
		allNav4Pages[4] = new Nav4Page('http://www.nyprehabmed.org/about/pt_ot.html', oneNav4Links);
		
		
		
		/*oneNav4Links[0] = new LeftLink('Burn Rehabilitation', 'http://www.nyprehabmed.org/about/3_5_1-Research_Burns.html', '4', 'Publications, Projects, and Research', '');

		oneNav4Links[1] = new LeftLink('Cancer Rehabilitation', 'http://www.nyprehabmed.org/about/3_5_7-Research-Oncology.html', '4', 'Publications, Projects, and Research', '');

		oneNav4Links[2] = new LeftLink('Cardiopulmonary Rehabilitation', 'http://www.nyprehabmed.org/about/3_5_2-Research_CP.html', '4', 'Publications, Projects, and Research', '');

		oneNav4Links[3] = new LeftLink('Geriatric Rehabilitation', 'http://www.nyprehabmed.org/about/3_5_3-Research_Geriatrics.html', '4', 'Publications, Projects, and Research', '');

		oneNav4Links[4] = new LeftLink('Hand Rehabilitation', 'http://www.nyprehabmed.org/about/3_5_4-Research_Hands.html', '4', 'Publications, Projects, and Research', '');

		oneNav4Links[5] = new LeftLink('Rehabilitation', 'http://www.nyprehabmed.org/about/3_5_5-Research-Rehab.html', '4', 'Publications, Projects, and Research', '');

		oneNav4Links[6] = new LeftLink('Occupational Therapy', 'http://www.nyprehabmed.org/about/3_5_6-Research_OT.html', '4', 'Publications, Projects, and Research', '');

		oneNav4Links[7] = new LeftLink('Physical Therapy', 'http://www.nyprehabmed.org/about/3_5_8-Research-PT.html', '4', 'Publications, Projects, and Research', '');

		oneNav4Links[8] = new LeftLink('Pediatric Rehabilitation', 'http://www.nyprehabmed.org/about/3_5_9-Research-Pediatrics.html', '4', 'Publications, Projects, and Research', '');



		allNav4Pages[0] = new Nav4Page('http://www.nyprehabmed.org/about/3_5-Publications_Research.html', oneNav4Links);

		allNav4Pages[1] = new Nav4Page('http://www.nyprehabmed.org/about/3_5_1-Research_Burns.html', oneNav4Links);

		allNav4Pages[2] = new Nav4Page('http://www.nyprehabmed.org/about/3_5_7-Research-Oncology.html', oneNav4Links);

		allNav4Pages[3] = new Nav4Page('http://www.nyprehabmed.org/about/3_5_2-Research_CP.html', oneNav4Links);

		allNav4Pages[4] = new Nav4Page('http://www.nyprehabmed.org/about/3_5_3-Research_Geriatrics.html', oneNav4Links);

		allNav4Pages[5] = new Nav4Page('http://www.nyprehabmed.org/about/3_5_4-Research_Hands.html', oneNav4Links);

		allNav4Pages[6] = new Nav4Page('http://www.nyprehabmed.org/about/3_5_5-Research-Rehab.html', oneNav4Links);

		allNav4Pages[7] = new Nav4Page('http://www.nyprehabmed.org/about/3_5_6-Research_OT.html', oneNav4Links);

		allNav4Pages[8] = new Nav4Page('http://www.nyprehabmed.org/about/3_5_8-Research-PT.html', oneNav4Links);

		allNav4Pages[9] = new Nav4Page('http://www.nyprehabmed.org/about/3_5_9-Research-Pediatrics.html', oneNav4Links); */



	} 

	// returning the value here, don't touch

	return (allNav4Pages);

}
