// Javascript Validations for the submit link page

function Validate()
{
	// Check if user has selected a category
	if( document.frmSubmitLink.category.selectedIndex == 0 )
	{
		alert("Please select a category.");
		document.frmSubmitLink.category.focus();
		return false;
	}

	// Check if user has not left the title text box empty
	if( isBlank(document.frmSubmitLink.title.value, "Please enter title.") == true )
	{
		document.frmSubmitLink.title.focus();
		return false;
	}

	// Check if user has not left the url text box empty
	if( isBlank(document.frmSubmitLink.url.value, "Please enter url.") == true )
	{
		document.frmSubmitLink.url.focus();
		return false;
	}

	// Check if user has not left the url text box empty
	if( isBlank(document.frmSubmitLink.desc.value, "Please enter description.") == true )
	{
		document.frmSubmitLink.desc.focus();
		return false;
	}

	// Check if user has not left the url text box empty
	if( isBlank(document.frmSubmitLink.email.value, "Please enter email.") == true )
	{
		document.frmSubmitLink.email.focus();
		return false;
	}
	else
	{
		if(checkemail(document.frmSubmitLink.email.value) == false)
		{
			document.frmSubmitLink.email.focus();
			return false;
		}
	}

	// If all data entered by the user is correct
	return true;
}