
function initialise ( ) {
  preLoadImages( );
}

function preLoadImages ( ) {
  if ( document.preload == null ) {
    document.preload = new Array( );
  }

  preLoadImagePair( 1, 'Services1.gif', 'Services2.gif' );
  preLoadImagePair( 3, 'Airport1.gif',  'Airport2.gif'  );
  preLoadImagePair( 4, 'Trip1.gif',     'Trip2.gif'     );
  preLoadImagePair( 5, 'About1.gif',    'About2.gif'    );
}

function preLoadImagePair ( i, s1, s2 ) {
  with ( document ) {
    if ( images ) {

      // var i = preload.length ;

      preload[ ( i - 1 ) * 2 ] = new Image( );
      preload[ ( i - 1 ) * 2 ].src = s1 ;

      preload[ ( i - 1 ) * 2 + 1 ] = new Image( );
      preload[ ( i - 1 ) * 2 + 1 ].src = s2 ;
    }
  }
}

function rollOn ( i ) {
  return roll( i - 1, ( i - 1 ) * 2 + 1 );
}

function rollOff ( i ) {
  return roll( i - 1, ( i - 1 ) * 2 );
}

function roll ( i, j ) {
  with ( document ) {
    images[ i ].src = preload[ j ].src ;
  }
  return true ;
}
