
function randomizeThis ( myArray ) {
  var i = myArray.length;
  if ( i == 0 ) return false;
  while ( --i ) {
     var j = Math.floor( Math.random() * ( i + 1 ) );
     var tempi = myArray[i];
     var tempj = myArray[j];
     myArray[i] = tempj;
     myArray[j] = tempi;
   }
}


var imageArray = new Array();

imageArray[0]='<a href= "http://www.nusma.org/" target="_blank"><img src="images/sponsorlogos/NUSMALogo.gif"/></a>'
imageArray[1]='<a href= "http://www.narrowgauge.org/java/wdnews.html" target="_blank"><img src="images/sponsorlogos/nmra.gif"/></a>'
imageArray[2]='<a href= "http://www.wvhobbies.com/" target="_blank"><img src="images/sponsorlogos/WV.gif" alt="West Valley Hobbies"/ ></a>'
imageArray[3]='<a href= "http://www.greatmodels.com" target="_blank"><img src="images/sponsorlogos/GMlogo.gif"/></a>'
//imageArray[4]='<a href= "http://www.mrshobby.com" target="_blank"><img src="images/sponsorlogos/MRSlogo2.gif"/></a>'


//send the array of images to the randomizeThis function which will shuffle them
randomizeThis(imageArray);


function DrawImages(){
       document.writeln(imageArray[0]);
       document.writeln('<br/>');
       document.writeln(imageArray[1]);
       document.writeln('<br/>');
       document.writeln(imageArray[2]);	
       document.writeln('<br/>');
       document.writeln(imageArray[3]);	
}