/* 
*  Author:  David Gailey
*  File name: OnlineCatalogWindowControl.js
*
*  Controls opening, focus, and setting new location(s) on child window.
*/


/*
*   Function name: openWindow
*	Inputs:  childLocation - the url of the new window to be opened
*			 childName - the name of the newly opened window
*			 childOptions - optional window options that control window size and display
*/

var openWin ='null';
var parentWin = window;
window.name = 'New_Pig';

function openWindow(childLocation, childName, childOptions) {
  if(typeof(childName)== 'undefined')childName = 'ocWindow';
  if(typeof(childOptions)== 'undefined')childOptions = 'width=880,height=' + (parseInt(screen.height * 0.75)).toString() + ',top=10,status=yes,location=yes,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes';
  //console.log(screen.height,childOptions);
  openWin = window.open (childLocation,childName,childOptions);
  openWin.focus();
  return false;
}
