/**
	@brief Used to validate the admin form.
 */
function validateLocalVideoAdminForm() {
	var urlTag = null; //!> The html element for the video url.
	var valid = true; //!> Boolean used to track the validation.

	document.getElementById('local-video-admin-form-error').innerHTML = "";

	cityTag = document.getElementById('local-video-admin-url-text');
	if(cityTag && cityTag.value.length <= 0) {
		addLocalVideoError('Video URL');
		valid = false;
	}

	if(valid == false) {
		/* Display the div tag containing the error messages. */
		document.getElementById('local-video-admin-form-error').style.display = "block";
		return valid;
	}
	
	/* Form has been validated so make sure the error div is cleared and not displayed. */
	document.getElementById('local-video-admin-form-error').style.display = "none";
	return true;
}

/**
	@brief Used to add an error message resulting from the form validation check.

	@param String that is the name of the invalid field on the form.
 */
function addLocalVideoError(field) {
	document.getElementById('local-video-admin-form-error').innerHTML += "Missing or invalid " + field + ".";
}

