//// build array and load for animation images
imgArray = new Array()
imgArray[0]= new Image(241,133)
imgArray[0].src = "imagens/fotos_home/descolagem01.jpg"
imgArray[1] = new Image(241,133)
imgArray[1].src = "imagens/fotos_home/descolagem02.jpg"
imgArray[2] = new Image(241,133)
imgArray[2].src = "imagens/fotos_home/alojamento01.jpg"
imgArray[3] = new Image(241,133)
imgArray[3].src = "imagens/fotos_home/clube01.jpg"
imgArray[4] = new Image(241,133)
imgArray[4].src = "imagens/fotos_home/escola01.jpg"
imgArray[5] = new Image(241,133)
imgArray[5].src = "imagens/fotos_home/manga02.jpg"
imgArray[6] = new Image(241,133)
imgArray[6].src = "imagens/fotos_home/meteo01.jpg"
imgArray[7] = new Image(241,133)
imgArray[7].src = "imagens/fotos_home/regiao01.jpg"
imgArray[8] = new Image(241,133)
imgArray[8].src = "imagens/fotos_home/rota01.jpg"
//
var started = false;
var step = 0;
var times = 1;
// scheme#2
var expDays = 1; // number of days the cookie should last
var page = "popup/popnews2004.html";
var windowprops = "width=478,height=328,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no";
//MM_openBrWindow('popup/popnews2004.html','','toolbar=yes,width=478,height=328,top=440,left=500')
//
function rollImage() {
imgRoller.src = imgArray[0].src;
times--;
if (!times) 
	{
	if (!started) {
		started = true;
		imgRoller.src = imgArray[0].src;
		setTimeout("anim()", 1);
	}
   }
}
function anim() {
imgNbr = 8
step++;
if (step==9) step = 1;
if (step==1) imgRoller.src = imgArray[0].src;
if (step==2) imgRoller.src = imgArray[1].src;
if (step==3) imgRoller.src = imgArray[2].src;
if (step==4) imgRoller.src = imgArray[3].src;
if (step==5) imgRoller.src = imgArray[4].src;
if (step==6) imgRoller.src = imgArray[5].src;
if (step==7) imgRoller.src = imgArray[6].src;
if (step==8) imgRoller.src = imgArray[7].src;
if (step==9) imgRoller.src = imgArray[8].src;
setTimeout("anim()", 6000);

}
// scheme#2
function GetCookie (name) { 
var arg = name + "="; 
var alen = arg.length; 
var clen = document.cookie.length; 
var i = 0; 
while (i < clen) { 
var j = i + alen; 
if (document.cookie.substring(i, j) == arg) 
return getCookieVal (j); 
i = document.cookie.indexOf(" ", i) + 1; 
if (i == 0) break; 
} 
return null;
}
function SetCookie (name, value) { 
var argv = SetCookie.arguments; 
var argc = SetCookie.arguments.length; 
var expires = (argc > 2) ? argv[2] : null; 
var path = (argc > 3) ? argv[3] : null; 
var domain = (argc > 4) ? argv[4] : null; 
var secure = (argc > 5) ? argv[5] : false; 
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) + 
((domain == null) ? "" : ("; domain=" + domain)) + 
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) { 
var exp = new Date(); 
exp.setTime (exp.getTime() - 1); 
var cval = GetCookie (name); 
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);

window.open(page, "", windowprops);

}
else {
count++;
SetCookie('count', count, exp);
}
}
// End -->

// 25.07.2004
