
function OcultaMenu(IDUL){ 
    var menu = document.getElementById(IDUL);
    if (menu!=null)  menu.style.display = "none"; 
} 
function DespliegaMenu(IDUL){ 
    var menu = document.getElementById(IDUL); 
    if (menu!=null) menu.style.display = "block"; 
}

function IniciaNoticias() {
    var Noticia = document.getElementById('CeldaNoticia');
    var SubNoticia = Noticia.getElementsByTagName('span');
    for (var i=0; i < SubNoticia.length; i++) {
        SubNoticia[i].style.display='none';
    }				
}	
function abrirVentana(noticia,ancho,largo) 
{ 
    window.open(noticia,'','titlebars=0, toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+ancho+',height='+largo); 
} 		

function AsignaIdioma(IdIdioma)
{
    setCookieLT("xidioma", IdIdioma, 100000);
    location.reload();
}
	
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Written by Steve - http://jsmadeeasy.com/ -->
	
<!--
function getObject(obj) {
    var theObj;
    if(document.all) {
        if(typeof obj=="string") {
            return document.all(obj);
        } else {
            return obj.style;
        }
    }
    if(document.getElementById) {
        if(typeof obj=="string") {
            return document.getElementById(obj);
        } else {
            return obj.style;
        }
    }
    return null;
}
	
//Contador de caracteres.
function Contar(entrada,salida,texto,caracteres) {
    var entradaObj=getObject(entrada);
    var salidaObj=getObject(salida);
    var longitud=caracteres - entradaObj.value.length;
    if(longitud <= 0) {
        longitud=0;
        texto='<span class="disable">&nbsp;'+texto+'&nbsp;</span>';
        entradaObj.value=entradaObj.value.substr(0,caracteres);
    }
    salidaObj.innerHTML = texto.replace("{CHAR}",longitud);
}
	
//-->
	
function calendario(anio,mes){
		
    var cal;
		
    cal = new CALENDAR(anio, mes);
    cal.offset = 1;
    cal.weekNumbers = true;
    cal.tFontSize = 12;
    cal.hFontSize = 12;
    cal.dFontSize = 10;
    cal.wFontSize = 10;
    cal.link = 'agenda.php';
    //	cal.viewEvent(7, 7, "RED", "Homenaje a Portoviejo");
    //	cal.viewEvent(15, 17, "RED", "Verbena");
    document.write(cal.create());	
}
	
/*(banners=new Array("banner01.jpg","banner02.jpg","banner03.jpg");
	c=0;
	function run_ini(){
    	c++;
    	if(c==banners.length)
        	c=0;
    	opa=$('.estilo_banner').css("opacity");
    	if(opa==0.0){

        	$('.estilo_banner').css({backgroundImage:"url(images/banner/"+banners[c]+")"}).animate({opacity:1},2000);
        	$('.estilo_banner').animate({top:0},5000);
   		}

    	$('.estilo_banner').animate({opacity:0.0},2000,run_ini);   
	}
 */

function setCookie(name, value, expires, path, domain, secure)
{
    document.cookie =
        name+"="+escape(value)+
        (expires ? "; expires="+expires.toGMTString() : "")+
        (path    ? "; path="   +path   : "")+
        (domain  ? "; domain=" +domain : "")+
        (secure  ? "; secure" : "");
}
function setCookieLT(name, value, lifetime, path, domain, secure)
{
    if (lifetime) lifetime = new Date(Date.parse(new Date())+lifetime*1000);
    setCookie(name, value, lifetime, path, domain, secure);
}
function delCookie(name, path, domain)
{
    if (getCookie(name))
        setCookie(name, "", new Date("January 01, 2000 00:00:01"), path, domain);
}
function getCookie(name)
{
    var cookie, offset, end;
    cookie  = " "+document.cookie;
    offset  = cookie.indexOf(" "+name+"=");
    if (offset == -1) return undefined;
    offset += name.length+2;
    end     = cookie.indexOf(";", offset)
    if (end    == -1) end = cookie.length;
    return unescape(cookie.substring(offset, end));
}

function rollover()
{
    $(".RollOver").each(function(){
        $(this).parents(".Secciones").find(".CuerpoSeccion").hide();    
        $(this).removeClass("RollOver").addClass("RollOverDown");
        $(this).toggle(
	function(){
            $(this).parents(".Secciones").find(".CuerpoSeccion").slideDown("slow");
            //$(this).css({backgroundImage:"url(images/up.png)"});
            $(this).removeClass("RollOverDown").addClass("RollOver");
	},function(){
            $(this).parents(".Secciones").find(".CuerpoSeccion").slideUp("slow");
            //$(this).css({backgroundImage:"url(images/down.png)"});
            $(this).removeClass("RollOver").addClass("RollOverDown");
	}
    )	
    });
}
jQuery.fn.labelOver = function(overClass) {
    return this.each(function(){
        var label = jQuery(this);
        var f = label.attr('for');
        if (f) {
            var input = jQuery('#' + f);
			
            this.hide = function() {
                label.css({ textIndent: -10000 })
            }
			
            this.show = function() {
                if (input.val() == '') label.css({ textIndent: 0 })
            }

            // handlers
            input.focus(this.hide);
            input.blur(this.show);
            label.addClass(overClass).click(function(){ input.focus() });
			
            if (input.val() != '') this.hide(); 
        }
    })
}