function getObject(objectId) {
	if (document.getElementById && document.getElementById(objectId)) {
		return document.getElementById(objectId);
	} else if (document.all && document.all(objectId)) {
		return document.all(objectId);
	} else {
		return false;
	}
}

function show_hide_it(id) {
	var myObj = getObject(id);
	if (myObj.style != false) {
		myObj.className = (myObj.className == 'invisible') ? '' : 'invisible';
	}
}

function show_it(id) {

	var myObj = getObject(id);
	myObj.className = '';
}

function hide_it(id) {

	var myObj = getObject(id);
	myObj.className = 'invisible';
}

function noenter() {
	return !(window.event && window.event.keyCode == 13);
}

function check_fields() {
	frm = document.myform;
	elmLength = frm.elements.length;
	isAllElmsSaved = true;
	for (i = 0; i < elmLength; i++) {
		elmName = frm.elements[i].name;
		if (elmName.substr(0, 9) == 'isUpdated') {
			if (frm.elements[elmName].value == "1") {
				return confirm("Some of the modified fields have not been saved.\nAre you sure you want to disregard this information?");
			}
		}
	}

	return isAllElmsSaved;
}