// Pop-up

	var ie5 = (document.all && document.getElementbyID) ? false : true;
	var isMac = (navigator.appVersion.indexOf("Mac") == -1) ? false : true;
	var win, win2;

	function openWin(url, popWidth, popHeight, popScroll, popStatus) {
		var winName =  "popup";
		// popStatus is a new parameter; it is optional so that old calls will not cause an error
		var statusBar = popScroll;

		if (popStatus != null) {
			statusBar  = popStatus;
			// 'fix' for Mac IE's problem when including a status bar in the pop up window
			// - the browser chops off the bottom 18 pixels of the window to accomodate for the
			//   the status bar, and so we add 18 pixels to the height
			if (!ie5 && !ns && isMac) { popHeight += 18; }
		}

	    if(win) {
			if(!win.closed) {
				if(win.name == "popup") winName = "popup2";
			  	win.close();
			}
			win = null;
		}

		win=window.open(url, winName, 'width=' + popWidth + ',height=' + popHeight + ',screenX=25,screenY=150,left=25,top=150,scrollbars=' + popScroll + ',resize=no,status=' + statusBar + '');

		if (win.opener == null) win.opener = self;
		win.focus();
	}

// end of pop-up


// pop-up window with menubar functionality

	function openWinPrint(url, popWidth, popHeight, popScroll, popStatus) {
		var winName =  "popup";
		// popStatus is a new parameter; it is optional so that old calls will not cause an error
		var statusBar = popScroll;

		if (popStatus != null) {
			statusBar  = popStatus;
			// 'fix' for Mac IE's problem when including a status bar in the pop up window
			// - the browser chops off the bottom 18 pixels of the window to accomodate for the
			//   the status bar, and so we add 18 pixels to the height
			if (!ie5 && !ns && isMac) { popHeight += 18; }
		}

	    if(win) {
			if(!win.closed) {
				if(win.name == "popup") winName = "popup2";
			  	win.close();
			}
			win = null;
		}

		win=window.open(url, winName, 'width=' + popWidth + ',height=' + popHeight + ',screenX=25,screenY=150,left=25,top=150,menubar,scrollbars=' + popScroll + ',resize=no,status=' + statusBar + '');

		if (win.opener == null) win.opener = self;
		win.focus();
	}



