var current = 8;
var MAX = '13';
if (MAX != '')
{
   var myPicture = new Array(MAX +1)
   myPicture[0] = '';
   var myText = new Array(MAX +1)
   myText[0] = '';
   myPicture[1] ='http://www.greenbriervt.com/images/inn-big-exterior-1.jpg';
myText[1] ='In the Heart of the Green Mountains';
   myPicture[2] ='http://www.greenbriervt.com/images/inn-big-exterior-2.jpg';
myText[2] ='Killington, the best skiing in the East';
   myPicture[3] ='http://www.greenbriervt.com/images/inn-big-exterior-3.jpg';
myText[3] ='Welcome and Enjoy our Vermont Hospitality';
   myPicture[4] ='http://www.greenbriervt.com/images/inn-big-lobby-1.jpg';
myText[4] ='Relax in our spacious lobby';
   myPicture[5] ='http://www.greenbriervt.com/images/inn-big-lobby-2.jpg';
myText[5] ='Lobby';
   myPicture[6] ='http://www.greenbriervt.com/images/inn-big-lobby-4.jpg';
myText[6] ='Play games, read a book, or just take it easy';
   myPicture[7] ='http://www.greenbriervt.com/images/inn-big-lobby-4-a.jpg';
myText[7] ='Enjoy Your morning coffee';
   myPicture[8] ='http://www.greenbriervt.com/images/inn-big-lobby-5-a.jpg';
myText[8] ='Relax by our fireplace';
   myPicture[9] ='http://www.greenbriervt.com/images/inn-big-room-1.jpg';
myText[9] ='Spacious Rooms - Connecting Rooms available';
   myPicture[10] ='http://www.greenbriervt.com/images/inn-big-room-2-a.jpg';
myText[10] ='Our rooms have one or two Queen size beds';
   myPicture[11] ='http://www.greenbriervt.com/images/inn-big-room-view.jpg';
myText[11] ='Mountain Views from your Room';
   myPicture[12] ='http://www.greenbriervt.com/images/inn-big-pool2.jpg';
myText[12] ='Enjoy our outdoor pool';
   myPicture[13] ='http://www.greenbriervt.com/images/inn-big-stream2.jpg';
myText[13] ='Take a hike along our trout stream';

   
   }

function goNext()
{
   if (MAX != '')
   {
     if (current < MAX) { current++; }
     else { current= 1; }
     showPicture();

   }
}
function goPrev()
{
    if (MAX != '')
   {
     if (current > 1) { current--; }
     else { current= MAX; }
     showPicture(); 
   }
}


function numberStringPhoto(pictureNumber)
{
  current=pictureNumber; 
  showPicture();
}


function showPicture()
{

  window.document.main_pic.src = myPicture[current];
  document.getElementById('photoWord').innerHTML ='<p align="center"><font color="#1F5C51" face="Verdana" size="2"><b>' + myText[current] + '</font><font color="#000000" face="Verdana" size="1"><br> &nbsp;</font></b>';
  document.getElementById('photoSentence').innerHTML ='<p align="center"><b><font face="Arial" size="4" color="#326A5F"><a name="photo"></a></font><font face="Arial" color="#326A5F" size="5">Photo Gallery: </font><font face="Arial" size="2">'+ current + ' of 13 pictures</font></b>';
}