IE5=NN4=NN6=false

if(document.all)
    IE5=true
else if(document.layers)
    NN4=true
else if(document.getElementById)
    NN6=true

selectedPage = "home";

if (document.images) {
    var indexn = new Image();
    indexn.src = "images/menu-normal-0-0.png";
    var indexs = new Image();
    indexs.src = "images/menu-selected-0-0.png";

    var productsn = new Image();
    productsn.src = "images/menu-normal-1-0.png";
    var productss = new Image();
    productss.src = "images/menu-selected-1-0.png";

    var simplifikatorn = new Image();
    simplifikatorn.src = "images/menu-normal-2-0.png";
    var simplifikators = new Image();
    simplifikators.src = "images/menu-selected-2-0.png";

    var galleryn = new Image();
    galleryn.src = "images/menu-normal-3-0.png";
    var gallerys = new Image();
    gallerys.src = "images/menu-selected-3-0.png";

    var aboutn = new Image();
    aboutn.src = "images/menu-normal-4-0.png";
    var abouts = new Image();
    abouts.src = "images/menu-selected-4-0.png";

    var contactn = new Image();
    contactn.src = "images/menu-normal-5-0.png";
    var contacts = new Image();
    contacts.src = "images/menu-selected-5-0.png";
}

function menuOn(imgName) {
    if (document.images)
        document.images[imgName].src = eval(imgName + "s.src");
}

function menuOff(imgName) {
    if (document.images) {
        //if (imgName != selectedPage) {
            document.images[imgName].src = eval(imgName + "n.src");
        //}
    }
}

function selectPage(myPage) {
    menuOff(selectedPage);
    selectedPage = myPage;
    menuOn(selectedPage);
}


function openGalleryWin(url, name, width, height)
{
    if (IE5) {
        wind = window.open("", "iWalkthru", "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,copyhistory=no,width="+width+",height="+height);

        wind.document.write( "<html><head>\n" );
        wind.document.write( "<title>"+name+"</title>\n" );
        wind.document.write( "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\n");
        wind.document.write( "<link type='text/css' rel='StyleSheet' href='gallery.css'>\n");

        wind.document.write( "</head>\n");
        wind.document.write( "<body>\n");
        wind.document.write( "<img src=\""+url+"\" border=0 alt=\""+name+"\"><br>\n");
        wind.document.write( "Please close window manually" );

        wind.document.write( "</body>\n");
        wind.document.write( "</html>\n");

        wind.focus;
        wind.document.close();
    } else {
        wind = window.open("", "iWalkthru", "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,copyhistory=no,width="+width+",height="+height);

        wind.document.write( "<html><head>\n" );
        wind.document.write( "<title>"+name+"</title>\n" );
        wind.document.write( "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\n");
        wind.document.write( "<link type='text/css' rel='StyleSheet' href='gallery.css'>\n");

        wind.document.write( "<SCRIPT src=\"gallery.js\" type=\"text/javascript\"></SCRIPT>\n");

        wind.document.write( "</head>\n");
        wind.document.write( "<body onLoad='javascript:computeAndSetSize();' >\n");


        wind.document.write( "<a href='javascript:top.window.close();'><img src='"+url+"' border=0 alt='"+name+"'></a><br>\n");

        wind.document.write( "<a href='javascript:top.window.close();'>close window</a>" );

        wind.document.write( "</body>\n");
        wind.document.write( "</html>\n");

        wind.focus;
        wind.document.close();
    }
}
