<!--

//***********************************************************************************
// Below are form validation functions
function selectvalidation(entered, alertbox)
{
// Emptyfield-Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Renamed Select-Validation and reprogrammed for select menus by Matt Flaherty
// <mattf@iql.com> 10/3/1999
// Please do not remove the this line and the four lines above.
with (entered)
{
if (selectedIndex < 1)
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
}
//
function emptyvalidation(entered, alertbox)
{
// Emptyfield-Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove the this line and the two lines above.
with (entered)
{
if (value==null || value=="")
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
}
//
function emailvalidation(entered, alertbox)
{
// E-mail-Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove the this line and the two lines above.
with (entered)
{
apos=value.indexOf("@"); 
dotpos=value.lastIndexOf(".");
lastpos=value.length-1;
if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
{if (alertbox) {alert(alertbox);} return false;}
else {return true;}
}
}
//
function digitvalidation(entered, min, max, alertbox, datatype)
{
// Digit-Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Modified by Matt Flaherty <mattf@iql.com> 9/16/1999 to check digit by digit
// Please do not remove this line and the three lines above.
with (entered)
{
if (datatype)
{
checkvalue=true;
smalldatatype=datatype.toLowerCase();
  for (s=0; s < value.length; s++)
  {
    if (smalldatatype.charAt(0)=="i")
    {
      var myChar = value.substring(s,s+1);
      if (parseInt(myChar)!=myChar)  {checkvalue=false};
    }
  }
}
if ((value.length<min) || (value.length>max) || (checkvalue==false))
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
}
//-->