<!-- Notice where script is placed

/************************************************************************************************************** 
 *  This web page & entire site of American Business School, Inc. are Copyright 1995-2004.                                *  
 *  Copying any code or other components from this page and/or the SpanoAgency.com site either                *
 *  in partial or in its entirety without expressed written permission from Edward A. Nugent, CPA;PC          *
 *  is unlawful. All copyrights are reserved world-wide. American Business School, Inc. is a legally                      *
 *  registered New Jersey Corporation in the United States of America. Code has been place whereby a ping     *
 *  is sent to this server from the source of all code. If Spano code is ping from an authorized source, it   *
 *  will be detected and the offending party will be prosecuted to the fullest extent of the law.             *
 **************************************************************************************************************/ 

function VerifyInfo(form){
     if (ValidateEmail(form)){
     if (ValidateOtherCtr(form)){
      if (ValidateTime(form)){
       if (ValidateCoursePurpose(form)){
        if (ValidateCourses(form)){
         if (ValidateTrainingCenter(form)){
          if (ValidateSending(form)){
  	        if (ValidateCompany(form)){   
            if (ValidateYourName(form)){
	          if (ValidateAddress1(form)){
	           if (ValidateCity(form)){
		         if (ValidateState(form)){
	  	          if (ValidateZip(form)){
		           if (ValidatePhoneArea(form)){
		            if (ValidatePhone3(form)){
		 	           if (ValidatePhone4(form)){
		 	            if (ValidateFoundUs(form)){		 	          		 	          
		 	             if (ValidateRetrieveEmail(form)){
		 	             if (AskAgain(form)){
			return true
       }}}}}}}}}}}}}}}}}}}
       			return false }


	function ValidateFoundUs(which)
        {if (which.cboFoundUs.value == "Null")
			{alert("Please identify how you found our website.");
      			 return false;
                }else{
				 	 return true;}}
		

	function ValidateRetrieveEmail(which)
        {if (which.cboRetrieveEmail.value == "Null")
			{alert("Please identify how you retieve your Email.");
      			 return false;
                }else{
				 	 return true;}}
		       
       
	function ValidateTime(which){
		if (which.Time1.checked == false && which.Time2.checked == false && which.Time3.checked == false && which.Time4.checked == false)
		{
		alert('Please identify time schedule(s) you are most interested in.');
		return false;
		}else
		return true;
		}

	function ValidateCoursePurpose(which){
		if (which.purpose1.checked == false && which.purpose2.checked == false && which.purpose3.checked == false)
		{
		alert('Please identify the purpose of taking the course(s).');
		return false;
		}else
		return true;
		}

	function ValidateCourses(which){
		if (which.course1.checked == false && which.course2.checked == false && which.course3.checked == false && which.course4.checked == false && which.course5.checked == false && which.course6.checked == false && which.course7.checked == false && which.course8.checked == false  && which.CourseOther.value == "")
		{
		alert('Please choose a course.');
		return false;
		}else
		return true;
		}


	function ValidateSending(which) {
   		 for (var i = 0; i < which.Sending.length; i++) {
   		     if (which.Sending[i].checked)
            return true;
	    }
   		 alert('You must choose whether we are sending this brochure to your home or company');
	   	 return false;
		}

	function getSelectedButton(buttonGroup){
	   		 for (var i = 0; i < buttonGroup.length; i++) {
   		     if (buttonGroup[i].checked){
            return i
	    }}
 	   	 return 0
	}
	
  	function ValidateCompany(which){
		var i = getSelectedButton(which.Sending)
		SendWhere = which.Sending[i].value
        {if (SendWhere == "My Company" && which.Company.value == "")
			{alert("You indicated you want your brochure mailed to your company but you failed to provide a company address. Please correct.")
			which.Company.select()         // Set focus to the field that needs to be corrected
          return false;
	    }else{
 	   	 return true;
			}}}
		
	function ValidateOtherCtr(which){	
		var i = getSelectedButton(which.TrainingCenter)
		var TrainingCtr = which.TrainingCenter[i].value
        {if (TrainingCtr == "Other" && which.TrainingCenterOther.value == "")
			{alert("You indicated you were interested in an alternative training center than listed but did not indicate the specific “Other Training Center”. Please correct.")
			which.TrainingCenterOther.select()         // Set focus to the field that needs to be corrected
          return false;
	    }else{
 	   	 return true;
			}}}		
	
	function ValidateTrainingCenter(which) {
   		 for (var i = 0; i < which.TrainingCenter.length; i++) {
   		     if (which.TrainingCenter[i].checked)
            return true;
	    }
   		 alert('You must choose a Training Center');
	   	 return false;
		}    
    
	function ValidateYourName(which)
        {if (which.YourName.value == "")
			{alert("Please Enter Your Name.");
			 which.YourName.select()         // Set focus to the field that needs to be corrected
             return false;
                }else{
				return true; }}
			
				 	 

		
	function ValidateAddress1(which)
        {if (which.Address1.value == "")
			{alert("Please Enter Your Street Address.");
			 which.Address1.select()         // Set focus to the field that needs to be corrected
      			 return false;
                }else{
				 	 return true;}}
		
	function ValidateCity(which)
        {if (which.City.value == "")
			{alert("Please Enter Your City.");
			 which.City.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}
		
	function ValidateState(which)
        {if (which.State.value == "")
			{alert("Please Enter Your State.");
			 which.State.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else
        {if (which.State.value.length != 2)
			{alert("Please Enter 2 Characters for State.");
			 which.State.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
		
		
				 	 return true;}}}
		
	function ValidateZip(which)

        {if (which.Zip.value == "")
			{alert("Please Enter Your 5 digit Zip Code.");
			 which.Zip.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else
        {if (which.Zip.value.length != 5)
			{alert("Please Enter 5 Digits for Your Zip.");
			 which.Zip.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
        
        // This code will ensure that only digits are allowed
        
        {var x=which.Zip.value
		var anum=/(^\d+$)|(^\d+\.\d+$)/
		if (anum.test(x))
		testresult=true
		else{
		testresult=false
		alert("Please Enter Digits ONLY for Your Zip Code")}
        which.Zip.select()         // Set focus to the field that needs to be corrected
		return (testresult)}}}}
	
		
	function ValidatePhoneArea(which){
			if (which.PhoneArea.value == ""){
			alert("Please Enter Your Area Code.");
			 which.PhoneArea.select()         // Set focus to the field that needs to be corrected
			 return false;
               }else{
        if (which.PhoneArea.value.length != 3)
			{alert("Please Enter 3 Digits for Your Area Code.");
			 which.PhoneArea.select()         // Set focus to the field that needs to be corrected
			 return false;
               }else{							                    
		
		// This code will ensure that only digits are allowed
		{var x=which.PhoneArea.value
		var anum=/(^\d+$)|(^\d+\.\d+$)/
		if (anum.test(x))
		testresult=true
		else{
		testresult=false
		alert("Please Enter Digits ONLY for Your Area Code")}
		which.PhoneArea.select()         // Set focus to the field that needs to be corrected
		return (testresult)}}}}
		
		
	function ValidatePhone3(which)
        {if (which.Phone3.value == "")
			{alert("Please Enter the last 3 digits of Your Phone Number Extension.");
			 which.Phone3.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else
        {if (which.Phone3.value.length != 3)
			{alert("Please Enter 3 Digits for Your Phone Number Extension.");
			 which.Phone3.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
        
        // This code will ensure that only digits are allowed
        {var x=which.Phone3.value
		var anum=/(^\d+$)|(^\d+\.\d+$)/
		if (anum.test(x))
		testresult=true
		else{
		testresult=false
		alert("Please Enter Digits ONLY for Your Phone Extension")}
		which.Phone3.select()         // Set focus to the field that needs to be corrected
		return (testresult)}}}}
						 	 
	function ValidatePhone4(which)
        {if (which.Phone4.value == "")
			{alert("Please Enter the last 4 digits of your phone's last 4 digits.");
			 which.Phone4.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else
        {if (which.Phone4.value.length != 4)
			{alert("Please Enter 4 Digits for your phone's last 4 digits.");
			 which.Phone4.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
             
        // This code will ensure that only digits are allowed
		{var x=which.Phone4.value
		var anum=/(^\d+$)|(^\d+\.\d+$)/
		if (anum.test(x))
		testresult=true
		else{
		testresult=false
		alert("Please Enter Digits ONLY for Your Phone's Last 4 Digits")}
		which.Phone4.select()         // Set focus to the field that needs to be corrected
		return (testresult)}}}}
                
						 	 
	function ValidateEmail(which)
		

		{if (which.Email.value == "")
			{alert("Please Enter Your Email Address");
			 which.Email.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
        {var offset1 = which.Email.value.indexOf(" ")
         if(which.Email.value == "" || which.Email.value.indexOf('@', 2) == -1  || which.Email.value.indexOf('.', 3) == -1 || which.Email.value.length <= 9 || which.Email.value.indexOf(" ") != -1 )
        {alert("Please Enter a Valid E-Mail Address. For example, Smith@yahoo.com")
         which.Email.select()         // Set focus to the field that needs to be corrected
               return false;
				}else{
				return true; }}}}

				
	function AskAgain(which){		
			
			//Give the User a chance to confirm his password is correct
				if (confirm("You entered \""+which.Email.value+"\" as your email address. Is that correct?"))
				return true;
				else{
				which.Email.select()
				return false; }}
				

	function ValidateWebsite(which)
        {if (which.Website.value == "")
			{alert("Please Identify your website address. If you have no website, write NONE in text box");
			 which.Website.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}
				 	

// NOT BEING USED AT PRESENT
				 	 
	function ValidateHearAboutUs(which)
        {if (which.cboHearAboutUs.value == "Null")
			{alert("Please Identify How Your Heard About Us");
			 which.cboHearAboutUs.focus()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}
				 	 
	function ValidateFoundUs(which)
        {if (which.cboFoundUs.value == "Null")
			{alert("Please Identify How Your Found Our Website");
			 which.cboFoundUs.focus()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}

	function ValidateInterest(which)
        {if (which.cboInterest.value == "Null")
			{alert("Please Identify What Category on Our Site was of Most Interest to You.");
			 which.cboInterest.focus()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}

	function ValidateHearAboutUsOther(which)
        {if (which.cboHearAboutUs.value == "Other" && which.HearAboutUsOther.value == "")
			{alert("You Indicated You Heard About Us Us by Means Other Then The Selections listed, Please Identify What You Mean By Other.");
			 which.HearAboutUsOther.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}

	function ValidateFoundUsOther(which)
        {if (which.cboFoundUs.value == "Other" && which.FoundUsOther.value == "")
				{alert("You Indicated You Found Us by Means Other Then The Selections listed, Please Identify What You Mean By Other.");
			 which.FoundUsOther.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}

	function ValidateInterestOther(which)
        {if (which.cboInterest.value == "Other" && which.InterestOther.value == "")
				{alert("You Indicated You Were Most Interested in a Section of Our Site Other Then The Selections listed, Please Identify What You Mean By Other.");
			 which.InterestOther.select()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}

	function ValidateProduct(which)
        {if (which.cboProduct.value == "Null")
			{alert("Please Select a Product of Interest.");
			 which.cboProduct.focus()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}
				 	 
	function ValidateHardware(which)
        {if (which.cboHardware.value == "Null")
			{alert("Please Select a Hardware/Software Interest.");
			 which.cboHardware.focus()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}
				 	 
	function ValidateTechServices(which)
        {if (which.cboTechServices.value == "Null")
			{alert("Please Select a Technical Service Interest.");
			 which.cboTechServices.focus()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}
				 	 
	function ValidateFeaturedTechnology(which)
        {if (which.cboFeaturedTechnology.value == "Null")
			{alert("Please Select a Featured Technology Interest.");
			 which.cboFeaturedTechnology.focus()         // Set focus to the field that needs to be corrected
			 return false;
                }else{
				 	 return true;}}


// -->
