function validate_int(a,b,c)
{
var i=0;

if(c == null) alert("internal ERROR: C IS NULL");

if(c == "") return(true);

if(c.length > 7) return(false);

for(i=0;i<c.length;i++) {
  if((c.substr(i,1) > '9' || c.substr(i,1) < '0') && c.substr(i,1) != '.' && c.substr(i,1) != '%') return(false);
  }
return(true);
}



function validate_date(a,b,c)
{
// 2001.03.02
// 0123456789

var i=0;

if(c == "") return(true);

for(i=0;i<c.length;i++) {
  if((c.substr(i,1) > '9' || c.substr(i,1) < '0') && c.substr(i,1) != '.') return(false);
  }
if(c.length != 10 || c.substr(4,1) != '.' || c.substr(7,1) != '.') return(false); 
if(c.substr(0,4) < 2000 || c.substr(0,4) > 3000) return(false);
if(c.substr(5,2) < 1 || c.substr(5,2) > 12) return(false);
if(c.substr(8,2) < 1 || c.substr(8,2) > 31) return(false);
return(true);
}



function validate_email(a,b,c)
{
var i=0;

if(c == null) alert("internal ERROR: C IS NULL");

if(c == "") return(true);

i=c.indexOf('@');
d=c.indexOf('.');
if(i<=0) { return(false); }
if(i>=c.length-1)  { return(false); }
if(d<=0)  { return(false); }
if(d>=c.length-1)  { return(false); }
if(d<=i+1)  { return(false); }

return(true);
}

