<!--

function openWindow(theURL,winName,width,height) {
    popup = window.open(theURL,winName,'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,toolbar=no,location=no,directories=no,status=no');
	moveToCenter (popup,width,height);
}
function openScrollWindow(theURL,winName,width,height) {
    popup = window.open(theURL,winName,'width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no,toolbar=no,location=no,directories=no,status=no');
	moveToCenter (popup,width,height);
}
function moveToCenter (wind, winX, winY) {
	screenWidth = screen.availWidth;
	screenHeight = screen.availHeight;
	finalX = (screenWidth / 2) - (winX/2);
	finalY = (screenHeight / 2) - (winY/2);
	wind.moveTo (finalX, finalY);
}

function checkComments(comments)
{
  if (comments.value == "")
  {
    alert("Are you sure that you would not like to send us your comments?");
    comments.focus();
	return false;
  }
  return true;
}
function checkTile(title)
{
  if (title.value == "")
  {
    alert("Please enter your title.");
	title.focus();
	return false;
  }
  return true;
}

function checkFirstName(fname)
{
  if (fname.value == "")
  {
    alert("Please enter your first name.");
	fname.focus();
	return false;
  }
  return true;
}

function checkLastName(lname)
{
  if (lname.value == "")
  {
    alert("Please enter your last name.");
	lname.focus();
	return false;
  }
  return true;
}

function checkCompany(company)
{
  if (company.value == "")
  {
    alert("Please enter your company name.");
	company.focus();
	return false;
  }
  return true;
}

function checkStreet(street)
{
  if (street.value == "")
  {
    alert("Please enter your street name.");
	street.focus();
	return false;
  }
  return true;
}

function checkCity(city)
{
  if (city.value == "")
  {
    alert("Please enter your city name.");
	city.focus();
	return false;
  }
  return true;
}

function checkState(state)
{
  if (state.value == "")
  {
    alert("Please choose your state/region name.");
	state.focus();
	return false;
  }
  return true;
}

function checkCountry(country)
{
  if (country.value == "")
  {
    alert("Please enter your country name.");
	country.focus();
	return false;
  }
  return true;
}

function checkZip(zip)
{
  if (zip.value == "")
  {
    alert("Please enter your ZIP or postal code.");
	zip.focus();
	return false;
  }
  return true;
}

function checkEmail(email)
{
  invalidChars="`~!#$%^&*()+=|\;:'<,>/? ";
  if (email.value == "")
  {
	alert("Please enter your e-mail address.");
	email.focus();
   	return false;
  }
  for(i=0;i<invalidChars.length;i++)
  {
	badChar=invalidChars.charAt(i);
	if (email.value.indexOf(badChar,0)>-1)
	{
	  alert("Please enter a valid e-mail address.");
	  email.focus();
	  return false;
	}
  }
  atPos=email.value.indexOf("@",1)
  if (atPos==-1)
  {
	alert("Please enter a valid e-mail address.");
	email.focus();
	return false;
  }
  if (email.value.indexOf("@",atPos+1)>-1)
  {
	alert("Please enter a valid e-mail address.");
	email.focus();
	return false;
  }
  periodPos=email.value.indexOf(".",atPos);
  if (periodPos==-1)
  {
	alert("Please enter a valid e-mail address.");
	email.focus();
	return false;
  }
  return true;
}

function checkAreaAndCountryCode(phone)
{
  if (phone.value.length < 10)
  {
    alert("Please enter your full phone/fax number including area code and, if outside of US, country code.");
	phone.focus();
  }
}

function checkEntries(comments,title,fname,lname,company,street,city,state,zip,country,email)
{
 if(!checkComments(comments)||!checkTitle(title)||!checkFirstName(fname)||!checkLastName(lname)||!checkCompany(company)||!checkStreet(street)||!checkCity(city)||!checkState(state)||!checkZip(zip)||!checkCountry(country)||!checkEmail(email))
	return false;
  else
  {
    alert("Thank you, your mail has been processed!");
	return true;
  }
}

//-->