// menu.js
SBotton = new Array();
SBotton[W] = Math.round(133 * scale);
SBotton[H] = Math.round(40 * scale);
SBotton[X] = new Array();
SBotton[Y] = new Array();
var BottonSpace = Math.round(6 * scale);
SBotton[Y][5] = SContent[Y] + SContent[H] - BottonSpace - SBotton[H];
setstyle('Botton0', [
  ['backgroundColor', BgGray],
  ['left', SLayout[X] + Math.round(29 * scale)],
  ['top', SBotton[Y][5]],
  ['width', SBotton[W]],
  ['height', SBotton[H]],
  ['visibility', 'visible'],
  ['cursor', 'pointer']
]);
setstyle('TBotton0', [
  ['fontFamily', FontFamily],
  ['color', Petrol],
  ['fontSize', Math.round(11 * scale) + 'px']
]);
SBotton[X][1] = SContent[X] + BottonSpace;
setstyle('Botton1', [
  ['backgroundColor', BgGray],
  ['left', SBotton[X][1]],
  ['top', SBotton[Y][5]],
  ['width', SBotton[W]],
  ['height', SBotton[H]],
  ['visibility', 'visible'],
  ['cursor', 'pointer']
]);
setstyle('TBotton1', [
  ['fontFamily', FontFamily],
  ['color', Petrol],
  ['fontSize', Math.round(11 * scale) + 'px']
]);
SBotton[X][2] = SContent[X] + BottonSpace + Math.round(139 * scale);
setstyle('Botton2', [
  ['backgroundColor', BgGray],
  ['left', SBotton[X][2]],
  ['top', SBotton[Y][5]],
  ['width', SBotton[W]],
  ['height', SBotton[H]],
  ['visibility', 'visible'],
  ['cursor', 'pointer']
]);
setstyle('TBotton2', [
  ['fontFamily', FontFamily],
  ['color', Petrol],
  ['fontSize', Math.round(11 * scale) + 'px']
]);
SBotton[X][3] = SContent[X] + BottonSpace + Math.round(2 * 139 * scale);
setstyle('Botton3', [
  ['backgroundColor', BgGray],
  ['left', SBotton[X][3]],
  ['top', SBotton[Y][5]],
  ['width', SBotton[W]],
  ['height', SBotton[H]],
  ['visibility', 'visible'],
  ['cursor', 'pointer']
]);
setstyle('TBotton3', [
  ['fontFamily', FontFamily],
  ['color', Petrol],
  ['fontSize', Math.round(11 * scale) + 'px']
]);
SBotton[X][4] = SContent[X] + BottonSpace + Math.round(3 * 139 * scale);
setstyle('Botton4', [
  ['backgroundColor', BgGray],
  ['left', SBotton[X][4]],
  ['top', SBotton[Y][5]],
  ['width', SBotton[W]],
  ['height', SBotton[H]],
  ['visibility', 'visible'],
  ['cursor', 'pointer']
]);
setstyle('TBotton4', [
  ['fontFamily', FontFamily],
  ['color', Petrol],
  ['fontSize', Math.round(11 * scale) + 'px']
]);
SBotton[X][5] = SContent[X] + BottonSpace + Math.round(4 * 139 * scale);
setstyle('Botton5', [
  ['backgroundColor', BgGray],
  ['left', SBotton[X][5]],
  ['top', SBotton[Y][5]],
  ['width', SBotton[W]],
  ['height', SBotton[H]],
  ['visibility', 'visible'],
  ['cursor', 'pointer']
]);
setstyle('TBotton5', [
  ['fontFamily', FontFamily],
  ['color', Petrol],
  ['fontSize', Math.round(11 * scale) + 'px']
]);
function show(page) {
  setstyle('FadeOut', [['visibility', 'hidden']]);
  setstyle('Visuals', [['visibility', 'hidden']]);
  setstyle('About', [['visibility', 'hidden']]);
  setstyle('Facts', [['visibility', 'hidden']]);
  setstyle('Links', [['visibility', 'hidden']]);
  switch(page) {
    case 'Visuals':
      setstyle('Visuals', [['visibility', 'visible']]);
	  setstyle('FadeOut', [['visibility', 'visible']]);
    break;
	case 'About':
      setstyle('About', [['visibility', 'visible']]);
	  setstyle('FadeOut', [['visibility', 'visible']]);
    break;
	case 'Facts':
      setstyle('Facts', [['visibility', 'visible']]);
	  setstyle('FadeOut', [['visibility', 'visible']]);
    break;
	case 'SnS':
      if (confirm('Do you want to visit\n\nElocar\n\nin a new window?')) window.open("http://www.elocar.de", "Elocar", "scrollbars=yes, location=yes, menubar=yes, resizable=yes, status=yes, toolbar=yes");
	break;
	case 'Links':
      setstyle('Links', [['visibility', 'visible']]);
	  setstyle('FadeOut', [['visibility', 'visible']]);
    break;
  }
}
setBotton('TBotton0');
overBotton('TBotton0');