/*
  functions to display an image and to keep it on top of the screen (for pages Actualités et Résultats
*/ 

var viewphoto = {
  
ypos:0, photoarray:new Array(),

keep:function()
{
  this.ypos += (document.body.scrollTop - this.ypos) * 0.12;

  document.getElementById('photoL').style.top = this.ypos + 50;
  document.getElementById('photoP').style.top = this.ypos + 50;

  setTimeout("viewphoto.keep()", 10);
},

showL:function( photoNumber )
{
  document.getElementById('photoP').style.visibility = 'hidden';

  var photoId = document.getElementById('photoL');

  photoId.src = this.photoarray[photoNumber].source;

  photoId.style.visibility = 'visible';
},

showP:function( photoNumber )
{
  document.getElementById('photoL').style.visibility = 'hidden';

  var photoId = document.getElementById('photoP');

  photoId.src = this.photoarray[photoNumber].source;

  photoId.style.visibility = 'visible';
},

hide:function()
{
  document.getElementById('photoL').style.visibility = 'hidden';
  document.getElementById('photoP').style.visibility = 'hidden';
},

startA09:function()
{
  this.keep();

  this.photoarray[25]  = new this.define("photos/arbitres260909.jpg");
},

startA:function()
{
  this.keep();

  this.photoarray[18]  = new this.define( "photos/assemblee_generale230508/photo1.jpg");
  this.photoarray[19]  = new this.define( "photos/assemblee_generale230508/photo2.jpg");
  this.photoarray[20]  = new this.define( "photos/assemblee_generale230508/photo3.jpg");
  this.photoarray[21]  = new this.define( "photos/assemblee_generale230508/photo4.jpg");
  this.photoarray[22]  = new this.define( "photos/assemblee_generale230508/photo5.jpg");
  this.photoarray[23]  = new this.define( "photos/assemblee_generale230508/photo6.jpg");
  this.photoarray[24]  = new this.define( "photos/assemblee_generale230508/photo7.jpg");

  this.photoarray[ 9]  = new this.define( "photos/cd13arles180508/photo1.jpg");
  this.photoarray[10]  = new this.define( "photos/cd13arles180508/photo2.jpg");
  this.photoarray[11]  = new this.define( "photos/cd13arles180508/photo3.jpg");
  this.photoarray[12]  = new this.define( "photos/cd13arles180508/photo4.jpg");
  this.photoarray[13]  = new this.define( "photos/cd13arles180508/photo5.jpg");
  this.photoarray[14]  = new this.define( "photos/cd13arles180508/photo6.jpg");
  this.photoarray[15]  = new this.define( "photos/cd13arles180508/photo8.jpg");
  this.photoarray[16]  = new this.define( "photos/cd13arles180508/photo7.jpg");
  this.photoarray[17]  = new this.define( "photos/cd13arles180508/photo9.jpg");

  this.photoarray[8]  = new this.define( "photos/corentin_juillet_moto.jpg");

  this.photoarray[7]  = new this.define( "photos/baptiste_romane_oms.jpg" );

  this.photoarray[6]  = new this.define( "photos/thomas1.jpg" );

  this.photoarray[4]  = new this.define( "photos/070207ima1.jpg" );
  this.photoarray[5]  = new this.define( "photos/070207ima2.jpg" );

  this.photoarray[1]  = new this.define( "photos/210107ima1.jpg" );
  this.photoarray[2]  = new this.define( "photos/210107ima2.jpg" );
  this.photoarray[3]  = new this.define( "photos/210107ima3.jpg" );
},

startA0:function()
{
  this.keep();

  this.photoarray[7]  = new this.define( "photos/221006ima1.jpg" );
  this.photoarray[8]  = new this.define( "photos/221006ima2.jpg" );
  this.photoarray[9]  = new this.define( "photos/221006ima3.jpg" );
  this.photoarray[10] = new this.define( "photos/221006ima4.jpg" );
  this.photoarray[11] = new this.define( "photos/221006ima5.jpg" );
  this.photoarray[12] = new this.define( "photos/221006ima6.jpg" );
  this.photoarray[13] = new this.define( "photos/221006ima7.jpg" );
  this.photoarray[14] = new this.define( "photos/221006ima8.jpg" );
  this.photoarray[15] = new this.define( "photos/221006ima9.jpg" );
  this.photoarray[16] = new this.define( "photos/221006ima10.jpg" );
  this.photoarray[17] = new this.define( "photos/221006ima11.jpg" );

  this.photoarray[18] = new this.define( "photos/151006ima1.jpg" );
  this.photoarray[19] = new this.define( "photos/151006ima2.jpg" );
  this.photoarray[20] = new this.define( "photos/151006ima3.jpg" );
  this.photoarray[21] = new this.define( "photos/151006ima4.jpg" );
  this.photoarray[22] = new this.define( "photos/151006ima5.jpg" );
  this.photoarray[23] = new this.define( "photos/151006ima6.jpg" );
  this.photoarray[24] = new this.define( "photos/151006ima7.jpg" );
  this.photoarray[25] = new this.define( "photos/151006ima8.jpg" );
  this.photoarray[26] = new this.define( "photos/151006ima9.jpg" );
  this.photoarray[27] = new this.define( "photos/151006ima10.jpg" );
  this.photoarray[28] = new this.define( "photos/151006ima11.jpg" );

  this.photoarray[29] = new this.define( "photos/240906ima1.jpg" );
  this.photoarray[30] = new this.define( "photos/240906ima2.jpg" );
  this.photoarray[31] = new this.define( "photos/240906ima3.jpg" );
  this.photoarray[32] = new this.define( "photos/240906ima4.jpg" );
  this.photoarray[33] = new this.define( "photos/240906ima5.jpg" );
  this.photoarray[34] = new this.define( "photos/240906ima6.jpg" );
  this.photoarray[35] = new this.define( "photos/240906ima7.jpg" );
  this.photoarray[36] = new this.define( "photos/240906ima8.jpg" );
},

startR12:function()
{
  this.keep();

  this.photoarray[1] = new this.define('photos/CD13_131111/photo1.jpg');
  this.photoarray[2] = new this.define('photos/CD13_131111/photo2.jpg');
  this.photoarray[3] = new this.define('photos/CD13_131111/photo3.jpg');

  this.photoarray[4] = new this.define('photos/CD13_220112/photo1.jpg');
  this.photoarray[5] = new this.define('photos/CD13_220112/photo2.jpg');
},

startR10:function()
{
  this.keep();

  this.photoarray[26] = new this.define('images/medaille.jpg');

  this.photoarray[25] = new this.define('photos/miramas100110.jpg');

  for(var i = 1, n = 11; i < 15; i++, n++ )  // n < 25 on exit
    this.photoarray[n] = new this.define('photos/Cagnes131209/photo' + i + '.jpg');

  for(var n = 1; n < 11; n++)
    this.photoarray[n] = new this.define('photos/Vichy061209/photo' + n + '.jpg');
},

startR09:function()
{
  this.keep();

  for(var n = 1; n < 11; n++)
    this.photoarray[n] = new this.define('feteJeunes2009/photo' + n + '.jpg');
},

startR:function()
{
  this.keep();

  this.photoarray[26]  = new this.define( "photos/CoupeDuClub/photo1.jpg");
  this.photoarray[27]  = new this.define( "photos/CoupeDuClub/photo2.jpg");
  this.photoarray[28]  = new this.define( "photos/CoupeDuClub/photo3.jpg");
  this.photoarray[29]  = new this.define( "photos/CoupeDuClub/photo4.jpg");
  this.photoarray[30]  = new this.define( "photos/CoupeDuClub/photo5.jpg");
  this.photoarray[31]  = new this.define( "photos/CoupeDuClub/photo6.jpg");

  this.photoarray[19]  = new this.define( "photos/assemblee_generale230508/photo10.jpg");
  this.photoarray[20]  = new this.define( "photos/assemblee_generale230508/photo11.jpg");
  this.photoarray[21]  = new this.define( "photos/assemblee_generale230508/photo12.jpg");
  this.photoarray[22]  = new this.define( "photos/assemblee_generale230508/photo14.jpg");
  this.photoarray[23]  = new this.define( "photos/assemblee_generale230508/photo15.jpg");
  this.photoarray[24]  = new this.define( "photos/assemblee_generale230508/photo18.jpg");
  this.photoarray[25]  = new this.define( "photos/assemblee_generale230508/photo20.jpg");

  this.photoarray[18]  = new this.define( "photos/equipe_provence_2008.jpg");

  this.photoarray[16]  = new this.define( "photos/230308ima1.jpg" );
  this.photoarray[17]  = new this.define( "photos/230308ima2.jpg" );

  this.photoarray[12]  = new this.define( "photos/colmar230308/peller1.jpg" );
  this.photoarray[13]  = new this.define( "photos/colmar230308/peller2.jpg" );
  this.photoarray[14]  = new this.define( "photos/colmar230308/peller3.jpg" );
  this.photoarray[15]  = new this.define( "photos/colmar230308/peller4.jpg" );

  this.photoarray[10] = new this.define( "photos/130108ima1.jpg" );
  this.photoarray[11] = new this.define( "photos/130108ima2.jpg" );

  this.photoarray[7] = new this.define( "photos/060108ima1.jpg" );
  this.photoarray[8] = new this.define( "photos/060108ima2.jpg" );
  this.photoarray[9] = new this.define( "photos/060108ima3.jpg" );

  this.photoarray[1] = new this.define( "photos/CD13_07_1.jpg" );
  this.photoarray[2] = new this.define( "photos/CD13_07_2.jpg" );
  this.photoarray[3] = new this.define( "photos/CD13_07_3.jpg" );
  this.photoarray[4] = new this.define( "photos/CD13_07_4.jpg" );
  this.photoarray[5] = new this.define( "photos/CD13_07_5.jpg" );
  this.photoarray[6] = new this.define( "photos/CD13_07_6.jpg" );
},

startR0:function()
{
  this.keep();

  this.photoarray[1] = new this.define( "photos/260507ima1.jpg" );
  this.photoarray[2] = new this.define( "photos/260507ima2.jpg" );
  this.photoarray[3] = new this.define( "photos/260507ima3.jpg" );
},

// constructor

define:function(imageName) 
{
  this.image = new Image();

  this.source = this.image.src = imageName;
},

close:function(ID)
{
  document.getElementById(ID).style.visibility = 'hidden';
}
}

