﻿// JScript File

function searchome()
{
    var jobprof=document.getElementById("DropDownList4").value;
    var jobexp=document.getElementById("drExperience").value;
    var keys=document.getElementById("DropDownList1").value;

    if(jobprof=="Select")
	{
		alert("Select The Job Profession");
		return false;			
	}
	if(jobprof=="IT - Software / Telecommunication")
	{
	    if(keys=="0")
	    {
	       alert("Select The Key Skill");
	       return false;
	    }	    
	}
	if(jobexp=="Select Your Experience")
	{
		alert("Select Your Experience");
		return false;			
	}
	return true;

}
function chkprofile()
{
    //var a=document.getElementById("GridView_view_candidate_details");
    var profilechk=document.getElementById("chk_select_rejected_cadidate").value;
    if(profilechk=="false")
    {
        alert("Select The Candidate Profile First")
        return false;
    }
    return true;
}
//.....
function space_remove()
{
    var username=document.getElementById("txt_general_userid").value;
    var len=username.length;  
    var msg="";  
    for(var i=0;i<=len-1;i++)
    {
        var aa=username.substring(i,i+1); 
        //alert(aa);       
        if(aa !=" ")
        {
           msg=msg+aa;
        } 
    }
   document.getElementById("txt_general_userid").value=msg;       
    return true;
}
//.........
function space_remove_jobapply()
{
    var username=document.getElementById("txt_candidate_userid").value;
    var len=username.length;  
    var msg="";  
    for(var i=0;i<=len-1;i++)
    {
        var aa=username.substring(i,i+1); 
        //alert(aa);       
        if(aa !=" ")
        {
           msg=msg+aa;
        } 
    }
   document.getElementById("txt_candidate_userid").value=msg;       
    return true;
}
//...........
function Quote_remove()
{
    var username=document.getElementById("txt_general_userid").value;
    var len=username.Length;  
    for(var i=0;i<=len-1;i++)
    {
        var a=username.Substring(i,i+1);
        if(a=="'")
        {
            alert("You Can Not Give Any Single Quote");
            return false;
        }
    }
    return true;
}
//.................
function Quote_remove_jobapply()
{
    var username=document.getElementById("txt_candidate_userid").value;
    var len=username.Length;  
    for(var i=0;i<=len-1;i++)
    {
        var a=username.Substring(i,i+1);
        if(a=="'")
        {
            alert("You Can Not Give Any Single Quote");
            return false;
        }
    }
    return true;
}
//.............
 function Slogin()
 {
	var uname=document.getElementById("txt_general_userid").value;
	var pass=document.getElementById("txt_general_password").value;	
	if(uname=="")
	{
	   alert("Enter User ID")
	   document.getElementById("txt_general_userid").focus();
	   return false;
	} 
	if(pass=="")
	{
	   alert("Enter Password")
	   document.getElementById("txt_general_password").focus();
	   return false;
	}	
	if(pass.length<6)
	{
	   alert("Password Should Be Minimum of 6 Characters");
	   return false;
	}	
//	var username=document.getElementById("txt_general_userid").value;
//    var len=username.Length;  
//    var msg="";  
//    for(var i=0;i<=len-1;i++)
//    {
//        var aa=username.substring(i,i+1); 
//        alert(aa);       
//        if(aa !=" ")
//        {
//           msg=msg+aa;
//           return false;
//        } 
//        document.getElementById("txt_general_userid").value=msg;       
//    }
	return true; 
 }
 //.......
 function Rlogin()
 {
	var uname=document.getElementById("txt_candidate_userid").value;
	var pass=document.getElementById("txt_candidate_password").value;
	if(uname=="")
	{
	   alert("Enter User ID")
	   document.getElementById("txt_candidate_userid").focus();
	   return false;
	} 
//	if(uname.length<6)
//	{
//	   alert("User ID Should Be Minimum of 6 Characters");
//	   return false;
//	} 
//	if(uname.length>6)
//	{
//	   alert("User ID Should Be Maximum of 6 Characters");
//	   return false;
//	} 
	if(pass=="")
	{
	   alert("Enter Password")
	   document.getElementById("txt_candidate_password").focus();
	   return false;
	}	
	if(pass.length<6)
	{
	   alert("Password Should Be Minimum of 6 Characters");
	   return false;
	}
//	if(pass.length>6)
//	{
//	   alert("User ID Should Be Maximum of 6 Characters");
//	   return false;
//	} 
	return true; 	    
  }	
 //--------------- 
 function examlogin()
 {
	var uname=document.getElementById("txt_application_id").value;
	var pass=document.getElementById("txt_password").value;	
	if(uname=="")
	{
	   alert("Enter Application ID")
	   document.getElementById("txt_application_id").focus()
	   return false;
	} 	
	if(pass=="")
	{
	   alert("Enter Password")
	   document.getElementById("txt_password").focus();
	   return false;
	}
	if(pass.length<6)
	{
	   alert("Password Should Be Minimum of 6 Characters");
	   return false;
	}
	if(pass.length>6)
	{
	   alert("User ID Should Be Maximum of 6 Characters");
	   return false;
	} 
	return true; 
 }
