nMaxItem = 4;
NameIndex = 0;
MouseOverState = 1;
MouseClickState = 2;
MouseDownState = 3;
MouseOutState = 4;
sndCounter = 0;
SoundList = new Array();

function RestoreImage(){ //v2.0
        nCount = document.OriginImage.length;
        ImgArray = document.OriginImage;

        if (document.OriginImage != null)
                for (i = 0; i < (nCount - 1); i += 2)
                        ImgArray[i].src = ImgArray[i+1];
        document.OriginImage = null;
}

function ReplaceImage(){ //v2.0
        j = 0;
        ImgArray = new Array;
        oldImgArray = document.OriginImage;

        for (i = 0; i < ReplaceImage.arguments.length; i += 2) {
                obj=ReplaceImage.arguments[i]
                ImgArray[j++] = obj;
                if (oldImgArray == null || oldImgArray[j-1] != obj)
                        ImgArray[j++] = obj.src;
                else
                        ImgArray[j++] = oldImgArray[j];
                obj.src = ReplaceImage.arguments[i + 1];
        }
        if (document.OriginImage == null)
                document.OriginImage = ImgArray;
}

// kost the ost

var currentImage = 0;
var aktImage = 0;

if (document.images) {
var img_show = new Array (3)
img_show[0] = "img/kost_the_ost1.jpg"
img_show[1] = "img/kost_the_ost2.jpg"
img_show[2] = "img/kost_the_ost3.jpg"

var img_name = new Array (4)
img_name[0] = "img/kost_the_ost4.jpg"
img_name[1] = "img/kost_the_ost5.jpg"
img_name[2] = "img/kost_the_ost6.jpg"
img_name[3] = "img/kost_the_ost7.jpg"
}

function Init() {
 if (document.images) {
  setTimeout('loadImage()',3800);
  setTimeout('dispImage()',2600);
 }
}

function loadImage() {
 if (currentImage < img_show.length - 1) {
  currentImage++
  } else {
   currentImage = 0
  }
 document.pico.src = img_show[currentImage]
 setTimeout('loadImage()',3000);
}

function dispImage() {
 if (aktImage < img_name.length - 1) {
  aktImage++
  } else {
   aktImage = 0
  }
 document.picu.src = img_name[aktImage]
 setTimeout('dispImage()',1400);
}