function verify(theForm)
{

// ##########################
// ### FOR CONTACT SALES ###
// #########################


	//Verify First Name has a value
	var x = 0;
	if  (theForm.Firstname.value.length==0)
	{
		x += 1;
  		alert("First Name is required.");
                theForm.Firstname.focus();
		return (false);
	}

	//Verify Last Name has a value
	if  (theForm.Lastname.value.length==0)
	{
		x+=1;
   		alert("Last Name is required.");
                theForm.Lastname.focus();
		return (false);
	}

	//Verify Company has a value
	if  (theForm.Company.value.length==0)
	{
		x+=1;
   		alert("Company is required.");
                theForm.Company.focus();
		return (false);
	}


	//Verify Email has a value
	 if  (theForm.Email.value.length==0)
	{
		x+=1;
   		alert("Email is required.");
		return (false);
	}
	 else
	{
	//Verify valid email address
		if (!isEmailAddr(theForm.Email.value))
		{
			x+=1;
			alert("Please enter a valid email address.");
			theForm.Email.focus();
			return (false);
		}
	} 


	//Verify Phone has a value
	if  (theForm.Phone.value.length==0)
	{
		x+=1;
		alert("Phone is required.");
                theForm.Phone.focus();
		return (false);
	}
	else
	{
	//Verify Phone Format
		if  (theForm.Phone.value.length<=9)
		{
			x+=1;
			alert("Phone Number is invalid.");
                theForm.Phone.focus();
			return (false);
		}
	}


	return(true);
}

function isInteger (s)

{   var i;

// Search through string's characters one by one
// until we find a non-numeric character.
// When we do, return false false; if we don't, return true.

for (i = 0; i < s.length; i++)
{   
// Check that current character is number.
var c = s.charAt(i);

if (!isDigit(c)) return (false);
}

// All characters are numbers.
return true;
}
function isDigit (c)
{   return ((c >= "0") && (c <= "9"))
}

function isEmailAddr(email)
{
  	var result = false;
	var theStr = new String(email);
  	var index = theStr.indexOf("@");
	if (index > 0) {
  		var pindex = theStr.indexOf(".",index);
  		if ((pindex > index+1) && (theStr.length > pindex+1)) {
			result = true;
  		}
	}
	return result;
}



function  verifywp(theForm)
{
// ########################
// ### FOR WHITE PAPERS ###
// ########################
	//Verify First Name has a value
	var x = 0;
	if  (theForm.Firstname.value.length==0)
	{
		x += 1;
  		alert("First Name is required.");
		theForm.Firstname.focus();
		return (false);
	}

	//Verify Last Name has a value
	if  (theForm.Lastname.value.length==0)
	{
		x+=1;
   		alert("Last Name is required.");
		theForm.Lastname.focus();
		return (false);
	}


	//Verify Email has a value
	 if  (theForm.Email.value.length==0)
	{
		x+=1;
   		alert("Email is required.");
		theForm.Email.focus();
		return (false);
	}
	 else
	{
	//Verify valid email address
		if (!isEmailAddr(theForm.Email.value))
		{
			x+=1;
			alert("Please enter a valid email address.");
			theForm.Email.focus();
			return (false);
		}
	} 

	//Verify Company has a value
	if  (theForm.Company.value.length==0)
	{
		x+=1;
   		alert("Company is required.");
		theForm.Company.focus();
		return (false);
	}


	return(true);
}




function  verifies(theForm)
{
// ##########################
// ### FOR NEWSLETTER SUB ###
// ##########################
	//Verify First Name has a value
	var x = 0;
	if  (theForm.Firstname.value.length==0)
	{
		x += 1;
  		alert("First Name is required.");
		return (false);
	}

	//Verify Last Name has a value
	if  (theForm.Lastname.value.length==0)
	{
		x+=1;
   		alert("Last Name is required.");
		return (false);
	}

	//Verify Company has a value
	if  (theForm.Company.value.length==0)
	{
		x+=1;
   		alert("Company is required.");
		return (false);
	}


	//Verify Email has a value
	 if  (theForm.Email.value.length==0)
	{
		x+=1;
   		alert("Email is required.");
		return (false);
	}
	 else
	{
	//Verify valid email address
		if (!isEmailAddr(theForm.Email.value))
		{
			x+=1;
			alert("Please enter a valid email address.");
			theForm.Email.focus();
			return (false);
		}
	} 




	return(true);
}




