
function redirect(){
//alert ("redirecting");
window.location = "mailsend.php"
}

function nav()
   {
   var w = document.myform.mylist.selectedIndex;
   var url_add = document.myform.mylist.options[w].value;
   window.location.href = url_add;
   }

function askformcheck(){

elem1 = document.getElementById("from");
elem2 = document.getElementById("replyto");
elem3 = document.getElementById("msg");

	if(elem1.value.length == 0){
		alert("Please fill in your name");
		elem1.focus();
		return false;
	}

	if(elem2.value.length == 0){
		alert("Please fill in your email");
		elem2.focus();
		return false;
	}


	var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	if(!elem2.value.match(emailExp)){
		alert("Please enter a valid e-mail address");
		elem2.focus();
		return false;
	}


	if(elem3.value.length == 0){
		alert("Please enter a question");
		elem3.focus();
		return false;
	}


	return true;	
}






function tellfriendformcheck(){

elem1 = document.getElementById("from");
elem2 = document.getElementById("replyto");
elem3 = document.getElementById("recipient");
elem4 = document.getElementById("to");
elem5 = document.getElementById("msg");


	if(elem1.value.length == 0){
		alert("Please fill in your name");
		elem1.focus();
		return false;
	}

	if(elem2.value.length == 0){
		alert("Please fill in your email");
		elem2.focus();
		return false;
	}


	var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	if(!elem2.value.match(emailExp)){
		alert("Please enter a valid e-mail address");
		elem2.focus();
		return false;
	}


	if(elem3.value.length == 0){
		alert("Please enter the name of the person you are sending to");
		elem3.focus();
		return false;
	}


	if(elem4.value.length == 0){
		alert("Please enter the e-mail address of the person you are sending to");
		elem4.focus();
		return false;
	}

	var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	if(!elem4.value.match(emailExp)){
		alert("Please enter a valid e-mail address");
		elem4.focus();
		return false;
	}



	return true;	
}


