Boas!
Ando por cá mas entre praia e descanso, apareço menos
asturmas já experimentaste fazer um View Source na página?
É puro javascript / DHTML, vai lá e vê.
Sinceramente já não me recordo onde fui buscar o original, mas a minha adaptação podes copiar na boa.
<html>
<head>
<style type="text/css">
<!--
#addbox {
position: relative;
width: 300px;
height: 70 px;
clip: rect(0px, 300px, 0px, 70px);
overflow: hidden;
}
#banner1 {
position: relative;
width: 270px;
height: 60px;
left: 0;
top: 0px;
cursor: pointer;
}
#banner2 {
position: relative;
width: 270px;
height: 60px;
left: 300px;
top: -60px !important;
top:-63px;
cursor: pointer;
}
-->
</style>
<script>
var displayTime, speed, wait, banner1, banner2, link1, link2, bannerIndex, bannerLocations, bannerURLs;
function initVar() {
displayTime = 7; // The amount of time each banner will be displayed in seconds.
speed = 5; // The speed at which the banners is moved (1 - 10, anything above 5 is not recommended).
wait = true;
banner1 = document.getElementById("banner1");
banner2 = document.getElementById("banner2");
link1 = document.getElementById("link1");
link2 = document.getElementById("link2");
banner1 = document.getElementById("banner1");
banner2 = document.getElementById("banner2");
banner1.style.left = 0;
banner2.style.left = 300;
bannerIndex = 1;
/* Important: In order for this script to work properly, please make sure that the banner graphic and the
URL associated with it have the same index in both, the bannerLocations and bannerURLs arrays.
Duplicate URLs are permitted. */
// Enter the location of the banner graphics in the array below.
bannerLocations = new Array(
"http://www.ptbloggers.com/Images/Promo/promofourlarge.jpg",
"http://escape.do.sapo.pt/images/sondagens.png",
"http://www.portal-jovem.com/tv/270-60.jpg",
"http://patriciacandoso.no.sapo.pt/sondagens.png",
"http://www.geocities.com/www_sondagens_tk/banner_primeirapagina.gif",
"http://www.geocities.com/www_sondagens_tk/banner_troca.gif"
);
// Enter the URL's to which the banners will link to in the array below.
bannerURLs = new Array(
"http://www.ptbloggers.com",
"http://forum.nofuturo.com",
"http://www.portal-jovem.com/tv",
"http://www.patriciacandoso.pt.vu",
"http://www.primeira-pagina.com",
"mailto:www.sondagens.tk@gmail.com"
);
}
function moveBanner(){
stopped = false;
if(!wait){
banner1.style.left = parseInt(banner1.style.left) - (speed * 5);
banner2.style.left = parseInt(banner2.style.left) - (speed * 5);
if(parseInt(banner1.style.left) <= -300){
banner1.style.left = 300;
bannerIndex = (bannerIndex < (bannerLocations.length - 1)) ? ++bannerIndex :0;
banner1.src = bannerLocations[bannerIndex];
wait = true;
}
if(parseInt(banner2.style.left) <= -300){
banner2.style.left = 300;
bannerIndex = (bannerIndex < (bannerLocations.length - 1)) ? ++bannerIndex :0;
banner2.src = bannerLocations[bannerIndex];
wait = true;
}
setTimeout("moveBanner()",100);
} else {
wait = false;
stopped = true;
setTimeout("moveBanner()", displayTime * 1000);
}
}
function gosite()
{
var ind;
if (bannerIndex > 0)
{
ind = bannerIndex - 1;
}
else
{
ind = bannerLocations.length - 1;
}
if (stopped)
{
if (bannerURLs[ind].substring(0,7) == "mailto:")
{
window.location.href = bannerURLs[ind];
}
else
{
window.open(bannerURLs[ind]);
}
}
}
</script>
</head>
<body onLoad="initVar(); moveBanner()">
<center>
<div name="addbox" id="addbox">
<span name="link1" id="link1" style="cursor:pointer" onclick="gosite();"><img border="0" name="banner1" id="banner1" src="http://www.ptbloggers.com/Images/Promo/promofourlarge.jpg"></span>
<span name="link2" id="link2" style="cursor:pointer" onclick="gosite();"><img border="0" name="banner2" id="banner2" src="http://escape.do.sapo.pt/images/sondagens.png"></span>
</div>
</center>
</body>
</html>
Abraços,