
//Javascript coding for Input validation---

var whitespace = " \t\n\r"; 

function stripInitialWhitespace (s)

{   var i = 0;

    while ((i < s.length) && charInString (s.charAt(i), whitespace))
       i++;
    
    return s.substring (i, s.length);
}

function stripFinalWhitespace (s)
{   
    var i = s.length - 1;
    while ((i >= 0) && charInString (s.charAt(i), whitespace))
       i--;
    return s.substring (0, i + 1);
}

function charInString (c, s)
{   for (i = 0; i < s.length; i++)
    {   if (s.charAt(i) == c) return true;
    }
    return false
}
	 
function _CF_onError(form_object, input_object, object_value, error_message)
    {
	alert(error_message);
       	return false;	
    }
	
function _CF_hasValue(obj, obj_type,flag)
{
     
    if (obj_type == "TEXT" || obj_type == "PASSWORD")
	{
		var string = stripInitialWhitespace(obj.value);
	    if (string == "")
    		return false;
    	else
		{
		    obj.value = string; 
      		return true
		}
    }
		
    else if (obj_type == "SELECT" & flag == 1)
	
	{
        for (i=0; i < obj.length; i++)
	    	{
		if (obj.options[i].selected)
			return true;
			}

       	return false;	
	}


else if (obj_type == "SELECT" & flag == 2)
	
	{
        for (i=1; i < obj.length; i++)
	    	{
		if (obj.options[i].selected)
			return true;
			}

       	return false;	
	}



    else if (obj_type == "SINGLE_VALUE_RADIO" || obj_type == "SINGLE_VALUE_CHECKBOX")
	{

		if (obj.checked)
			return true;
		else
       		return false;	
	}
    else if (obj_type == "RADIO" || obj_type == "CHECKBOX")
	{

        for (i=0; i < obj.length; i++)
	    	{
		if (obj[i].checked)
			return true;
			}

       	return false;	
	}
}

//Returns true if value is a date format or is NULL
//otherwise returns false
function _CF_checkdate(object_value)
    {
	if (object_value.length == 0)
        return true;
                
    //Returns true if value is a date in the mm/dd/yyyy format
	isplit = object_value.indexOf("/");

	if (isplit == -1 || isplit == object_value.length)
		return false;

    sMonth = object_value.substring(0, isplit);
	isplit = object_value.indexOf("/", isplit + 1);

	if (isplit == -1 || (isplit + 1 ) == object_value.length)
		return false;

    sDay = object_value.substring((sMonth.length + 1), isplit);

	sYear = object_value.substring(isplit + 1);

	if (!_CF_checkinteger(sMonth)) //check month
		return false;
	else
	if (!_CF_checkrange(sMonth, 1, 12)) //check month
		return false;
	else
	if (!_CF_checkinteger(sYear)) //check year
		return false;
	else
	if (!_CF_checkrange(sYear, 1601, 9999)) //check year
		return false;
	else
	if (!_CF_checkinteger(sDay)) //check day
		return false;
	else
	if (!_CF_checkday(sYear, sMonth, sDay)) // check day
		return false;
	else
		return true;
    }



function _CF_checkday(checkYear, checkMonth, checkDay)
    {

	maxDay = 31;

	if (checkMonth == 4 || checkMonth == 6 ||
			checkMonth == 9 || checkMonth == 11)
		maxDay = 30;
	else
	if (checkMonth == 2)
	{
		if (checkYear % 4 > 0)
			maxDay =28;
		else
		if (checkYear % 100 == 0 && checkYear % 400 > 0)
			maxDay = 28;
		else
			maxDay = 29;
	}

	return _CF_checkrange(checkDay, 1, maxDay); //check day
    }

//Returns true if value is in time format or is NULL
//otherwise returns false**Shiby
function _CF_checktime(object_value)
    {
	if (object_value.length == 0)
        return true;
    //Returns true if value is a time is in the hh:mm:ss format
	isplit = object_value.indexOf(":");

	if (isplit == -1 || isplit == object_value.length)
		return false;

    sHour = object_value.substring(0, isplit);
	isplit = object_value.indexOf(":", isplit + 1);

	if (isplit == -1 || (isplit + 1 ) == object_value.length)
		return false;

    sMin = object_value.substring((sHour.length + 1), isplit);

	sSec = object_value.substring(isplit + 1);
	//alert("hr "+sHour);
	//alert("Min "+sMin);
	//alert("sec "+sSec);
	if (!_CF_checkinteger(sHour)) //check hour
	{
		//alert("Hour integer failed");
		return false;
	}	
	else
	if (!_CF_checkrange(sHour, 0, 23)) //check hour range 0-23
		return false;
	else
	if (!_CF_checkinteger(sMin)) //check Minutes
	{
		//alert("Min integer failed");
		return false;
	}		
	else
	if (!_CF_checkrange(sMin, 0, 59)) //check Minutes
		return false;
	else
	if (!_CF_checkinteger(sSec)) //check seconds
	{
		//alert("sec integer failed");
		return false;
	}	
	else
	if (!_CF_checkrange(sSec, 0, 59)) //check Minutes
		return false;
	else
		return true;
		
}
	
	
function _CF_checkemail(object_value)
{
      if (object_value.length == 0)
        return true;
      var i = 1;
	  var length = object_value.length;
	  // look for @
      while ( (i < length) && (object_value.charAt(i) != "@"))
	  {   i++  }
	  if ( (i >= length) || (object_value.charAt(i) != "@"))
	  {   return false   }
	  else
	  {   i += 2;  }
	  // look for .
	  while ((i < length) && (object_value.charAt(i) != "."))
      {   i++  }
      // there must be at least one character after the .
      if ((i >= length - 1) || (object_value.charAt(i) != ".")) 
	  {   return false   }
      else 
	  {   return true;   }
}

function _CF_checkinteger(object_value)
    {
    //Returns true if value is a number or is NULL
    //otherwise returns false	

    if (object_value.length == 0)
        return true;

    //Returns true if value is an integer defined as
    //   having an optional leading + or -.
    //   otherwise containing only the characters 0-9.
	var decimal_format = ".";
	var check_char;

    //The first character can be + -  blank or a digit.
	check_char = object_value.indexOf(decimal_format)
    //Was it a decimal?
    if (check_char < 1)
	return _CF_checknumber(object_value);
    else
	return false;
    }



function _CF_numberrange(object_value, min_value, max_value)
    {
    // check minimum
    if (min_value != null)
	{
        if (object_value < min_value)
		return false;
	}

    // check maximum
    if (max_value != null)
	{
	if (object_value > max_value)
		return false;
	}
	
    //All tests passed, so...
    return true;
    }



function _CF_checknumber(object_value)
    {
    //Returns true if value is a number or is NULL
    //otherwise returns false	

    if (object_value.length == 0)
        return true;

    //Returns true if value is a number defined as
    //   having an optional leading + or -.
    //   having at most 1 decimal point.
    //   otherwise containing only the characters 0-9.
	var start_format = " .+-0123456789";
	var number_format = " .0123456789";
	var check_char;
	var decimal = false;
	var trailing_blank = false;
	var digits = false;

    //The first character can be + - .  blank or a digit.
	check_char = start_format.indexOf(object_value.charAt(0))
    //Was it a decimal?
	if (check_char == 1)
	    decimal = true;
	else if (check_char < 1)
		return false;
        
	//Remaining characters can be only . or a digit, but only one decimal.
	for (var i = 1; i < object_value.length; i++)
	{
		check_char = number_format.indexOf(object_value.charAt(i))
		if (check_char < 0)
			return false;
		else if (check_char == 1)
		{
			if (decimal)		// Second decimal.
				return false;
			else
				decimal = true;
		}
		else if (check_char == 0)
		{
			if (decimal || digits)	
				trailing_blank = true;
        // ignore leading blanks

		}
	        else if (trailing_blank)
			return false;
		else
			digits = true;
	}	
    //All tests passed, so...
    return true
    }



function _CF_checkrange(object_value, min_value, max_value)
    {
    //if value is in range then return true else return false

    if (object_value.length == 0)
        return true;


    if (!_CF_checknumber(object_value))
	{
	return false;
	}
    else
	{
	return (_CF_numberrange((eval(object_value)), min_value, max_value));
	}
	
    //All tests passed, so...
    return true;
    }

function _CF_checkphone(object_value)
    {
    if (object_value.length == 0)
        return true;
		
    if (object_value.length != 12)
        return false;

	// check if first 3 characters represent a valid area code
    if (!_CF_checknumber(object_value.substring(0,3)))
		return false;
    else
	if (!_CF_numberrange((eval(object_value.substring(0,3))), 100, 1000))
		return false;

	// check if area code/exchange separator is either a'-' or ' '
	if (object_value.charAt(3) != "-" && object_value.charAt(3) != " ")
        return false

	// check if  characters 5 - 7 represent a valid exchange
    if (!_CF_checknumber(object_value.substring(4,7)))
		return false;
    else
	if (!_CF_numberrange((eval(object_value.substring(4,7))), 100, 1000))
		return false;
	
	// check if exchange/number separator is either a'-' or ' '
	if (object_value.charAt(7) != "-" && object_value.charAt(7) != " ")
        return false;

	// make sure last for digits are a valid integer
	if (object_value.charAt(8) == "-" || object_value.charAt(8) == "+")
        return false;
	else
	{
		return (_CF_checkinteger(object_value.substring(8,12)));
	}
    
 }
