// (c) 2008 www.4dsites.com | www.softidiom.com

function validateUploadForm(form) {

	if (form.upload_name.value == ''){
		alert('You must enter a name before uploading');
		return false;
	}

	if (form.uploadedfile.value == ''){
		alert('Please browse to an audio file before uploading');
		return false;
		
	}
	
	if (form.upload_artist.value == ''){
		alert('If you are the artist, please login and check the "I am the artist box". If you are not the artist, please type an artist name before uploading');
		return false;
	}
	if (!form.upload_agree.checked){
		alert('You must agree to the Terms before uploading');
		return false;
	}
	var uploadcompletemessage = document.getElementById('uploadcompletemessage');
	if(uploadcompletemessage) {
		uploadcompletemessage.style.display = 'none';
	}
	var statuscomplete = document.getElementById('status-complete');
	if(statuscomplete) {
		statuscomplete.style.display='block';
	}
	var statusincomplete = document.getElementById('status-incomplete');
	if(statusincomplete) {
		statusincomplete.style.display='block';
	}

	setInterval("check_status(['check_upload__1', 'rand_string', 'uploadedfile'], ['statusbar']);",'1000');
	return true;
}