var netscape = (uaStr.indexOf("mozilla") > -1);
var netscape4 = (netscape && uaVer < 5);
var mozilla = (netscape && uaVer >= 5);

// for detecting netscape 6 (offsetLeft fix)
// NOTE: should probably check the gecko build id
var uaNS6_regex = /Netscape6/;
var uaNS6 = uaNS6_regex.test(navigator.userAgent);

// for detecting ie/win (hide/showMenu fix)
var uaIEwin_regex = /MSIE\ [5,6]\.[0-9]+\;\ Windows/;
var uaIEwin = uaIEwin_regex.test(navigator.userAgent);

function deletelogo() {
	document.branding.del_logo.value = "true";
	document.branding.submit();
}

function validateCoBranding(form) {
/*
	nameProvided = true;
	urlProvided = true;
	imageProvided = true;

	if (form.COBRANDNAME.value == "") {
		form.COBRANDNAME.focus();
		form.COBRANDNAME.select();
		nameProvided = false;
	}

	if (form.URL.value == "") {
		form.URL.focus();
		form.URL.select();
		urlProvided = false;
	}
   
	imageProvided = changeImage();
	// check that there is at least something to display:
	if ((nameProvided == false) && (imageProvided == false))
	{
		alert("Either an image or institution name must be specified to set up customer co-branding.");
		return false;
	}
	else
	{*/
		return true;
	//}
}

function changeImage() {
	var brandingForm;
	var newSrc = "";
	
	if (uaIEwin)
	{
		brandingForm = branding;
		newSrc = branding.instgraphicfile.value;
	}
	else
	{
		brandingForm = document.getElementById("branding");
		instgraphicfile = document.getElementById("instgraphicfile");
		newSrc = instgraphicfile.value;
	}
	if (newSrc == "")
	{
		if (brandingForm.instgraphic.src == "")
		{
			// don't let the form post up the default image if none was specified.
			return false;
		}
	}

	brandingForm.instgraphic.src = newSrc;
	return true;	
}



