function newWin(URL) {
var W = 520;
var H = 480;
var look='toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width='+W+',height='+H+','
popwin=window.open("","pop",look)
popwin.document.open()
popwin.document.write('<title>123Digitizing Gallery - Large Views</title><head>')
popwin.document.write('<link rel=StyleSheet href="123D.css" type="text/css"></head>')
popwin.document.write('<body bgcolor="#FFFFFF" style="margin:0px;">')
popwin.document.write('<TABLE cellpadding=0 cellspacing=0 border=0 width="100%" height="100%" ><tr><td align="center">')
popwin.document.write('<TABLE cellpadding="0" cellspacing="0" border="0" align="center"><tr><td>')
popwin.document.write('<a href="javascript:window.close(this)" title="click to close window"><img src="'+URL+'" alt="click to close window" border="0"></a>')
popwin.document.write('</td></tr></table>')
popwin.document.write('</td></tr></table>')
popwin.document.write('</body>')
popwin.document.close()
}

submitted = false;
function validate(){
F = document.orderForm;
	if(F.Company.value == ""){
		alert("Please enter your company name");
		F.Company.focus();
		F.action.value="";
	}
	else if(F.Name.value == ""){
		alert("Please enter your name");
		F.Name.focus();
		F.action.value="";
	}
	else if(F.Phone.value == "" || F.Phone.value.length < 8){
		alert("Please enter your phone # including area code");
		F.Phone.focus();
		F.action.value="";
	}
	else if(F.Email.value.length < 7 || F.Email.value.indexOf("@") == -1 || F.Email.value.indexOf(".") == -1){
		alert("Please enter your email correctly");
		F.Email.focus();
		F.action.value="";
	}
	else if(F.OrderType[0].checked == false && F.OrderType[1].checked == false){
		alert("Please specify an order type");
		F.action.value="";
	}
	else if(F.ServiceType[0].checked == false && F.ServiceType[1].checked == false && F.ServiceType[2].checked == false){
		alert("Please specify a service type");
		F.action.value="";
	}
	else if(F.JobName.value == ""){
		alert("Please enter a job name / design name");
		F.JobName.focus();
		F.action.value="";
	}
	else if(F.DiskFormat.value == ""){
		alert("Please specify disk format/machine language");
		F.DiskFormat.focus();
		F.action.value="";
	}
	else if(F.SewnOn[0].checked == false && F.SewnOn[1].checked == false){
		alert("Please specify if the design is to be sewn on flat goods or finished caps");
		F.action.value="";
	}
	else if(F.Fabric.value == ""){
		alert("Please specify what type of fabric the design is to be sewn on");
		F.Fabric.focus();
		F.action.value="";
	}
	else if(F.Placement.value == ""){
		alert("Please specify where the design is to be sewn on");
		F.Placement.focus();
		F.action.value="";
	}
	else if(F.Width.value == ""){
		alert("Please specify the width of the finished design");
		F.Width.focus();
		F.action.value="";
	}
	else if(F.Height.value == ""){
		alert("Please specify the height of the finished design");
		F.Height.focus();
		F.action.value="";
	}
	else if(F.Unit[0].checked == false && F.Unit[1].checked == false){
		alert("Please specify the unit of the desired size, i.e. inch or mm");
		F.action.value="";
	}
	else if(F.ColorNumber.value == ""){
		alert("Please specify the # of colors used in the design");
		F.ColorNumber.focus();
		F.action.value="";
	}
	else if( F.Attachment.value == ""){
		alert("Please upload your design file from your computer");
		F.Attachment.focus();
		F.action.value="";
	}
	else if (!submitted) {
		F.action = "formMailer.php";
		submitted = true;
		F.submit();
	}
	else {
		alert("Your request has already been submitted. Please wait for the process to finish. Thank you for your patience!");
	}
}