//////////////////////////////////////////////////////////////////
//																//
//	Weill Cornell Medical College								//
//	nypobesity.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/nypobesity/abo_us_on.gif";
	one_off = new Image; one_off.src="http://images.med.cornell.edu/headers/navbar/nypobesity/abo_us_off.gif";
	one_active = new Image; one_active.src="http://images.med.cornell.edu/headers/navbar/nypobesity/abo_us_on.gif";
	
	two_on = new Image; two_on.src="http://images.med.cornell.edu/headers/navbar/nypobesity/hea_ser_on.gif";
	two_off = new Image; two_off.src="http://images.med.cornell.edu/headers/navbar/nypobesity/hea_ser_off.gif";
	two_active = new Image; two_active.src="http://images.med.cornell.edu/headers/navbar/nypobesity/hea_ser_on.gif";

	three_on = new Image; three_on.src="http://images.med.cornell.edu/headers/navbar/nypobesity/hea_az_on.gif";
	three_off = new Image; three_off.src="http://images.med.cornell.edu/headers/navbar/nypobesity/hea_az_off.gif";
	three_active = new Image; three_active.src="http://images.med.cornell.edu/headers/navbar/nypobesity/hea_az_on.gif";
	
	four_on = new Image; four_on.src="http://images.med.cornell.edu/headers/navbar/nypobesity/sur_faq_on.gif";
	four_off = new Image; four_off.src="http://images.med.cornell.edu/headers/navbar/nypobesity/sur_faq_off.gif";
	four_active = new Image; four_active.src="http://images.med.cornell.edu/headers/navbar/nypobesity/sur_faq_on.gif";

	five_on = new Image; five_on.src="http://images.med.cornell.edu/headers/navbar/nypobesity/res_on.gif";
	five_off = new Image; five_off.src="http://images.med.cornell.edu/headers/navbar/nypobesity/res_off.gif";
	five_active = new Image; five_active.src="http://images.med.cornell.edu/headers/navbar/nypobesity/res_on.gif";
	
	six_on = new Image; six_on.src="http://images.med.cornell.edu/headers/navbar/nypobesity/for_pro_on.gif";
	six_off = new Image; six_off.src="http://images.med.cornell.edu/headers/navbar/nypobesity/for_pro_off.gif";
	six_active = new Image; six_active.src="http://images.med.cornell.edu/headers/navbar/nypobesity/for_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/nypobesity/pano_home.swf";
} else { //default to this just in case
	panoLoc = "http://media.med.cornell.edu/panoramas/nypobesity/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/nypobesity/home.jpg";
} else { //default to this just in case
	altPanoLoc = "http://images.med.cornell.edu/panoramas/nypobesity/pano.jpg";
}		
	
siteURL = "http://www.nyp.org/obesity";


// set xml data for pano flash here
dataLoc				= "http://global.med.cornell.edu/panoramas/nypobesity/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.med.cornell.edu/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 ( 6, "http://www.nyp.org/give/index.html");
buttonArray[3]		= new createButtonObject ( 8, "http://www.nyp.org/maps/index.html");
buttonArray[4]		= new createButtonObject ( 5, "http://www.nyp.org/obesity/contact.html");

// setting the array, don't touch
additionalMapArray	= new Array ();

// VARIABLES FOR WEB TRENDS
//var gFpcDom=".nyppsychiatry.org";
var gDomain="cds.nyp.org";
var gDcsId="dcsts0fhji711rsfjz0x8gsg8_6u8c";

function sectionName() {
	var activeSectionName = "";
	if (active == "one") {
		activeSectionName = "About Us";
	} else if (active == "two") {
		activeSectionName = "Healthcare Services";
	} else if (active == "three") {
		activeSectionName = "Health A to Z";
	} else if (active == "four") {
		activeSectionName = "Survey FAQs";
	} else if (active == "five") {
		activeSectionName = "Research";
	} else if (active == "six") {
		activeSectionName = "For Professionals";
	} 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") {
	    
		navLinks[0] = new LeftLink('Our Obesity Surgery Team', 'http://www.nyp.org/obesity/about/our_phy.html', '2', '', '');
		//navLinks[1] = new LeftLink('Our Facilities', 'http://www.nyp.org/obesity/about/our_fac.html', '2', '', '');
		navLinks[1] = new LeftLink('Our Success Stories', 'http://www.nyp.org/obesity/about/our_suc.html', '2', '', '');
				

	}  else if (active == "four") {
		
		navLinks[0] = new LeftLink('Health Insurance Coverage', 'http://www.nyp.org/obesity/sur_faq/hea_ins.html', '2', '', '');
		
	}
	// returning the value here, don't touch
	return (navLinks);
}