function _CF_checkzip(object_value)
    {
    if (object_value.length == 0)
        return false;
                
    if (object_value.length != 5 && object_value.length != 10)
        return false;

        // make sure first 5 digits are a valid integer
        if (object_value.charAt(0) == "-" || object_value.charAt(0) == "+")
        return false;

        if (!_CF_checkinteger(object_value.substring(0,5)))
                return false;

        if (object_value.length == 5)
                return true;
        
        // make sure

        // check if separator is either a'-' or ' '
        if (object_value.charAt(5) != "-" && object_value.charAt(5) != " ")
        return false;

        // check if last 4 digits are a valid integer
        if (object_value.charAt(6) == "-" || object_value.charAt(6) == "+")
        return false;

        return (_CF_checkinteger(object_value.substring(6,10)));
    }
	
// validation for entered date against current date........	
	
	function _CF_checkdate_currentdate(object_value)
	{
	   var theDate = new Date();
	   var enteredDate = new Date(object_value);
	 
// if entered year is less than current year......	 
	 	 
		 if (enteredDate.getFullYear() < theDate.getFullYear())
	      {	
	         alert("Date expired! Please check the entered date")    	   
		     return false;
	      }
		 
// if year are the same but  entered month is less	 than current month...
		
		 if ((enteredDate.getFullYear() == theDate.getFullYear())&&
	            (enteredDate.getMonth() <  theDate.getMonth()))
	       {
	    	 alert("Date expired! Please check the entered date")
			 return false;
    	   }
		
		
//	 year and month being same, if the entered date is less than current date.... 	
		if ((enteredDate.getFullYear() == theDate.getFullYear())&&
	   (enteredDate.getMonth() == theDate.getMonth())&&
	    (enteredDate.getDate() < theDate.getDate()))
	    {
	    alert("Date expired! Please check the entered date")
		   return false;
	    }
		
		
//If  entered(year ,month and date) are same as current ....			
		
	 if ((enteredDate.getFullYear() == theDate.getFullYear())&&
	   (enteredDate.getMonth() ==  theDate.getMonth())&&
	    (enteredDate.getDate() == theDate.getDate()))
	   {
	      
		  alert("Date expired! Please check the entered date")
		  return false;
	    }
		
		return true;
		
    }
	
	// validation for entered date >= current date........	**shiby
	
	function _CF_checkdate_currentdate2(object_value)
	{
	   var theDate = new Date();
	   var enteredDate = new Date(object_value);
	 
// if entered year is less than current year......	 
	 	 
		 if (enteredDate.getFullYear() < theDate.getFullYear())
	      {	
	         alert("Date expired! Please check the entered date")    	   
		     return false;
	      }
		 
// if year are the same but  entered month is less	 than current month...
		
		 if ((enteredDate.getFullYear() == theDate.getFullYear())&&
	            (enteredDate.getMonth() <  theDate.getMonth()))
	       {
	    	 alert("Date expired! Please check the entered date")
			 return false;
    	   }
		
		
//	 year and month being same, if the entered date is less than current date.... 	
		if ((enteredDate.getFullYear() == theDate.getFullYear())&&
	   (enteredDate.getMonth() == theDate.getMonth())&&
	    (enteredDate.getDate() < theDate.getDate()))
	    {
	    alert("Date expired! Please check the entered date")
		   return false;
	    }
		
		

		
		return true;
		
    }
	
//  -->



function check_textbox(obj, obj_type, message)
{
     if (!_CF_hasValue(obj, obj_type))
	 {
	    alert (message)
		obj.select()
		obj.focus()
		return false
	 }
	 return true
}

function check_textlen(obj, message)
{
     if (obj.value.length == 0)
            return true
     if (obj.value.length < 5)
         {
            alert (message)
                obj.select()
                obj.focus()
                return false
         }
         return true
}

function check_pwd(obj1_value, obj2, obj2_value, message)
{
      if (obj1_value != obj2_value)
          {
              alert (message)
          obj2.select()
          obj2.focus()
          return false
          }
          return true
}

function check_zip(obj, obj_value, message)
{ 
     if (!_CF_checkzip(obj_value))
         {
                alert (message)
                obj.select()
                obj.focus()
                return false
         }
         return true
}

function check_selectbox(obj, obj_type, message)
{
     if (!_CF_hasValue(obj, obj_type))
	 {
	    alert (message)
		return false
	 }
	 return true
}

function check_radiobox(obj, obj_type, message)
{
     if (!_CF_hasValue(obj, obj_type))
	 {
	    alert (message)
		return false
	 }
	 return true
}

function check_textspace(obj, message)
{
     if (obj.value.length == 0)
	    return true
     for (var i = 1; i < obj.value.length; i++)
	 {
	      if (charInString (obj.value.charAt(i), whitespace))
		  {
		     alert (message)
			 obj.select()
             obj.focus()
			 return false
		  }
     }
	 return true
}

function check_mail(obj, obj_value, message)
{
     if (!_CF_checkemail(obj_value))
	 {
	    alert (message)
		obj.select()
		obj.focus()
		return false
	 }
	 return true
}

function check_zip(obj, obj_value, message)
{ 
     if (!_CF_checkzip(obj_value))
	 {
	 	alert (message)
		obj.select()
		obj.focus()
		return false
	 }
	 return true
}

function check_phone(obj, obj_value, message)
{
     if (!_CF_checkphone(obj_value))
	 {
	    alert ("Please enter a valid phone number!")
		obj.select()
		obj.focus()
		return false
	 }
	 return true
}

function check_date(obj, obj_value, message)
{

     if (!_CF_checkdate(obj_value))
	 {
	    alert (message)
	     obj.select()
		obj.focus()
		return false
	 }
	 return true
}

function check_integer(obj, obj_value, message)
{
      if (!_CF_checkinteger(obj_value))
	  {
	     alert (message)
		 obj.select()
		 obj.focus()
		 return false
	  }
	  return true
}

function check_number(obj, obj_value, message)
{
      if (!_CF_checknumber(obj_value))
	  {
	      alert (message)
		  obj.select()
		  obj.focus()
		  return false
	  }
	  return true
}

// Validation Starts for Subscriber Info Form Screen   
function _CDC_Subscriber_info(_CF_this)
{
	if (!_CF_hasValue(_CF_this.visitor_first_name,"TEXT", 0))
	{
	    alert ("Please enter Your First Name!")
		_CF_this.visitor_first_name.select()
	    _CF_this.visitor_first_name.focus()
		return false
	}
	if (!_CF_hasValue(_CF_this.visitor_last_name, "TEXT", 0))
	{
	    alert ("Please enter Your Last Name!")
		_CF_this.visitor_last_name.select()
	    _CF_this.visitor_last_name.focus()
		return false
    }
	if (!_CF_hasValue(_CF_this.visitor_address_1, "TEXT", 0))
	{
	    alert ("Please enter your Address!")
		_CF_this.visitor_address_1.select()
	    _CF_this.visitor_address_1.focus()
		return false
	}
	if (!_CF_hasValue(_CF_this.visitor_city,"TEXT", 0))
	{
	    alert ("Please enter Your city!")
		_CF_this.visitor_city.select()
	    _CF_this.visitor_city.focus()
		return false
	}
	if (!_CF_hasValue(_CF_this.visitor_state, "TEXT", 0))
	{
	    alert ("Please enter Your State!")
//		_CF_this.visitor_state.select()
//	    _CF_this.visitor_state.focus()
		return false
    }
	if (!_CF_hasValue(_CF_this.visitor_zip, "TEXT", 0))
	{
	    alert ("Please enter your ZipCode!")
		_CF_this.visitor_zip.select()
	    _CF_this.visitor_zip.focus()
		return false
	}
	if (!_CF_hasValue(_CF_this.visitor_phone, "TEXT", 0))
	{
	    alert ("Please enter your Phone No.!")
		_CF_this.visitor_phone.select()
	    _CF_this.visitor_phone.focus()
		return false
	}
    if (!_CF_checkphone(_CF_this.visitor_phone.value))
    {
        alert ("Please enter a correct phone number format!")
    	_CF_this.visitor_phone.select()
        _CF_this.visitor_phone.focus()
        return false
    }
	if (!_CF_hasValue(_CF_this.visitor_email, "TEXT", 0))
	{
	    alert ("Please enter your E-mail!")
		_CF_this.visitor_email.select()
	    _CF_this.visitor_email.focus()
		return false
	}
    if (!_CF_checkemail(_CF_this.visitor_email.value))
    {
    	alert ("Please enter a valid email format!")
        _CF_this.visitor_email.select()
        _CF_this.visitor_email.focus()
        return false
	}
	if (!_CF_hasValue(_CF_this.credit_card_id, "TEXT", 0))
	{
	    alert ("Please Select The Credit Card Type!")
		_CF_this.credit_card_id.select()
	    _CF_this.credit_card_id.focus()
		return false
	}
	
	if (!_CF_hasValue(_CF_this.name_on_credit_card, "TEXT", 0))
	{
	    alert ("Please Enter your Name as you have in Credit Card!")
		_CF_this.name_on_credit_card.select()
	    _CF_this.name_on_credit_card.focus()
		return false
	}
	if (!_CF_checkinteger(_CDC_Form.credit_card_number.value))
      {
       	alert("Please enter the credit card number")
        _CDC_Form.credit_card_number.select()
		_CDC_Form.credit_card_number.focus()
        return false; 
      } 
	if (!_CF_hasValue(_CF_this.credit_card_address, "TEXT", 0))
	{
	    alert ("Please Enter your Address!")
		_CF_this.credit_card_address.select()
	    _CF_this.credit_card_address.focus()
		return false
	}
	if (!_CF_hasValue(_CF_this.credit_card_expiry_date, "TEXT", 0))
	{
	    alert ("Please enter your credit card expire date!")
		_CF_this.credit_card_expiry_date.select()
	    _CF_this.credit_card_expiry_date.focus()
		return false
	}
	
	return true
}
// Validation Ends for Subscriber Info Form Screen   

