

		 function valid_shortage(objform)
		 {
		 	
		    strEmail=objform.email.value;
			dept=objform.department.value;
		 	acct=objform.account.value;
		 	conf=objform.test.value;
		 	ref=objform.reference.value;
		 	strArea=objform.phone1.value;
			strExchange=objform.phone2.value;
			strNumber=objform.phone3.value;
		 	pub1=objform.publication1.value;			
		 	pub2=objform.publication2.value;			
		 	pub3=objform.publication3.value;			
		 	pub4=objform.publication4.value;			
		 	pub5=objform.publication5.value;			
		 	pub6=objform.publication6.value;			
		 	copy1=objform.qty1.value;
		 	copy2=objform.qty2.value;
		 	copy3=objform.qty3.value;
		 	copy4=objform.qty4.value;
		 	copy5=objform.qty5.value;
		 	copy6=objform.qty6.value;
		 	nam=objform.contact.value;
		 	deli=objform.deliver.value;

			if ((dept!="newspaper") && (dept!="magazine") && (dept!="books") && (dept!="other"))
				{
				alert("Please Select Department")
				return false
				}
			if (nam == "")
			{
				alert("Please Enter Your Name or Company's Name")
				objform.contact.focus();
				return false
			}
			if ((strEmail.indexOf("@") < 0) || (strEmail.indexOf(".") < 0))
			{
				alert("Please enter a valid email address.");
				objform.email.focus();
				return false;
			}
			if (acct=="")
			{
				alert("Please Enter Your Account Number")
				objform.account.focus();
				return false
			}
			if (acct!=conf)
			{
				alert("Please Verify Account Number")
				objform.account.focus();
				return false
			}
			if (ref=="")
			{
				alert("Please Enter Your Reference Number")
				objform.reference.focus();
				return false
			}
			if ((strArea.length + strExchange.length + strNumber.length) < 10)
			{
				alert("Your phone number is missing " + (10 - (strArea.length + strExchange.length + strNumber.length)) + " digit(s).");
				objform.phone1.focus();
				return false;
			}
			if (isNaN(strArea) || isNaN(strExchange) || isNaN(strNumber))
			{
				alert("There are invalid characters in your phone number.");
				objform.phone1.focus();
				return false;
			}
			if (deli == 0)
			{
				alert("Please Enter the Date from the Invoice")
				objform.deliver.focus();
				return false
			}
			
			if (objform.parcel.checked == false)
			{
			if (pub1 == "")
			{
				alert("Please Enter a Publication Title")
				objform.publication1.focus();
				return false
			}
			if (copy1 == 0)
			{
				alert("Please Enter the Number of Missing Copies for the first publication")
				objform.qty1.focus();
				return false
			}
			if ((pub2!="") && (copy2 == 0))
				{
				alert("Please Enter the Number of Missing Copies for the second publication")
				objform.qty2.focus();
				return false
				}
			if ((pub3!="") && (copy3 == 0))
				{
				alert("Please Enter the Number of Missing Copies for the third publication")
				objform.qty3.focus();
				return false
				}
			if ((pub4!="") && (copy4 == 0))
				{
				alert("Please Enter the Number of Missing Copies for the fourth publication")
				objform.qty4.focus();
				return false
				}
			if ((pub5!="") && (copy5 == 0))
				{
				alert("Please Enter the Number of Missing Copies for the fifth publication")
				objform.qty5.focus();
				return false
				}
			if ((pub6!="") && (copy6 == 0))
				{
				alert("Please Enter the Number of Missing Copies for the sixth publication")
				objform.qty6.focus();
				return false
				}
			}
		}
		
		
		

		
		
		
		
		
		