   
		function StartUp()
		{
		
			document.form1.UserLogin1_txtUserName.focus();
			
		}
		
		function validateform()
		{
		
		
		user = document.form1.UserLogin1_txtUserName.value;
	
		pass = document.form1.UserLogin1_txtPassword.value;
		if (user.length == 0)
		{
			alert("User name must be entered for authentication.")
			document.form1.UserLogin1_txtUserName.focus();
			return false;
		}
		if (pass.length == 0)
		{
			alert("Password must be entered for authentication.");
			document.form1.UserLogin1_txtPassword.focus();
			return false;
		}
		if (pass.length < 8)
		{
			alert("Password should be mininum 8 characters.");
			document.form1.UserLogin1_txtPassword.focus();
			return false;
		}
		if (getCalendarDate()==false)
		{
		    return false;
		}
    	
    }
		
	 function readCookie(cookies)
         {
        
      var txtuname=  document.getElementById('txtUserName');
      var txtpass=  document.getElementById('txtPassword');
      
   
  if (document.cookie.length>0 && txtuname.value.length>0 )
  {
    // check the index of the username that is entered by user in Username text box 
     var  c_start=document.cookie.indexOf(txtuname.value);
      if (c_start!=-1)
        { 
      
  
        var    c_end=document.cookie.indexOf(";",c_start);
  
                if (c_end==-1) 
                {
                    c_end=document.cookie.length;
  
                }
      
      var value= unescape(document.cookie.substring(c_start,c_end));
          //alert(value);
           var arr = new Array(10);
           arr= value.split('=');
            // if only 0ne equal sign is present that is default one 
            if(arr[0]==txtuname.value && arr.length==2)
            {
                
                txtpass.value=arr[1];
             }
             // if the password contain =(equal) signs in it 
             else if(arr[0]==txtuname.value  && arr.length > 2)
             {
                 var pass=arr[1];
                 for(i=2;i<arr.length;i++)
                 {
                    pass += arr[i];
                 }
                   
                  txtpass.value=pass;
                  
             }
             else
             {
                  txtpass.value="";
             }
        }
            
           else
           {
                 txtpass.value="";
           }
    }
    else
    {
        txtpass.value="";
    }

    } 
    
    function getCalendarDate()
{
   var months = new Array(13);
   months[0]  = "1";
   months[1]  = "2";
   months[2]  = "3";
   months[3]  = "4";
   months[4]  = "5";
   months[5]  = "6";
   months[6]  = "7";
   months[7]  = "8";
   months[8]  = "9";
   months[9]  = "10";
   months[10] = "11";
   months[11] = "12";
   var now         = new Date();
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var monthday    = now.getDate();
   var year        = now.getYear();
   if(year < 2000) { year = year + 1900; }
   var dateStringDate = monthname + "/" + monthday + "/" + year;
 
 var FinalDateTime;
 var now    = new Date();
   var hour   = now.getHours();
   var minute = now.getMinutes();
   var second = now.getSeconds();
   var ap = "AM";
   if (hour   > 11) { ap = "PM";             }
   if (hour   > 12) { hour = hour - 12;      }
   if (hour   == 0) { hour = 12;             }
   if (hour   < 10) { hour   = "0" + hour;   }
   if (minute < 10) { minute = "0" + minute; }
   if (second < 10) { second = "0" + second; }
   var timeStringTime = hour +
                    ':' +
                    minute +
                    ':' +
                    second +
                    " " +
                    ap;
 
 
 FinalDateTime=dateStringDate + " " + timeStringTime
document.form1.UserLogin1_hdCDate.value=FinalDateTime;
     
   
} // function getCalendarDate()
