
function checkage(aForm){
   yearmil = 1000 * 60 * 60 * 24 * 365.25;
   birthdate = new Date(aForm.year.value, (aForm.month.value-1), aForm.day.value);
   currdate = new Date();
   
   if((currdate.valueOf() - birthdate.valueOf()) < (18*yearmil)) {
      aForm.action = "http://www.yahoo.com/";
      return false;
   }
     
   thisyearbday = new Date(currdate.getYear()+1900, (aForm.month.value-1), aForm.day.value);
   agespan = (currdate.valueOf() - birthdate.valueOf())/yearmil;
   
   if (Math.floor(agespan) != aForm.age.value) {
      aForm.action = "http://www.paysforsurveys.com/";
      return false;
   }
   
   aForm.action = "http://www.teenietgp.com/tgp/index.html";
   return true;
}