<!--  hide script from old browsers
function email_ok(){
	if(document.formAuthor.email.value=="")
		alert("You must provide your e-mail address to proceed.")
	else if(document.formAuthor.email.value.indexOf("@")==-1 ||
		document.formAuthor.email.value.indexOf(".")==-1 ||
		document.formAuthor.email.value.indexOf(" ")!=-1 ||
		document.formAuthor.email.value.indexOf(".")==(document.formAuthor.email.value.length-1) ||
		document.formAuthor.email.value.indexOf("@")==(document.formAuthor.email.value.length-1) ||
		document.formAuthor.email.value.indexOf(".")==0 ||
		document.formAuthor.email.value.indexOf("@")==0 ||
		Math.abs(document.formAuthor.email.value.indexOf("@")-document.formAuthor.email.value.indexOf("."))==1
		)
		alert("Non valid e-mail address!")
	else document.formAuthor.submit()
}


function getSelectedButton(buttonGroup){
	for (var i=0; i < buttonGroup.length; i++) {
		if (buttonGroup[i].checked) {
			return i
		}
	}
	return 0
}




function calcularTotal()
{
	var total = 0 ;
	var idxreg = getSelectedButton(document.inscripcio.studentRate);
	var idxgra = getSelectedButton(document.inscripcio.graduate);

	if (document.inscripcio.earlyRegistration.value == 'Y') {
		if (document.inscripcio.studentRate[idxreg].value == 'Y')
			total += 150;
		if (document.inscripcio.studentRate[idxreg].value == 'N')
			total += 300;
	} else {
		if (document.inscripcio.studentRate[idxreg].value == 'Y')
			total += 210;
		if (document.inscripcio.studentRate[idxreg].value == 'N')
			total += 375;
	}

	if (document.inscripcio.graduate[idxgra].value == 'Y')
		total += 200;


	if (document.inscripcio.dinner.value == '') document.inscripcio.dinner.value = 0
	if (document.inscripcio.stand.value == '') document.inscripcio.stand.value = 0
	if (document.inscripcio.tutorials.value == '') document.inscripcio.tutorials.value = 0
	if (document.inscripcio.proceedings.value == '') document.inscripcio.proceedings.value = 0
	total += parseFloat(document.inscripcio.proceedings.value) * 60;
	total += parseFloat(document.inscripcio.dinner.value) * 55;
	total += parseFloat(document.inscripcio.stand.value) * 300;
	total += parseFloat(document.inscripcio.tutorials.value) * 50;
	document.inscripcio.total.value=total ;
}



// end hiding contents -->


