var arrImages = new Array();
var startShow = 0, timer;
timer = null;
 //loading Images
 
function StartSlideShow()
{
   document.getElementById('stopTimerButton').disabled = false;
   document.getElementById('startTimerButton').disabled = true;
   timer =  setInterval("ChangeImageSlideShow()", 3000); //Three Seconds 
}
function StopSlideShow()
{
   document.getElementById('stopTimerButton').disabled = true;;
   document.getElementById('startTimerButton').disabled = false;;
   clearTimeout(timer);
}
function ChangeImageSlideShow()
{
  if (startShow == 36)
  {
    startShow = 0;
  }
  startShow++;
  document.images['tobeChanged'].src = arrImages [startShow].src;
}
// add to favorites works for both IE and Mozilla and Opera
function addBookmark(title,url) 
{
  if (window.sidebar) 
  { 
    window.sidebar.addPanel(title, url,""); 
  }
  else if( document.all ) 
  {
    window.external.AddFavorite( url, title);
  } 
  else if( window.opera && window.print )
  {
   return true;
 }
}

function Go(Url)
{
 window.location.href = Url;
 //window.location.replace(Url);
}
	
function swapImage(imageID, imageName)
{
    document.getElementById(imageID).src = "buttons/"+ imageName + ".gif";
}
function LoadImages ()
{
  for (var i = 1; i <=38; i++)
  {
    arrImages [ i  ] = new Image(); 
    arrImages [ i  ].src = 'imagesPhoto/' + i  + '.jpg';
  }
}
function changeImage(imgName)
{
  if (timer != null)
  {
    StopSlideShow();
  }
  document.images['tobeChanged'].src = arrImages [imgName].src;
}
function replaceImage(oldName)
{
}
function returnImage(imgName)
{
  if (timer != null)
  {
    StopSlideShow();
  }
  document.images['tobeChanged'].src = arrImages [imgName].src;
}








