/**
 *
 * Function to open a new window
 * Replaces _target since it's not implemented in xhtml strict
 *
 */
function nw(link) {

    window.open(link.href);

    return false;

}

/**
 *
 * Function to hide / show the upload elements.
 *
 */
function formSubmit() {

	if (document.getElementById('_file').value == '') {
	
		return '';
	
	}
	// Hide the form.
	document.getElementById('upload_form').style.display = 'none';
	// Show the 'uploading' message
	document.getElementById('upload_message').style.display = 'block';

}

/**
 *
 * Function to check if a form field value is set.
 *
 */
function checkForm() {

	if (document.getElementById('_file').value == '') {
	
		return alert('Please, select an image to upload.');
	
	}

}


