<!--

function formValidation(form)
{

		var str;
		str=notEmpty(form.Title, "Title");
		str=str+notEmpty(form.FAuthor, "First Author");
		var pub_box=form.Pub;					// retrieve the element Pub in the form 
		var x=pub_box.options[pub_box.selectedIndex].text;	// this is the way to retrieve the value of the selection - important use text and not value
		var y=notEmpty(form.newPub, "");
									//	alert("Pub name is "+x);
		if (str.length==0)
		{
			if (x.length!=0	&& y.length==0)			// condition when both mentioned , y will be 0 because it has no error
			{
				str="Please provide only one Publication name";
			}
			else if (x.length!=0 || y.length==0)
			{
				return true;	
			}
			else 
			{
				str=str+"Publication name can not be blank";
			}
		}
		alert("Form Input Error:\n"+str);
		return false;
}	

function notEmpty(elem, attr)
{
	var str = elem.value;
	if(str.length <=3)
	{
		return attr+" can not be blank \n" ;
	} 
	else
	{
	 	return "";
	}
}

//-->


