function $(name)
{
     return document.getElementById(name);
}

function OpenSubMenu (name){
  $(name).style.display = 'block';
}

/*
function openMenuBlock(n)
{
    $('submenu_' + GLOBALS['cur_opened']).style.display = 'none';
    $('submenu_' + n).style.display = 'block';
    GLOBALS['cur_opened'] = n;
}

function collapseMenu()
{ 
  var i, n;
  if (!(GLOBALS.cur_opened)) {
    GLOBALS.cur_opened = GLOBALS.left_menu_boxes[0];
  }
  for (i = 0; i < GLOBALS.left_menu_boxes.length; i++) {
    n = GLOBALS.left_menu_boxes[i];
    if (n == GLOBALS.cur_opened) {
      $('submenu_' + n).style.display = 'block';
    } else {
      $('submenu_' + n).style.display = 'none';
    }
  }
}
*/


nn4 = (document.layers)? true : false;
ie4 = (document.all)? true : false;
nn6 = (document.getElementById && !ie4)? true : false;

function new_wind(cardName, winW, winH, winTitle) {
if (nn4 || ie4 || nn6) {
posX = Math.round((screen.width - winW) / 2);
posY = Math.round((screen.height - winH) / 2);
posCode = (nn4 || nn6)? 'screenX='+posX+',screenY='+posY : 'left='+posX+',top='+posY;
} else { posCode = ''; }
cardWindow = window.open('','_blank','menubar=no,toolbar=no,scrollbars=no,status=yes,width='+winW+',height='+winH+','+posCode);
cardWindow.document.open();
cardWindow.document.write('<html><head><title>'+winTitle+'</title></head>');
cardWindow.document.write('<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>');
cardWindow.document.write('<img src="'+cardName+'" width="'+winW+'" height="'+winH+'" /></body></html>');
cardWindow.document.close();
cardWindow.focus();
}


