var bookMark = "";	//define bookmark to prevent script errors....
//var prefix = (isSpanish ? "sp_" : "");

// Preload Images for Global Nav
forMem = new Image(); forMem.src = "/stellent/fragments/crsanavigation/images/formembers.gif";
forMemRO = new Image(); forMemRO.src = "/stellent/fragments/crsanavigation/images/formembers_ro.gif";
forMemON = new Image(); forMemON.src = "/stellent/fragments/crsanavigation/images/formembers_on.gif";

forPro = new Image(); forPro.src = "/stellent/fragments/crsanavigation/images/forproviders.gif";
forProRO = new Image(); forProRO.src = "/stellent/fragments/crsanavigation/images/forproviders_ro.gif";
forProON = new Image(); forProON.src = "/stellent/fragments/crsanavigation/images/forproviders_on.gif";

fndPro = new Image(); fndPro.src = "/stellent/fragments/crsanavigation/images/findprovider.gif";
fndProRO = new Image(); fndProRO.src = "/stellent/fragments/crsanavigation/images/findprovider_ro.gif";
fndProON = new Image(); fndProON.src = "/stellent/fragments/crsanavigation/images/findprovider_on.gif";

speSer = new Image(); speSer.src = "/stellent/fragments/crsanavigation/images/specialty.gif";
speSerRO = new Image(); speSerRO.src = "/stellent/fragments/crsanavigation/images/specialty_ro.gif";
speSerON = new Image(); speSerON.src = "/stellent/fragments/crsanavigation/images/specialty_on.gif";

refRes = new Image(); refRes.src = "/stellent/fragments/crsanavigation/images/references.gif";
refResRO = new Image(); refResRO.src = "/stellent/fragments/crsanavigation/images/references_ro.gif";
refResON = new Image(); refResON.src = "/stellent/fragments/crsanavigation/images/references_on.gif";

abouUs = new Image(); abouUs.src = "/stellent/fragments/crsanavigation/images/aboutus.gif";
abouUsRO = new Image(); abouUsRO.src = "/stellent/fragments/crsanavigation/images/aboutus_ro.gif";
abouUsON = new Image(); abouUsON.src = "/stellent/fragments/crsanavigation/images/aboutus_on.gif";

// ********************************************************************** //

sp_forMem = new Image(); sp_forMem.src = "/stellent/fragments/crsanavigation/images/sp_formembers.gif";
sp_forMemRO = new Image(); sp_forMemRO.src = "/stellent/fragments/crsanavigation/images/sp_formembers_ro.gif";
sp_forMemON = new Image(); sp_forMemON.src = "/stellent/fragments/crsanavigation/images/sp_formembers_on.gif";

sp_forPro = new Image(); sp_forPro.src = "/stellent/fragments/crsanavigation/images/sp_forproviders.gif";
sp_forProRO = new Image(); sp_forProRO.src = "/stellent/fragments/crsanavigation/images/sp_forproviders_ro.gif";
sp_forProON = new Image(); sp_forProON.src = "/stellent/fragments/crsanavigation/images/sp_forproviders_on.gif";

sp_fndPro = new Image(); sp_fndPro.src = "/stellent/fragments/crsanavigation/images/sp_findprovider.gif";
sp_fndProRO = new Image(); sp_fndProRO.src = "/stellent/fragments/crsanavigation/images/sp_findprovider_ro.gif";
sp_fndProON = new Image(); sp_fndProON.src = "/stellent/fragments/crsanavigation/images/sp_findprovider_on.gif";

sp_speSer = new Image(); sp_speSer.src = "/stellent/fragments/crsanavigation/images/sp_specialty.gif";
sp_speSerRO = new Image(); sp_speSerRO.src = "/stellent/fragments/crsanavigation/images/sp_specialty_ro.gif";
sp_speSerON = new Image(); sp_speSerON.src = "/stellent/fragments/crsanavigation/images/sp_specialty_on.gif";

