ie4 = (document.all) ? true:false;
ns4=(navigator.appName=='Netscape' && parseInt(navigator.appVersion)==4);
ns6 = (!ie4 && document.getElementById) ? 1 : 0;

function iniciar_log() {
	mostrarlog(2);
	document.foInfoSesion.submit();
}

function mostrarlog(qui) {
	if (!document.getElementById|document.all) {
			return;
	}else{
		which  = (qui==1)?"logueado":"logueo";
		if (document.getElementById) oWhich = eval ("document.getElementById('" + which + "')");
		else oWhich = eval ("document.all." + which);
	}
	window.focus();
	if (oWhich.style.display=="none") {oWhich.style.display="";} else {oWhich.style.display="none";}
	}

function hemlogeat(elnom) {
	mostrarlog(2);
	mostrarlog(1);
	escriucapa("nomlogeado",elnom);
	}

function escriucapa(nocapa,content) {
	if (ie4) {
		sub = document.all[nocapa];
		sub.innerHTML=content;
		}
	else if (ns6) {
		rng = document.createRange();
		el = document.getElementById(nocapa);
		rng.setStartBefore(el);
		htmlFrag = rng.createContextualFragment(content);
		while (el.hasChildNodes()) el.removeChild(el.lastChild);
		el.appendChild(htmlFrag);
		}
	}