// Validation drop down list boxes for navigation bar -- Used by dropdownlists.cfm
function validatelistbox(_CF_this)
{
	if (_CF_this.pub_entrydate.selectedIndex == 0)
	{
		alert ("Please select entry date for publication!")
		return false
	}
	if (_CF_this.publication.selectedIndex == 0)
	{
		alert ("Please select publication!")
		return false
	}
	return true
}
// End

// Returns true if to date is greater than from date. Else returns false.
function compareDates(fromdate, todate)
{
	temp_from = fromdate.split("/");
	temp_to = todate.split("/");
	// Compare years
	if (temp_to[2] > temp_from[2])
		return true;
	else
		if (temp_to[2] < temp_from[2])
			return false;
	
	// If it reaches here, years are same. Compare months
	if (temp_to[0] > temp_from[0])
		return true;
	else
		if (temp_to[0] < temp_from[0])
			return false;
	
	// If it reaches here, months are same. Compare days
	if (temp_to[1] >= temp_from[1])
		return true;
	else
		return false;
	
}



// Validation for user registration
function _VC_validate_adduser(_CF_this)
{		
	// Validate first name
	if (!check_textbox(_CF_this.first_name, "TEXT", "Please enter your first name!"))
		return false;
		
	// Validate last name
	if (!check_textbox(_CF_this.last_name, "TEXT", "Please enter your last name!"))
		return false;
		
	// Validate login name
	if (!check_textbox(_CF_this.user_name, "TEXT", "Please enter a unique name to identify yourself"))
		return false;
		
	if (!check_textlen(_CF_this.user_name, "The user id should be at least 5 characters!"))
		return false;
		
	if (!check_textspace(_CF_this.user_name, "A unique name can not include white space!"))
		return false;
		
	// Validate password
	if (!check_textbox(_CF_this.user_pwd, "PASSWORD", "Please enter a password!"))
		return false;
		
	if (!check_textlen(_CF_this.user_pwd, "Please enter a 5 to 10 character password!"))
		return false;
		
	if (!check_textspace(_CF_this.user_pwd, "Password can not include white space!"))
		return false;
		
	if (_CF_this.user_pwd.value == _CF_this.user_name.value)
	{
		alert("Password cannot be same as Username. Choose another password!!!");
		return false;
	}
		
	// Validate confirm password
	if (!check_textbox(_CF_this.user_pwd2, "PASSWORD", "Please confirm your password!"))
		return false;
	if (!check_pwd(_CF_this.user_pwd.value, _CF_this.user_pwd2, _CF_this.user_pwd2.value, "The password you retyped is not same as your password!"))
		return false;
		
	// Validate email 
	if (!check_textbox(_CF_this.email, "TEXT", "Please enter an email address!"))
		return false;
	if (!check_mail(_CF_this.email, _CF_this.email.value, "Please enter a valid email address!"))
		return false;
	
	// Validate Company name
	if (!check_textbox(_CF_this.company_name, "TEXT", "Please enter your Company Name!"))
		return false;
	
	// Validate Address1
	if (!check_textbox(_CF_this.address1, "TEXT", "Please enter your address!"))
		return false;
	
	// Validate City
	if (!check_textbox(_CF_this.city, "TEXT", "Please enter the city name!"))
		return false;
		
	// Validate State
	if (!check_textbox(_CF_this.state, "TEXT", "Please enter the state / Province!"))
		return false;
			
	// Validate Country
	if (!check_textbox(_CF_this.country, "TEXT", "Please enter the country!"))
		return false;
		
	// Validate Zip
	if (!check_textbox(_CF_this.zip, "TEXT", "Please enter the zip /Postal Code!"))
		return false;
		
	// Validate zip code
	//if (!check_zip(_CF_this.zip, _CF_this.zip.value, "Please enter a valid zip code!"))
		//return false;
	
	// Validate phone number
	if (!check_textbox(_CF_this.phone, "TEXT", "Please enter the phone number!"))
		return false;
	
	// If the form validates, return true
	return true;
} 

// Validation for user registration
function _VC_validate_modifypwd(_CF_this)
{		
	// Validate password
	if (!check_textbox(_CF_this.user_pwd, "PASSWORD", "Please enter a password!"))
		return false;
		
	if (!check_textlen(_CF_this.user_pwd, "Please enter a 5 to 10 character password!"))
		return false;
		
	if (!check_textspace(_CF_this.user_pwd, "Password can not include white space!"))
		return false;
		
	if (_CF_this.user_pwd.value == _CF_this.user_name.value)
	{
		alert("Password cannot be same as Username. Choose another password!!!");
		return false;
	}
		
	// Validate confirm password
	if (!check_textbox(_CF_this.user_pwd2, "PASSWORD", "Please confirm your password!"))
		return false;
	if (!check_pwd(_CF_this.user_pwd.value, _CF_this.user_pwd2, _CF_this.user_pwd2.value, "The password you retyped is not same as your password!"))
		return false;
	
	// If the form validates, return true
	return true;
} 

function validate_add(_CF_this)
{
     // Checking first name
         if (!check_textbox(_CF_this.fname, "TEXT", "Please enter your first name!"))
            return false
         // Checking last name
         if (!check_textbox(_CF_this.lname, "TEXT", "Please enter your last name!"))
            return false
         // check email 
         if (!check_textbox(_CF_this.email, "TEXT", "Please enter an email address!"))
            return false
         if (!check_mail(_CF_this.email, _CF_this.email.value, "Please enter a valid email address!"))
            return false
         // Check zip code
         if (!check_zip(_CF_this.zip, _CF_this.zip.value, "Please enter a valid zip code!"))
            return false
         // Check phone number
         if (!check_phone(_CF_this.phone, _CF_this.phone.value, "Please enter a valid phone number!"))
            return false
         // Check fax number
         if (!check_phone(_CF_this.fax, _CF_this.fax.value, "Please enter a valid fax number!"))
            return false
         return true
}

// Validation for user registration
function validate_usermodify(_CF_this)
{		
	// Validate first name
	if (!check_textbox(_CF_this.first_name, "TEXT", "Please enter your first name!"))
		return false;
		
	// Validate last name
	if (!check_textbox(_CF_this.last_name, "TEXT", "Please enter your last name!"))
		return false;
		
	// Validate login name
	if (!check_textbox(_CF_this.user_name, "TEXT", "Please enter a unique name to identify yourself"))
		return false;
		
	if (!check_textlen(_CF_this.user_name, "The user id should be at least 5 characters!"))
		return false;
		
	if (!check_textspace(_CF_this.user_name, "A unique name can not include white space!"))
		return false;
		
	// Validate email 
	if (!check_textbox(_CF_this.email, "TEXT", "Please enter an email address!"))
		return false;
	if (!check_mail(_CF_this.email, _CF_this.email.value, "Please enter a valid email address!"))
		return false;
	
	// Validate Company name
	if (!check_textbox(_CF_this.company_name, "TEXT", "Please enter your Company Name!"))
		return false;
	
	// Validate Address1
	if (!check_textbox(_CF_this.address1, "TEXT", "Please enter your address!"))
		return false;
	
	// Validate City
	if (!check_textbox(_CF_this.city, "TEXT", "Please enter the city name!"))
		return false;
	
	// Validate zip code
	/* if (!check_zip(_CF_this.zip, _CF_this.zip.value, "Please enter a valid zip code!"))
		return false; */
	if (!check_textbox(_CF_this.zip, "TEXT", "Please enter zip code!"))
		return false;
	
	// Validate phone number
	if (!check_textbox(_CF_this.phone, "TEXT", "Please enter the phone number!"))
		return false;
	
	// If the form validates, return true
	return true;
} 

// Check change login screen
function validate_login(_CF_this)
{
         // Check old password
         if (!check_textbox(_CF_this.oldpwd, "PASSWORD", "Please enter an old password!"))
                return false
         // Check new password
         if (!check_textbox(_CF_this.newpwd, "PASSWORD", "Please enter a new password!"))
                return false
         if (!check_textlen(_CF_this.newpwd, "Please enter a 5- to 10- character password!"))
        return false
         if (!check_textspace(_CF_this.newpwd, "Password can not include white space!"))
            return false
     // check comfirm password
         if (!check_textbox(_CF_this.conpwd, "PASSWORD", "Please confirm your password!"))
            return false
         if (!check_pwd(_CF_this.newpwd.value, _CF_this.conpwd, _CF_this.conpwd.value, "The password you retyped is not same as your password!"))
            return false
         return true
}


// Validation for resource add
function _VC_validate_addresource(_CF_this)
{		
	// Validate resource name
	if (!check_textbox(_CF_this.resource_name, "TEXT", "Please enter a name for the resource!"))
		return false;
		
	// Validate resource location
	if (!check_textbox(_CF_this.file_path, "TEXT", "Please enter the complete file path for the resource!"))
		return false;
		
	// If the form validates, return true
	return true;
}

// Validation for resource detail modify
function _VC_validate_modifyresource(_CF_this)
{		
	if (_VC_validate_addresource(_CF_this))
		return true;
}


