﻿// JScript File

function validpassword(source,arguments)
{
    var value=document.getElementById ("ctl00_ContentPlaceHolder1_txt_password").value;
    if (value.length<6)
        arguments.IsValid   = false; 
    else if(value.length>12)
        arguments.IsValid   = false; 
    else
    {
        var length=value.length;
        var j=0;
        for(var i=0;i<length;i++)
        {

            if(value.substr(i,1)==" ")
            {
                j=0;
                arguments.IsValid = false; 
                break;
            }
            else
            {
                 j=1;  
                
            }
        }
        if (j==1)
            arguments.IsValid   =   true;  
    }   
    
}
function ValidPasswordwithoutContent(source,arguments)
{
    var value=document.getElementById ("txt_password").value;
     if (value.length<6)
        arguments.IsValid   = false; 
    else if(value.length>12)
        arguments.IsValid   = false; 
    else
    {
        var length=value.length;
        var j=0;
        for(var i=0;i<length;i++)
        {

            if(value.substr(i,1)==" ")
            {
                j=0;
                arguments.IsValid = false; 
                break;
            }
            else
            {
                 j=1;  
                
            }
        }
        if (j==1)
            arguments.IsValid   =   true;  
    }   
    
}