<html> <head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checker ()
{
var regExp1=/^(\d{1,2})-(\d{1,2})-(\d{2})$/
var regExp2 = /^(\d{1,2})-(\d{1,2})-(\d{4})$/
var result1=document.form1.date1/value.match (regExp1)
var result2=document.form1.date1/value.match (regExp2)
if (result1 == null && result2 == null) {
alert ("Data vvedena neverno . Korrectnii format - DD-MM-GG ili DD-MM-GGGG")
document.form1.date1.value=""
return false
}
else
{
document.form1.submit ()
}
}
//-->
</SCRIPT>