// validation check for add/edit resource_combo form
function _VC_validate_resourceallocation(_CF_this)
{
	// Check Resource Id
	var myresourcelist="";
	var count=0;
	for (i=0; i < _CF_this.assigned_resource.length; i++)
	{
		if ((_CF_this.assigned_resource.options[i].value > "") && (_CF_this.assigned_resource.options[i].value != "none")) {
		 myresourcelist=_CF_this.assigned_resource.options[i].value+","+myresourcelist;
		 count++;
		}
	}
	
	_CF_this.resourcelist.value=myresourcelist;
	
	if ( count < 1 )
	{
		alert("Please select a resource!!!");
		return false;
	}
	
	return true;
}

// validation check for add product form
function valproentry(_CF_this)
{
	// Check product SKU #
	if (!check_textbox(_CF_this.product_id, "TEXT", "Please enter this product SKU #!"))
		return false;
	if (!check_textbox(_CF_this.price, "TEXT", "Please enter this product price!"))
		return false;
	return true;
}

// validation check for modify product form
function _VC_validate_modifyproduct(_CF_this)
{
	if (!check_textbox(_CF_this.price, "TEXT", "Please enter this product price!"))
		return false;
	return true;
}

// validate price request form
function valpriceform(_CF_this)
{
	if (!_CF_hasValue(_CF_this.license, "RADIO", 0))
	{
		alert ("Please answer question \"Do you prefer an Enterprise License?\"");
		return false;
	}
	
	if (!_CF_hasValue(_CF_this.workshifts, "RADIO", 0))
	{
		alert ("Please answer question \"Do the users work in shifts?\"");
		return false;
	}
		
	if (_CF_this.workshifts[0].checked)
	{
		if (!_CF_hasValue(_CF_this.sharebadges, "RADIO", 0))
		{
			alert ("Please answer question \"If yes, do you want the users to share badges across shifts?\"");
			return false;
		}
		if (_CF_this.sharebadges[0].checked)
		{
			if (!_CF_hasValue(_CF_this.sharenumber, "TEXT", 0))
			{
				alert ("Please answer question \"If yes, what is the maximum number of users wearing badges at any given time?\"");
				_CF_this.sharenumber.focus();
				_CF_this.sharenumber.select();
				return false;
			}
		}
		if (_CF_this.sharebadges[1].checked) 
		{
			if (!_CF_hasValue(_CF_this.badgesnumber, "TEXT", 0))
			{
				alert ("Please answer question \"If no, how many total badges would you like?\"");
				_CF_this.badgesnumber.focus();
				_CF_this.badgesnumber.select();
				return false;
			}
		}
	}
	if (_CF_this.workshifts[1].checked)
	{
		if (!_CF_hasValue(_CF_this.badgestotal, "TEXT", 0))
		{
			alert ("Please answer question \"If no, how many total badges would you like?\"");
			_CF_this.badgestotal.focus();
			_CF_this.badgestotal.select();
			return false;
		}
	}
	if (!_CF_hasValue(_CF_this.plan, "RADIO", 0))
	{
		alert ("Please answer question \"Do you plan on placing and receiving calls from the \nVocera badges to the public telephone network or to office extension numbers?\"");
		return false;
	}
	if (_CF_this.plan[0].checked)
	{
		if (!_CF_hasValue(_CF_this.analogdigital, "RADIO", 0))
		{
			alert ("Please answer question \"Would you prefer analog or digital integration to your PBX?\"");
			return false;
		}
		if (!_CF_hasValue(_CF_this.callsnumber, "SELECT", 2))
		{
			alert ("Please answer question \"If yes, how many simultaneous calls through the PBX\nwould you like to be able to handle at one time?\"");
			return false;
		}
	}
	if (!_CF_hasValue(_CF_this.nursecallsystem, "RADIO", 0))
	{
		alert ("Please answer question \"Will you require integration with a Nurse Call System?\"");
		return false;
	}
	if (!_CF_hasValue(_CF_this.batterycharger, "SELECT", 2))
	{
		alert ("Please answer question \"Would you prefer eight-bay battery chargers for\ncharging multiple batteries and badges in a central location, \nor individual, single-bay chargers for each badge?\"");
		return false;
	}
	return true;
}

function checkformdata(thisform)
{
        var emailregexp = /^[_\.A-Za-z0-9]+@(([A-Za-z0-9]+)|([A-Za-z0-9]+[-][A-Za-z0-9]+))(\.[A-Za-z0-9]+)+$/;
        var emailArray = new Array()
        var newemaillist = ""
        
        if (!_CF_hasValue(thisform.to, "TEXT", 0))

		{
			alert ("Please enter a email address you want to send!");
			thisform.to.select();
			thisform.to.focus();
            return false;
		}
        if (thisform.to.value.indexOf(",") != -1)
        {
	        emailArray = thisform.to.value.split(",")
	        for (var i = 0; i < emailArray.length; i++)
	        {
	            aftertreatemail = stripFinalWhitespace(stripInitialWhitespace(emailArray[i]))
	            if (!emailregexp.test(aftertreatemail))
	            {
	            	alert ("Please enter a correct email address!");
	                return false;
	            }
	            if (i == 0)
	                newemaillist = aftertreatemail;
	            else
	                newemaillist = newemaillist + "," + aftertreatemail;
	        }
	        thisform.to.value = newemaillist;
        }
        else
        {
	        if (!emailregexp.test(thisform.to.value))
	        {
	            alert ("Please enter a correct email address!");
	            return false;
	        }
        }
		if(!_CF_hasValue(thisform.fromname, "TEXT", 0))
		{
			alert ("Please enter your name!");
			thisform.fromname.select();
			thisform.fromname.focus();
			return false;
		}
		if(!_CF_hasValue(thisform.fromemail, "TEXT", 0))
		{
			alert ("Please enter your email address!");
			thisform.fromemail.select();
			thisform.fromemail.focus();
			return false;
		}
		if (!emailregexp.test(thisform.fromemail.value))
        {
            alert ("Please enter a correct email address!");
			thisform.fromemail.select();
			thisform.fromemail.focus();
            return false;
        }
        return true;
}

function validatform(CF_this)
{
	if (CF_this.compemail.value == "")
	{
		alert ("Please enter contact email address!");
		CF_this.compemail.focus();
		CF_this.compemail.select();
		return false;
	}
	return true;
}

// Validation for ap compatibility request form
function validatvdpform(CF_this)
{
	if (CF_this.company.value == "")
	{
		alert ("Please enter company name!");
		CF_this.company.focus();
		CF_this.company.select();
		return false;
	}
	if (CF_this.compaddr.value == "")
	{
		alert ("Please enter address!");
		CF_this.compaddr.focus();
		CF_this.compaddr.select();
		return false;
	}
	if (CF_this.compcity.value == "")
	{
		alert ("Please enter city!");
		CF_this.compcity.focus();
		CF_this.compcity.select();
		return false;
	}
	if (CF_this.country.value == "")
	{
		alert ("Please enter country!");
		CF_this.country.focus();
		CF_this.country.select();
		return false;
	}
	if (CF_this.compphone.value == "")
	{
		alert ("Please enter phone!");
		CF_this.compphone.focus();
		CF_this.compphone.select();
		return false;
	}
	if (CF_this.compwebsite.value == "")
	{
		alert ("Please enter website!");
		CF_this.compwebsite.focus();
		CF_this.compwebsite.select();
		return false;
	}
	if (CF_this.pcfname.value == "")
	{
		alert ("Please enter first name!");
		CF_this.pcfname.focus();
		CF_this.pcfname.select();
		return false;
	}
	if (CF_this.pclname.value == "")
	{
		alert ("Please enter last name!");
		CF_this.pclname.focus();
		CF_this.pclname.select();
		return false;
	}
	if (CF_this.pctitle.value == "")
	{
		alert ("Please enter title!");
		CF_this.pctitle.focus();
		CF_this.pctitle.select();
		return false;
	}
	if (CF_this.pcemail.value == "")
	{
		alert ("Please enter email!");
		CF_this.pcemail.focus();
		CF_this.pcemail.select();
		return false;
	}
	if (CF_this.pcphone.value == "")
	{
		alert ("Please enter phone!");
		CF_this.pcphone.focus();
		CF_this.pcphone.select();
		return false;
	}
	if (CF_this.prodname.value == "")
	{
		alert ("Please List the product/application name(s) you wish to interface with Vocera!");
		CF_this.prodname.focus();
		CF_this.prodname.select();
		return false;
	}
	if (CF_this.proddesc.value == "")
	{
		alert ("Please describe your product/application you wish to interface with Vocera!");
		CF_this.proddesc.focus();
		CF_this.proddesc.select();
		return false;
	}
	if (CF_this.verticals.value == "")
	{
		alert ("What verticals is the product/application currently deployed in?");
		CF_this.verticals.focus();
		CF_this.verticals.select();
		return false;
	}
	if (CF_this.commdevices.value == "")
	{
		alert ("What communication devices or systems does this product/application currently interface with?");
		CF_this.commdevices.focus();
		CF_this.commdevices.select();
		return false;
	}
	if (CF_this.intprocess.value == "")
	{
		alert ("How does the integration between your product/solution and Vocera change the customer's business processes?");
		CF_this.intprocess.focus();
		CF_this.intprocess.select();
		return false;
	}
	return true;
}

//VIP

