/*function activaBotones()
{
	var  botones = document.getElementsByTagName("input");
	var  boton;
	var  enlace;
	for (i in botones)
	{
		boton=botones[i];
		var enlace=boton.parentNode;
		if(enlace!=undefined)
		{
		//	alert(boton.className);
			if (enlace.tagName=="A")
			//	alert(enlace);
			boton.onclick=function (){window.location.href=this.parentNode.href};
			
		}
	
	}
}
*/
function activaBotones()
{
/*funcion que recorre todos los botones para asignarle el evento onclick*/
	var  enlaces = document.getElementsByTagName("A");
	var  boton;
	var  enlace;

	for (i in enlaces)
	{
	enlace=enlaces[i];
	
		
		var boton=enlace.firstChild;
		if(boton!=undefined)
		{
			
			
			if(boton.tagName=="INPUT")
			{
						boton.onclick=function (){window.location.href=this.parentNode.href};
			}
		}
	}
	
}
function abre_ventana(elemento, ancho, alto,scroll)
{
	if ( ancho==undefined&& alto==undefined&& scroll==undefined)
	{
	
		var ventana =window.open(elemento.href,"_blank");
		return  ventana==undefined;
	}
	var ventana=window.open(elemento.href,"popup","width="+ancho+"px,height="+alto+"px,scrollbars="+scroll);
	return ventana==undefined;
}
