<!--
function blockEnter(evt) {
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode :
        ((evt.which) ? evt.which : evt.keyCode);
    if (charCode == 13 || charCode == 3) {
        return false;
    } else {
        return true;
    }
}

function submitForm(evt , thisform) {
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode :
        ((evt.which) ? evt.which : evt.keyCode);
    if (charCode == 13 || charCode == 3) {
    	document.forms[thisform].submit();
       return false;
    } else {
        return true;
    }
}

function focusNextField(evt , thisform, nextfield) {
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode :
        ((evt.which) ? evt.which : evt.keyCode);
    if (charCode == 13 || charCode == 3) {
    	document.forms[thisform].elements[nextfield].focus();
       return false;
    } else {
        return true;
    }
}

function checknumber(evt) {
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode :
        ((evt.which) ? evt.which : evt.keyCode);
    if (charCode == 8 || charCode == 9 || charCode == 127 || charCode == 46 || 
			( charCode >= 37 && charCode <= 40) || ( charCode >= 48 && charCode <= 57) ) {
        return true;
    } else {
       return false;
    }
}


function logout_confirm() {
	if (confirm("Are you sure want to logout the system?")) {
		top.location = "logout.php";
	}
}

function goMenu(id) {
	document.menu_form.id.value = id;
	document.menu_form.submit();
}

function goSelect(id) {
	document.form1.action.value = 'select';
	document.form1.action_value.value = id;
	document.form1.submit();
}

function action_submit(action,value,obj) {
	var theForm = obj.form;
	theForm.action.value = action;
	theForm.action_value.value = value;
	theForm.submit();
}

function action_submit_form(action,value,form) {
	var theForm = document.forms[form];
	theForm.action.value = action;
	theForm.action_value.value = value;
	theForm.submit();
}

function confirm_submit(id,obj) {
	var theForm = obj.form;
	theForm.action.value = 'confirm_submit';
	theForm.action_value.value = id;
	theForm.submit();
}

function h(obj,type) {
	if (type == 1 ){
		obj.className = 'HighlightRow';
	} else if(type == 2) {
		obj.className = "";
	} else {
		obj.className = "";
	}
}

function h2(obj,type, id) {
	var o = document.form1.elements[id];
	if (o) {
		if (o.checked) {
			obj.className = "SelectedRow";
		} else {
			if (type == 1 ){
				obj.className = 'HighlightRow';
			} else {
				obj.className = "";
			}
		}
	}
}

function s(obj,c) {
	obj.className = c;
}

function sort_table(id) {
	document.search_form.action.value = 'sort';
	document.search_form.action_value.value = id;
	document.search_form.submit();
}

// -->