function validatvipform(CF_this)
{
	if (CF_this.company.value == "")
	{
		alert ("Please enter company name!");
		CF_this.company.focus();
		CF_this.company.select();
		return false;
	}
	if (CF_this.compaddr.value == "")
	{
		alert ("Please enter address!");
		CF_this.compaddr.focus();
		CF_this.compaddr.select();
		return false;
	}
	if (CF_this.compcity.value == "")
	{
		alert ("Please enter city!");
		CF_this.compcity.focus();
		CF_this.compcity.select();
		return false;
	}
	if (CF_this.compstate.value == "")
	{
		alert ("Please enter state/province!");
		CF_this.compstate.focus();
		CF_this.compstate.select();
		return false;
	}
	if (CF_this.compzip.value == "")
	{
		alert ("Please enter zip/postal code!");
		CF_this.compzip.focus();
		CF_this.compzip.select();
		return false;
	}
	if (CF_this.country.value == "")
	{
		alert ("Please enter country!");
		CF_this.country.focus();
		CF_this.country.select();
		return false;
	}
	if (CF_this.compphone.value == "")
	{
		alert ("Please enter phone!");
		CF_this.compphone.focus();
		CF_this.compphone.select();
		return false;
	}
	if (CF_this.compfax.value == "")
	{
		alert ("Please enter fax!");
		CF_this.compfax.focus();
		CF_this.compfax.select();
		return false;
	}
	if (CF_this.compwebsite.value == "")
	{
		alert ("Please enter website!");
		CF_this.compwebsite.focus();
		CF_this.compwebsite.select();
		return false;
	}
	if (CF_this.pcfname.value == "")
	{
		alert ("Please enter first name!");
		CF_this.pcfname.focus();
		CF_this.pcfname.select();
		return false;
	}
	if (CF_this.pclname.value == "")
	{
		alert ("Please enter last name!");
		CF_this.pclname.focus();
		CF_this.pclname.select();
		return false;
	}
	if (CF_this.pctitle.value == "")
	{
		alert ("Please enter title!");
		CF_this.pctitle.focus();
		CF_this.pctitle.select();
		return false;
	}
	if (CF_this.pcemail.value == "")
	{
		alert ("Please enter email!");
		CF_this.pcemail.focus();
		CF_this.pcemail.select();
		return false;
	}
	if (CF_this.pcphone.value == "")
	{
		alert ("Please enter phone!");
		CF_this.pcphone.focus();
		CF_this.pcphone.select();
		return false;
	}
	if (CF_this.scfname.value == "")
	{
		alert ("Please enter first name!");
		CF_this.scfname.focus();
		CF_this.scfname.select();
		return false;
	}
	if (CF_this.sclname.value == "")
	{
		alert ("Please enter last name!");
		CF_this.sclname.focus();
		CF_this.sclname.select();
		return false;
	}
	if (CF_this.sctitle.value == "")
	{
		alert ("Please enter title!");
		CF_this.sctitle.focus();
		CF_this.sctitle.select();
		return false;
	}
	if (CF_this.scemail.value == "")
	{
		alert ("Please enter email!");
		CF_this.scemail.focus();
		CF_this.scemail.select();
		return false;
	}
	if (CF_this.scphone.value == "")
	{
		alert ("Please enter phone!");
		CF_this.scphone.focus();
		CF_this.scphone.select();
		return false;
	}
	if (CF_this.scprog.value == "")
	{
		alert ("Please enter programming credentials!");
		CF_this.scprog.focus();
		CF_this.scprog.select();
		return false;
	}
	
	if (CF_this.market1.value == "")
	{
		alert ("Please enter top primary markets!");
		CF_this.market1.focus();
		CF_this.market1.select();
		return false;
	}
	
	if (CF_this.marketbusp1.value == "")
	{
		alert ("Please enter % business!");
		CF_this.marketbusp1.focus();
		CF_this.marketbusp1.select();
		return false;
	}
	
	if (CF_this.marketprod1.value == "")
	{
		alert ("Please enter your key products!");
		CF_this.marketprod1.focus();
		CF_this.marketprod1.select();
		return false;
	}
	
	
	if (CF_this.prodname.value == "")
	{
		alert ("Please List the products/applications with which you wish to test Vocera interoperability?");
		CF_this.prodname.focus();
		CF_this.prodname.select();
		return false;
	}
	if (CF_this.proddesc.value == "")
	{
		alert ("Please describe the products/applications with which you wish to test Vocera interoperability ? ");
		CF_this.proddesc.focus();
		CF_this.proddesc.select();
		return false;
	}
	
	
	
	return true;
}
//VIP




//WIP 


function validatwipform(CF_this)
{
	if (CF_this.company.value == "")
	{
		alert ("Please enter Company legal name");
		CF_this.company.focus();
		CF_this.company.select();
		return false;
	}
	
	if (CF_this.dba.value == "")
	{
		alert ("Please enter Doing business as (DBA)");
		CF_this.dba.focus();
		CF_this.dba.select();
		return false;
	}
	
	if (CF_this.address_1.value == "")
	{
		alert ("Please enter Address line 1");
		CF_this.address_1.focus();
		CF_this.address_1.select();
		return false;
	}
	
	
	
	
	if (CF_this.city.value == "")
	{
		alert ("Please enter City");
		CF_this.city.focus();
		CF_this.city.select();
		return false;
	}
	
	if (CF_this.state.value == "")
	{
		alert ("Please enter Stat/province");
		CF_this.state.focus();
		CF_this.state.select();
		return false;
	}
	
	if (CF_this.zip.value == "")
	{
		alert ("Please enter Zip/postal code");
		CF_this.zip.focus();
		CF_this.zip.select();
		return false;
	}
	
	if (CF_this.country.value == "")
	{
		alert ("Please enter Country");
		CF_this.country.focus();
		CF_this.country.select();
		return false;
	}
	
	if (CF_this.phone.value == "")
	{
		alert ("Please enter Phone");
		CF_this.phone.focus();
		CF_this.phone.select();
		return false;
	}
	
	if (CF_this.website.value == "")
	{
		alert ("Please enter Website");
		CF_this.website.focus();
		CF_this.website.select();
		return false;
	}
	
	if (CF_this.list_other_locations.value == "")
	{
		alert ("Please List other locations in which your company operates remote offices (city, state)");
		CF_this.list_other_locations.focus();
		CF_this.list_other_locations.select();
		return false;
	}
	
	if (CF_this.first_name.value == "")
	{
		alert ("Please enter First Name");
		CF_this.first_name.focus();
		CF_this.first_name.select();
		return false;
	}
	
	
	if (CF_this.last_name.value == "")
	{
		alert ("Please enter Last Name");
		CF_this.last_name.focus();
		CF_this.last_name.select();
		return false;
	}
	
	if (CF_this.title.value == "")
	{
		alert ("Please enter Title");
		CF_this.title.focus();
		CF_this.title.select();
		return false;
	}
	
	
	if (CF_this.pcontact_phone.value == "")
	{
		alert ("Please enter Primary Contact Phone");
		CF_this.pcontact_phone.focus();
		CF_this.pcontact_phone.select();
		return false;
	}
	
	
	if (CF_this.pcontact_cellphone.value == "")
	{
		alert ("Please enter Primary Contact Cell Phone");
		CF_this.pcontact_cellphone.focus();
		CF_this.pcontact_cellphone.select();
		return false;
	}
	
	if (CF_this.email.value == "")
	{
		alert ("Please enter Primary Contact Email");
		CF_this.email.focus();
		CF_this.email.select();
		return false;
	}
	
	if (CF_this.total_number_of_employees.value == "")
	{
		alert ("Please enter Total number of employees");
		CF_this.total_number_of_employees.focus();
		CF_this.total_number_of_employees.select();
		return false;
	}
	
	if (CF_this.number_of_systems_engineers.value == "")
	{
		alert ("Please enter Number of systems engineers");
		CF_this.number_of_systems_engineers.focus();
		CF_this.number_of_systems_engineers.select();
		return false;
	}
	
	if (CF_this.years_in_business.value == "")
	{
		alert ("Please enter Years in business");
		CF_this.years_in_business.focus();
		CF_this.years_in_business.select();
		return false;
	}
	
	if (CF_this.years_in_business_deploying_wireless_LANs_and_VoIP.value == "")
	{
		alert ("Please enter Years in business deploying wireless LANs and VoIP");
		CF_this.years_in_business_deploying_wireless_LANs_and_VoIP.focus();
		CF_this.years_in_business_deploying_wireless_LANs_and_VoIP.select();
		return false;
	}
	
	
	
	if (!_CF_hasValue(CF_this.previous_experience, "RADIO"))
	{
		alert ("Please enter Previous experience deploying infrastructure to support a Vocera installation");
		return false;
	}
	
	
	
	
	if (CF_this.survey.value == "")
	{
		alert ("Please Describe previous VoIP site survey and installation experience");
		CF_this.survey.focus();
		CF_this.survey.select();
		return false;
	}
	
	
	
	
	
	
	
	
	
	
	return true;
}


// END WIP

//Online Quote

