function CheckCookies() {
	var cookies = (navigator.cookieEnabled) ? true : false;
	return cookies;
	//alert("Cookies enabled: " + cookies);
}


function DetermineObject(obj) {
	var element = null;
	if(document.all) {
		element = document.all[obj];
	}
	if (document.getElementById) {
		element = document.getElementById(obj);
	}
	
	return element;
}


function ShowPanel(objNum, objName) {
	// loop thru as many times as there are sites
	for(i=1;i<=9;i++) {
		
		var objPanel = DetermineObject(objName+i);
		
		if(objNum == i) {
			objPanel.setAttribute("class", "visible");
			objPanel.setAttribute("className", "visible");
			//alert(i + " " + objPanel.id);
		}
		else {
			objPanel.setAttribute("class", "invisible");
			objPanel.setAttribute("className", "invisible");
		}
		
	}

	return true;
}


//****************************************************************************
// these functions are used on the previous splash page with the banner image
//****************************************************************************
function SwapBanner(str) {
	
	document.images["imgBanner"].src = "/PublishingImages/banners/banner_splash_" + str + ".png";
	 
}


function RestoreBanner(str) {
	
	document.images["imgBanner"].src = "/PublishingImages/banners/banner_splash_" + str + ".png";
	
}


function SwapMainImage(str) {
	
	document.images["imgMain"].src = "http://forms.iapmo.org/images/banners/home_" + str + "_1000.jpg";
	 
}
//*************************************************


//*************************************************************************
// these functions are used on the new splash page with the separate logos
//*************************************************************************
function LargeLogo(str) {
	// the 'logo_splash_xxx' images are 100 pixels wide so they fit in the banner area without movement when hovered over
	document.images["imgLogo_" + str].src = "http://forms.iapmo.org/images/logos/logo_splash_" + str + "_green.jpg";
	 
}


function SmallLogo(str) {
	
	document.images["imgLogo_" + str].src = "http://forms.iapmo.org/images/logos/logo_" + str + "_sm_green.jpg";
	 
}
//*************************************************


//*************************************************
// these functions are used on the old splash page
//*************************************************
function HoverLogo_old(num, str) {
	
	document.images["imgLogo" + num].src = "/PublishingImages/logos/logo_" + str + ".png";
	 
}


function RestoreLogo_old(num, str) {
	
	document.images["imgLogo" + num].src = "/PublishingImages/logos/logo_sm_" + str + ".png";
	 
}
//*************************************************


function NewWindow(target, width, height, name) {
	var newPane = window.open(target, name, 'toolbar=0,location=0,scrollbars=1,directories=0,status=0,menubar=0,resizable=0,width='+width+',height='+height+',top=100,left=100');
}

//function isFilled(input) { return (input.value.length != 0); }
//function isFilled(input) { return (input.value != ""); }


