﻿// JScript File



  function chkfrm()
        {
            if(!/\S/.test(document.getElementById("txt_id").value))
            {
                alert("Please Enter User ID !!");
                document.getElementById("txt_id").focus();
                return false;
            }
            else
				{
				            flag=true;
		            s=new String(document.getElementById("txt_id").value);
		            n1=s.length;
		            for(var i=0;i<n1;i++)
		            { 

			            n=s.charCodeAt(i);
			            if(!((n>=65&&n<=90)||(n>=97&&n<=122)||n==32))
			            {
				            flag=false;
				            break;
			            }  
		            }
		            if(flag==false)
		            {
			            alert("Not Valid User ID!");
			            document.getElementById("txt_id").value="";
			            document.getElementById("txt_id").focus();
			            return false;
		            }
				}
            if(!/\S/.test(document.getElementById("txt_password").value))
            {
                alert("Please Enter Password !!");
                document.getElementById("txt_password").focus();
                return false;
            }
            return true;
        }
        function OpenHRMS()
	{
		
		window.open("hrmis/Default.aspx")
		
	}
	
	
	
	function validation()
{
if (!compareDateinCalendarFormat('txtFrmDate', 'txtToDate','From Date','To Date'))
                  {
                      return false;
                  }
  if (!chkSingleQuote('txtLetterNo'))
                  {
                      return false;
                  }
 if(!SpecialChar('txtLetterNo'))
                  {                                                        

                      return false; 
                  }
  if (!NumericValidation('txtLetterNo','Letter No',50))
                  {                 
                      return false;
                  }                
if (!chkSingleQuote('txtSubject'))
                  {
                      return false;
                  }
 if(!SpecialChar('txtSubject'))
                  {                                                        

                      return false; 
                  }                  

                 
}