function validatquoteform(CF_this)
{
	
		//CF_this.Square_Footage_of_Entire_Facility.value = CF_this.Square_Footage_of_Entire_Facility.value.replace(/,/g,'');
	
	
	if (CF_this.Quote_Type.value == "")
	{
		alert ("Please enter Quote Type");
		
		return false;
	}
	
	
	if (CF_this.Company.value == "")
	{
		alert ("Please enter Company");
		CF_this.Company.focus();
		CF_this.Company.select();
		return false;
	}
	
	if (CF_this.Address.value == "")
	{
		alert ("Please enter Address");
		CF_this.Address.focus();
		CF_this.Address.select();
		return false;
	}
	
	if (CF_this.City.value == "")
	{
		alert ("Please enter City");
		CF_this.City.focus();
		CF_this.City.select();
		return false;
	}
	
	if (CF_this.State.value == "")
	{
		alert ("Please enter State");
		CF_this.State.focus();
		CF_this.State.select();
		return false;
	}
	
	if (CF_this.Zip.value == "")
	{
		alert ("Please enter Zip");
		CF_this.Zip.focus();
		CF_this.Zip.select();
		return false;
	}
	
	if (CF_this.Country.value == "")
	{
		alert ("Please enter Country");
		CF_this.Country.focus();
		CF_this.Country.select();
		return false;
	}
	
	if (CF_this.Contact_First_Name.value == "")
	{
		alert ("Please enter Contact First Name");
		CF_this.Contact_First_Name.focus();
		CF_this.Contact_First_Name.select();
		return false;
	}
	
	
	if (CF_this.Contact_Last_Name.value == "")
	{
		alert ("Please enter Contact Last Name");
		CF_this.Contact_Last_Name.focus();
		CF_this.Contact_Last_Name.select();
		return false;
	}
	
	if (CF_this.Title.value == "")
	{
		alert ("Please enter Title");
		CF_this.Title.focus();
		CF_this.Title.select();
		return false;
	}
	
	if (CF_this.Phone.value == "")
	{
		alert ("Please enter Phone");
		CF_this.Phone.focus();
		CF_this.Phone.select();
		return false;
	}
	
	if (CF_this.Email_Address.value == "")
	{
		alert ("Please enter Email Address");
		CF_this.Email_Address.focus();
		CF_this.Email_Address.select();
		return false;
	}
	
	if (CF_this.Department_Considering_Vocera.value == "")
	{
		alert ("Please enter Department Considering Vocera");
		CF_this.Department_Considering_Vocera.focus();
		CF_this.Department_Considering_Vocera.select();
		return false;
	}
	
	
	if (CF_this.License_Size.value == "")
	{
		alert ("Please enter Vocera License Size");
		return false;
	}
	
	
	if (CF_this.Vocera_Telephony_Software.value == "")
	{
		alert ("Please enter Vocera Telephony Software");
		return false;
	}
	
	if (CF_this.Vocera_Report_Server.value == "")
	{
		alert ("Please enter Vocera Report Server");
		
		return false;
	}
	
	
	if (CF_this.Vocera_Messaging_Interface.value == "")
	{
		alert ("Please enter Vocera Messaging Interface");
		
		return false;
	}
	
	
	
	if (CF_this.Vocera_Staging_Server.value == "")
	{
		alert ("Please enter Vocera Staging Server");
		
		return false;
	}
	
	
	
	
	
	if (CF_this.Number_of_Badges.value == "")
	{
		alert ("Please enter Number of Badges");
		CF_this.Number_of_Badges.focus();
		CF_this.Number_of_Badges.select();
		return false;
	}
	
	
	if (CF_this.Number_of_Users_to_Train.value == "")
	{
		alert ("Please enter Number of Users to Train");
		CF_this.Number_of_Users_to_Train.focus();
		CF_this.Number_of_Users_to_Train.select();
		return false;
	}
	
	if (CF_this.Number_of_Users.value == "")
	{
		alert ("Please enter Number of Users");
		CF_this.Number_of_Users.focus();
		CF_this.Number_of_Users.select();
		return false;
	}
	
	
	if (CF_this.Square_Footage_of_Entire_Facility.value == "")
	{
		alert ("Please enter a number for your Square Footage");
		
		return false;
	}
	
	
	
	if (CF_this.Number_of_Buildings.value == "")
	{
		alert ("Please enter Number of Buildings");
		CF_this.Number_of_Buildings.focus();
		CF_this.Number_of_Buildings.select();
		return false;
	}
	
	
	
		//if (CF_this.Square_Footage_of_Entire_Facility.value != "")
	//{

		//sqfootage = CF_this.Square_Footage_of_Entire_Facility.value;
		//if(isNaN(sqfootage)) {
			
			//alert ("Please enter a number for your Square Footage");
			//CF_this.Square_Footage_of_Entire_Facility.focus();
			//CF_this.Square_Footage_of_Entire_Facility.select();
			//return false;
			
			
			
		//}
		
		//if(sqfootage < 125000){
		//	alert ("Please enter a number larger than 125000");
		//	CF_this.Square_Footage_of_Entire_Facility.focus();
		//	CF_this.Square_Footage_of_Entire_Facility.select();
		//	return false;
			
		//}
		
		
		
		
	//}else{
		//alert ("Please enter a number for Square Footage of Entire Facility");
		//CF_this.Square_Footage_of_Entire_Facility.focus();
		//CF_this.Square_Footage_of_Entire_Facility.select();
		//return false;	
	//}
	
	
	//if (CF_this.Square_Footage_of_Units_to_Deploy.value == "")
	//{
		//alert ("Please enter Square Footage of Units to Deploy");
		//CF_this.Square_Footage_of_Units_to_Deploy.focus();
		//CF_this.Square_Footage_of_Units_to_Deploy.select();
		//return false;
	//}
	
	
	
	
	
	
	
	
	return true;
}
//Online Quote

// Validation for ap compatibility request form
function validatapform(_CF_this)
{
	if (!check_textbox(_CF_this.name, "TEXT", "Please enter your name!"))
		return false;
	if (!check_textbox(_CF_this.company, "TEXT", "Please enter company!"))
		return false;
	if (!check_textbox(_CF_this.email, "TEXT", "Please enter your email!"))
		return false;
	if (!check_mail(_CF_this.email, _CF_this.email.value, "Please enter a valid email address!"))
		return false;
	if (!check_textbox(_CF_this.phone, "TEXT", "Please enter your phone!"))
		return false;
	if (!check_phone(_CF_this.phone, _CF_this.phone.value, "Please enter a valid phone number!"))
        return false
	if (_CF_this.apmake.options[_CF_this.apmake.selectedIndex].value == "Other" &&
		_CF_this.others.value == "")
	{
		alert("Please specify your others!");
		_CF_this.others.focus();
		_CF_this.others.select();
		return false;
	}
	if (!check_textbox(_CF_this.apmodel, "TEXT", "Please enter model!"))
		return false;
	if (!check_textbox(_CF_this.apfirmware, "TEXT", "Please enter firmware!"))
		return false;
	//if (!check_textbox(_CF_this.simodel, "TEXT", "Please enter model!"))
		//return false;
	//if (!check_textbox(_CF_this.sifirmware, "TEXT", "Please enter firmware!"))
		//return false;
	if (!check_textbox(_CF_this.installationname, "TEXT", "Please enter installation name!"))
		return false;
	if (!check_textbox(_CF_this.installationdate, "TEXT", "Please enter installation date!"))
		return false;
		
	_CF_this.installationdate.value=FormatShortDateString(_CF_this.installationdate.value);
		
	if (!_CF_checkdate(_CF_this.installationdate.value))
	{
		alert("Please enter mm/dd/yyyy formatted date");
		_CF_this.installationdate.focus();
		_CF_this.installationdate.select();
		return false;
	}
	if (!check_textbox(_CF_this.installationtype, "TEXT", "Please enter installation type!"))
		return false;
	if (!check_textbox(_CF_this.installationbadgesno, "TEXT", "Please enter number of badges!"))
		return false;
	if (!check_textbox(_CF_this.installationapsno, "TEXT", "Please enter number of Aps!"))
		return false;
		
	return true;
}

// Validation for campaign registration
function _VC_validate_campaign(_CF_this)
{		
	// Validate first name
	if (!check_textbox(_CF_this.first_name, "TEXT", "Please enter your first name!"))
		return false;
		
	// Validate last name
	if (!check_textbox(_CF_this.last_name, "TEXT", "Please enter your last name!"))
		return false;	
		
	// Validate email 
	if (!check_textbox(_CF_this.email, "TEXT", "Please enter an email address!"))
		return false;
	if (!check_mail(_CF_this.email, _CF_this.email.value, "Please enter a valid email address!"))
		return false;
		
	// Validate job title
	if (!check_textbox(_CF_this.job_title, "TEXT", "Please enter your job title!"))
		return false;
	
	// Validate Company name
	if (!check_textbox(_CF_this.company_name, "TEXT", "Please enter your Company Name!"))
		return false;
	
	// Validate Address1
	if (!check_textbox(_CF_this.address1, "TEXT", "Please enter your address!"))
		return false;
	
	// Validate City
	if (!check_textbox(_CF_this.city, "TEXT", "Please enter the city name!"))
		return false;
		
	// Validate State
	if (_CF_this.state.selectedIndex == 0)
	{
		alert("Please select state!");
		return false;
	}
	
	// Validate zip code
	if (!check_zip(_CF_this.zip, _CF_this.zip.value, "Please enter a valid zip code!"))
		return false;
		
	// Validate contact method
	if (_CF_this.checkbox1.checked)
	{
		if (!check_radiobox(_CF_this.contactby, "RADIO", "Please select contact method!"))
		return false;
		
		if (_CF_this.contactby[1].checked)
		{
			if (!check_textbox(_CF_this.phone, "TEXT", "You seleced " + '"' + "contact me by phone" + '"' + ", Please enter your phone number!"))
			return false;
		}
	}
	// If the form validates, return true
	return true;
} 


//Javascript coding for Input validation---
var whitespace = " \t\n\r"; 
var creditCardDelimiters = " ";
function stripInitialWhitespace (s)
{   
    var i = 0;
    while ((i < s.length) && charInString (s.charAt(i), whitespace))
       i++;
    return s.substring (i, s.length);
}

function stripFinalWhitespace (s)
{   
    var i = s.length - 1;
    while ((i >= 0) && charInString (s.charAt(i), whitespace))
       i--;
    return s.substring (0, i + 1);
}

function charInString (c, s)
{   for (i = 0; i < s.length; i++)
    {   if (s.charAt(i) == c) return true;
    }
    return false
}
         
