  var iPhotos =17
  var iWidth =100//default thumbnail width
  var iHeight =75//  & height
  aWidths =  new  Array(iPhotos);
  aHeights =  new  Array(iPhotos);
  aImages =  new  Array(iPhotos);
  aThumbs =  new  Array(iPhotos);
  aPhotos =  new  Array(iPhotos);
  
  //list photo subjects
    aPhotos[1] = "sully"; aWidths[1]=1.4;
	aPhotos[2] = "brandon"; aWidths[2]=1.4;
    aPhotos[3] = "couches"; aWidths[3]=1.4;
    aPhotos[4] = "rully"; aWidths[4]=1.4;
	aPhotos[5] = "demigny"; aWidths[5]=1.4;
	aPhotos[6] = "germolles"; aWidths[6]=1.4;
	aPhotos[7] = "la-ferte"; aWidths[7]=1.4;
	aPhotos[8] = "cormatin"; aWidths[8]=1.4;
	aPhotos[9] = "st-aubin"; aWidths[9]=1.3;
	aPhotos[10] = "brancion"; aWidths[10]=1.4;
	aPhotos[11] = "digoine"; aWidths[11]=1.4;
	aPhotos[12] = "dree"; aWidths[12]=1.4;
	aPhotos[13] = "berze"; aWidths[13]=1.4;
	aPhotos[14] = "milly-lamartine"; aWidths[14]=1.4; 
	aPhotos[15] = "st-point"; aWidths[15]=1.4;
	aPhotos[16] = "pierreclos"; aWidths[16]=1.4;
	aPhotos[17] = "flecheres"; aWidths[17]=1.4;
	
	
    for (n=1; n<=iPhotos; n++)
    {
	 //aWidths[n]=1;//set default width multipliers/all set above
	 aHeights[n]=1;//set default height multipliers
     aImages[n]="../burgundy-chateaux/img_"
          +aPhotos[n]+".jpg";
	 aThumbs[n]="../burgundy-chateaux/th_"
          +aPhotos[n]+".jpg";
    }  
 
   //set specific width and height multipliers
   //aWidths[1]=1;
   //aHeights[1]=1;
   
  // document.write("<form name=previewselect>");
  
function FindIndex(house){   
   n=1;
   while (aPhotos[n] != house){
    n++;
   }//EoWhile
   n=n-1
  return n;
 }//EofFn
 
function CoffeePreview() {
vIndex=document.previewselect.selbox.selectedIndex;
 house=aPhotos[vIndex+1];
  document.preview.src = document.previewselect.selbox.options[vIndex].value;
  document.preview.width=iWidth*(aWidths[vIndex+1]);
  document.preview.height=iHeight*(aHeights[vIndex+1]);
  }
 
function CoffeeShow(photo) {
  
  if (document.title="Map of Burgundy"){
   		vIndex=FindIndex(photo);
    }//eoif
 
  else{ //set by coffeePreview call
   //vIndex=document.previewselect.selbox.selectedIndex;
    }//eoelse

  storecookie(1,aPhotos[vIndex+1]);// pass picture name
  storecookie(2,aWidths[vIndex+1]);// pass picture width multiplier
  storecookie(3,aHeights[vIndex+1]);// pass picture height multiplier
  storecookie(4,"Ch&acircteau de ");// pass page text

 window.location.href ="LargerImageCmtn.html";

}

//cookie storage and recovery

  var aCooknames= new Array(4);
 aCooknames[1]="Picture=";//must have =
 aCooknames[2]="Width=";
 aCooknames[3]="Height=";
 aCooknames[4]="Text=";

 
 function storecookie(n,sText){
  var cookdate= new Date();
  
  cookdate.setTime(cookdate.getTime() + 1000*60*30);//extra half hr
document.cookie=aCooknames[n]
		+sText
		+";expires= "+cookdate.toGMTString();
}//EoFN setcookie
 