sp_refRes = new Image(); sp_refRes.src = "/stellent/fragments/crsanavigation/images/sp_references.gif";
sp_refResRO = new Image(); sp_refResRO.src = "/stellent/fragments/crsanavigation/images/sp_references_ro.gif";
sp_refResON = new Image(); sp_refResON.src = "/stellent/fragments/crsanavigation/images/sp_references_on.gif";

sp_abouUs = new Image(); sp_abouUs.src = "/stellent/fragments/crsanavigation/images/sp_aboutus.gif";
sp_abouUsRO = new Image(); sp_abouUsRO.src = "/stellent/fragments/crsanavigation/images/sp_aboutus_ro.gif";
sp_abouUsON = new Image(); sp_abouUsON.src = "/stellent/fragments/crsanavigation/images/sp_aboutus_on.gif";


//Sets the ON version button in the Global Nav 
function setBookMark(imageID) {
	bookMark = imageID;
	if(imageID != 'none'){
		document.images[imageID].src = eval(imageID + "ON.src");
    }
}

// RollOver Image Change Script
function imgChg(imageID) { 
  window.document.images[imageID].src = eval(imageID + "RO.src"); 
}
   
function imgChgBack(imageID) { 
//   if bookMark = nav calling rollover
    if(bookMark == imageID){
	window.document.images[imageID].src = eval(imageID + "ON.src");
    } 
    else {
         window.document.images[imageID].src = eval(imageID + ".src");
    }
}
// **********************************************************************

var ie = (document.all) ? 1:0 // detects ie
var dom = (document.getElementById && !document.all) ? 1:0 //detects mozilla browsers like NS6 & 7

// Helps Setup SubNavDropDown Kill for MacIE
// Helps Setup SubNavDropDown Kill for MacIE
function BrowserDetectVeryLite(){
	var ua 			= navigator.userAgent.toLowerCase(); 
    this.isMajor 	= parseInt(navigator.appVersion);
    this.isMinor 	= parseFloat(navigator.appVersion);	
	this.isMac  	= (ua.indexOf('mac') != -1);
	this.isWin 		= ( (ua.indexOf("win")!=-1) || (ua.indexOf("16bit")== -1) ); 
	this.isIE   	= ( (ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1) );
	this.isIE5    	= (this.isIE && (this.isMajor == 4) && (ua.indexOf("msie 5.0")!=-1));
	this.isIE5up    = (this.isIE && (this.isMajor >= 4) && (ua.indexOf("msie 5.0") ==-1));		
	this.isNS   	= ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
	this.isNS6 		= (this.isNS && ((this.isMajor == 5) || (this.isMajor == 6)));
	this.isNS7up  	= (this.isNS && (this.isMajor >= 7));
	this.isOpera   	= (ua.indexOf("opera") != -1);
	this.isSafari 	= (ua.indexOf("applewebkit") != -1);	

	// browser version
	n = ua.indexOf('netscape');
	NSversion = ua.substring(n+8,n+9);

	this.versionMinor = parseFloat(navigator.appVersion); 
	this.versionMajor = parseInt(this.versionMinor); 
	// correct version number
	if (this.isIE && this.versionMinor >= 4) {
		this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );}
}

var browser = new BrowserDetectVeryLite();

getVer = browser.versionMinor.toString()
isIE50 = (getVer.indexOf('5.0')!=-1?true:false)

var killRollouts;
if(browser.isMac && browser.isIE5){killRollouts = true;}
if(browser.isIE && (browser.isMajor < 4)){killRollouts = true;}
if(browser.isNS && (browser.isMajor < 5)){killRollouts = true;}
//*** following line commented out per per Brian C. -- 
//if(NSversion == "6"){killRollouts = true} 
// **********************************************************************

function hideDivById(divId)
{
//alert(document.getElementById(divId).style.display);
if (document.getElementById(divId).style.display == "block")
	{
		document.getElementById(divId).style.display = "none";
	}
else
	{
		document.getElementById(divId).style.display = "block";
	}

}