// JavaScript Document
function Fade(){
	//$('#Inicio').fadeOut(100);
	//$('#Fondo').fadeOut(3500);
	//$('#Publi').fadeIn(500,function(){$('#Publi').fadeOut(9000);});
}
function Radio(){
	$('#Publi').fadeOut(900);
}
function Quitar(){
	$('#Publi').fadeIn(1500);
	setTimeout("Radio()",6000);
}
function Ajustar(){
	if (screen.width<=800){
		document.getElementById('Principal').style.width="800px";
		document.getElementById('Principal').style.height="45px";
	}else{
		if (screen.width<=1024){
			document.getElementById('Principal').style.width="900px";
			document.getElementById('Principal').style.height="48px";
		}else{
			document.getElementById('Principal').style.width="1120px";
			document.getElementById('Principal').style.height="60px";
		}
	}
}
function imprime(){
	//alert ($(window).width()+" x "+$(window).height());
	//alert ($(document).width()+" x "+$(document).height());
	//alert (screen.width+" X "+screen.height);
	//document.getElementById('bInferior').style.top=$(document).height()-50;
}
function irSubmenu(seccion){
	//document.getElementById('FotoDelDia').style.display="block";
	document.getElementById('Notas').src='noticias.php?p=1&s='+seccion;
}
function irMenu(url){
	document.getElementById('Notas').src=url;
}
function vermapa(){
	document.getElementById('Notas').src='mapa.php';
}
function video(f){
	media="media/nyanpalomo.flv";
	if(f==1){
		document.getElementById('Video').innerHTML='<embed name="radiomaya" src="mediaplayer.swf" autostart="true" width="670" height="400" allowscriptaccess="always" allowfullscreen="true" flashvars="width=670&height=400&autostart=true&file='+media+'&screencolor=0x000000&logo=radiomaya.png&link=http://www.radiomayainternacional.com" />';
		$('#Video').fadeIn(300);
		ustream(0);
	}else{
		$('#Video').fadeOut(300);
		document.getElementById('Video').innerHTML="";
	}
}
function ustream(f){
	if(f==1){
		document.getElementById('Ustream').innerHTML='<object width="670" height="400" id="lsplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="http://cdn.livestream.com/grid/LSPlayer.swf?channel=grupoceiba&amp;autoPlay=false"></param><param name="allowScriptAccess" value="always"></param><param name="allowFullScreen" value="true"></param><embed name="lsplayer" wmode="transparent" src="http://cdn.livestream.com/grid/LSPlayer.swf?channel=grupoceiba&amp;autoPlay=false" width="670" height="400" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash"></embed></object>';
		$('#Ustream').fadeIn(300);
		video(0);
	}else{
		$('#Ustream').fadeOut(300);
		document.getElementById('Ustream').innerHTML="";
	}
}

function tv(f){
	//document.getElementById('UstreamTV').style.display="block";
	//document.formVideo.submit();
	/*var dir="http://www.radiomayainternacional.com";
	var pag="_blank";
	var opciones="toolbar=no,menubar=no,directories=no,status=no,resizable=yes,location=no,scrollbars=no,height=600,width=800";
	window.open(dir,pag,opciones);*/
	if(f==1){
		$('#TV').fadeIn(300);
		ustream(1);
		//video(1);
		document.getElementById('Cuadros').style.height="1280px";
	}else{
		$('#TV').fadeOut(300);
		ustream(0);
		video(0);
		document.getElementById('Cuadros').style.height="870px";
	}
}
