

function field_focus() {

	if (document.uploadInfo.name.value == "") {
  document.forms[0].elements["name"].focus();
  }
  else {
  document.uploadInfo.jobname.focus();
  }
  
};

function checkform() {
	if (document.uploadInfo.name.value == "") {
	alert("Please include your name.");
	document.uploadInfo.name.focus();
	return false;
	}
	if (document.uploadInfo.company.value == "") {
	alert("Please include your company name.");
	document.uploadInfo.company.focus();
	return false;
	}
	if (document.uploadInfo.email.value == "") {
	alert("Please include your email.");
	document.uploadInfo.email.focus();
	return false;
	}
	if (document.uploadInfo.email.value != "") {

		var str = document.uploadInfo.email.value
		var re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
		
		if (!re.test(str)) {

		alert("You entered an invalid Email Address.");
		document.uploadInfo.email.focus();
		return false;
		}
	}
	if (document.uploadInfo.phone.value == "") {
	alert("Please include your phone number.");
	document.uploadInfo.phone.focus();
	return false;
	}
	if (document.uploadInfo.csr.value == "") {
	alert("Please supply a csr name, or select I don't know.");
	document.uploadInfo.csr.focus();
	return false;
	}
	if (document.uploadInfo.jobname.value == "") {
	alert("Please supply a job name or job reference.");
	document.uploadInfo.jobname.focus();
	return false;
	}
	if (document.uploadInfo.qty.value == "") {
	alert("How many files will you be uploading?");
	document.uploadInfo.qty.focus();
	return false;
	}
	if (document.uploadInfo.qty.value == 0) {
	alert("You can't upload 0 files.");
	document.uploadInfo.qty.focus();
	return false;
	}
	if (document.uploadInfo.software.value == "") {
	alert("Please select the software you used.");
	document.uploadInfo.software.focus();
	return false;
	}
	if (document.uploadInfo.platform.value == "") {
	alert("Please specify your computer platform.");
	document.uploadInfo.platform.focus();
	return false;
	}
	if (document.uploadInfo.code.value == "") {
	alert("You need to enter the alphanumeric code in order to continue.");
	document.uploadInfo.code.focus();
	return false;
	
	} else {
	alert("Please Note:\nYou are not generating an order by submitting this form. This is merely a file upload site. You must follow up with a P.O. to one of our CSRs in order to initiate the job that is related to the uploaded file(s).");
		return true;
	}
};

