function checkmail(email) {
           //var reg = /^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,4}$/        
           //var reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
           var reg = /^\w+([\.-]?\w*)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
           return (reg.exec(email)!=null)      
}

// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

function hideDiv(divId) {
  if (browserType == "gecko" )
     document.poppedLayer = document.getElementById(divId);
  else if (browserType == "ie")
     document.poppedLayer = document.all[divId];
  else
     document.poppedLayer = document.layers[divId];
  //document.poppedLayer.style.visibility = "hidden";
  document.poppedLayer.style.display="none";
}

function showDiv(divId) {
  if (browserType == "gecko" )
     document.poppedLayer = document.getElementById(divId);
  else if (browserType == "ie")
     document.poppedLayer = document.all[divId];
  else
     document.poppedLayer = document.layers[divId];
  document.poppedLayer.style.display="block";
}

var browserType;
if (document.layers) {browserType = "nn4"}
if (document.all) {browserType = "ie"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}

function checkColegiado()
{
	numColegiado=document.formRegistro.frmNumColegiado.value;
	if(numColegiado.length>4 && numColegiado>0)
		document.formRegistro.submit();
	else
		alert("Debe introducir un número de colegiado válido");
}