function CheckForm()
{
document.FB.Lxone.value = navigator.appName + ", " + navigator.userAgent;
document.FB.Lxtwo.value = screen.width + "*" + screen.height;
if (navigator.appName == "Netscape")
{
  document.FB.Lxtwo.value += "*" + window.outerWidth + "*" + window.outerHeight;
}
var Email = document.FB.Email.value;
var ErrNr = 0;
var ErrMsg = new Array("",
"The message body is empty.",
"Please enter your email address.",
"Sorry, this does not look like a valid email address.",
"Please enter your first name.",
"Please enter your last name.",
"Please indicate your company/institution.",
"Please enter your street address.",
"Please enter your ZIP code, city and, if applicable, state.",
"Please indicate your country.");

document.FB.Faxno.style.backgroundColor = "#cee6ff";
document.FB.Phone.style.backgroundColor = "#cee6ff";
document.FB.Job.style.backgroundColor = "#cee6ff";
document.FB.Abteilung.style.backgroundColor = "#cee6ff";

if(document.FB.Country.value.length<2 || document.FB.Country.value=="Country*")
{
  document.FB.Country.focus();
  document.FB.Country.style.backgroundColor = "#ffd0d3";
  ErrNr = 9;
}
else { document.FB.Country.style.backgroundColor = "#cee6ff"; }
if(document.FB.City.value.length<5 || document.FB.City.value=="ZIP/City/State*")
{
  document.FB.City.focus();
  document.FB.City.style.backgroundColor = "#ffd0d3";
  ErrNr = 8;
}
else { document.FB.Street.style.backgroundColor = "#cee6ff"; }
if(document.FB.Street.value.length<5 || document.FB.Street.value=="Street address*")
{
  document.FB.Street.focus();
  document.FB.Street.style.backgroundColor = "#ffd0d3";
  ErrNr = 7;
}
else { document.FB.Street.style.backgroundColor = "#cee6ff"; }
if(Email.indexOf('@')<1||Email.indexOf('.')<1||Email.length<7||Email.indexOf('@.')>=0||Email.indexOf('.@')>=0)
{
  document.FB.Email.focus();
  document.FB.Email.style.backgroundColor = "#ffd0d3";
  ErrNr = 3;
}
else { document.FB.Email.style.backgroundColor = "#cee6ff"; }
if(Email == '' || Email == 'Your email address*')
{
  document.FB.Email.focus();
  document.FB.Email.style.backgroundColor = "#ffd0d3";
  ErrNr = 2;
}
else { document.FB.Email.style.backgroundColor = "#cee6ff"; }
if(document.FB.Firma.value.length<3 || document.FB.Firma.value=="Company*")
{
  document.FB.Firma.focus();
  document.FB.Firma.style.backgroundColor = "#ffd0d3";
  ErrNr = 6;
}
else { document.FB.Firma.style.backgroundColor = "#cee6ff"; }
if(document.FB.Nachname.value.length<2 || document.FB.Nachname.value=="Last name*")
{
  document.FB.Nachname.focus();
  document.FB.Nachname.style.backgroundColor = "#ffd0d3";
  ErrNr = 5;
}
else { document.FB.Nachname.style.backgroundColor = "#cee6ff"; }
if(document.FB.Vorname.value.length<2 || document.FB.Vorname.value=="First name*")
{
  document.FB.Vorname.focus();
  document.FB.Vorname.style.backgroundColor = "#ffd0d3";
  ErrNr = 4;
}
else { document.FB.Vorname.style.backgroundColor = "#cee6ff"; }
if(document.FB.Anrede.options.selectedIndex==0)
{
  document.FB.Anrede.style.backgroundColor = "#ffd0d3";
}
else { document.FB.Anrede.style.backgroundColor = "#cee6ff"; }
if(document.FB.Comments.value=='' || document.FB.Comments.value=='Your message*')
{
  document.FB.Comments.focus();
  document.FB.Comments.style.backgroundColor = "#ffd0d3";
  ErrNr = 1;
}
else { document.FB.Comments.style.backgroundColor = "#cee6ff"; }

if(ErrNr>0)
{
  if(ErrNr==3)
  {
    alert("Sorry,\n\""+ Email +"\" does not look like a valid email address.");
  }
  else { alert(ErrMsg[ErrNr]); }
  return false;
}

}

function Uncolor()
{
  document.FB.Faxno.style.backgroundColor = "#ffffff";
  document.FB.Phone.style.backgroundColor = "#ffffff";
  document.FB.Job.style.backgroundColor = "#ffffff";
  document.FB.Abteilung.style.backgroundColor = "#ffffff";
  document.FB.Country.style.backgroundColor = "#ffffff";
  document.FB.City.style.backgroundColor = "#ffffff";
  document.FB.Street.style.backgroundColor = "#ffffff";
  document.FB.Email.style.backgroundColor = "#ffffff";
  document.FB.Firma.style.backgroundColor = "#ffffff";
  document.FB.Nachname.style.backgroundColor = "#ffffff";
  document.FB.Vorname.style.backgroundColor = "#ffffff";
  document.FB.Anrede.style.backgroundColor = "#ffffff";
  document.FB.Comments.style.backgroundColor = "#ffffff";
}
