var elemento;

function iSubmitEnter(oEvento, oFormulario){
     var iAscii;

     if (oEvento.keyCode)
         iAscii = oEvento.keyCode;
     else if (oEvento.which)
         iAscii = oEvento.which;
     else
         return false;

     if (iAscii == 13) oFormulario.submit();

     return true;
}



function buscar(nomo){
    nomo=trim(nomo);
    if (nomo.length > 3){
        ocultar("mensajecontrol");
        obtienPag('/busc.php?algo='+ nomo,'tablacentral');
    }else{
       //window.alert("Es necesario digitar al menos 4 letras.");
       mostrar("mensajecontrol");
    }
}

function trim(kadena) {return kadena.replace(/^\s+|\s+$/g,"");}
    
function mostrar(nombreCapa){ 
    document.getElementById(nombreCapa).style.visibility="visible";
}

function ocultar(nombreCapa){ 
    document.getElementById(nombreCapa).style.visibility="hidden";
} 

function Enter(Evento,Formulario){
/*
 * Para que funcione debe llamarse desde un campo de formulario como:
 * <input type="text" onkeypress="Enter(event, document.form[0])">
 */
	var AsciiChar;
	if (Evento.keyCode) {AsciiChar = Evento.keyCode;}
	else if (Evento.which){AsciiChar = Evento.which;}
	else {return false;}

    if (AsciiChar == 13) {Formulario.submit();}
    return true;
}
function abc(){
	alert("ABC");
}
function oculta_visualiza(capa){
	var elem;
	//if (document.getElementById) {
		// Estandart actual
		elem = document.getElementById(capa);
	//}
	if (elem.style.display == 'none'){elem.style.display = "block";}
	else { elem.style.display = "none";}
}

function prueba(){
	alert("Prueba");
}
function cargarform() {
         document.comentaform.nombre.value="";
         document.comentaform.correo.value="Opcional";
         document.comentaform.comentari.value="Escriba su comentario...";
         
        var f = new Date();
        var meses = new Array("Enero","Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto",
                                "Septiembre", "Octubre", "Noviembre", "Diciembre");
         
         document.comentaform.fechado.value = f.getDate()+" de "+meses[f.getMonth()]+" del "+f.getFullYear();
}
function zoom(elem){
	//alert("hola "+elem);
	elemento = document.getElementById(elem).style;
		//document.getElementById(elem).style.height = "60px";
		elemento.height = "60px";
		//alert(elemento.height);
		setTimeout("zoom_normal()",5000);
}
function zoom_normal(){
	//alert("llamada..."+elemento.height);
	elemento.height = "50px";
	
}

