function sub()
{
//set form field types
var types = new Array('name','company_name','position','city','zip','email','titlea','urla','descriptiona');
var err = 0;
var newtype = "";
var thistype="";
for(i=0;i<types.length;i++)
{
if(eval('document.mail.'+types[i]+'.value') == "")
{
 eval("document.mail."+types[i]+".style.borderColor= '#ff0000';");
 switch(types[i])
 {
 case "titlea":
 newtype = "Site Title";
 break;
 
 case "urla":
 newtype = "Site URL";
 break;
 
 case "descriptiona":
 newtype = "Site Description";
 break;
 
 case "name":
 newtype = "Name";
 break;
 
 case "company_name":
 newtype = "Company Name";
 break;
 
 case "position":
 newtype = "Position";
 break;
 
 case "city":
 newtype = "City";
 break;
 
 case "zip":
 newtype = "Zip";
 break;
 
  case "email":
 newtype = "Email";
 break;
 
 }

 
if(newtype!="")
{
thistype += "You didn't fill out: "+newtype+"\n";
err='1';
}
//alert("You didn't fill out the "+newtype+" field!");

}

}

if(err != '1')
{
return true;
}
else{
alert("------------------------\n\n"+thistype+"\n\n------------------------\n\n[click OK and try again]");
return false;
}
}


function sub1()
{
//set form field types
var types = new Array('name','company','email','address','city','state','zip','comments');
var err = 0;
for(i=0;i<types.length;i++)
{
if(eval('document.mail.'+types[i]+'.value') == "")
{
 eval("document.mail."+types[i]+".style.borderColor= '#ff0000';");
alert("You didn't fill out the "+types[i]+" field!");
err='1';
}

}

if(err != '1')
{
return true;
}
else{
return false;
}
}


