
function xGetElementById(e)
{
  if (typeof e != "string")
    return e;
  if (document.getElementById)
    e = document.getElementById(e);
  else
    if (document.all)
      e = document.all[e];
    else
      e = null;
  return e;
}

pic = new Array()
for(i=0;i<6;i++)
{
pic[i] = new Image();
if(i==0) pic[i].src = "show/pic1.jpg";
if(i==1) pic[i].src = "show/pic2.jpg";
if(i==2) pic[i].src = "show/pic3.jpg";
if(i==3) pic[i].src = "show/pic4.jpg";
if(i==4) pic[i].src = "show/pic5.jpg";
if(i==5) pic[i].src = "show/pic6.jpg";
}

pic_big = new Array();
pic_big[0] = new Image();
pic_big[1] = new Image();
pic_big[2] = new Image();
pic_big[3] = new Image();
pic_big[4] = new Image();
pic_big[5] = new Image();
pic_big[6] = new Image();

pic_big[0].src = "show/pic1_big.jpg";
pic_big[1].src = "show/pic2_big.jpg";
pic_big[2].src = "show/pic3_big.jpg";
pic_big[3].src = "show/pic4_big.jpg";
pic_big[4].src = "show/pic5_big.jpg";
pic_big[6].src = "show/pic6_big.jpg";

n=0;
stop=0;
back=0;

function slideShow()
{
  if(stop) {
    return false;
  }

  if(back) {
    n--; if(n<0) n=5;
  }
  else {
    n++; if(n>5) n=0;
  }

document.images["show"].src = pic[n].src;
setTimeout("slideShow()",3000);

}

function slideStop ()  {
  stop=1;
  return false;
}

function slideStart ()  {  if(0 == stop)
    return false;
  stop=0;
  slideShow();
  return false;
}

function showSlide ()  {
open(pic_big[n].src, "new_window","toolbar=0,location=0,status=0, menubar=0,scrollbars=1,resizable=1");
}

function slideTolleft ()  {
  back = 1;
  return slideStart();
}

function slideTolright ()  {
  back = 0;
  return slideStart();
}
