//var host = "/care/admin/index/";
//alert();
var host = site_host_url+"admin/index/";
function validation()
{
                var servicename=document.getElementById('servicename').value;
                if(accountname=="")
                {
                   alert("please first fill servicename");
                    return false;
                }
            
 
return;
}//end of function of validation for servicename

function valid()
{
                 var accountname=document.getElementById('accountname').value;
                 if(accountname=="")
                 {
                   alert("please first fill accounttypename");
                    return false;
                 }
            
 
return;

}//end of function of validation for accounttype name
function background_check()
{

		var social=document.getElementById('social').value;
		var security=document.getElementById('security').value;
		var number=document.getElementById('number').value;
		var c_social=document.getElementById('c_social').value;
		var c_security=document.getElementById('c_security').value;
		var c_number=document.getElementById('c_number').value;
		if(social!=c_social || security!=c_security||number!=c_number)
		{
			//alert("Confirm SSN should be same as entered SSN");
			document.getElementById('confirm').style.display='block';
			return false;
		}
		
	return true;
}
function checkZipCode(){
	var zip = document.getElementById('zip_code').value;
	var distance = document.getElementById('travel_distance').value;
	
	if(document.getElementById('zip_code').style.disabled!=true)  {
	if(zip==''){
		alert('Please enter a valid ZIP Code.');
		document.getElementById('zip_code').focus();
		return false;
	} 
	var num_format=/^[0-9]*$/;
	if (!(num_format.test(zip)))
	{
		document.getElementById('zip_code').focus();
		alert('Please enter a valid ZIP Code.');
		return false;
	}
	if(zip.length<5){
		alert('Please enter a valid 5 characters zipcode.');
		document.getElementById('zip_code').focus();
		return false;
	}   
	else 
	{
		return true;
	}
	}
	else
	{return true;}
}
function showRating(){
	
	
 		document.getElementById('ratingdetail').style.display="";
	
}
function checkArticle()
{
    var articletitle = document.getElementById('topic1').value;
    if(articletitle=="")
    {
        alert(" Please enter topic");
        return false;
    }
    var val=document.getElementById("topic").value;
    trim(val)
    alert(val)
    if(val=="or type a keyword(s)")  {	
        document.getElementById("topic").value=""
    }

}
