I switched to using a php rotator instead of javascript. I created a file banner.php and added below and wherever I want it to be displayed did a php include to that file.

PHP Code


<?php
$banner_src[0]="http://www.linktoimage.jpg";
$banner_link[0]="http://www.linktosite.com";

$banner_src[1]="http://www.linktoimage.jpg";
$banner_link[1]="http://www.linktosite.com";

$banner_src[2]="http://www.linktoimage.jpg";
$banner_link[2]="http://www.linktosite.com";

$banner_src[3]="http://www.linktoimage.jpg";
$banner_link[3]="http://www.linktosite.com";



/*The above code has created 2 arrays, one array of image
 urls and another array for the  links  that go with them. You can
 add as many as you like, increasing the number  in the 
[square brackets] by 1 as you do. */

$banner_count=((count($banner_src))-1);
/*this line counts how many banners you have in your arrays,
 but since arrays start at number 0, we minus 1 from the count*/

$which_banner=(rand(0, $banner_count));
/*this line picks a random number between 0(the start of our array) 
and the current  banner count */


/*this next bit of code displays the chosen banner as a link */
print "<center><a href=\"$banner_link[$which_banner]\" target=\"_blank\">
<img src=\"$banner_src[$which_banner]\" border=\"0\"></a></center>";

?>