// JavaScript Document
function finalchecks() {
	var errors='',errorsdetail="";
	if (document.getElementById("scompany").value == "") {
		missing('scompanyTR')
		errors = "Please complete the highlighted fields";
	}

	if (document.getElementById("saddress").value == "") {
		missing('saddressTR')
		errors = "Please complete the highlighted fields";
	}

	if (document.getElementById("sname1").value == "") {
		missing('sname1TR')
		errors = "Please complete the highlighted fields";
	}

	if (document.getElementById("semail1").value == "") {
		missing('semail1TR')
		errors = "Please complete the highlighted fields";
	}


	if (document.getElementById("stel1").value == "") {
		missing('stel1TR')
		errors = "Please complete the highlighted fields";
	}


	if (errors) {
		alert(errors+errorsdetail);
		return;
	}

		document.getElementById('newsuppform').submit();

}


function missing(eltochange)
{
	document.getElementById(eltochange).className="formReqOver";
	
}

function rowOut(eltochange)
{
	document.getElementById(eltochange).className="formOut";
	
}

function inFocusReq(eltochange)
{
	document.getElementById(eltochange).className="formReqFocus";
	
}

function clearform(aform,label) {
if (confirm("Are you sure you want to reset the "+label+" form?\nAll fields will be reset.")) {

document.getElementById(aform).reset();
}
}

