////////////////////////////////////////////////////////////////////																////	Weill Cornell Medical College								////	nyp.org/socialwork/ site javascript							////	socialwork.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/body/nyp/socialwork/abo_us_on.gif";	one_off = new Image; one_off.src="http://images.med.cornell.edu/body/nyp/socialwork/abo_us_off.gif";	one_active = new Image; one_active.src="http://images.med.cornell.edu/body/nyp/socialwork/abo_us_on.gif";		two_on = new Image; two_on.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_on.gif";	two_off = new Image; two_off.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_off.gif";	two_active = new Image; two_active.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_on.gif";	three_on = new Image; three_on.src="http://images.med.cornell.edu/body/nyp/socialwork/abu_neg_on.gif";	three_off = new Image; three_off.src="http://images.med.cornell.edu/body/nyp/socialwork/abu_neg_off.gif";	three_active = new Image; three_active.src="http://images.med.cornell.edu/body/nyp/socialwork/abu_neg_on.gif";	four_on = new Image; four_on.src="http://images.med.cornell.edu/body/nyp/socialwork/sup_gro_on.gif";	four_off = new Image; four_off.src="http://images.med.cornell.edu/body/nyp/socialwork/sup_gro_off.gif";	four_active = new Image; four_active.src="http://images.med.cornell.edu/body/nyp/socialwork/sup_gro_on.gif";		adult_on = new Image; adult_on.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_on.gif";	adult_off = new Image; adult_off.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_off.gif";	adult_active = new Image; adult_active.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_on.gif";		older_on = new Image; older_on.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_on.gif";	older_off = new Image; older_off.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_off.gif";	older_active = new Image; older_active.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_on.gif";		pediatric_on = new Image; pediatric_on.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_on.gif";	pediatric_off = new Image; pediatric_off.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_off.gif";	pediatric_active = new Image; pediatric_active.src="http://images.med.cornell.edu/body/nyp/socialwork/cli_pro_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/nyp/socialwork/pano_home.swf"; 	} else if (active == "one") {	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/socialwork/pano_" + active + ".swf";	} else if (active == "two") {	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/socialwork/pano_" + active + ".swf";		} else if (active == "three") {	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/socialwork/pano_" + active + ".swf";			} else if (active == "four") {	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/socialwork/pano_" + active + ".swf";			} else if (active == "adult") {	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/socialwork/pano_" + active + ".swf";			} else if (active == "older") {	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/socialwork/pano_" + active + ".swf";			} else if (active == "pediatric") {	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/socialwork/pano_" + active + ".swf";			} else { //default to this just in case	panoLoc = "http://media.med.cornell.edu/panoramas/nyp/socialwork/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/body/nyp/socialwork/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/body/nyp/socialwork/pano_home.jpg";} else { //default to this just in case	altPanoLoc = "http://images.med.cornell.edu/body/nyp/socialwork/pano.jpg";}			// set site urlsiteURL 			= "http://www.nyp.org/socialwork/";// set xml data for pano flash heredataLoc				= "http://global.med.cornell.edu/panoramas/nyp/socialwork/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://www.nyp.org/media_temp/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/PhysSearchCriteria.asp");buttonArray[1]		= new createButtonObject ( 4, "http://www.nyp.org/search/search_advanced.html");buttonArray[2]		= new createButtonObject ( 5, "http://www.nyp.org/contact.html?name1=Contact+Us&type1=2Active");buttonArray[3]		= new createButtonObject ( 6, "http://www.nyp.org/give/index.html");buttonArray[4]		= new createButtonObject ( 7, "http://www.nyp.org/maps.html?name1=Maps+and+Directions&type1=2Active");// setting the array, don't touchadditionalMapArray	= new Array ();// START OF WEB TRENDS VARIABLES//var gFpcDom=".nyp.org";var gDomain="cds.nyp.org";var gDcsId="dcs9e0rmek711roghvzx6gsg8_9s4x";function sectionName() {	var activeSectionName = "";		if (active == "one") {		activeSectionName = "About Us";	} else if (active == "two") {		activeSectionName = "Clinical Programs";	} else if (active == "three") {		activeSectionName = "Abuse, Neglect, and Sexual Assault";	} else if (active == "four") {		activeSectionName = "Support Groups and Resources";	} else if (active == "") {		if (activeHome == "home") {			activeSectionName = "Home";		} else {			activeSectionName = "Toolbar:Quick Info";		}	} 	return activeSectionName;}// END OF 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();			if (active == "one") {	    		navLinks[0] = new LeftLink('Mission Statement', 'http://www.nyp.org/socialwork/about/mis_sta.html', '2', '', '');		navLinks[1] = new LeftLink('Interdisciplinary Staff Training Work Group', 'http://www.nyp.org/socialwork/about/int_sta_tra.html', '2', '', '');		navLinks[2] = new LeftLink('Quality Assessment and Improvement', 'http://www.nyp.org/socialwork/about/qua_ass.html', '2', '', '');		navLinks[3] = new LeftLink('Patient and Family Education', 'http://www.nyp.org/socialwork/about/pat_fam.html', '2', '', '');		//navLinks[4] = new LeftLink('Newsletter', 'http://www.nyp.org/socialwork/about/new.html', '2', '', '');		navLinks[4] = new LeftLink('Resource Committee', 'http://www.nyp.org/socialwork/about/res_com.html', '2', '', '');			navLinks[5] = new LeftLink('Social Work Graduate Student Training Program', 'http://www.nyp.org/socialwork/about/soc_wor.html', '2', '', '');		navLinks[6] = new LeftLink('Staff Education and Training', 'http://www.nyp.org/socialwork/about/sta_edu.html', '2', '', '');		navLinks[7] = new LeftLink('Staff Education and Training Calendar', 'http://www.nyp.org/socialwork/about/edu_tra_cal.html', '2', '', '');		navLinks[8] = new LeftLink('Staff Recognition Committee', 'http://www.nyp.org/socialwork/about/sta_rec.html', '2', '', '');		navLinks[9] = new LeftLink('Social Work Department Staff List', 'http://www.nyp.org/socialwork/about/staff.html', '2', '', '');				} else if (active == "two") {				navLinks[0] = new LeftLink('Programs for Adults','http://www.nyp.org/socialwork/cli_pro/cli_pro.html', '2', '', '');		navLinks[1] = new LeftLink('Geriatrics/Older Adults Specialty Programs','http://www.nyp.org/socialwork/cli_pro/ger_old.html', '2', '', '');				/*		navLinks[0] = new LeftLink('Acute Care for the Elderly (ACE)','http://www.nyp.org/socialwork/cli_pro/2.1.html', '2', '', '');		navLinks[1] = new LeftLink('Burn Center','http://www.nyp.org/socialwork/cli_pro/2.2.html', '2', '', '');		navLinks[2] = new LeftLink('Cancer Care','http://www.nyp.org/socialwork/cli_pro/2.3.html', '2', '', '');		navLinks[3] = new LeftLink('Cardiac Care','http://www.nyp.org/socialwork/cli_pro/2.4.html', '2', '', '');		navLinks[4] = new LeftLink('Caregivers Service','http://www.nyp.org/socialwork/cli_pro/2.5.html', '2', '', '');		navLinks[5] = new LeftLink('Child Protection Service','http://www.nyp.org/socialwork/cli_pro/2.6.html', '2', '', '');		navLinks[6] = new LeftLink('Cornell Internal Medical Associates (CIMA)','http://www.nyp.org/socialwork/cli_pro/2.7.html', '2', '', '');		navLinks[7] = new LeftLink('Dialysis Renal Transplant Services','http://www.nyp.org/socialwork/cli_pro/2.8.html', '2', '', '');		navLinks[8] = new LeftLink('Early Childhood Direction Center','http://www.nyp.org/socialwork/cli_pro/2.9.html', '2', '', '');		navLinks[9] = new LeftLink('Early Intervention Program','http://www.nyp.org/socialwork/cli_pro/2.10.html', '2', '', '');		navLinks[10] = new LeftLink('Emergency Department','http://www.nyp.org/socialwork/cli_pro/2.11.html', '2', '', '');		navLinks[11] = new LeftLink('Family Health Center of Western Queens','http://www.nyp.org/socialwork/cli_pro/2.12.html', '2', '', '');		navLinks[12] = new LeftLink('Fracture','http://www.nyp.org/socialwork/cli_pro/2.13.html', '2', '', '');		navLinks[13] = new LeftLink('Geriatric Care Management','http://www.nyp.org/socialwork/cli_pro/2.14.html', '2', '', '');		navLinks[14] = new LeftLink('HealthOutreach Program','http://www.nyp.org/socialwork/cli_pro/2.15.html', '2', '', '');		navLinks[15] = new LeftLink('Hemophilia and other Bleeding Disorders','http://www.nyp.org/socialwork/cli_pro/2.16.html', '2', '', '');		navLinks[16] = new LeftLink('HIV Care Program','http://www.nyp.org/socialwork/cli_pro/2.17.html', '2', '', '');		navLinks[17] = new LeftLink('Irving Sherwood Wright Center on Aging','http://www.nyp.org/socialwork/cli_pro/2.18.html', '2', '', '');		navLinks[18] = new LeftLink('Jay Monahan Center','http://www.nyp.org/socialwork/cli_pro/2.19.html', '2', '', '');		navLinks[19] = new LeftLink('Lifeline Program','http://www.nyp.org/socialwork/cli_pro/2.20.html', '2', '', '');		navLinks[20] = new LeftLink('Liver Transplant Service','http://www.nyp.org/socialwork/cli_pro/2.21.html', '2', '', '');		navLinks[21] = new LeftLink('Medical Intensive Care Unit','http://www.nyp.org/socialwork/cli_pro/2.22.html', '2', '', '');		navLinks[22] = new LeftLink('Neonatal Intensive Care Program','http://www.nyp.org/socialwork/cli_pro/2.23.html', '2', '', '');		navLinks[23] = new LeftLink('Neuroscience','http://www.nyp.org/socialwork/cli_pro/2.24.html', '2', '', '');		navLinks[24] = new LeftLink('Obstetrics and Gynecology','http://www.nyp.org/socialwork/cli_pro/2.25.html', '2', '', '');		navLinks[25] = new LeftLink('Pediatric Allergy Asthma and Pulmonary','http://www.nyp.org/socialwork/cli_pro/2.26.html', '2', '', '');		navLinks[26] = new LeftLink('Pediatric Critical Care Medicine','http://www.nyp.org/socialwork/cli_pro/2.27.html', '2', '', '');		navLinks[27] = new LeftLink('Pediatric Diabetes and Endocrinology','http://www.nyp.org/socialwork/cli_pro/2.28.html', '2', '', '');		navLinks[28] = new LeftLink('Pediatric Gastroenterology','http://www.nyp.org/socialwork/cli_pro/2.29.html', '2', '', '');		navLinks[29] = new LeftLink('Pediatric Oncology','http://www.nyp.org/socialwork/cli_pro/2.30.html', '2', '', '');		navLinks[30] = new LeftLink('Pediatric Nephrology','http://www.nyp.org/socialwork/cli_pro/2.31.html', '2', '', '');		navLinks[31] = new LeftLink('Pediatric Urology','http://www.nyp.org/socialwork/cli_pro/2.32.html', '2', '', '');		navLinks[32] = new LeftLink('Rape Crisis Intervention Program','http://www.nyp.org/socialwork/cli_pro/2.33.html', '2', '', '');		navLinks[33] = new LeftLink('Rehabilitation Service','http://www.nyp.org/socialwork/cli_pro/2.34.html', '2', '', '');		navLinks[34] = new LeftLink('Surgical Intensive Care Unit (SICU)','http://www.nyp.org/socialwork/cli_pro/2.35.html', '2', '', '');		navLinks[35] = new LeftLink('Teen Pregnancy and Parenting Program','http://www.nyp.org/socialwork/cli_pro/2.36.html', '2', '', '');		navLinks[36] = new LeftLink('Vascular Institute','http://www.nyp.org/socialwork/cli_pro/2.37.html', '2', '', '');		navLinks[37] = new LeftLink('Ventilator Management Team','http://www.nyp.org/socialwork/cli_pro/2.38.html', '2', '', '');		*/		} else if (active == "adult") {				navLinks[0] = new LeftLink('Programs for Adults','http://www.nyp.org/socialwork/cli_pro/cli_pro.html', '2', '', '');		navLinks[1] = new LeftLink('Geriatrics/Older Adults Specialty Programs','http://www.nyp.org/socialwork/cli_pro/ger_old.html', '2', '', '');		navLinks[2] = new LeftLink('Pediatric Specialty Programs','http://www.nyp.org/socialwork/cli_pro/ped_spe.html', '2', '', '');				} else if (active == "older") {				navLinks[0] = new LeftLink('Programs for Adults','http://www.nyp.org/socialwork/cli_pro/cli_pro.html', '2', '', '');		navLinks[1] = new LeftLink('Geriatrics/Older Adults Specialty Programs','http://www.nyp.org/socialwork/cli_pro/ger_old.html', '2', '', '');		navLinks[2] = new LeftLink('Pediatric Specialty Programs','http://www.nyp.org/socialwork/cli_pro/ped_spe.html', '2', '', '');				} else if (active == "pediatric") {				navLinks[0] = new LeftLink('Programs for Adults','http://www.nyp.org/socialwork/cli_pro/cli_pro.html', '2', '', '');		navLinks[1] = new LeftLink('Geriatrics/Older Adults Specialty Programs','http://www.nyp.org/socialwork/cli_pro/ger_old.html', '2', '', '');		navLinks[2] = new LeftLink('Pediatric Specialty Programs','http://www.nyp.org/socialwork/cli_pro/ped_spe.html', '2', '', '');				} else if (active == "three") {				navLinks[0] = new LeftLink('Child Abuse', '/socialwork/abu_neg/chi_abu.html', '2', '', '');		navLinks[1] = new LeftLink('Domestic Violence', '/socialwork/abu_neg/dom_abu.html', '2', '', '');		navLinks[2] = new LeftLink('Elder Abuse', '/socialwork/abu_neg/eld_abu.html', '2', '', '');		navLinks[3] = new LeftLink('Sexual Assault', '/socialwork/abu_neg/sex_abu.html', '2', '', '');				} else if (active == "four") {				navLinks[0] = new LeftLink('Support Groups', '/socialwork/sup_gro/sup_gro.html', '2', '', '');		navLinks[1] = new LeftLink('Resources', '/socialwork/sup_gro/res.html', '2', '', '');		navLinks[2] = new LeftLink('Leaving the Hospital videos', '/socialwork/sup_gro/hos_videos.html', '3', 'Resources', '');						} else if (active == "five") {			navLinks[0] = new LeftLink('Preparing for Surgery', 'http://www.nyp.org/pat_vis/pre_sur.html', '2', '', '');		navLinks[1] = new LeftLink('Before you arrive: Instructions for day and night before surgery, and day of surgery', 'http://www.nyp.org/pat_vis/bef_arr.html', '3', 'Preparing for Surgery', '');		navLinks[2] = new LeftLink('Anesthesia', 'http://www.nyp.org/pat_vis/ane_gen_blu.html', '3', 'Preparing for Surgery', '');		navLinks[3] = new LeftLink('After Your Surgery (recovery room info, reuniting with your family, getting discharge instructions)', 'http://www.nyp.org/pat_vis/aft_you.html', '3', 'Preparing for Surgery', '');				navLinks[4] = new LeftLink("FAQ's", 'http://www.nyp.org/pat_vis/faq.html', '2', '', '');		navLinks[5] = new LeftLink('Helpful Links', 'http://www.nyp.org/pat_vis/links.html', '2', '', '');			} else if (active == "") {				if (activeTool == "contact") {			navLinks[0] = new LeftLink('Contact Us', 'http://www.nyp.org/contact.html', '2', '', '');			navLinks[1] = new LeftLink('Maps and Directions', 'http://www.nyp.org/maps.html', '2', '', '');		}	}	// returning the value here, don't touch	return (navLinks);}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();}// Pop a window. url mandatory, other args optional.function popWin(url,winName,widthHeight,leftTop,others){	/* set defaults */	if (winName == null) { var winName = "newWin"; }	if (widthHeight == null) { var widthHeight = "width=320, height=300"; }	if (leftTop == null) { var leftTop = "left=320,top=60,screenX=300,screenY=60"; }	if (others == null) { var others = "toolbar=no,location=no,scrollbars=no,menubar=no,resizable,status=no"; }		var features = widthHeight+','+leftTop+','+others;		var winInfo = window.open(url,winName,features); 	winInfo.focus();}