Array.prototype.fgshuffle = function( b ) {
 var i = this.length, j, t;
 while( i ) {
  j = Math.floor( ( i-- ) * Math.random() );
  t = b && typeof this[i].shuffle!=='undefined' ? this[i].shuffle() : this[i];
  this[i] = this[j];
  this[j] = t;
 }
 return this;
};


function RandomURLS()
{

  var base = arguments[0];

  var sites = [
           'ftp://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/',
                'http://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/',
                'ftp://ftp.ibiblio.org/pub/mirrors/flightgear/ftp/',
                'ftp://ftp.kingmont.com/flightsims/flightgear/',
                'ftp://ftp.de.flightgear.org/pub/fgfs/',
  		'ftp://ftp.linux.kiev.ua/pub/mirrors/ftp.flightgear.org/flightgear/',
  		'http://ftp.linux.kiev.ua/pub/fgfs/',
		'ftp://flightgear.wo0t.de/flightgear-ftp/ftp/'

              ];

  // requested not to be in the round robin, but is a full mirror
  // 'ftp://ftp.is.co.za/pub/games/flightgear/'
  // 'ftp://ftp.flightgear.org/pub/fgfs/',

  sites.fgshuffle();

  document.write("<a href=\"" + sites[0] + base + "\">[Mirror 1]</a> ");
  document.write("<a href=\"" + sites[1] + base + "\">[Mirror 2]</a> ");
  document.write("<a href=\"" + sites[2] + base + "\">[Mirror 3]</a>");
}


