function upload()
{
	if (document.getElementById('upload').userfile.value)
		{
			alert("Please, wait while saving data.");
			document.getElementById('upload').submit(); 
		}
	else 
		{
			alert("A file is required.")
			return 0;
		}
}
function reg_1()
		{
			//valido autor
			if (document.getElementById('reg_participants').part_nom.value.length==0)
			{
				alert("Name is required.")
				document.getElementById('reg_participants').part_nom.focus()
				return 0;
			}
			//valido correo
			if (document.getElementById('reg_participants').part_mail.value.length==0)
			{
				alert("e-mail is required.")
				document.getElementById('reg_participants').part_mail.focus()
				return 0;
			}
			//valido filiacion
			if (document.getElementById('reg_participants').part_fil.value.length==0)
			{
				alert("Affiliation is required.")
				document.getElementById('reg_participants').part_fil.focus()
				return 0;
			}
			//valido que ponga un numero en contribuciones
			if ((!/^([0-9])*$/.test(document.getElementById('reg_participants').part_com.value)) || (document.getElementById('reg_participants').part_com.value.length==0))
			{
				alert("You must enter a number from 0 to 9")
				document.getElementById('reg_participants').part_com.focus()
				return 0;
			}
			//valido que ponga un numero en acompaņantes
			if ((!/^([0-9])*$/.test(document.getElementById('reg_participants').part_acom.value)) || (document.getElementById('reg_participants').part_acom.value.length==0))
			{
				alert("You must enter a number from 0 to 9")
				document.getElementById('reg_participants').part_acom.focus()
				return 0;
			}
			//el formulario se envia
			alert("Please, wait while saving data.");
			document.getElementById('reg_participants').submit(); 
		}
		
function reg_2()
		{
			//valido autor
			if (document.getElementById('reg_course').cour_nom.value.length==0)
			{
				alert("Name is required.")
				document.getElementById('reg_course').cour_nom.focus()
				return 0;
			}
			//valido correo
			if (document.getElementById('reg_course').cour_mail.value.length==0)
			{
				alert("e-mail is required.")
				document.getElementById('reg_course').cour_mail.focus()
				return 0;
			}
			//valido filiacion
			if (document.getElementById('reg_course').cour_fil.value.length==0)
			{
				alert("Affiliation is required.")
				document.getElementById('reg_course').cour_fil.focus()
				return 0;
			}
			//el formulario se envia
			alert("Please, wait while saving data.");
			document.getElementById('reg_course').submit(); 
		}
