// Copyright (C) 2002 onlineoffice


function initbuttons() {
    if (document.layers) {
        document.layers['button1'].document.captureEvents();
        document.layers['button1'].onmouseover = over1;
        document.layers['button1'].onmouseout = outer1;
	document.layers['button4'].document.onmouseup = click1;
        document.layers['button2'].document.captureEvents();
        document.layers['button2'].onmouseover = over2;
        document.layers['button2'].onmouseout = outer2;
	document.layers['button4'].document.onmouseup = click2;
        document.layers['button3'].document.captureEvents();
        document.layers['button3'].onmouseover = over3;
        document.layers['button3'].onmouseout = outer3;
	document.layers['button4'].document.onmouseup = click3;
        document.layers['button4'].document.captureEvents();
        document.layers['button4'].onmouseover = over4;
        document.layers['button4'].onmouseout = outer4;
	document.layers['button4'].document.onmouseup = click4;
        document.layers['button5'].document.captureEvents();
        document.layers['button5'].onmouseover = over5;
        document.layers['button5'].onmouseout = outer5;
	document.layers['button5'].document.onmouseup = click5;
    }
}

function over(item) {
    disableAllButtons();
    var name ='button'+item;
    if (document.layers) {
        document.layers[name].document.bgColor="#E23828";
    } else if (document.all) {
        document.all[name].style.backgroundColor="#E23828";
    } else {
        document.getElementById(name).style.backgroundColor="#E23828";
    }
    if (item<4) showMenu(item);
}

function outer(item) {

    if(openMenu==null) {
    disableButton(item);
    }

}

function disableButton(item) {

    var name ='button'+item;
    if (document.layers) {
        document.layers[name].document.bgColor="#B0232A";
    } else if (document.all) {
        document.all[name].style.backgroundColor="#B0232A";
    } else {
        document.getElementById(name).style.backgroundColor="#B0232A";
    }
}

function disableAllButtons()  {

    disableButton(1);
    disableButton(2);
    disableButton(3);
    disableButton(4);
    disableButton(5);
}

function over1() {
    over(1);
}
function outer1() {
    outer(1);
}
function click1() {
    location.href="menu1.html"
}
function over2() {
    over(2);
}
function outer2() {
   outer(2);
}
function click2() {
    location.href="menu2.html"
}
function over3() {
    over(3);
}
function outer3() {
    outer(3);
}
function click3() {
    location.href="menu3.html"
}
function over4() {
    over(4);
}
function outer4() {
    outer(4);
}
function click4() {
    location.href="about.html"
}
function over5() {
    over(5);
}
function outer5() {
    outer(5);
}
function click5() {
    location.href="contact.html"
}
