/*
--------------------------------
CSIS JavaScript Functions
--------------------------------
*/

/*
Pops up a window that is resizable.  Good for reports that require parameters before they
can be generated.  Once generated, the report populates the popup window.  This enables 
the user to close the report without closing off the main application window.

pURL is the URL to load into the window
w is the initial width of the window
h is the initial height of the window

*/
function popupResizableWindow(pURL, w, h) {
	var popup = window.open(pURL,'popupRes','scrollbars=yes,toolbar=no,status=no,menubar=no,resizable=yes,location=no,copyhistory=no,directories=no,height=' + h + ',width=' + w)
	popup.focus();
}

/*
Pops up a printer friendly window containing details for a pick-up, and then prints it.

content is an HTML formatted string containing the entire content of the popup window
w is the initial width of the window
h is the initial height of the window

*/
function popupAndWindowAndPrint(content, w, h) {
	var popup = window.open('','popupRes','scrollbars=yes,toolbar=no,status=no,menubar=no,resizable=yes,location=no,copyhistory=no,directories=no,height=600,width=600');
	popup.document.write(content);
	popup.document.close();/* Closes output stream */
	
	popup.print();
	popup.close();
}
