function check_mail()
{
	//-----------------function for email validation----------------------------------//
	var t=document.getElementById('email').value;
	if(t=="")
	{
		document.getElementById('emailError').innerHTML=friends_errors.vars.email;
		return false;
	}
	else if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(t))
	{
		document.friend_form.submit();
	}
	else 
	{
		document.getElementById('emailError').innerHTML=friends_errors.vars.email_name;
		return false;
	}
}

function remove(id)
{
	var webURL   = document.getElementById("webURL").value;
	//-------------------------function to remove friend---------------------------//
	var where_to= confirm(friends_errors.vars.friend_message);
 	if (where_to== true)
	 {
		
   		window.location=webURL+"/friends/deletefnd/?fid="+id;
 	 }
}

function removefrnd(id)
{
	var webURL   = document.getElementById("webURL").value;
	//-----------------------function to remove friend---------------------------//
	var where_to= confirm(friends_errors.vars.friend_message);
 	if (where_to== true)
	 {
   		window.location=webURL+"/friends/deletefrnd/?fid="+id;
 	 }
}
