/* $BD:Slide - version 0.9.4$ $LastModified: 04/02/2006$ Sistema Free para uso pessoal ou comercial contanto que os créditos permaneçam intactos. Eu já nem estou colocando um monte de coisa pra não deixar o código pesado. ^^ Maiores Informações: http://my.opera.com/bimonti/ */ slide = { //vetor com os slides _imagens : [ ["includes/thumb.php?imagem=../upload/8a4b0d5576cd5277742a9fc20cd92594.JPG&x=270","WGV Consultoria presente na inauguração do El Shadai Park Ho...","","noticia_ler.php?s=2&conteudo_id=26"],["includes/thumb.php?imagem=../upload/e0fb5fbc42ab5aa0658b3db54fcdb08a.JPG&x=270","Welington no Jornal a Voz do Jacaré","","noticia_ler.php?s=2&conteudo_id=27"],["includes/thumb.php?imagem=../upload/bc35c38610702393bfeadeb3adc486b7.jpg&x=270","AABB DEPOIS DE ANOS SEM ATIVIDADES TENTA RESSURGIR","","noticia_ler.php?s=2&conteudo_id=28"] ], // variáveis do sistema _count : 0, _length : null, _timeOutID : null, _pause : false, _timer : 10, // função que inicia o slide e seta todas os parâmetros necessários start : function(){ with(this){ _preLoader(); _length = _imagens.length; _work(); } }, // faz o pré-carregamento das imagens _preLoader : function(){ for(x in this._imagens){ var image = new Image(); image.src = this._imagens[x][0]; } }, // função principal que faz as checagens necessárias _work : function(){ with(this){ (_count == _length) ? _count = 0 : (_count < 0) ? _count = _length-1 : void(0); var current = _imagens[_count]; _exchange(current); if(!_pause){ (typeof(_timeOutID) == "number") ? clearTimeout(_timeOutID) : void(0); _timeOutID = setTimeout(function(){ slide.next(); }, (Number(_timer)*1000)); } } }, // função que altera os elementos da página, altere os IDs se necessário _exchange : function(img){ document.getElementById("slideImg").src = img[0]; document.getElementById("linkSlide").innerHTML = img[1]; document.getElementById("textSlide").innerHTML = img[2]; document.getElementById("linkSlide").href = img[3]; document.getElementById("linkSlideImg").href = img[3]; }, // altera para o próximo slide ao clicar no botão Próximo next : function(){ with(this){ _count++; _work(); } }, // altera para o slide anterior ao clicar no botão correspondente previous : function(){ with(this){ _count--; _work(); } }, // pause e continua a apresentação pause : function(){ var img = document.getElementById("playpause"); if(this._pause){ this._pause = false; img.src = 'imagens/pause.jpg'; img.title = 'Parar'; } else{ this._pause = true; img.src = 'imagens/play.jpg'; img.title = 'Continuar'; } with(this){(typeof(_timeOutID) == "number") ? clearTimeout(_timeOutID) : void(0); _work();} } }