var offset = {x:-1, y:0};

if (navigator.appName == "Microsoft Internet Explorer") {
  offset.x += 1;
  offset.y += 1;
}

function show_hide_obj(obj, show, menu) {
  var d;
  var v;
  obj=get_obj(obj);
  v = (show) ? 'visible' : 'hidden';
  move_obj(obj, menu);
  obj.style.visibility = v;
}


/* oder nach
 http://www.devarticles.com/c/a/DHTML/Dynamically-Positioned-Layers-by-Mouse-Position/1/
*/
function get_obj( obj ) {
  // step 1
  if ( document.getElementById ) {
    obj = document.getElementById( obj );
  // step 2
  } else if ( document.all ) {
    obj = document.all.item( obj );
  //step 3
  } else {
    obj = null;
  }
  //step 4
  return obj;
  }

function move_obj( obj, menu ) {
  var pos;
  menu = get_obj(menu);
  pos = get_dim(menu);
  pos.y += get_height(menu);

  obj.style.top  = (pos.y+offset.y) + 'px';
  obj.style.left = (pos.x+offset.x) + 'px';
  }

function get_height(el) {
  return el.offsetHeight;
}

function get_dim(el){
  for (var lx=0,ly=0;el!=null;
    lx+=el.offsetLeft,ly+=el.offsetTop,el=el.offsetParent);
  return {x:lx,y:ly}
}

function open_window ( url, title, options ) {
  var win;
  win = window.open( url, '' );
}

function popup ( adresse ) {
  var win;
  var title;
  var options;
  title = 'popup';
  options = 'width=600,height=620,resizable=yes,scrollbars=yes,location=no,menubar=no,status=no,toolbar=no';
  win = window.open(adresse, title, options );
  win.focus();
}


