if (top.location!=self.location) top.location.replace(self.location);

function ver(que) {
	document.getElementById(que).style.visibility = 'visible';
}

function ocultar() {
	document.getElementById("sistemas").style.visibility = 'hidden';
}

function filter(imagename,nuevaimg) {
	if (document.images[imagename].src!=eval(nuevaimg+".src")) document.images[imagename].src=eval(nuevaimg+".src");
}

function nover(cualsi) {
	losdiv = document.getElementsByTagName("div");
	for (i = 0; i < losdiv.length; i++) {
		clasedeldiv = (document.all) ? losdiv[i].getAttribute("className") : losdiv[i].getAttribute("class");
		if (clasedeldiv=='dropmenu') {
			iddeldiv = losdiv[i].getAttribute("id");
			if (cualsi!=undefined) {
				if (iddeldiv!=cualsi) document.getElementById(iddeldiv).style.visibility = 'hidden';
			} else {
				document.getElementById(iddeldiv).style.visibility = 'hidden';
			}
		}
	}
}

function popimage(titulo,imagesrc,winwidth,winheight){
	var look='width='+winwidth+',height='+winheight+',top=0,left=0,'
	popwin=window.open("","",look);
	popwin.document.open();
	popwin.document.write('<ti'+'tle>'+titulo+'</tit'+'le><bo'+'dy style="margin:0" onclick="self.close()"><i'+'mg src="'+imagesrc+'"></bo'+'dy>');
	popwin.document.close();
}

function volverArriba() {
	/* var c = document.getElementById("KJFContenido");
	c.scrollTop = 0; */
	window.scrollTo(0,0);
}

function verVideo(cual, titulo) {
	v = window.open("", "kjfvideoplayer", 'width=640,height=505,top=0,left=0,')
	v.document.open();
	v.document.write('<title>'+titulo+'</title><body style="margin:0"><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/'+cual+'&hl=es_ES&fs=1&rel=0&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+cual+'&hl=es_ES&fs=1&rel=0&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></body>');
	v.document.close();
}

function xmlobj() {
	var req = false;
	if (window.XMLHttpRequest)
		req = new XMLHttpRequest();
	else if (window.ActiveXObject)
		req = new ActiveXObject("Microsoft.XMLHTTP");
	return req;
}

function navegar(adonde) {
	var provi = '<table align="center" width="100%" style="height: 100%;"><tr><td align="center"><img src="images/loading.gif" alt="" width="48" height="48" border="0"><br>Actualizando informaci&oacute;n<br>por favor espere...</td></tr></table>';
	document.getElementById('KJFContenido').innerHTML = provi;
	var req = new xmlobj();
	if (req) {
		req.open('GET', adonde, true);
		req.onreadystatechange = function (aEvt) {
			if (req.readyState == 4) {
				if(req.status == 200) {
					respuesta = unescape(req.responseText);
					document.getElementById('KJFContenido').innerHTML = respuesta;
				}
			}
		};
		req.send(null);
	}
}
