// A collection of useful functions

//opens sURL in popup window
function popupWindow(sURL)
{
    window.open(sURL, 'popup', 'width=400, height=500, top=100, left=100, menubar=0, scrollbars=1, location=0, toolbar=0, resizable=1, status=0');
}

//opens image in new window and adds a close button
function popupImageWindow(sImageURL)
{
    win = window.open("", 'popup', 'width=400, height=400, top=100, left=100, menubar=0, scrollbars=1, location=0, toolbar=0,  resizable=1, status=0');
    win.document.write("<html>\n<body>\n<form name='frmImageWindow' action=''>\n");
    win.document.write("<center><input type='Button' name='btnCloseWindow' value='Close Window' onclick='javascript:window.close();'><center><p>\n");
    win.document.write("<img src='" + sImageURL + "' border='0' align='center'><br>\n");
    win.document.write("</form>\n</body>\n</html>\n");
    win.document.close();
}

//inserts close button
function insertCloseBtn()
{
	document.write("<center><input type='Button' name='btnCloseWindow' value='Close Window' onclick='javascript:window.close();'><center><p>\n");
}

