function getAbsolutePos(objectId,LeftTop) {
	o = document.getElementById(objectId);
	oPos = eval('o.offset' + LeftTop);
	while(o.offsetParent!=null) {
		oParent = o.offsetParent;
		oPos += eval('oParent.offset' + LeftTop);
		o = oParent
	}
	return oPos
}

winOpen = null
function pop(mypage,winName,w,h,status,toolbar,menubar,scrollbars,resizable) {

  if (status == null) { status = 1 }
  if (toolbar == null) { toolbar = 0 }
  if (menubar == null) { menubar = 0 }
  if (scrollbars == null) { scrollbars = 0 }
  if (resizable == null) { resizable = 0 }

  var options="";
  options+=",width="+w;
  options+=",height="+h;

  winl=(screen.width-w)/2;
  if (winl<25) winl=0;
  options+=",left="+winl;

  wint=(screen.availHeight -h)/2;
  if (wint<50) wint=0;
  options+=",top="+wint;

  options+=",status="+status;
  options+=",toolbar="+toolbar;
  options+=",menubar="+menubar;
  options+=",scrollbars="+scrollbars;
  options+=",resizable="+resizable;

  if (winOpen!=null && !winOpen.closed) { winOpen.close() };

  winOpen = window.open(mypage, winName, options);
}
