Spry.Widget.HTMLPanel.evalScripts = true;

function init(){
	calendario.loadContent("/calendario/index.php");
}

/** FUNCIONES PARA EL CALENDARIO **/
function mostrar(nombreCapa){
	document.getElementById(nombreCapa).style.visibility="visible";
}
function ocultar(nombreCapa){
	document.getElementById(nombreCapa).style.visibility="hidden";
}

/** FUNCIONES PARA EL PANEL DE NOTICIAS **/
function restableceMenuNoticias(){
	document.getElementById( "menuPrincipales" ).style.backgroundImage="url(imagenes/bgtitlecontentcenter.gif)";
	document.getElementById( "menuPrincipales" ).style.color="#BCD8F0";
	document.getElementById( "menuAcademicas" ).style.backgroundImage="url(imagenes/bgtitlecontentcenter.gif)";
	document.getElementById( "menuAcademicas" ).style.color="#BCD8F0";
	document.getElementById( "menuCulturales" ).style.backgroundImage="url(imagenes/bgtitlecontentcenter.gif)";
	document.getElementById( "menuCulturales" ).style.color="#BCD8F0";
	document.getElementById( "menuDeportivas" ).style.backgroundImage="url(imagenes/bgtitlecontentcenter.gif)";
	document.getElementById( "menuDeportivas" ).style.color="#BCD8F0";
	document.getElementById( "menuSociales" ).style.backgroundImage="url(imagenes/bgtitlecontentcenter.gif)";
	document.getElementById( "menuSociales" ).style.color="#BCD8F0";
}

function MuestraPanelNoticias(nombrePanel){
	restableceMenuNoticias();
	document.getElementById( "menu" + nombrePanel ).style.backgroundImage="url(imagenes/bgtitlecontentcenter2.gif)";
	document.getElementById( "menu" + nombrePanel ).style.color="#1f3856";
	spNoticias.showPanel("pNoticias" + nombrePanel);
}

function getScrollY() {
  var scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
  }
  return scrOfY;
}

function niceScrollTo(yPos){
   var sizeScrolling = 20;
   if( getScrollY() < yPos ){
   		if( ( yPos - getScrollY() ) < sizeScrolling ){
			scrollTo(0,yPos);
		}else{
			scrollTo(0, getScrollY() + sizeScrolling );
			setTimeout("niceScrollTo(" + yPos + ")",1);
		}
	}else{
		
	}
}
