
/*********************************************************************************************
	Global Variable Declarations
*********************************************************************************************/
var root = "";


/*********************************************************************************************
	Initialize function to load all necessary javascript on page load
*********************************************************************************************/
function initialize(newRoot)
{
	root = newRoot;
	preLoadImages();
}


/*********************************************************************************************
	Preload images for rollovers
*********************************************************************************************/

function preLoadImages()
{
	/* Determine Browser */
	isNS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 4 );
	isIE5 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) < 6 );
	
	var imagePath = root + "/Images/Navigation/";

	/* Primary Navigation */
	nav_ourProd_on = new Image();
	nav_ourProd_on.src = imagePath + "nav_ourProd_on.gif";
	nav_ourProd_over = new Image();
	nav_ourProd_over.src = imagePath + "nav_ourProd_over.gif";
	nav_ourProd_off = new Image();
	nav_ourProd_off.src = imagePath + "nav_ourProd_off.gif";
	
	nav_commonCond_on = new Image();
	nav_commonCond_on.src = imagePath + "nav_commonCond_on.gif";
	nav_commonCond_over = new Image();
	nav_commonCond_over.src = imagePath + "nav_commonCond_over.gif";
	nav_commonCond_off = new Image();
	nav_commonCond_off.src = imagePath + "nav_commonCond_off.gif";
	
	nav_understanding_on = new Image();
	nav_understanding_on.src = imagePath + "nav_understanding_on.gif";
	nav_understanding_over = new Image();
	nav_understanding_over.src = imagePath + "nav_understanding_over.gif";
	nav_understanding_off = new Image();
	nav_understanding_off.src = imagePath + "nav_understanding_off.gif";
	
	nav_skinForAll_on = new Image();
	nav_skinForAll_on.src = imagePath + "nav_skinForAll_on.gif";
	nav_skinForAll_over = new Image();
	nav_skinForAll_over.src = imagePath + "nav_skinForAll_over.gif";
	nav_skinForAll_off = new Image();
	nav_skinForAll_off.src = imagePath + "nav_skinForAll_off.gif";
	
	nav_aboutUs_on = new Image();
	nav_aboutUs_on.src = imagePath + "nav_aboutUs_on.gif";
	nav_aboutUs_over = new Image();
	nav_aboutUs_over.src = imagePath + "nav_aboutUs_over.gif";
	nav_aboutUs_off = new Image();
	nav_aboutUs_off.src = imagePath + "nav_aboutUs_off.gif";
	
	nav_rebates_on = new Image();
	nav_rebates_on.src = imagePath + "nav_rebates_on.gif";
	nav_rebates_over = new Image();
	nav_rebates_over.src = imagePath + "nav_rebates_over.gif";
	nav_rebates_off = new Image();
	nav_rebates_off.src = imagePath + "nav_rebates_off.gif";
	
	/* Secondary Navigation */
	subnav_capex_on = new Image();
	subnav_capex_on.src = imagePath + "subnav_capex_on.gif";
	subnav_capex_off = new Image();
	subnav_capex_off.src = imagePath + "subnav_capex_off.gif";	
	
	subnav_cetaphil_on = new Image();
	subnav_cetaphil_on.src = imagePath + "subnav_cetaphil_on.gif";
	subnav_cetaphil_off = new Image();
	subnav_cetaphil_off.src = imagePath + "subnav_cetaphil_off.gif";	
	
	subnav_clindagel_on = new Image();
	subnav_clindagel_on.src = imagePath + "subnav_clindagel_on.gif";
	subnav_clindagel_off = new Image();
	subnav_clindagel_off.src = imagePath + "subnav_clindagel_off.gif";
	
	subnav_clobex_on = new Image();
	subnav_clobex_on.src = imagePath + "subnav_clobex_on.gif";
	subnav_clobex_off = new Image();
	subnav_clobex_off.src = imagePath + "subnav_clobex_off.gif";
	
	subnav_differin_on = new Image();
	subnav_differin_on.src = imagePath + "subnav_differin_on.gif";
	subnav_differin_off = new Image();
	subnav_differin_off.src = imagePath + "subnav_differin_off.gif";
	
	subnav_metrogel_on = new Image();
	subnav_metrogel_on.src = imagePath + "subnav_metrogel_on.gif";
	subnav_metrogel_off = new Image();
	subnav_metrogel_off.src = imagePath + "subnav_metrogel_off.gif";
	
	subnav_rosanil_on = new Image();
	subnav_rosanil_on.src = imagePath + "subnav_rosanil_on.gif";
	subnav_rosanil_off = new Image();
	subnav_rosanil_off.src = imagePath + "subnav_rosanil_off.gif";
	
	subnav_triLuma_on = new Image();
	subnav_triLuma_on.src = imagePath + "subnav_triLuma_on.gif";
	subnav_triLuma_off = new Image();
	subnav_triLuma_off.src = imagePath + "subnav_triLuma_off.gif";
	
	subnav_solage_on = new Image();
	subnav_solage_on.src = imagePath + "subnav_solage_on.gif";
	subnav_solage_off = new Image();
	subnav_solage_off.src = imagePath + "subnav_solage_off.gif";
	
	subnav_other_on = new Image();
	subnav_other_on.src = imagePath + "subnav_other_on.gif";
	subnav_other_off = new Image();
	subnav_other_off.src = imagePath + "subnav_other_off.gif";		
	
	subnav_acne_on = new Image();
	subnav_acne_on.src = imagePath + "subnav_acne_on.gif";
	subnav_acne_off = new Image();
	subnav_acne_off.src = imagePath + "subnav_acne_off.gif";
	
	subnav_dermatitis_on = new Image();
	subnav_dermatitis_on.src = imagePath + "subnav_dermatitis_on.gif";
	subnav_dermatitis_off = new Image();
	subnav_dermatitis_off.src = imagePath + "subnav_dermatitis_off.gif";	
	
	subnav_melasma_on = new Image();
	subnav_melasma_on.src = imagePath + "subnav_melasma_on.gif";
	subnav_melasma_off = new Image();
	subnav_melasma_off.src = imagePath + "subnav_melasma_off.gif";	
	
	subnav_psoriasis_on = new Image();
	subnav_psoriasis_on.src = imagePath + "subnav_psoriasis_on.gif";
	subnav_psoriasis_off = new Image();
	subnav_psoriasis_off.src = imagePath + "subnav_psoriasis_off.gif";	
	
	subnav_rosacea_on = new Image();
	subnav_rosacea_on.src = imagePath + "subnav_rosacea_on.gif";
	subnav_rosacea_off = new Image();
	subnav_rosacea_off.src = imagePath + "subnav_rosacea_off.gif";	
	
	subnav_sunSpots_on = new Image();
	subnav_sunSpots_on.src = imagePath + "subnav_sunSpots_on.gif";
	subnav_sunSpots_off = new Image();
	subnav_sunSpots_off.src = imagePath + "subnav_sunSpots_off.gif";	
	
	subnav_skinCare_on = new Image();
	subnav_skinCare_on.src = imagePath + "subnav_skinCare_on.gif";
	subnav_skinCare_off = new Image();
	subnav_skinCare_off.src = imagePath + "subnav_skinCare_off.gif";	

	subnav_sunExposure_on = new Image();
	subnav_sunExposure_on.src = imagePath + "subnav_sunExposure_on.gif";
	subnav_sunExposure_off = new Image();
	subnav_sunExposure_off.src = imagePath + "subnav_sunExposure_off.gif";	
	
	subnav_lifestyleTips_on = new Image();
	subnav_lifestyleTips_on.src = imagePath + "subnav_lifestyleTips_on.gif";
	subnav_lifestyleTips_off = new Image();
	subnav_lifestyleTips_off.src = imagePath + "subnav_lifestyleTips_off.gif";	
}	
	
	
/*********************************************************************
	Functions for image rollovers
*********************************************************************/

function setPrimaryImageInactive(imgname, activeimgoff)
{
	activeImageTagName = imgname;
	activeImageFileNameOff = activeimgoff;
	
	setImageActive(activeImageTagName, activeImageFileNameOff);
}

function setImageActive(imgname, activeimg)
{
	document.images[imgname].src = eval(activeimg+ ".src");
}


/*********************************************************************
	Printer Friendly functions
*********************************************************************/
function setPrinterFriendly()
{
	var l = document.all ? document.all[secondaryMain] : document.getElementById(secondaryMain);
	l.style.height = "" + "3000" + "px";
}







