// Java Document//**************************************// Simple Banner Rotation System V2.3  *// Adam Tout, Play Along Toys 2006-    *//**************************************// array to store filenames for MAIN images w/o file extension var main = new Array()main[0] = "rotating_1"main[1] = "rotating_2"main[2] = "rotating_3"main[3] = "rotating_4"// array for the links to the corresponding ads above, add target=_blank to open in a new windowvar mainLinks = new Array()mainLinks[0] = ""mainLinks[1] = ""mainLinks[2] = ""// generate a random number no greater than the array lengthvar numMain = Math.floor(Math.random() * (main.length))// make a variable with all of the components assembeled var mainResult = "<IMG SRC=images/"+main[numMain]+".gif>";//array for the image names to be swapped on the right hand collum of ads/*var right = new Array()right[0] = "ad_cpkRight"right[1] = "ad_dmRight"right[2] = "ad_snRight"right[3] = "ad_ssRight"right[4] = "ad_trRight"right[5] = "ad_dbRight"// Links for the ads on the right var rightLinks = new Array()rightLinks[0] = "mycpk.com target=_blank"rightLinks[1] = "playalongtoys.com/doodle_monster/home.aspx"rightLinks[2] = "playalongtoys.com/snugglers/home.aspx"rightLinks[3] = "speedstacks.com target=_blank"rightLinks[4] = "playalongtoys.com/trolls/themed.aspx"rightLinks[5] = "doodlebear.com target=_blank"// generates a random number first number should be the last array slot, always -1 , always +1 // this makes sure it will always select a number less than the greatest value in the array and greater than the least value in the array.// below there are vars to add and subtract one from this number , this makes sure the sequence will never display the same advertisement. var numRight1 = Math.floor(Math.random() * (5-1)+1);// adds one to the number above var numRight2 = numRight1+1;// subtracts one from the one above var numRight3 = numRight1-1;// creates variables that assemble all of the segments of code above, this just keeps the javascript later on a little cleaner. var rightResult1 = "<A href=http://www."+rightLinks[numRight1]+"><IMG SRC=images/"+right[numRight1]+".jpg>";var rightResult2 = "<A href=http://www."+rightLinks[numRight2]+"><IMG SRC=images/"+right[numRight2]+".jpg>";var rightResult3 = "<A href=http://www."+rightLinks[numRight3]+"><IMG SRC=images/"+right[numRight3]+".jpg>";*/