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; 
}


function cambiacanal(idnoticia) {
$.get("inc/videosmuestra.php", { idnoticia: idnoticia},
  function(data){

	$("#zonareproductor").html(data);
  });		

}

function cambialistateles(paistele) {
d="<iframe src='cambiateles.php?paistele="+paistele+"' width='238' height='339'  AllowTransparency frameborder='0'></iframe>";
document.getElementById("telepais").innerHTML=d;		

}


function viajera(galeria,id) {
		ajax=nuevoAjax();
		ajax.open("GET", 'viajera.php?_pagi_pg='+id+'&galeriaid='+galeria, true);
		ajax.onreadystatechange=function() 	{ 
			if (ajax.readyState==1)	{

			}
			if (ajax.readyState==4)	{ 
				document.getElementById("viajera").innerHTML=ajax.responseText;
			} 
		}
		ajax.send(null);
}

function muestamenuvideo(subcatid,subcatid1,nombre,ordenar) {
/*$.get("inc/videosmenu.php", { subcatid: subcatid, subcatid1: subcatid1, nombre:nombre },
  function(data){
    alert("Data Loaded: " + data);
  });*/
abrecierra(subcatid,subcatid1);
$.get("inc/videosminiaturas.php", { subcatid: subcatid, subcatid1: subcatid1, ordenar:ordenar, nombre:nombre },
  function(data){
    $("#menuvideos").html(data);
	$('#pane2').jScrollPane({showArrows:true, scrollbarWidth: 15, arrowSize: 16});
	if(cornerOnload) cornerOnload(); if(isIE){addIECorners(); }else {addCorners();}
  });

}
function abrecierra(catid,subcatid) {
if (catid>0 || subcatid>0) {
	a=$("#nive"+catid).css("display");
	if ($("#nive"+catid).css("display")=="none") {
	$(".nivel1").slideUp();
	$("#nive"+catid).slideDown();
	}
	else {
	$(".nivel1").slideUp();
	}
		 
}
}



function muestraeventos(ano,mes,dia) {
GB_showPage("Eventos "+mes+"/"+dia+"/"+ano, "../../muestraeventos.php?ano="+ano+"&mes="+mes+"&dia="+dia);
}

function muestaboxindex(box,listado) {    
$.get("inc/box0index.php", { box: box, listado: listado },
  function(data){

	$("#thumbs"+box).html(data);
  });
	

}
