// Oculta un tag DIV
function hidediv(layer_ref) {
    var state = 'none';
    if (document.all) { //IS IE 4 or 5 (or 6 beta)
	eval( "document.all." + layer_ref + ".style.display = state");
    }
    if (document.layers) { //IS NETSCAPE 4 or below
	document.layers[layer_ref].display = state;
    }
    if (document.getElementById &&!document.all) {
	hza = document.getElementById(layer_ref);
	hza.style.display = state;
    }
}

// Muestra un tag DIV
function showdiv(layer_ref) {
    var state = 'block';
    if (document.all) { //IS IE 4 or 5 (or 6 beta)
        eval( "document.all." + layer_ref + ".style.display = state");
    }
    if (document.layers) { //IS NETSCAPE 4 or below
        document.layers[layer_ref].display = state;
    }
    if (document.getElementById &&!document.all) {
        hza = document.getElementById(layer_ref);
        hza.style.display = state;
    }
}

// Muestra un tag DIV en línea
function showdivinline(layer_ref) {
    var state = 'inline';
    if (document.all) { //IS IE 4 or 5 (or 6 beta)
        eval( "document.all." + layer_ref + ".style.display = state");
    }
    if (document.layers) { //IS NETSCAPE 4 or below
        document.layers[layer_ref].display = state;
    }
    if (document.getElementById &&!document.all) {
        hza = document.getElementById(layer_ref);
        hza.style.display = state;
    }
} 

// Devuelve el valor seleccionado de un grupo de radiobutton
function getRadioValue(radioGroupName) {
    radios = document.getElementsByName(radioGroupName);
    for (i = 0; i < radios.length; i++) {
        if (radios[i].checked) 
            return radios[i].value;
    }
}

