
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) {
	for(i=1;i<=5;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;
}


function PopupWindow(target, width, height, name) {
	var newPane = window.open(target, name, 'toolbar=0,location=0,scrollbars=1,directories=0,status=0,menubar=0,resizable=1,width='+width+',height='+height+',top=100,left=100');
}

//function isFilled(input) { return (input.value.length != 0); }
//function isFilled(input) { return (input.value != ""); }

// this function is passed a field name and checks for empty values
function CheckEntry(frm, fld) {
	var obj;
	var str;
	
	switch (fld) {
		case "xxx":
		str = frm.xxx.value;
		str = str.replace(" ", "");
		//alert(str);
		strWarning = "Please enter a full or partial xxx.";
		break;
	}
	
	if(str != "") {
		alert(strWarning);
		return false;
	}

}
