﻿// Subscriber SignIn 

window.history.forward(1);

function ValidateSubscriberLogin() { 
       

        str =  document.getElementById("ctl00_Content_txtSubscriberID").value;
        str= Trim(str);
        
        if (str.length == 0 ) {
        
            alert("Please enter a User Name.");
            document.getElementById("ctl00_Content_txtSubscriberID").focus();
            return false;
            
        }
        
        str="";        
        str =  document.getElementById("ctl00_Content_txtPassword").value;
        str= Trim(str);
        
        if (str.length == 0 ) {
        
            alert("Please enter a Password.");
            document.getElementById("ctl00_Content_txtPassword").focus();
            return false;
            
        }        


	    if(document.getElementById("ctl00_Content_txtSubscriberID").length>0) {  
	    
		    if (document.getElementById("ctl00_Content_txtSubscriberID").charCodeAt(0)==32) {
		    
				    alert("User Name should not start with space.");
	                document.getElementById("ctl00_Content_txtSubscriberID").focus();
				    return false;
				    
			}
        }   
             
	    if ((document.getElementById("ctl00_Content_txtPassword").value.length) < 4) {
	    
	        alert("Invalid User Name or Password.");
	        document.getElementById("ctl00_Content_txtPassword").focus();
	        return false;
	        
	     }
	     
  }
  
  
  function ClearSubscriberLogin() {
     
     document.getElementById("ctl00_Content_txtSubscriberID").value="";
     document.getElementById("ctl00_Content_txtPassword").value = "";
     document.getElementById("ctl00_Content_txtSubscriberID").focus();
     return false;
  
  }
