//-------------------------------------------------------------- //APH 11/02/2010, calendar images -- randomize between 13 images var randomNumber = 0; var curImage = 0; function calendarRandomize(){ var calendar = new Array (); calendar[0] = ("2011 Rain and Hail Photo Contest"); calendar[1] = ("2011 Rain and Hail Photo Contest"); calendar[2] = ("2011 Rain and Hail Photo Contest"); calendar[3] = ("2011 Rain and Hail Photo Contest"); calendar[4] = ("2011 Rain and Hail Photo Contest"); calendar[5] = ("2011 Rain and Hail Photo Contest"); calendar[6] = ("2011 Rain and Hail Photo Contest"); calendar[7] = ("2011 Rain and Hail Photo Contest"); calendar[8] = ("2011 Rain and Hail Photo Contest"); calendar[9] = ("2011 Rain and Hail Photo Contest"); calendar[10] = ("2011 Rain and Hail Photo Contest"); calendar[11] = ("2011 Rain and Hail Photo Contest"); calendar[12] = ("2011 Rain and Hail Photo Contest"); randomNumber = Math.floor(13*Math.random()) curImage=randomNumber; //set the current image to start on document.write(calendar[randomNumber]); } //-------------------------------------------------------------- //-------------------------------------------------------------- //APH 11/02/2010, calendar images -- rotation between 13 images var dimages=new Array(); var numImages=13; //here is the bank of rotating images for (i=0; i=numImages) nextImage=0; if (dimages[nextImage] && dimages[nextImage].complete) { var target=0; if (document.images.myImage) target=document.images.myImage; if (document.all && document.getElementById("myImage")) target=document.getElementById("myImage"); // make sure target is valid. It might not be valid // if the page has not finished loading if (target) { target.src=dimages[nextImage].src; curImage=nextImage; } setTimeout("swapPicture()", 5000); } else { setTimeout("swapPicture()", 500); } } } //--------------------------------------------------------------