function objetoAjax(){
 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;
}

// redireccion // function rdc(u){ window.location.href="http://"+document.domain+"/"+u;} 
function rdc(u){ window.location.href=""+u;} 

/*  Mostrar o y ocultar Publicidad */
function ocultar(enla) {
 img_ocul = '<img src="img/ocul_16.gif" border="0">';
  img_most = '<img src="img/mos_16.gif" border="0">';
  obj = document.getElementById('publicidad');
  obj.style.display = (obj.style.display == '') ? 'none' : '';
  enla.innerHTML = (enla.innerHTML == img_most) ? img_ocul : img_most;
}
/* Ver Video */
function verVideo(id,_capa){	 
var id = id;
var capa = document.getElementById(_capa);
capa.innerHTML = "<center><br><br><br><img src=\"img/Cargando.gif\" /><br><b><a style=\"color:#000000\">Cargando.....</a></b></center><br>";
Ajax_Video=objetoAjax();
Ajax_Video.open("GET", "./Procesos/Proc.Vervideo.php?id="+id, true);
Ajax_Video.onreadystatechange = function() {
	  if (Ajax_Video.readyState == 4) {
	if (Ajax_Video.status == 200) {
		var Respuesta = Ajax_Video.responseText;
		capa.innerHTML = Respuesta;
	  }
  }
}
Ajax_Video.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
Ajax_Video.send(null);
}
/* Chiste */
function chiste(){
	var capa = document.getElementById("chiste");
	ajax_chiste = objetoAjax();
	capa.innerHTML = " Cargando Chiste ... ";
	ajax_chiste.open("GET","Procesos/Proc.Chiste.php?nocache="+Math.random() , true);
	ajax_chiste.onreadystatechange = function() {
		if(ajax_chiste.readyState == 4){
			capa.innerHTML = ajax_chiste.responseText;
		}
	}
	ajax_chiste.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax_chiste.send(null);
}
	
/* Voto */

function voto(tipo,artista) {
var voto_capa = document.getElementById("voto");
var tipo;
var artista;
voto_capa.innerHTML= '<center><br><br><br><img src=\"img/Cargando.gif\" /><br><b><a style=\"color:#000000\">Cargando.....</a></b></center><br>';
  VotoAjax=objetoAjax();
var url = "./Procesos/Proc.Voto.php?tipo="+tipo+"&art="+swf('repro').lr();
//var url = "./modulos/"+tipo+".php";
VotoAjax.open("GET", url, true);
VotoAjax.onreadystatechange = function() {
  if (VotoAjax.readyState == 4) {
	  if (VotoAjax.status == 200) {
		var Respuesta = VotoAjax.responseText;
		voto_capa.innerHTML = Respuesta;
	  }
  }
}
VotoAjax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
VotoAjax.send(null);
}

/* Compartir Con Red Sociales */





function fbs_click(fb){
u=location.href;
t=document.title;
window.open('http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.jhonny.tk%2Farray.php%3Fid%3D'+fb+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}

function twi(twitter){
u=location.href;
t=document.title;
window.open('http://twitter.com/home?status=http://www.jhonny.tk/'+twitter+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=840,height=500');
return false;
}




