//*********************************************************************
//
// Popup Function
//
// Copyright (c) 2002, MFM Communication Software, Inc.
//
//*********************************************************************
//
// popupWindow.js
// $Id: popupWindow.js,v 1.7 2008/07/30 14:50:08 lbettag Exp $
//
// Popup function used on most web pages
//
//*********************************************************************
//
// Tell jsjam.pl to not change these identifier and function names
//
// jsjam-keep:popUpPage
// jsjam-keep:popUpPageNoTools
//
//*********************************************************************


//********************************************************************
// 
// popUpPage()
//
// Parameters:
//   page:   string
//     location of the file to open
//
//   name:   string
//     the name you want associated with this window
//     (so you can have different types of windows open at the same time)
//
//   height: integer
//     height (in pixels) for the pop-up window
//
//   width:  integer
//     width (in pixels) for the pop-up window
//
// Opens page in a pop-up window.
// 
//********************************************************************
function popUpPage(page,name,height,width,field) {
  
  if(!height)
  {
    height = screen.height * .75;
    width = screen.width * .75;
  }
	
  var winFeatures = 'width=' + width + ',height=' + height + ',left=75,top=25,scrollbars=yes,resizable=yes,location=yes,status=yes,toolbar=yes,menubar=yes';
  
  name = name.replace(/[^a-zA-Z\d]/g,'_');
  
  var win = window.open(page,name,winFeatures);
  win.focus();
}

function popUpPageNoTools(page,name,height,width,field) {
  
  if(!height)
  {
    height = screen.height * .75;
    width = screen.width * .75;
  }
	
  var winFeatures = 'width=' + width + ',height=' + height + ',left=75,top=25,scrollbars=yes,resizable=yes,location=yes,status=no,toolbar=no,menubar=no';
  
  name = name.replace(/[^a-zA-Z\d]/g,'_');
  
  var win = window.open(page,name,winFeatures);
  win.focus();
}

//*********************************************************************
//
// CHANGE HISTORY
//
// $Log: popupWindow.js,v $
// Revision 1.7  2008/07/30 14:50:08  lbettag
// add jsjam-keep:popUpPageNoTools
//
// Revision 1.6  2008/07/25 19:48:36  lbettag
// turn location bar back on to facilitate debugging
//
// Revision 1.5  2008/07/25 13:49:44  lbettag
// add popUpPageNoTools
//
// Revision 1.4  2006/10/02 18:54:27  mdame
// Add standard header and change log
//
// Revision 1.3  2004/12/16 20:13:33  timhulse
// added a focus call on the new window that is created so that the
// window will always come to the front, especially when it's already
// opened in the background.
//
// Revision 1.2  2004/08/04 16:59:37  dsteinbrunner
// name is now restricted to a-z case insensitive and numbers
//
// Revision 1.1  2004/03/09 22:10:28  rbollas
// Initial Revision.
//
// 2004-03-09 -- rbollas
// Script started using dsteinbrunner's code
//
//*********************************************************************