function _CF_hasValue(obj, obj_type) 
{
	if (obj_type == "TEXT" || obj_type == "PASSWORD")
	{
		var string1 = stripInitialWhitespace(obj.value);
		var string = stripFinalWhitespace(string1);
		if (string == "")
		{
			return false;
		}
		else
		{
			obj.value = string; 
			return true;
		}
	}
	else if (obj_type == "SELECT")
	{
		for (i=1; i < obj.length; i++)
		{
			if (obj.options[i].selected)
			return true;
		}	
		return false;   
	}
	else if (obj_type == "SINGLE_VALUE_RADIO" || obj_type == "SINGLE_VALUE_CHECKBOX")
	{
		if (obj.checked)
			return true;
		else
			return false;   
	}
	else if (obj_type == "RADIO" || obj_type == "CHECKBOX")
	{
		for (i=0; i < obj.length; i++)
		{
			if (obj[i].checked)
				return true;
		}
		return false;   
	}
}

function _CF_checkemail(object_value)
{
      if (object_value.length == 0)
        return true;
      var i = 1;
          var length = object_value.length;
          // look for @
      while ( (i < length) && (object_value.charAt(i) != "@"))
          {   i++  }
          if ( (i >= length) || (object_value.charAt(i) != "@"))
          {   return false   }
          else
          {   i += 2;  }
          // look for .
          while ((i < length) && (object_value.charAt(i) != "."))
      {   i++  }
      // there must be at least one character after the .
      if ((i >= length - 1) || (object_value.charAt(i) != ".")) 
          {   return false   }
      else 
          {   return true;  }
}

function _CF_checkzip(object_value)
{
    if (object_value.length == 0)
        return true;
                
    if (object_value.length != 5 && object_value.length != 10)
        return false;

    // make sure first 5 digits are a valid integer
    if (object_value.charAt(0) == "-" || object_value.charAt(0) == "+")
        return false;

    if (!_CF_checkinteger(object_value.substring(0,5)))
        return false;

    if (object_value.length == 5)
        return true;
    
    // check if separator is either a'-' or ' '
    if (object_value.charAt(5) != "-" && object_value.charAt(5) != " ")
        return false;

    // check if last 4 digits are a valid integer
    if (object_value.charAt(6) == "-" || object_value.charAt(6) == "+")
        return false;

    return (_CF_checkinteger(object_value.substring(6,10)));
}

function _CF_checkinteger(object_value)
{
    //Returns true if value is a number or is NULL
    //otherwise returns false   

    if (object_value.length == 0)
        return true;

    //Returns true if value is an integer defined as
    //   having an optional leading + or -.
    //   otherwise containing only the characters 0-9.
        var decimal_format = ".";
        var check_char;

    //The first character can be + -  blank or a digit.
        check_char = object_value.indexOf(decimal_format)
    //Was it a decimal?
    if (check_char < 1)
        return _CF_checknumber(object_value);
    else
        return false;
}

function _CF_checknumber(object_value)
    {
    //Returns true if value is a number or is NULL
    //otherwise returns false   

    if (object_value.length == 0)
        return true;

    //Returns true if value is a number defined as
    //   having an optional leading + or -.
    //   having at most 1 decimal point.
    //   otherwise containing only the characters 0-9.
        var start_format = " .+-0123456789";
        var number_format = " .0123456789";
        var check_char;
        var decimal = false;
        var trailing_blank = false;
        var digits = false;

    //The first character can be + - .  blank or a digit.
        check_char = start_format.indexOf(object_value.charAt(0))
    //Was it a decimal?
        if (check_char == 1)
            decimal = true;
        else if (check_char < 1)
                return false;
        
        //Remaining characters can be only . or a digit, but only one decimal.
        for (var i = 1; i < object_value.length; i++)
        {
                check_char = number_format.indexOf(object_value.charAt(i))
                if (check_char < 0)
                        return false;
                else if (check_char == 1)
                {
                        if (decimal)            // Second decimal.
                                return false;
                        else
                                decimal = true;
                }
                else if (check_char == 0)
                {
                        if (decimal || digits)  
                                trailing_blank = true;
        // ignore leading blanks

                }
                else if (trailing_blank)
                        return false;
                else
                        digits = true;
        }       
    //All tests passed, so...
    return true
}

function check_textbox(obj, obj_type, message)
{
     if (!_CF_hasValue(obj, obj_type))
	 {
	    alert (message)
		obj.select()
		obj.focus()
		return false
	 }
	 return true
}

function check_textlen(obj, message)
{
     if (obj.value.length == 0)
            return true
     if (obj.value.length < 5)
         {
            alert (message)
                obj.select()
                obj.focus()
                return false
         }
         return true
}

function check_pwd(obj1_value, obj2, obj2_value, message)
{
      if (obj1_value != obj2_value)
          {
              alert (message)
          obj2.select()
          obj2.focus()
          return false
          }
          return true
}

function check_zip(obj, obj_value, message)
{ 
     if (!_CF_checkzip(obj_value))
         {
                alert (message)
                obj.select()
                obj.focus()
                return false
         }
         return true
}

function check_selectbox(obj, obj_type, message)
{
     if (!_CF_hasValue(obj, obj_type))
	 {
	    alert (message)
		return false
	 }
	 return true
}

function check_radiobox(obj, obj_type, message)
{
     if (!_CF_hasValue(obj, obj_type))
	 {
	    alert (message)
		return false
	 }
	 return true
}

function check_textspace(obj, message)
{
     if (obj.value.length == 0)
	    return true
     for (var i = 1; i < obj.value.length; i++)
	 {
	      if (charInString (obj.value.charAt(i), whitespace))
		  {
		     alert (message)
			 obj.select()
             obj.focus()
			 return false
		  }
     }
	 return true
}

function check_mail(obj, obj_value, message)
{
     if (!_CF_checkemail(obj_value))
	 {
	    alert (message)
		obj.select()
		obj.focus()
		return false
	 }
	 return true
}

function check_zip(obj, obj_value, message)
{ 
     if (!_CF_checkzip(obj_value))
	 {
	 	alert (message)
		obj.select()
		obj.focus()
		return false
	 }
	 return true
}

function check_phone(obj, obj_value, message)
{

	if ((_CF_checknumber(obj_value)) && (obj_value.length=10))
	{
		obj_value = obj_value.substring(0,3) + "-" + obj_value.substring(3,6) + "-" + obj_value.substring(6,10);
		obj.value=obj_value;
	}

	if (!_CF_checkphone(obj_value))
	{
		alert ("Please enter a valid phone number!")
		obj.select()
		obj.focus()
		return false
	}
	return true;
}

function check_date(obj, obj_value, message)
{
     if (!_CF_checkdate(obj_value))
	 {
	    alert (message)
		obj.select()
		obj.focus()
		return false
	 }
	 return true
}

function check_integer(obj, obj_value, message)
{
      if (!_CF_checkinteger(obj_value))
	  {
	     alert (message)
		 obj.select()
		 obj.focus()
		 return false
	  }
	  return true
}

function check_number(obj, obj_value, message)
{
      if (!_CF_checknumber(obj_value))
	  {
	      alert (message)
		  obj.select()
		  obj.focus()
		  return false
	  }
	  return true
}

function checkform(CF_this)
{
	
	if (!_CF_hasValue(CF_this.fname, "TEXT"))
	{
		alert ("Please enter your first name!");
		CF_this.fname.select();
		CF_this.fname.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.lname, "TEXT"))
	{
		alert ("Please enter your last name!");
		CF_this.lname.select();
		CF_this.lname.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.company, "TEXT"))
	{
		alert ("Please enter company name!");
		CF_this.company.select();
		CF_this.company.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.city, "TEXT"))
	{
		alert ("Please enter city!");
		CF_this.city.select();
		CF_this.city.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.state, "SELECT"))
	{
		alert ("Please select state!");
		return false;
	}
	if (!_CF_hasValue(CF_this.email, "TEXT"))
	{
		alert ("Please enter your email address!");
		CF_this.email.select();
		CF_this.email.focus();
		return false;
	}
	if (!_CF_checkemail(CF_this.email.value))
	{
		alert ("Please enter correct email address!");
		CF_this.email.select();
		CF_this.email.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.phone, "TEXT"))
	{
		alert ("Please enter your phone number!");
		CF_this.phone.select();
		CF_this.phone.focus();
		return false;
	}
	return true;
}

function checkform1(CF_this)		
{
		
	if (!check_selectbox(CF_this.salutation, "SELECT", "Please select your salutation."))
		return false
		
	if (!check_textbox(CF_this.first_name, "TEXT", "Please enter your first name."))
		return false
		
	if (!check_textbox(CF_this.last_name, "TEXT", "Please enter your last name."))
		return false
		
	if (!check_textbox(CF_this.company, "TEXT", "Please enter your company."))
		return false
		
	if (!check_textbox(CF_this.email, "TEXT", "Please enter your email."))
		return false		
		
	if (!check_mail(CF_this.email, CF_this.email.value, "Please enter your email in right format."))
		return false
		
	if (!check_textbox(CF_this.phone, "TEXT", "Please enter your phone."))
		return false	
		
	if (!check_textbox(CF_this.city, "TEXT", "Please enter your city."))
		return false	
		
	if (!check_textbox(CF_this.state, "TEXT", "Please enter your state."))
		return false	
		
	if (!check_textbox(CF_this.country, "TEXT", "Please enter your country."))
		return false	
		
	if (!check_selectbox(CF_this.industry, "SELECT", "Please select your industry."))
		return false		
		
	if (!check_selectbox(CF_this.ooN30000000sWMW, "SELECT", "Please select your Technical Expertise."))
		return false
		
		
	return true;
}
	
	
function checkOptInOutForm(CF_this)
{
	
	if (!_CF_hasValue(CF_this.email, "TEXT"))
	{
		alert ("Please enter your email address!");
		CF_this.email.select();
		CF_this.email.focus();
		return false;
	}
	if (!_CF_checkemail(CF_this.email.value))
	{
		alert ("Please enter correct email address!");
		CF_this.email.select();
		CF_this.email.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.opt, "RADIO"))
	{
		alert ("Please either opt-in or opt-out!");
		return false;
	}
	return true;
}


