function update_calendar(){var month=$('#calendar_mes').attr('value');var year=$('#calendar_anio').attr('value');var valores='month='+month+'&year='+year;$.ajax({url:'mostrar_calendario.php',type:"GET",data:valores,beforeSend:function(){$("#calendario").html('<p><img src="images/loader.gif" style="margin-left:45px;" /></p><p>Cargando el calendario.</p><p>Espere por favor.</p>');},success:function(datos){$("#calendario").html(datos);}});}
var delayb4scroll=1000
var marqueespeed=1
var pauseit=1
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)?copyspeed:0
var actualheight=''
function scrollmarquee(){if(parseInt(cross_marquee.style.top)>(actualheight*(-1)+12))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"}
function initializemarquee(){cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if(window.opera||navigator.userAgent.indexOf("Netscape/7")!=-1){cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return}
setTimeout('lefttime=setInterval("scrollmarquee()",30)',delayb4scroll)}
if(window.addEventListener)
window.addEventListener("load",initializemarquee,false)
else if(window.attachEvent)
window.attachEvent("onload",initializemarquee)
else if(document.getElementById)
window.onload=initializemarquee
function fecha(){var mydate=new Date()
var year=mydate.getYear()
if(year<1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if(daym<10)
daym="0"+daym
var dayarray=new Array("Domingo","Lunes","Martes","Mi\u00E9coles","Jueves","Viernes","S\u00E1bado")
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
document.write("<p>"+dayarray[day]+" "+daym+" de "+montharray[month]+", "+year+" <\/p>")}
$(function(play){$('.date_has_event').each(function(){var distance=10;var time=250;var hideDelay=500;var hideDelayTimer=null;var beingShown=false;var shown=false;var trigger=$(this);var popup=$('.events ul',this).css('opacity',0);$([trigger.get(0),popup.get(0)]).mouseover(function(){if(hideDelayTimer)clearTimeout(hideDelayTimer);if(beingShown||shown){return;}else{beingShown=true;popup.css({bottom:20,left:-76,display:'block'}).animate({bottom:'+='+distance+'px',opacity:1},time,'swing',function(){beingShown=false;shown=true;});}}).mouseout(function(){if(hideDelayTimer)clearTimeout(hideDelayTimer);hideDelayTimer=setTimeout(function(){hideDelayTimer=null;popup.animate({bottom:'-='+distance+'px',opacity:0},time,'swing',function(){shown=false;popup.css('display','none');});},hideDelay);});});});function MM_validateForm(){if(document.getElementById){var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;for(i=0;i<(args.length-2);i+=3){test=args[i+2];val=document.getElementById(args[i]);if(val){nm=val.name;if((val=val.value)!=""){if(test.indexOf('isEmail')!=-1){p=val.indexOf('@');if(p<1||p==(val.length-1))errors+='- '+nm+' debe contener una dirección de correo electrónico válido.\n';}else if(test!='R'){num=parseFloat(val);if(isNaN(val))errors+='- '+nm+' debe contener un número.\n';if(test.indexOf('inRange')!=-1){p=test.indexOf(':');min=test.substring(8,p);max=test.substring(p+1);if(num<min||max<num)errors+='- '+nm+' debe contener un número entre '+min+' y '+max+'.\n';}}}else if(test.charAt(0)=='R')errors+='- '+nm+' es requerido.\n';}}if(errors)alert('Se ha(n) producido el(los) siguiente(s) errore(s):\n'+errors);document.MM_returnValue=(errors=='');}}
var scrollSpeed=80;var current=0;var direction='h';var direction2='d';function bgscroll(){current-=1;$('div.nubes').css("backgroundPosition",(direction=='h')?current+"px 0":"0 "+current+"px");$('div.logos').css("backgroundPosition",(direction2=='h')?current+"px 0":"0 "+current+"px");}
setInterval("bgscroll()",scrollSpeed);function MostrarOcultar(capa,enlace){if(document.getElementById){var aux=document.getElementById(capa).style;aux.display=aux.display?"":"block";}}
function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=850,height=650,left = 215,top = 5');");}
