// isDate --------------------------------------------------------------------------------
  function isDate(theElement, theElementName)
  {
   var DayArray =new Array(31,28,31,30,31,30,31,31,30,31,30,31);
   //var MonthArray = new Array("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");
   var MonthArray = new Array("01","02","03","04","05","06","07","08","09","10","11","12");
   var thisYear = null;
   var thisMon = null;
   var thisDay = null;
   var today = null;
   inpDate = theElement.value;
    if (inpDate.length == 0 ) return true;
   thisDay = inpDate.substr(0,2);
   //thisMonth = inpDate.substr(3,3).toUpperCase();
   thisMonth = inpDate.substr(3,2).toUpperCase();
   //thisYear = inpDate.substr(7,2);
   thisYear = inpDate.substr(6,4);
   //var filter=/^[0-9]{2}-[a-zA-Z]{3}-[0-9]{2}$/;
   if (inpDate.substr(2,1) != "." || inpDate.substr(5,1) != ".")
      { alert(alert_isdate1_mesg); 
         theElement.focus(); 
         return false; 
      } 
   
   var filter=/^[0-9]{2}.[0-9]{2}.[0-9]{4}$/;
    if (! filter.test(inpDate)) 
    {   //alert("Please enter Date in DD-MON-YY Format !"); 
        alert(alert_isdate1_mesg); 
         theElement.focus(); 
         return false; 
    } 
    //var filter=/JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC/ ;
    var filter=/01|02|03|04|05|06|07|08|09|10|11|12/ ;
    if (! filter.test(thisMonth))
    {
       alert(alert_isdate2_mesg);
       theElement.focus(); 
       return false;
    }
    N=Number(thisYear);
    if ( ( N%4==0 && N%100 !=0 ) || ( N%400==0 ) ) 
    {
      DayArray[1]=29;   
    }
    for(var ctr=0; ctr<=11; ctr++)
    {
     if (MonthArray[ctr]==thisMonth)
     {
        if (thisDay<= DayArray[ctr] && thisDay >0 )
             return true;
         else
         {
             alert(alert_isdate3_mesg); 
             theElement.focus(); 
             return false; 
         }
      }
     }
  }
//----------------------------------------------------------------------------------------