function validate() {
  var email = document.forms['download_form'].download_email.value;
  var sub1 = document.forms['download_form'].download_choice[1].checked;
	var sub2 = document.forms['download_form'].download_choice[0].checked;
	
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	
  if ((email==null)||(email=="")&&(sub1 == false)) {
		alert("Please enter your e-mail.")
		document.forms['download_form'].download_email.style.border = "2px solid #FF0000";
		document.forms['download_form'].download_email.value=""
		document.forms['download_form'].download_email.focus()
		return false;
	}
	
	if ((reg.test(email)==false)&&(sub2 == true)) {
		alert('Invalid e-mail address.');
		return false;
	}
	
	return true;
	
}