function checkLeadWebform(CF_this)
{
	if (!_CF_hasValue(CF_this.first_name, "TEXT"))
	{
		alert ("Please enter your first name!");
		CF_this.first_name.select();
		CF_this.first_name.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.last_name, "TEXT"))
	{
		alert ("Please enter your last name!");
		CF_this.last_name.select();
		CF_this.last_name.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.company, "TEXT"))
	{
		alert ("Please enter company name!");
		CF_this.company.select();
		CF_this.company.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.email, "TEXT"))
	{
		alert ("Please enter your email address!");
		CF_this.email.select();
		CF_this.email.focus();
		return false;
	}
	if (!_CF_checkemail(CF_this.email.value))
	{
		alert ("Please enter correct email address!");
		CF_this.email.select();
		CF_this.email.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.phone, "TEXT"))
	{
		alert ("Please enter your phone number!");
		CF_this.phone.select();
		CF_this.phone.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.city, "TEXT"))
	{
		alert ("Please enter city!");
		CF_this.city.select();
		CF_this.city.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.state, "TEXT"))
	{
		alert ("Please select state!");
		CF_this.state.select();
		CF_this.state.focus();
		return false;
	}
	return true;
}

function checkUserGroupform(CF_this)
{
	if (!_CF_hasValue(CF_this.first_name, "TEXT"))
	{
		alert ("Please enter your first name!");
		CF_this.first_name.select();
		CF_this.first_name.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.last_name, "TEXT"))
	{
		alert ("Please enter your last name!");
		CF_this.last_name.select();
		CF_this.last_name.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.company, "TEXT"))
	{
		alert ("Please enter company name!");
		CF_this.company.select();
		CF_this.company.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.email, "TEXT"))
	{
		alert ("Please enter your email address!");
		CF_this.email.select();
		CF_this.email.focus();
		return false;
	}
	if (!_CF_checkemail(CF_this.email.value))
	{
		alert ("Please enter correct email address!");
		CF_this.email.select();
		CF_this.email.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.reemail, "TEXT"))
	{
		alert ("Please verify your email address!");
		CF_this.reemail.select();
		CF_this.reemail.focus();
		return false;
	}
	if (CF_this.email.value != CF_this.reemail.value)
	{
		alert ("Re-entered email is not matched");
		CF_this.reemail.select();
		CF_this.reemail.focus();
		return false;
	}
	if (!_CF_hasValue(CF_this.age, "SINGLE_VALUE_CHECKBOX", 0))
	{
		alert ("You must be older than 18 to become a Vocera eList member");
		return false;
	}
	if (!_CF_hasValue(CF_this.readprivacy, "SINGLE_VALUE_CHECKBOX", 0))
	{
		alert ("You have to read our privacy policy and agree to its terms, then check the box");
		return false;
	}
	return true;
}

function FormatShortDateString(sDate)
{
	
	isplit=sDate.indexOf("/");
	if (isplit == -1 || (isplit + 1 ) == sDate.length) 
	{
		return sDate;
	}
	sMonth = sDate.substring(0, isplit);
	//alert(sMonth);
	
	isplit = sDate.indexOf("/", isplit + 1);
	sDay = sDate.substring((sMonth.length + 1), isplit);
	if (isplit == -1 || (isplit + 1 ) == sDate.length)
	{
		return sDate;
	}
	//alert(sDay);

	sYear = sDate.substring(isplit + 1);
	//alert(sYear);

	if (sMonth.length==1) 
	{
		sMonth = "0" + sMonth;
	}
	//alert(sMonth);
	if (sDay.length==1) 
	{
		sDay = "0" + sDay;
	}
	//alert(sDay);
	if (sYear.length==2) 
	{
		sYear = "20" + sYear;
	}

	sDate = sMonth + "/" + sDay + "/" + sYear;
	return sDate;
}

function validatecommform(CF_this)
{
	if (CF_this.First_Name.value == "")
	{
		alert ("Please enter your first name");
		CF_this.First_Name.focus();
		CF_this.First_Name.select();
		return false;
	}
	
	if (CF_this.Last_Name.value == "")
	{
		alert ("Please enter your last name");
		CF_this.Last_Name.focus();
		CF_this.Last_Name.select();
		return false;
	}
	
	if (CF_this.Job_Title.value == "")
	{
		alert ("Please enter your job title");
		CF_this.Job_Title.focus();
		CF_this.Job_Title.select();
		return false;
	}
	
	
	
	
	if (CF_this.Phone.value == "")
	{
		alert ("Please enter your phone");
		CF_this.Phone.focus();
		CF_this.Phone.select();
		return false;
	}
	
	if (CF_this.Email.value == "")
	{
		alert ("Please enter your email");
		CF_this.Email.focus();
		CF_this.Email.select();
		return false;
	}
	
	if (CF_this.Partner_Company_Name.value == "")
	{
		alert ("Please enter your partner company name");
		CF_this.Partner_Company_Name.focus();
		CF_this.Partner_Company_Name.select();
		return false;
	}
	if (CF_this.Bill_to_Name.value == "")
	{
		alert ("Please enter the bill to name");
		CF_this.Bill_to_Name.focus();
		CF_this.Bill_to_Name.select();
		return false;
	}
	if (CF_this.Attention.value == "")
	{
		alert ("Please enter attention to");
		CF_this.Attention.focus();
		CF_this.Attention.select();
		return false;
	}
	
	if (CF_this.Address.value == "")
	{
		alert ("Please enter address");
		CF_this.Address.focus();
		CF_this.Address.select();
		return false;
	}
	
	if (CF_this.City.value == "")
	{
		alert ("Please enter city");
		CF_this.City.focus();
		CF_this.City.select();
		return false;
	}
	
	if (CF_this.State.value == "")
	{
		alert ("Please enter state");
		CF_this.State.focus();
		CF_this.State.select();
		return false;
	}
	
	if (CF_this.Zip.value == "")
	{
		alert ("Please enter your zip/postal code");
		CF_this.Zip.focus();
		CF_this.Zip.select();
		return false;
	}
	if (CF_this.Ship_to_Address_Different.checked == true == true && CF_this.Ship_to_Attention.value == "")
	{
		alert ("Please enter ship-to attention");
		CF_this.Ship_to_Attention.focus();
		CF_this.Ship_to_Attention.select();
		return false;
	}
	
	
	if (CF_this.Ship_to_Address_Different.checked == true && CF_this.Ship_to_Address.value == "")
	{
		alert ("Please enter your ship-to address");
		CF_this.Ship_to_Address.focus();
		CF_this.Ship_to_Address.select();
		return false;
	}
	
	if (CF_this.Ship_to_Address_Different.checked == true && CF_this.Ship_to_City.value == "")
	{
		alert ("Please enter your ship-to city");
		CF_this.Ship_to_City.focus();
		CF_this.Ship_to_City.select();
		return false;
	}
	
	if (CF_this.Ship_to_Address_Different.checked == true && CF_this.Ship_to_State.value == "")
	{
		alert ("Please enter your ship-to state");
		CF_this.Ship_to_State.focus();
		CF_this.Ship_to_State.select();
		return false;
	}
	
	if (CF_this.Ship_to_Address_Different.checked == true && CF_this.Ship_to_Zip.value == "")
	{
		alert ("Please enter your ship-to zip/postal code");
		CF_this.Ship_to_Zip.focus();
		CF_this.Ship_to_Zip.select();
		return false;
	}
	if (CF_this.Ship_to_Address_Different.checked == true && CF_this.Ship_to_Fax.value == "")
	{
		alert ("Please enter your ship-to fax number");
		CF_this.Ship_to_Fax.focus();
		CF_this.Ship_to_Fax.select();
		return false;
	}
	
	
	if (CF_this.Purchasing_Department_Phone.value == "")
	{
		alert ("Please enter your purchasing department phone number");
		CF_this.Purchasing_Department_Phone.focus();
		CF_this.Purchasing_Department_Phone.select();
		return false;
	}
	
	if (CF_this.Authorized_Purchasing_Agent.value == "")
	{
		alert ("Please let us know if you are authorized purchasing agent");
		return false;
	}
	
	
	if (CF_this.Purchasing_Methods_Purchase_Order.checked == false && CF_this.Purchasing_Methods_Credit_Card.checked == false && CF_this.Purchasing_Methods_Other.checked == false)
	{
		alert ("Please enter your purchasing method(s)");
		return false;
	}
	
	
	
	
	if (CF_this.Current_Vocera_Customer.value == "")
	{
		alert ("Please enter if you are a current Vocera customer");
		return false;
	}
	
	if (CF_this.Organization_Tax_Exempt.value == "")
	{
		alert ("Please enter Pif your organization is tax exempt");
		return false;
	}
	
	/*if (!_CF_hasValue(CF_this.previous_experience, "RADIO"))
	{
		alert ("Please enter Previous experience deploying infrastructure to support a Vocera installation");
		return false;
	}*/
	
	
	
	
	
	
	
	
	
	
	return true;
}