function menuMouseOver(elem, clr) {
  elem.style.backgroundColor = clr;
  elem.style.cursor = 'hand';
  elem.children.tags('A')[0].style.color = "#FFFFFF";
}

function menuMouseOut(elem, clr) {
  elem.style.backgroundColor = clr;
  elem.children.tags('A')[0].style.color = "#FFFFFF";
}

function menuMouseDown(elem, clr) {
  elem.style.backgroundColor = clr;
  elem.children.tags('A')[0].style.color = "#FFFFFF";
}

function menuMouseUp(path) {
  location.href = path;
}

function openform() {
  var width  = 560;
  var height = 750;
  var left   = (screen.width) ? (screen.width-width)/2 : 0;
  var top    = (screen.height) ? (screen.height-height)/2 : 0;
  var w = window.open('orderform.html','OrderForm',
    "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left +
    ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no");
  w.focus();
}

function openscore(name) {
  var w = window.open('sample_' + name + '.html', 'musicscore','width=770,height=880,toolbar=yes,menubar=yes,scrollbars=yes');
  w.focus();
}

function openscore1(name) {
  var w = window.open('sample_' + name + '.html', 'musicscore','width=750,height=850,toolbar=yes,menubar=yes,scrollbars=yes');
  w.focus();
}

var _TITLE  = '';
var _MAXPGS = 1;
var _NAME   = '';
var _PGNUM  = 1;
var _WIDTH  = 0;
var _HEIGHT = 0;
var _EXT    = '.jpg';

function openscorewin(title, name, maxpgs, w, h, ext) {
  _TITLE  = title;
  _MAXPGS = 1;
  _NAME   = name;
  _PGNUM  = 1;
  _WIDTH  = 770;
  _HEIGHT = 880;
  _EXT    = '.jpg';

  if (maxpgs != undefined) _MAXPGS = maxpgs;
  if (w      != undefined) _WIDTH  = w;
  if (h      != undefined) _HEIGHT = h;
  if (ext    != undefined) _EXT    = ext;

  var w = window.open('scorewin.html', 'musicscore_' + name, 'width='+_WIDTH+',height='+_HEIGHT+',toolbar=yes,menubar=yes,scrollbars=yes');
  w.focus();
}

function openwindow(addr) {
  var w = window.open(addr, 'newwindow','toolbar=yes,menubar=yes,scrollbars=yes');
  w.focus();
}  