// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
function validate_upload_form() {
	var valid = true;
	clear_all_error_messages();
	if(Form.Element.getValue('pending_album[title]') == "") {
		$('pending_album_title_error').show();
		valid = false;
	}
	if(Form.Element.getValue('pending_album[uploaded_data]') == "") {
		$('pending_album_error').show();
		valid = false;
	}
	if(Form.Element.getValue('pending_album_artwork[uploaded_data]') == "") {
		$('pending_album_artwork_error').show();
		valid = false;
	}
	return valid;
}

function clear_all_error_messages() {
	$$('.formError').each(function (e) {
		e.hide();
	});
}
