    var dataAccepted = true;
	var alertMsg = 'The following fields require your attention:\n';
	
		function VerifyPostalCode()
		{
			var ch = document.frmWS_Step2.PostalCode.value.substring(0,1);
		
			if (document.frmWS_Step2.PostalCode.value.length != 7)
			{
				alertMsg  = alertMsg + '\nPlease enter a valid Bill To Postal Code.';
				dataAccepted = false;
				return false;
			}
 
			if  ((ch < "0" || "9" < ch) == false) //first character is not a number -- Canadian postal code
			{
				alertMsg  = alertMsg + '\nPlease enter a valid Bill To Postal Code.';
				dataAccepted = false;
				return false;			
			}

		}
		
		function VerifySTPostalCode()
		{
			var ch = document.frmWS_Step2.STPostalCode.value.substring(0,1);
				
			if (document.frmWS_Step2.STPostalCode.value.length != 7)
			{
				alertMsg  = alertMsg + '\nPlease enter a valid Bill To Postal Code.';
				dataAccepted = false;
				return false;
			}
 
			if  ((ch < "0" || "9" < ch) == false) //first character is not a number -- Canadian postal code
			{
				alertMsg  = alertMsg + '\nPlease enter a valid Bill To Postal Code.';
				dataAccepted = false;
				return false;			
			}

		}

	
		function VerifyPhoneNumValue()
		{
			if (document.frmWS_Step2.PhoneNumber.value.length != 8)
			{
				alertMsg  = alertMsg + '\nPlease enter a valid Bill To Phone Number in the format: 888-8888';
				dataAccepted = false;
				return false;
			}
			
	        // Return false if phone field does not contain a '-' .
			if (document.frmWS_Step2.PhoneNumber.value.indexOf('-',0) == -1 )
            {
				alertMsg  = alertMsg + '\nPlease enter a valid Bill To Phone Number in the format: 888-8888';
                dataAccepted = false;
                return false;
             }		
		}
		
		function VerifySTPhoneNumValue()
		{
			if (document.frmWS_Step2.STPhoneNumber.value.length != 8)
			{
				alertMsg  = alertMsg + '\nPlease enter a valid Bill To Phone Number in the format: 888-8888';
				dataAccepted = false;
				return false;
			}
			
	        // Return false if phone field does not contain a '-' .
			if (document.frmWS_Step2.STPhoneNumber.value.indexOf('-',0) == -1 )
            {
				alertMsg  = alertMsg + '\nPlease enter a valid Bill To Phone Number in the format: 888-8888';
                dataAccepted = false;
                return false;
             }		
		}
		
		
		function VerifyEmailValue()
		{	
			if (document.frmWS_Step2.Email.value == '')
			{
				alertMsg  = alertMsg + '\nPlease enter your Bill To E-mail address to complete the request.';
				dataAccepted = false;
				return false;
			}
				
		    // Return false if e-mail field does not contain a '@' and '.' .
		    if (document.frmWS_Step2.Email.value.indexOf('@',0) == -1 || document.frmWS_Step2.Email.value.indexOf('.',0) == -1)
		          {
					alertMsg  = alertMsg + '\nA valid Email has the following form: name@host.domain.';
		            dataAccepted = false;
		            return false;
		          }
		              
		    // Return false if e-mail field contains a space           
		    if (document.frmWS_Step2.Email.value.indexOf(' ',0) != -1 )
		         { 
					alertMsg  = alertMsg + '\nE-mail addresses cannot contain spaces.';
		            dataAccepted = false;
		            return false;
		         }   
				
		}
		
		function VerifySTEmailValue()
		{	
			if (document.frmWS_Step2.STEmail.value == '')
			{
				alertMsg  = alertMsg + '\nPlease enter your Bill To E-mail address to complete the request.';
				dataAccepted = false;
				return false;
			}
				
		    // Return false if e-mail field does not contain a '@' and '.' .
		    if (document.frmWS_Step2.STEmail.value.indexOf('@',0) == -1 || document.frmWS_Step2.STEmail.value.indexOf('.',0) == -1)
		          {
					alertMsg  = alertMsg + '\nA valid Email has the following form: name@host.domain.';
		            dataAccepted = false;
		            return false;
		          }
		              
		    // Return false if e-mail field contains a space           
		    if (document.frmWS_Step2.STEmail.value.indexOf(' ',0) != -1 )
		         { 
					alertMsg  = alertMsg + '\nE-mail addresses cannot contain spaces.';
		            dataAccepted = false;
		            return false;
		         }   
				
		}


	function VerifyDataSCartWS()
	{	
		
		if (document.frmWS_Step2.FirstName.value == '')
		{
			alertMsg  = alertMsg + '\nPlease enter a value for the Bill To First Name field.';
			dataAccepted = false;
		}
				
		if (document.frmWS_Step2.LastName.value == '')
		{
			alertMsg  = alertMsg + '\nPlease enter a value for the Bill To Last Name field.';
			dataAccepted = false;
		}
		
		if (document.frmWS_Step2.Address1.value == '')
		{
			alertMsg  = alertMsg + '\nPlease enter a value for the Bill To first Address field.';
			dataAccepted = false;
		}
		
		if (document.frmWS_Step2.City.value == '')
		{
			alertMsg  = alertMsg + '\nPlease enter a value for the Bill To City field.';
			dataAccepted = false;
		}
		
		if (document.frmWS_Step2.Province.value == '0')
		{
			alertMsg  = alertMsg + '\nPlease select a Bill To Province.';
			dataAccepted = false;
		}
				
		
		VerifyPostalCode()
		
		if (document.frmWS_Step2.AreaCode.value.length != 3)
		{
			alertMsg  = alertMsg + '\nPlease enter a valid 3 digit Bill To Area Code.';
			dataAccepted = false;
		}

		VerifyPhoneNumValue()		
				
		VerifyEmailValue()
		
		/*
		if (!frmValue.UseSTAddress.checked)
		{
			VerifyShipTo(frmValue);
		}
		*/
		if (!dataAccepted) 
		{
			alert(alertMsg);
			alertMsg = 'The following fields require your attention:\n';
			dataAccepted = true;
			return false;
		} else {
			return true;
		}
		

	}
	
	function VerifyShipTo(frmValue)
	{
		alertMsg  = alertMsg + '\nNOTE: The Bill To address will be used.';
		if (frmValue.STFirstName.value == '')
		{
			alertMsg  = alertMsg + '\nPlease enter a value for the Bill To First Name field.';
			dataAccepted = false;
		}
		
		if (frmValue.STLastName.value == '')
		{
			alertMsg  = alertMsg + '\nPlease enter a value for the Bill To Last Name field.';
			dataAccepted = false;
		}
		
		if (document.frmWS_Step2.STAddressLine1.value == '')
		{
			alertMsg  = alertMsg + '\nPlease enter a value for the Bill To first Address field.';
			dataAccepted = false;
		}
		
		if (document.frmWS_Step2.STCity.value == '')
		{
			alertMsg  = alertMsg + '\nPlease enter a value for the Bill To City field.';
			dataAccepted = false;
		}
		
		if (document.frmWS_Step2.STProvince.value == '0')
		{
			alertMsg  = alertMsg + '\nPlease select a Bill To Province.';
			dataAccepted = false;
		}
				
		VerifySTPostalCode()
		
		if (document.frmWS_Step2.STAreaCode.value.length != 3)
		{
			alertMsg  = alertMsg + '\nPlease enter a valid 3 digit Bill To Area Code.';
			dataAccepted = false;
		}
		
		VerifySTPhoneNumValue()		
				
		VerifySTEmailValue()	
			
	}
