var xx,yy;
var Ventana = 0;

function InsertFecha() {
var fec = new Date();
var dd = fec.getDate();
var mm = fec.getMonth()+1;
var yy = fec.getFullYear();
var hh = fec.getHours();
var mi = fec.getMinutes();
var ss = fec.getSeconds();
if (dd < 10) {dd = "0" + dd;}
if (mm < 10) {mm = "0" + mm;}
if (hh < 10) {hh = "0" + hh;}
if (ss < 10) {ss = "0" + ss;}
var res = dd + "-" + mm + "-" + yy + "  " + hh + ":" + mi + ":" + ss;
document.getElementById("Tfecha").innerHTML=res.fontcolor("#993300");
setTimeout(InsertFecha,0);
}


function MenuSobre(x) {
var Nclase;
var clase = eval("document.body.all('" + x + "').className");
if (clase=="Celda_Menu") Nclase="document.body.all('" + x + "').className='celda_over'";
if (clase=="celda_over")  Nclase="document.body.all('" + x + "').className='Celda_Menu'";
eval(Nclase);
}

function Cerrar(x) {}

function Ejecuta(x) {
location.href="http://" + x;	
}

/*	.....	FUNCION CAPTURA FILA Y CAMBIA DE COLOR	.....	*/
var fila = 0;
function Ccolor(x) {
if (fila == x) {
		var dat = "document.body.all('" + x + "').className=''";
		fila = 0;
		}
else {
		var dat = "document.body.all('" + x + "').className='Ccolor-Fila'";
		fila = x;
		}
eval(dat);
}
/*	.....................................................	*/

function Vdetalle(x) {
if (Ventana == x || x == 0) {
		Detalles.style.visibility = "hidden";
		Ventana = 0;
		return;
		}
var ancho = screen.availWidth;
var alto  =  screen.availHeight;
xx = document.body.screenX;
yy = document.body.screenY;

if (xx== null || yy == null ) {
	xx =700;
	yy = event.clientY + document.body.scrollTop;
	}

//Detalles.style.top = yy + "px";
//Vmostrar.style.top = yy + "px";
Ventana = x;

//..... BUSCAR Detalles del Debate (x) ..... 
ajax=nuevoAjax();
ajax.open("GET", "detalles_show.php?id_debate=" + x,true); // metodo get
ajax.onreadystatechange=function() {
		if (ajax.readyState < 4) {
				Vmostrar.style.visibility = "visible";
				Vmostrar.style.top  = yy + "px";
				Vmostrar.style.left = xx + "px";
				switch (ajax.readyState) {
					case 0,1	:	var men = "<center>Conectándose</center>";break;
					case 2,3	:	var men = "<center>Conectado</center>";break;
					}
					Vmostrar.innerHTML = men;
				}
		if (ajax.readyState==4) {
				Vmostrar.style.visibility = "hidden";
				Detalles.style.visibility = "visible";
				Detalles.style.top  = yy + "px";
				Detalles.style.left = 200 + "px";
				Detalles.innerHTML = ajax.responseText;
				}
		}
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send();


}
/*	.....	AJAX	.....	*/

function nuevoAjax(){
var xmlhttp=false;
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }

if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
/*	.......................................................	*/
