<!--
function screenOffset(axis, pixels) {
  var percentOffset = (10/100); // %offset from axis
  var axisDimension = new Number;
  if (axis == 'x') axisDimension = screen.availWidth;
  if (axis == 'y') axisDimension = screen.availHeight;
  return Math.ceil((axisDimension - pixels) * percentOffset);
}

function popWin(winType, URL, winWidth, winHeight) {
  var strWinName = new String;
  var winOpts = new String, 
      oNewWin = new Object;
  var xPos = new Number, 
      yPos = new Number;
  switch (winType) {
    case "console":
      strWinName = 'newConsoleWin';
      winOpts = "resizable";
      break;
    case "fixed":
      strWinName = 'newFixedWin';
      winOpts = "status";
      break;
    case "elastic":
      strWinName = 'newElasticWin';
      winOpts = "menubar,scrollbars,resizable,status";
      break;
    default:
      strWinName = 'hobsonsWin';
      winOpts = "toolbar,menubar,scrollbars,resizable,location,status,directories";
      break;
  }
  (!winWidth) ? winWidth = 800 : winWidth -= 0; //680
  (!winHeight) ? winHeight = 600 : winHeight -= 0; //520
  if ( window.screenX ) {
    xPos = screenOffset('x', window.screenX) + window.screenX;
    yPos = screenOffset('y', window.screenY) + window.screenY;
  }
  else if ( window.screenLeft ) {
    xPos = screenOffset('x', window.screenLeft) + window.screenLeft;
    yPos = screenOffset('y', window.screenTop) + window.screenTop;
  }
  if ( screen.availWidth < (xPos + winWidth) ) xPos = screen.availWidth - winWidth;
  if ( screen.availHeight < (yPos + winHeight) ) yPos = screen.availHeight - winHeight;
  winOpts += ",x=" + xPos + 
             ",left=" + xPos + 
             ",y=" + yPos + 
             ",top=" + yPos + 
             ",height=" + winHeight + 
             ",width=" + winWidth;
  oNewWin = window.open(URL, strWinName, winOpts);
  oNewWin.focus();
  return false;
}

function popUp(URL, name, width, height, properties) {
  if ( !name ) name = 'Council';
  if ( !width ) width = '800'; //'680';
  if ( !height ) height = '600'; //'520';
  if ( !properties ) properties = 'menubar=0,toolbar=0,personalbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=1';
  properties = 'width=' + width + 
               ',height=' + height + 
               ',' + properties;
  var newWindow = window.open(URL, name, properties);
  if ( newWindow != null )
    newWindow.focus();
  return false;
}

function openPDFWin(url) {
  popUp(url, 'PDFWin', null, null, 'menubar=0,toolbar=1,status=0,scrollbars=0,resizable=1');
}
function openNewWin(url) {
  popUp(url, 'NewWin', null, null, 'menubar=1,toolbar=1,status=1,scrollbars=1,resizable=1');
}
function openPrintWin(url) {
  popUp(url, 'PrintWin', null, null, 'menubar=1,toolbar=0,location=0,status=0,scrollbars=1,resizable=1');
}
function openTarget(){
     var newWindow;
     newWindow = window.open('', 'form_target', 'scrollbars=yes,menubar=no,status=no,resizable=yes,toolbar=yes,location=no,directories=no');
}
//-->
