/*
PopoffWindow(windowName,windowWidth,windowHeight,URL,shouldResize,shouldScroll)
written by Matt Pressnall 10/24/03
What does it do?
Pops off (or up) a window. If the window has been called and resides in the background and someone calls it again, it brings the window to the forefront (which most popup code doesn't do).
How do I use it?
(call to JS file needs to be on a page only once)
<script src="/js/standardFunctionality/PopoffWindow.js"></script>
<a href="javascript:PopoffWindow('test',300,300,'http://www.pressnall.com','no','no')">text</a>
Parameters:
windowName - the name of the window. Alphabetic characters only!
windowWidth
windowHeight
URL
shouldResize - yes|no
shouldScroll - yes|no
*/
function PopoffWindow(windowName,windowWidth,windowHeight,URL,shouldResize,shouldScroll) {
var availableWidth = screen.availWidth;
var availableHeight = screen.availHeight;
var windowLeft = (availableWidth - windowWidth) / 2;
var windowTop = ((availableHeight - windowHeight) / 2) - 16;
newWindow = window.open(URL,windowName,"width=" + windowWidth + ",height=" + windowHeight + ",left=" + windowLeft + ",top=" + windowTop + ",location=no,resizable=" + shouldResize + ",scrollbars=" + shouldScroll + ",toolbar=no");
newWindow.focus();
}