function emailvalidation(entered, alertbox){with (entered){    if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(value)){        return (true)    } else {       alert(alertbox);       return false;    }}}function valuevalidation(entered, min, max, alertbox, datatype){with (entered){      if (value==null || value=="") {           return true;      }checkvalue=parseFloat(value);if (datatype){smalldatatype=datatype.toLowerCase();if (smalldatatype.charAt(0)=="i") {checkvalue=parseInt(value)};}if ((parseFloat(min)==min && checkvalue<min) || (parseFloat(max)==max && checkvalue>max) || value!=checkvalue){if (alertbox!="") {alert(alertbox);} return false;}else {return true;}}}function digitvalidation(entered, min, max, alertbox, datatype) {  with (entered) {      if (value==null || value=="") {           return true;      }      checkvalue=parseFloat(value);      if (datatype) {           smalldatatype=datatype.toLowerCase();           if (smalldatatype.charAt(0)=="i") {               checkvalue=parseInt(value); if (value.indexOf(".")!=-1) {checkvalue=checkvalue+1}};          }      if ((parseFloat(min)==min && value.length<min) || (parseFloat(max)==max && value.length>max) || value!=checkvalue) {            if (alertbox!="") {               alert(alertbox);            } return false;      } else {        return true;      } }}function emptyvalidation(entered, alertbox){with (entered){if (value==null || value==""){if (alertbox!="") {alert(alertbox);} return false;}else {return true;}}}function formvalidation(thisform){    if (thisform.email.value==null || thisform.email.value=="") {           return true;    }   return emailvalidation(thisform.email,'E-maili aadress ei ole korrektne! Palun paranda');}