View Single Post
Old 01-12-2011, 02:47 PM  
onedree
So Fucking Banned
 
Industry Role:
Join Date: Nov 2005
Location: Excercist image strickly for Halloween :=)
Posts: 633
Extremely simple :

Code:
<script type="text/javascript">
<!-- Begin
rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
};

function rand(number) {
	var result = Math.ceil(rnd()*number);
	if (!result)result++;
        return result
};
var ad_cnt1 = 2;
var ad1 = rand(ad_cnt1);
var link1;
var adBanner1;
var width1
var height1
if (ad1==1) {
link1="URL HERE";
adBanner1="Banner image here";
width1="500";
height1="149";
alt1="Alt info here";
}
if (ad1==2) {
link2="URL HERE";
adBanner1="Banner image here";
width1="500";
height1="149";
alt1="Alt info here";
}
document.write('<center><a href="' + link1 + '" target="_blank">');
document.write('<img src="' + adBanner1 + '" width=' + width1 + ' height=' + height1 + ' border=0 alt="' + alt1 + '"></a>');
document.write('</center>');
// End -->
</SCRIPT>

Simply rewrite the (ad1==1) to (ad1==2) / (ad1==3)
and change the 'var ad_cnt1 = 2; ' to however many banners you decide to rotate.

Styles and Templets
Styles Manager
Common Templates / Header

Sincerely
Deidre

Last edited by onedree; 01-12-2011 at 02:53 PM..
onedree is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote