browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

        if (browserName == "Netscape" && browserVer >= 3) version = "n3";
        else version = "n2";
        if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "n3";

        if (version == "n3")
{
        toc1on = new Image;
        toc1on.src = "picts/index2.gif";
        toc2on = new Image;
        toc2on.src = "picts/story2.gif";
        toc3on = new Image;
        toc3on.src = "picts/music2.gif";
        toc4on = new Image;
        toc4on.src = "picts/shop2.gif";
        toc5on = new Image;
        toc5on.src = "picts/mail2.gif";


        toc1off = new Image;
        toc1off.src = "picts/index.gif";
        toc2off = new Image;
        toc2off.src = "picts/story.gif";
        toc3off = new Image;
        toc3off.src = "picts/music.gif";
        toc4off = new Image;
        toc4off.src = "picts/shop.gif";
        toc5off = new Image;
        toc5off.src = "picts/mail.gif";


}


function img_act(imgName) {
        if (version == "n3") {
        imgOn = eval(imgName + "on.src");
        document [imgName].src = imgOn;
        }
}

function img_inact(imgName) {
        if (version == "n3") {
        imgOff = eval(imgName + "off.src");
        document [imgName].src = imgOff;
        }
}

function noEntry() {

  for (i=5; i<12; i++) {
    if (document.forms[0].elements[i].value == "")
    {
      alert("Tyhjiä syöttökenttiä!");
      return false;
    }
  }
}


function popupPage2(page,w,h) {
	windowprops = "toolbar=no,width="+w+",height="+h+",directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no";
	popup=window.open(page, "Popup", windowprops);
	popup.resizeTo(w,h);
	popup.focus();
}



