
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - ticker.js - */
// http://ad2009.alagoasdigital.com.br/portal_javascripts/ticker.js?original=1
var i=0;var imagens=Array();var textos=Array();var destinos=Array();var img=Array();var intervalo;var tempo;var timeIn,timeOut;initImage=function(){var item1=document.getElementById('item1').value.split('|');var item2=document.getElementById('item2').value.split('|');var item3=document.getElementById('item3').value.split('|');imagens[0]=item1[0];imagens[1]=item2[0];imagens[2]=item3[0];textos[0]=item1[1];textos[1]=item2[1];textos[2]=item3[1];destinos[0]=item1[2];destinos[1]=item2[2];destinos[2]=item3[2];img[0]=new Image();img[0].src=imagens[0];img[1]=new Image();img[1].src=imagens[1];img[2]=new Image();img[2].src=imagens[2];i=(i<2)?i+1:0;fadeIn('thephoto',i);document.getElementById('thephoto').style.background="url("+img[i].src+") center";document.getElementById('thephoto').alt=textos[i];document.getElementById('linkFoto').href=destinos[i];document.getElementById('texto').innerHTML="<a href=\""+destinos[i]+"\">"+textos[i]+"</a>";tempo=setTimeout("fadeOut('thephoto',"+100+")",5500)}
inicio=function(){initImage();intervalo=setInterval("initImage()",6000)}
proximo=function(){clearTimeout(tempo);clearInterval(intervalo);initImage();intervalo=setInterval("initImage()",6000)}
anterior=function(){i=(i<2)?i+1:0;clearTimeout(tempo);clearInterval(intervalo);initImage();intervalo=setInterval("initImage()",6000)}
setOpacity=function(obj,opacity){opacity=(opacity==100)?99.999:opacity;obj.style.filter="alpha(opacity:"+opacity+")";obj.style.KHTMLOpacity=opacity/100;obj.style.MozOpacity=opacity/100;obj.style.opacity=opacity/100}
fadeIn=function(objId,opacity){clearTimeout(timeIn);if(document.getElementById){obj=document.getElementById(objId);if(opacity<100){opacity+=20;setOpacity(obj,opacity);timeIn=window.setTimeout("fadeIn('"+objId+"',"+opacity+")",50)}}}
fadeOut=function(objId,opacity){clearTimeout(timeOut);if(document.getElementById){obj=document.getElementById(objId);if(opacity>0){opacity-=20;setOpacity(obj,opacity);timeOut=window.setTimeout("fadeOut('"+objId+"',"+opacity+")",50)}}}
window.onload=function(){if(document.getElementById('photoholder')){anterior()}}


/* - jsticker.js - */
// http://ad2009.alagoasdigital.com.br/portal_javascripts/jsticker.js?original=1
var i=0;var imagens=Array();var textos=Array();var destinos=Array();var img=Array();var intervalo;var tempo;var timeIn,timeOut;var count=0;var total=0;initImage=function(){count=0;while(document.getElementById('item'+count)){var item=document.getElementById('item'+count).value.split('|');imagens[count]=item[0];textos[count]=item[1];destinos[count]=item[2]
img[count]=new Image();img[count].src=imagens[count];count++}
total=count;fadeIn('thephoto',0);if(typeof(i)=='undefined')
i=0;if(i>count)
i=0;document.getElementById('thephoto').style.background="url("+img[i].src+") center";document.getElementById('thephoto').alt=textos[i];document.getElementById('linkFoto').href=destinos[i];document.getElementById('texto').innerHTML="<a href=\""+destinos[i]+"\">"+textos[i]+"</a>";tempo=setTimeout("fadeOut('thephoto',"+100+")",5500)}
inicio=function(){initImage();intervalo=setInterval("proximo()",6000)}
proximo=function(){i=(i<total-1)?i+1:0;clearTimeout(tempo);clearInterval(intervalo);initImage();intervalo=setInterval("proximo()",6000)}
anterior=function(){i=(i!=0)?i-1:total-1;clearTimeout(tempo);clearInterval(intervalo);initImage();intervalo=setInterval("proximo()",6000)}
setOpacity=function(obj,opacity){opacity=(opacity==100)?99.999:opacity;obj.style.filter="alpha(opacity:"+opacity+")";obj.style.KHTMLOpacity=opacity/100;obj.style.MozOpacity=opacity/100;obj.style.opacity=opacity/100}
fadeIn=function(objId,opacity){clearTimeout(timeIn);if(document.getElementById){obj=document.getElementById(objId);if(opacity<100){opacity+=20;setOpacity(obj,opacity);timeIn=window.setTimeout("fadeIn('"+objId+"',"+opacity+")",50)}}}
fadeOut=function(objId,opacity){clearTimeout(timeOut);if(document.getElementById){obj=document.getElementById(objId);if(opacity>0){opacity-=20;setOpacity(obj,opacity);timeOut=window.setTimeout("fadeOut('"+objId+"',"+opacity+")",50)}}}
pause=function(){clearTimeout(timeOut);clearTimeout(timeIn);clearTimeout(intervalo);clearTimeout(tempo)}
start=function(){if(document.getElementById('photoholder')){inicio()}}
if(window.addEventListener)
window.addEventListener("load",start,false);else if(window.attachEvent)
window.attachEvent("onload",start);

