function verifySignUp(){

	var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	var errorString = "No Errors";
	
	if (document.signUp.Name.value.length < 3 || document.signUp.Name.value.length > 30) {
		document.signUp.Name.focus();
		alert("The entered name must be between 3 and 30 characters. ");
		return false;
	} else 
	if (document.signUp.email.value.length < 3 || document.signUp.email.value.length > 50) {
		document.signUp.email.focus();
		alert("The entered e-mail must be between 3 and 500 characters. ");
		return false;
	} else
	if(!document.signUp.email.value.match(emailExp)){
		document.signUp.email.focus();
		alert("Please enter a valid e-mail address. ");
		return false;
	} else 
	if (document.signUp.Password.value.length < 6|| document.signUp.Password.value.length > 30) {
		document.signUp.Password.focus();
		alert("The entered password must be between 3 and 100 characters. ");
		return false;
	} else
	if (document.signUp.Password2.value !=  document.signUp.Password.value ) {
		document.signUp.Password.focus();
		alert("The Entered passwords Do Not Match. ");
		return false;
	} else
	
	{
		return true;
	}
	
}

function verifyUpdateUser(){

	var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	var errorString = "No Errors";
	
	if (document.signUp.Name.value.length < 3 || document.signUp.Name.value.length > 30) {
		document.signUp.Name.focus();
		alert("The entered name must be between 3 and 30 characters. ");
		return false;
	} else 
	if (document.signUp.email.value.length < 3 || document.signUp.email.value.length > 50) {
		document.signUp.email.focus();
		alert("The entered e-mail must be between 3 and 500 characters. ");
		return false;
	} else
	if(!document.signUp.email.value.match(emailExp)){
		document.signUp.email.focus();
		alert("Please enter a valid e-mail address. ");
		return false;
	} else 
	if (document.signUp.OldPassword.value.length < 6|| document.signUp.OldPassword.value.length > 30) {
		document.signUp.OldPassword.focus();
		alert("The entered password must be between 3 and 100 characters. ");
		return false;
	} else
	if (document.signUp.Password.value.length < 6|| document.signUp.Password.value.length > 30) {
		document.signUp.Password.focus();
		alert("The entered password must be between 3 and 100 characters. ");
		return false;
	} else
	if (document.signUp.Password2.value !=  document.signUp.Password.value ) {
		document.signUp.Password.focus();
		alert("The Entered passwords Do Not Match. ");
		return false;
	} else
	
	{
		return true;
	}
	
}

function verifyMessage(){
	
	
	
}

function verifyDelete(url) {
	var answer = confirm("Are you sure you want to remove this book?")
	if (answer){
		window.location = ("deletecontent.php5?book=" + url);
	}
	else{
		alert("Thanks for sticking around!")
	}
}

function verifyMessageDelete(url) {
	var answer = confirm("Are you sure you want to remove this Message?")
	if (answer){
		window.location = ("deletecontent.php5?message=" + url);
	}
	else{
		alert("Thanks for sticking around!")
	}
}

function verifyBook(){
	if (document.newbook.ISBN.value.length < 10
		|| document.newbook.ISBN.value.length > 13 || document.newbook.ISBN.value.length == 11 ) {
		document.newbook.ISBN.focus();
		alert("The ISBN/EAN must be 10 or 13 characters. ");
		return false;
	}else 
	if (document.newbook.price.value.length < 1|| document.newbook.price.value.length > 10) {
		document.newbook.price.focus();
		alert("The price must be between 1 and 10 characters. ");
		return false;
	}else 
	if(isNaN(document.newbook.price.value)){
		document.newbook.price.focus();
		alert("Price must be formatted as the example - 10.00 . ");
		return false;
	}else
	if (document.newbook.description.value.length < 1|| document.newbook.description.value.length > 3000) {
		document.newbook.description.focus();
		alert("The description must be between 1 and 3000 characters. ");
		return false;
	}else
	{
		return true
	}
}

function verifyUpdateBook(){
	if (document.newbook.price.value.length < 1|| document.newbook.price.value.length > 10) {
		document.newbook.price.focus();
		alert("The price must be between 1 and 10 characters. ");
		return false;
	}else 
	if (document.newbook.description.value.length < 1|| document.newbook.description.value.length > 3000) {
		document.newbook.description.focus();
		alert("The description must be between 1 and 3000 characters. ");
		return false;
	}else
	{
		return true
	}
}