function  verifyposter(theForm)
{
// #########################
// ###  FOR IPV6 POSTER  ###
// #########################
	//Verify First Name has a value
	var x = 0;
	if  (theForm.Firstname.value.length==0)
	{
		x += 1;
  		alert("First Name is required.");
		theForm.Firstname.focus();
		return (false);
	}

	//Verify Last Name has a value
	if  (theForm.Lastname.value.length==0)
	{
		x+=1;
   		alert("Last Name is required.");
		theForm.Lastname.focus();
		return (false);
	}

	//Verify Company has a value
	if  (theForm.Company.value.length==0)
	{
		x+=1;
   		alert("Company is required.");
		theForm.Company.focus();
		return (false);
	}

	//Verify Address has a value
	if  (theForm.Address.value.length==0)
	{
		x+=1;
   		alert("Address is required.");
		theForm.Address.focus();
		return (false);
	}

	//Verify City has a value
	if  (theForm.City.value.length==0)
	{
		x+=1;
   		alert("City is required.");
		theForm.City.focus();
		return (false);
	}


	//Verify Zip has a value
	if  (theForm.Zip.value.length==0)
	{
		x+=1;
   		alert("Zip is required.");
		theForm.Zip.focus();
		return (false);
	}


	//Verify Email has a value
	 if  (theForm.Email.value.length==0)
	{
		x+=1;
   		alert("Email is required.");
		return (false);
	}
	 else
	{
	//Verify valid email address
		if (!isEmailAddr(theForm.Email.value))
		{
			x+=1;
			alert("Please enter a valid email address.");
			theForm.Email.focus();
			return (false);
		}
	} 




	return(true);
}


function verifine(theForm)
{

// #########################
// ###  FOR IP SEMINARS  ###
// #########################


	//Verify First Name has a value
	var x = 0;
	if  (theForm.Firstname.value.length==0)
	{
		x += 1;
  		alert("First Name is required.");
                theForm.Firstname.focus();
		return (false);
	}

	//Verify Last Name has a value
	if  (theForm.Lastname.value.length==0)
	{
		x+=1;
   		alert("Last Name is required.");
                theForm.Lastname.focus();
		return (false);
	}

	//Verify Company has a value
	if  (theForm.Company.value.length==0)
	{
		x+=1;
   		alert("Company is required.");
                theForm.Company.focus();
		return (false);
	}


	//Verify Email has a value
	 if  (theForm.Email.value.length==0)
	{
		x+=1;
   		alert("Email is required.");
		return (false);
	}
	 else
	{
	//Verify valid email address
		if (!isEmailAddr(theForm.Email.value))
		{
			x+=1;
			alert("Please enter a valid email address.");
			theForm.Email.focus();
			return (false);
		}
	} 


	return(true);
}


function verifyMIT(theForm)
{

// ###############################
// ###  FOR MIT Lunch-n-Learn  ###
// ###############################


	//Verify First Name has a value
	var x = 0;
	if  (theForm.Firstname.value.length==0)
	{
		x += 1;
  		alert("First Name is required.");
                theForm.Firstname.focus();
		return (false);
	}

	//Verify Last Name has a value
	if  (theForm.Lastname.value.length==0)
	{
		x+=1;
   		alert("Last Name is required.");
                theForm.Lastname.focus();
		return (false);
	}


	//Verify Email has a value
	 if  (theForm.Email.value.length==0)
	{
		x+=1;
   		alert("Email is required.");
		return (false);
	}
	 else
	{
	//Verify valid email address
		if (!isEmailAddr(theForm.Email.value))
		{
			x+=1;
			alert("Please enter a valid email address.");
			theForm.Email.focus();
			return (false);
		}
	} 


	return(true);
}

function verifyCat(theForm)
{

// #################################
// ###  FOR Catalogue Downloads  ###
// #################################


	//Verify First Name has a value
	var x = 0;
	if  (theForm.Firstname.value.length==0)
	{
		x += 1;
  		alert("First Name is required.");
                theForm.Firstname.focus();
		return (false);
	}

	//Verify Last Name has a value
	if  (theForm.Lastname.value.length==0)
	{
		x+=1;
   		alert("Last Name is required.");
                theForm.Lastname.focus();
		return (false);
	}


	//Verify Company has a value
	if  (theForm.Company.value.length==0)
	{
		x+=1;
   		alert("Company is required.");
                theForm.Company.focus();
		return (false);
	}


	//Verify Email has a value
	 if  (theForm.Email.value.length==0)
	{
		x+=1;
   		alert("Email is required.");
		return (false);
	}
	 else
	{
	//Verify valid email address
		if (!isEmailAddr(theForm.Email.value))
		{
			x+=1;
			alert("Please enter a valid email address.");
			theForm.Email.focus();
			return (false);
		}
	} 


	//Verify Phone has a value
	if  (theForm.Phone.value.length==0)
	{
		x+=1;
		alert("Phone is required.");
                theForm.Phone.focus();
		return (false);
	}
	else
	{
	//Verify Phone Format
		if  (theForm.Phone.value.length<=9)
		{
			x+=1;
			alert("Phone Number is invalid.");
                theForm.Phone.focus();
			return (false);
		}
	}

	return(true);
}

