function activaBotones()
{
/*funcion que recorre todos los enlaces para asignarle el evento onclick al boton contenido*/
	var  enlaces = document.getElementsByTagName("A");
	var  boton;
	var  enlace;

	for (i in enlaces)
	{
	enlace=enlaces[i];
	
		if (enlace!=undefined){
			var boton=enlace.firstChild;
			if(boton!=undefined)
			{
				if(boton.tagName=="INPUT")
				{
						if (boton.onclick==undefined)
						boton.onclick=function (){window.location.href=this.parentNode.href};
				}
			}
		}
	}
	
}

function activaRolloverBotones()

{

/*funcion que recorre todos los botones para asignarle el evento onclick*/

	var  botones = document.getElementsByTagName("input");

	var  boton;

	//	alert ("aasasasasa");

	for (i in botones)

	{

	boton=botones[i];

	

	if(boton.type=="submit" || boton.type=="button")

	{

		

		clase=boton.className;

		

		if(clase.indexOf("boton")!=-1 && clase.indexOf(" rollover")==-1)

		{

		

			boton.onmouseover=function 	()	{this.className=this.className+" rollover";};

			boton.onmouseout=function 	()	{

				if (this.className.indexOf(" rollover")!=-1)

			this.className=this.className.slice(0,this.className.indexOf(" rollover"));

			}

			

			

		}

	}

	}

}

function creaMenu()

{

 var foMenu = new FlashObject("/fileadmin/templates/menu.swf", "Menu", "208", "780", "7", "#FFFFFF", true); 

 foMenu.addVariable("uid", uid); 

 foMenu.addVariable("L", L); 

 foMenu.write("centro");

}

function activaLogotipo()

{



}

function init()

{

	document.getElementById("logotipo").style.position="absolute";

//	document.getElementById("centro").style.position="absolute";

	document.getElementById("logotipo").firstChild.onclick=function (){

		document.location.href="http://www.centroguerrero.org";

	}

	activaBotones();	

	activaRolloverBotones();

	/*var foMenu = new FlashObject("/fileadmin/templates/menu.swf", "Menu", "208", "780", "7", "#FFFFFF", true);

	foMenu.addVariable("uid", uid); // this line is optional, but this example uses the variable and displays this text inside the flash movie

	foMenu.addVariable("L", L); // this line is optional, but this example uses the variable and displays this text inside the flash movie

	foMenu.write("centro");

	*/

	



}



function abre_ventana(elemento, ancho, alto,scroll)

{

	var ventana=window.open(elemento.href,"popup","width="+ancho+"px,height="+alto+"px,scrollbars="+scroll);

	return ventana==undefined;

}

window.onload=init;