//A place for scripts that possibly could be reused.

function openPopupWindow(url,toolbar,width,height,scrollbars,resizeable)
{
  winprops = "toolbar="+toolbar+",width="+width+",height="+height+",directories=0,status=0,scrollbars="+scrollbars+",resizeable="+resizeable+",menubar=0,location=0,copyhistory=0,fullscreen=0'"
  win = window.open(url,'',winprops);
}

/**
  * Prints current page
  */
function printPage()
{
  window.print();
}

/**
  * Opens a separate browser window in the left upper corner
  * with the specified URL
  *
  * @param url - the URL to open in the window
  * @param width - width of the window (default of 580 is used if not specified)
  * @param height - height of the window (default of 400 is used if not specified)
  */
function openWin(url,width,height)
{
  var winWidth;
  var winHeight;

  if(width)
  {
    winWidth=width;
  }
  else
  {
  	winWidth='780';
  }

  if(height)
  {
  	winHeight=height;
  }
  else
  {
  	winHeight='400';
  }

  var W = window.open(url,"","toolbar=no,width="+winWidth+",height="+winHeight+",directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no,location=no,copyhistory=no")
}