// spinner.js library
// prepared by B Nancarrow
// 14:10 15/03/2010
// used to rotate images in header area of web site pages
// Toronto Centre RASC
// JavaScript code inspired by R. Pateman's web http://www.neiu.edu/~rspatema/

// create an array for the various astro images
// images must be 150 tall, no more no less
// images can be up to 800 pixels wide, minimum 500 or so
// this must be manually updated as new stuff is added
// remember to watch spelling and case
// and watch those COMMAS!
var RandAstroImage = new Array(
  "OSCparty.jpg" ,
  "PnSbn1002a.jpg" ,
  "AurOnSat1a.jpg" ,
  "m17hst1a.jpg" ,
  "BlueDoor.jpg" ,
  "rand0010.jpg" 
);

// randomly select from item array, return value
// note: random() -> 0.0 to 1.0
function RandSelImg() {                   
  do {                                   
    i = Math.floor( Math.random() * RandAstroImage.length );	// trunc to int random value: 0 to length
  } while( typeof( RandAstroImage[i] ) == "undefined" ); 	// while i-item is undefined, for safety
return RandAstroImage[i]; }                      		// return the value of the i-item

