function valAuthor(formName){
	formName=eval(document.forms[formName]);
	aName=formName.author.value
	aMail=formName.email.value

	if(aName==""){
		alert("You neglected to enter the author's name");
		formName.author.focus();
		return;
		}
	if(aMail==""){
		alert("You neglected to enter the author's E-mail Address");
		formName.email.focus();
		return;
		}
	formName.submit()
	}

function valRating(formName){
	formName=eval(document.forms[formName]);
	aName=formName.ratingname.value

	if(aName==""){
		alert("You neglected to enter the name for the rating.");
		formName.ratingname.focus();
		return;
		}
	
	formName.submit()
	}


function valContent(formName){
	formName=eval(document.forms[formName]);
	cTitle=formName.title.value;
	cAuthor=formName.author.selectedIndex;
	cSynopsis=formName.synopsis.value;
	cRating=formName.rating.selectedIndex;
	cContent=document.getElementById('contenttext').value;


	if(cTitle==""){
		alert("You neglected to enter the title.");
		formName.title.focus();
		return;
		}
	if(cSynopsis==""){
		alert("You neglected to enter the synopsis.");
		formName.synopsis.focus();
		return;
		}
	if(cContent==""){
		alert("You neglected to enter the text.");
		formName.contenttext.focus();
		return;
		}
	if(cAuthor==0){
		alert("Please select an author");
		formName.author.focus();
		return;
		}
	if(cRating==0){
		alert("Please select a Rating");
		formName.rating.focus();
		return;
		}
	
	formName.submit()
	}

function setDirName(formName){
	formName=eval(document.forms[formName]);
	cName=formName.author.value;
	cName=cName.replace(" ","");
	formName.dirname.value=cName;
	}

function goEdit(){
	location.href="frmmenu.php";
	alert("No Action was taken");
}

function valSubContent(formName){
	formName=eval(document.forms[formName]);
	cTitle=formName.title.value;
	cAuthor=formName.author.value;
	cEmail=formName.email.value;
	cSynopsis=formName.synopsis.value;
	cContent=formName.contenttext.value;


	if(cTitle==""){
		alert("You neglected to enter the title.");
		formName.title.focus();
		return;
		}
		
	if(cAuthor==""){
		alert("You neglected to enter the Author's Name.");
		formName.author.focus();
		return;
		}	
		
	if(cEmail==""){
		alert("You neglected to enter the Author's E-Mail Address.");
		formName.email.focus();
		return;
		}	
	if(cSynopsis==""){
		alert("You neglected to enter the synopsis.");
		formName.synopsis.focus();
		return;
		}
	if(cContent==""){
		alert("You neglected to enter the text.");
		formName.contenttext.focus();
		return;
		}
	
	formName.submit()
	}

function openAuthor(){
	window.open('author.php','thisAuthor','height=300,width=300,scrollbars=true');
	parent.history.go(-1);
		
}
function valNews(formName){
	formName=eval(document.forms[formName]);
	strTit=formName.title.value;
	strText=document.getElementById("contenttext").value;
	
	if(strTit==""){
	    alert("You Neglected to enter a title.");
	    formName.title.focus();
	    return;
	}
	if(strText==""){
	    alert("You Neglected to enter any text.");
	    document.getElementById("contenttext").focus();
	    return;
	}
	formName.submit()
	}
	
function noAction(){
    history.go(-1);
    alert("No Action Taken");
}	