function RefreshImage(valImageId) {
	var objImage = document.images[valImageId];
	if (objImage == undefined) {
		return;
	}
	var now = new Date();
	objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}


function verifeed(theForm)
{

// ##########################
// ### FOR FEEDBACK PAGES ###
// ##########################


	//Verify First Name has a value
	var x = 0;
	if  (theForm.Firstname.value.length==0)
	{
		x += 1;
  		alert("First Name is required.");
                theForm.Firstname.focus();
		return (false);
	}

	//Verify Last Name has a value
	if  (theForm.Lastname.value.length==0)
	{
		x+=1;
   		alert("Last Name is required.");
                theForm.Lastname.focus();
		return (false);
	}

	//Verify Company has a value
	if  (theForm.Company.value.length==0)
	{
		x+=1;
   		alert("Company is required.");
                theForm.Company.focus();
		return (false);
	}


	//Verify Email has a value
	 if  (theForm.Email.value.length==0)
	{
		x+=1;
   		alert("Email is required.");
		return (false);
	}
	 else
	{
	//Verify valid email address
		if (!isEmailAddr(theForm.Email.value))
		{
			x+=1;
			alert("Please enter a valid email address.");
			theForm.Email.focus();
			return (false);
		}
	} 



	return(true);
}

function isInteger (s)

{   var i;

// Search through string's characters one by one
// until we find a non-numeric character.
// When we do, return false false; if we don't, return true.

for (i = 0; i < s.length; i++)
{   
// Check that current character is number.
var c = s.charAt(i);

if (!isDigit(c)) return (false);
}

// All characters are numbers.
return true;
}
function isDigit (c)
{   return ((c >= "0") && (c <= "9"))
}

function isEmailAddr(email)
{
  	var result = false;
	var theStr = new String(email);
  	var index = theStr.indexOf("@");
	if (index > 0) {
  		var pindex = theStr.indexOf(".",index);
  		if ((pindex > index+1) && (theStr.length > pindex+1)) {
			result = true;
  		}
	}
	return result;
}

function send()
{
document.fbsearch.submit()
}


function  verifywpr(theForm)
{
// ########################
// ### FOR WHITE PAPERS ### *THIS WAS UPDATED 5-17-10 to add CITY and STATE
// ########################
	//Verify First Name has a value
	var x = 0;
	if  (theForm.Firstname.value.length==0)
	{
		x += 1;
  		alert("First Name is required.");
		theForm.Firstname.focus();
		return (false);
	}

	//Verify Last Name has a value
	if  (theForm.Lastname.value.length==0)
	{
		x+=1;
   		alert("Last Name is required.");
		theForm.Lastname.focus();
		return (false);
	}


	//Verify Email has a value
	 if  (theForm.Email.value.length==0)
	{
		x+=1;
   		alert("Email is required.");
		theForm.Email.focus();
		return (false);
	}
	 else
	{
	//Verify valid email address
		if (!isEmailAddr(theForm.Email.value))
		{
			x+=1;
			alert("Please enter a valid email address.");
			theForm.Email.focus();
			return (false);
		}
	} 

	//Verify Company has a value
	if  (theForm.Company.value.length==0)
	{
		x+=1;
   		alert("Company is required.");
		theForm.Company.focus();
		return (false);
	}

	//Verify City has a value
	if  (theForm.City.value.length==0)
	{
		x+=1;
   		alert("City is required.");
		theForm.City.focus();
		return (false);
	}

	//Verify State has a value
	  STChoice = theForm.State.selectedIndex
	  if (theForm.State.options[STChoice].value == "")
	  {
	     alert("You must pick a State")
		theForm.City.focus();
		return (false);
	   } 




	return(true);
}


