
function chk_checkbox(checkbox1) 
{
	//alert(checkbox1.checked);
	if (checkbox1.checked==false) {
	document.getElementById("Submit_login").disabled="disabled";
	} else {
	document.getElementById("Submit_login").disabled="";
	}
}

function chkdata(form1) 
{
	str = form1.textfield1.value.toLowerCase();
	if(form1.textfield1.value=='' || form1.textfield2.value=='') {
		alert('Please input both Sales Order Number and Name to complete online approval.');
		form1.textfield1.focus();
		return false;
	}
	if (str.search('-')==-1){
	  alert('The Sales Order No entered is incorrect. Please ensure the full number is input in the format 1234-5678.');
	  return false; 
	}
	var reg=/(^[0-9]{4}\-[0-9]{4}$)/;
	if (reg.test(str)==false) {
		alert('The Sales Order No entered is incorrect. Please ensure the full number is input in the format 1234-5678.');
		form1.textfield1.focus();
		return false;
	}
}

function kdiv_show(status)
{
	document.getElementById("ajax_show").style.visibility = status;
}

function chk_username(account) 
{
	if (account.value=='') {
	alert('aaaaaaaaaaaaaa');
	}
	else {
	window.open('user_checkmail.php?account='+
		account.value,'',
		'width=400,height=200,scrollbars=no,resizable=yes');
	}
}
