// JavaScript Document

function validate_missing(InviteReviewerReviewer){
	
	apos=InviteReviewer.email.value.indexOf("@")
	dotpos=InviteReviewer.email.value.lastIndexOf(".")
	
		
	if (InviteReviewer.fname.value == "")  {
    alert( "Enter first name" );
	InviteReviewer.fname.focus();
    return false 
	}
	
	if (InviteReviewer.lname.value == "")  {
    alert( "Enter last name" );
	InviteReviewer.lname.focus();
    return false 
	}

	if (apos<1||dotpos-apos<2)  {
    alert( "Email address invalid or missing! Check values" );
    InviteReviewer.email.focus();
    return false 
	}
	
	if (InviteReviewer.expertise.value == "")  {
    alert( "Enter expertise" );
	InviteReviewer.expertise.focus();
    return false 
	}
	
	if (InviteReviewer.biosketch.value == "")  {
    alert( "Enter biosketch" );
	InviteReviewer.biosketch.focus();
    return false 
	}

	
	if (InviteReviewer.biosketch.value == "Type a short biosketch of yourself, describing your work experience or anything that will make the authors comfortable of having you review their manuscripts. This information will be sent to authors with the review report.")  {
    alert( "Enter correct biosketch" );
	InviteReviewer.biosketch.focus();
    return false 
	}
	
	if (InviteReviewer.country.value == "")  {
    alert( "Enter country name" );
	InviteReviewer.country.focus();
    return false 
	}
	
	if (InviteReviewer.code.value == "")  {
    alert( "Missing or invalid" );
	InviteReviewer.code.focus();
    return false 
	}

		
}



//function set_focus(){
// InviteReviewer.fname.focus();
//}

function ClearFiled(){
	if (InviteReviewer.biosketch.value == "Type a short biosketch of yourself, describing your work experience or anything that will make the authors comfortable of having you review their manuscripts. This information will be sent to authors with the review report.")  {
	InviteReviewer.biosketch.value ="";
	}
}
