function isset(variable_name) {
    variable_name = document.getElementById(variable_name).value;
    try {
	if (typeof(eval(variable_name)) != 'undefined')
	if (eval(variable_name) != null)
	    return true;
    } catch(e) { }
    return false;
    }

//validar correo electronico
function isEmailAddress( id_elemento ){
    var s = document.getElementById(id_elemento).value;
    var filter=/^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
    if (filter.test(s))
        return true;
    else
        return false;
	}
	
//Comprobar si un campo esta vacio
var string;
function empty( string ){
        var campo = document.getElementById( string ).value;
        if ( campo.length == 0 )
            return true;
        else
            return false;
        }

//Solo nos dejara meter numeros        
var nav4 = window.Event ? true : false;
function acceptNum(evt){	
    var key = nav4 ? evt.which : evt.keyCode;	
    return (key <= 13 || (key >= 48 && key <= 57));
    }
    
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace
        (" over", "");
   }
   }
  }
 }
}
window.onload=startList;

