function check(){
  var x=0;
  var doc=document.client_login;

   for(i=0; i<doc.elements.length; i++){    
	  var t=doc.elements[i].value.length;	  
      for(j=0; j<t; j++){
	   if(doc.elements[i].value.charAt(0)==" "){        
		doc.elements[i].value=doc.elements[i].value.substring(1,doc.elements[i].value.length);		
	   }
      }    
   }   

   if(doc.user.value.length==""){
     alert("User Id Cannot Be Blank");
     doc.user.focus();
     x++;
     return false;
   }

   if(doc.password.value.length==""){
     alert("Password Cannot Be Blank");
     doc.password.focus();
     x++;
     return false;
   }

    if(x == 0){
     doc.submit();
   }
}