var prototype=new Object();
   
   prototype.checkDate=function()
   {
    var checkPattern = /^\d{2}\/\d{2}\/\d{4}$/;
    var txtDate=document.getElementById(“txtDate”).value;
    
    //alert(checkPattern.test(txtDate));    
    //return;
         
    if (!checkPattern.test(txtDate))
    {
     document.getElementById(“divError”).innerHTML=”คุณกรอกวันที่ผิด”;     
    }
    else
    {
     document.getElementById(“divError”).innerHTML=”ถูกต้องนะครับบบบบ”;
    }
   
   }
   
   prototype.checkTime=function()
   {
   
   }