function conmuteStyle(whichLayer,style)
{
	if (document.getElementById) {
		// this is the way the standards work
		document.getElementById(whichLayer).style.display = style;
	}
	else if (document.all) {
		// this is the way old msie versions work
		document.all[whichlayer].style.display = style;
	}
	else if (document.layers) {
		// this is the way nn4 works
		document.layers[whichLayer].display = style;
	}
}

function selectMenuLink(link_name)
{
	var index=0;
	while(document.getElementById('menu_'+index))
	{
		document.getElementById('menu_'+index).className="menu_link";
		index++;
	}
	document.getElementById(link_name).className="menu_link_on";
}

function start()
{
	if (document.getElementById)
	{
		if (document.getElementById('principal'))
		{
			var alto_principal=0;
			var resto=120;
			if (document.getElementById('principal').offsetHeight)
				alto_principal=document.getElementById('principal').offsetHeight;
			if (alto_principal>=resto)
			{
				if(document.getElementById('menu')&&document.getElementById('contenido')&&document.getElementById('frame_contenido'))
				{
					document.getElementById('menu').style.height=alto_principal-resto;
					document.getElementById('contenido').style.height=alto_principal-resto;
					document.getElementById('frame_contenido').style.height=alto_principal-resto;
				}
			}
		}
	}
}
/*
if (document.getelementsByTagName)
{
	alert('hay getelementsByTagName');
}
else alert('no hay getelementsByTagName');
*/

function setIframe()
{
	// Se elimina el borde del frame contenido
	document.getElementById('contenido').innerHTML='<iframe name="frame_contenido" id="frame_contenido" src="inicioGa.html" title="Contenido" frameborder="0">El navegador no soporta iframes. Es necesaria una actualización del navegador para visualizar la página correctamente.</iframe>';
}


window.onload = function() { start(); setIframe(); selectMenuLink('menu_0'); }
window.onresize = function() { start(); }