1
I would like to incorporate a quiz in script in the sidebar of my site, are 3 quiz actually and did not want to put one below the other, I would like them to automatically switch each other every time the page is loaded, occupying the same block.
It is a script with variation as below:
<script type="text/javascript" charset="utf-8" src="http://static.polldaddy.com/p/9527749.js"></script>
<noscript><a href="http://polldaddy.com/poll/9527749/">O que faz você fugir da dieta?</a></noscript>
I would like a script type what I use to vary the images that varies every time the page is loaded. By clicking it leads to the destination site, this option would not be required.
'<script>// <![CDATA[
var max = 3;
var nrImages = 3;
function makeImages() {
this[0] = "imagem1.jpg";
this[1] = "imagem2.jpg";
this[2] = "imagem3.jpg";
this.length = nrImages;
}
function makeLinks() {
this[0] = "Link pro site";
this[1] = "Link pro site";
this[2] = "Link pro site";
this.length = nrImages;
}
var vetImages = new makeImages();
var vetLinks = new makeLinks();
var x = Math.round(Math.random()*max);
var y = max / nrImages;
for(var cont = 1;cont*y<= max;cont++) {
if (x <= (cont*y)) {
document.write("<a href="+vetLinks[cont-1]+" rel=nofollow target=_blank><img src="+vetImages[cont-1]+" border='0'/></a>");
break;
}
}
// ]]></script>'