
/* Example message arrays for the two demo scrollers*/

var pausecontent=new Array()
pausecontent[3]='<table width="406" border="0" cellspacing="0" cellpadding="0"><tr><td width="197"><br><br><br><table width="200" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="images/cat_maternal.jpg" width="179" height="93" alt="Lactantes"></td></tr><tr><td class="Categorias_index"><div style="margin-left:5px; margin-right:20px;">En este período se cubre un intervalo de desarrollo de los niños que abarca del año 6 meses a los tres años 11 meses.<br><a href="niveles_educativos.php#maternal">Ver más información</a></div></td></tr></table></td><td width="10">&nbsp;</td><td width="199"><br><br><br><table width="200" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="images/cat_lactantes.jpg" width="179" height="93" alt="Lactantes"></td></tr><tr><td class="Categorias_index"><div style="margin-left:5px; margin-right:5px;">Un niño lactante es aquel cuya edad se encuentra en el rango que va desde el nacimiento al año seis meses.<br><a href="niveles_educativos.php#lactantes">Ver más información</a></div></td></tr></table><br></td></tr></table><br /><table width="200" border="0" cellspacing="0" cellpadding="0"><tr><td><table width="200" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="images/cat_preescolar.jpg" width="177" height="92" alt="Lactantes"></td></tr><tr><td class="Categorias_index"><div style="margin-left:5px; margin-right:20px;" align="justify">Este período es aproximado a dos años: desde los 4 hasta los 5 años 11 meses, justamente antes de su ingreso al nivel de educación primaria.<br><a href="niveles_educativos.php#preescolar">Ver más información</a></div></td></tr></table></td><td>&nbsp;</td><td><table width="200" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="images/cat_primaria.jpg" width="178" height="93" alt="Lactantes"></td></tr><tr><td class="Categorias_index"><div style="margin-left:5px; margin-right:5px;">Contenido en construcción.<br><a href="javascript: alert(\'Contenido en construcción\');">Ver más información</a></div></td></tr></table></td></tr></table>';
pausecontent[2]='<a href="salud.pdf" target="_blank"><img src="images/campana_salud.jpg" width="383" height="308" alt="Inicio de Clases" border="0"></a>';
pausecontent[1]='<div style="text-align:center;padding:50px;"><object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="250"><param name="movie" value="flash/CPyV2010.swf" /><param name="quality" value="high" /><param name="wmode" value="opaque" /><param name="swfversion" value="6.0.65.0" /><!-- Esta etiqueta param indica a los usuarios de Flash Player 6.0 r65 o posterior que descarguen la versión más reciente de Flash Player. Elimínela si no desea que los usuarios vean el mensaje. --><param name="expressinstall" value="Scripts/expressInstall.swf" /><!-- La siguiente etiqueta object es para navegadores distintos de IE. Ocúltela a IE mediante IECC. --><!--[if !IE]>--><object type="application/x-shockwave-flash" data="flash/CPyV2010.swf" width="300" height="250"><!--<![endif]--><param name="quality" value="high" />  <param name="wmode" value="opaque" /><param name="swfversion" value="6.0.65.0" /><param name="expressinstall" value="Scripts/expressInstall.swf" /><!-- El navegador muestra el siguiente contenido alternativo para usuarios con Flash Player 6.0 o versiones anteriores. --><div><h4>El contenido de esta página requiere una versión más reciente de Adobe Flash Player.</h4><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Obtener Adobe Flash Player" width="112" height="33" /></a></p></div><!--[if !IE]>--></object><!--<![endif]--></object></div>';
pausecontent[0]='<br /><a title="Curso de Verano 2010" href="verano.pdf" target="_blank"><img src="images/curso_verano.jpg" width="383" height="271" alt="Curso de Verano 2010" border="0"></a>';




var pausecontent2=new Array()
pausecontent2[0]='<table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/1.jpg" width="78" height="28"></td><td><img src="images/11.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/12.jpg" width="78" height="28"></td><td><img src="images/27.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/10.jpg" width="78" height="28"></td><td><img src="images/20.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/3.jpg" width="78" height="28"></td><td><img src="images/4.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/14.jpg" width="78" height="28"></td><td><img src="images/13.jpg" width="78" height="28"></td></tr></table><br><br><br>';
pausecontent2[1]='<table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/5.jpg" width="78" height="28"></td><td><img src="images/6.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/7.jpg" width="78" height="28"></td><td><img src="images/8.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/9.jpg" width="78" height="28"></td><td><img src="images/2.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/15.jpg" width="78" height="28"></td><td><img src="images/28.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/16.jpg" width="78" height="28"></td><td><img src="images/29.jpg" width="78" height="28"></td></tr></table><br><br><br>';
pausecontent2[2]='<table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/17.jpg" width="78" height="28"></td><td><img src="images/18.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/19.jpg" width="78" height="28"></td><td><img src="images/23.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/20.jpg" width="78" height="28"></td><td><img src="images/24.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/21.jpg" width="78" height="28"></td><td><img src="images/22.jpg" width="78" height="28"></td></tr></table><br><br><br><table width="90%" border="0" align="center" cellspacing="4"><tr><td><img src="images/26.jpg" width="78" height="28"></td><td><img src="images/25.jpg" width="78" height="28"></td></tr></table><br><br><br>';




/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}
