
function printPage(url) {
  var wnd = openPopupWindow("print", url, "width=900,height=800,location=no,scrollbars=yes,menubar=no,resizable=yes,toolbar=no,status=no");
}


function openPopupWindow(name, url, options) {
  var wnd = window.open(url,name,options);
  if (wnd) {
		/* w-width bestimmen */
		var tmp = options.split("width=");
		var tmp = tmp[1].split(",");
		var	w = tmp[0];
		
		/* h-height bestimmen */
		var tmp = options.split("height=");
		var tmp = tmp[1].split(",");
		var	h = tmp[0];
		
		var screenw = screen.width; 
		var screenh = screen.height; 
		
		var xpos = (screenw - w) / 2; 
		var ypos = (screenh - h) / 2; 
		wnd.moveTo (xpos, ypos); 
    wnd.focus();
  }
  return wnd;
}

function openPopupWindowWithoutReturn(name, url, options) {
	  var wnd = window.open(url,name,options);
	  if (wnd) {
	    wnd.focus();
	  }
}