/*		WINDOW OPENER SCRIPT 
	Used by: any page within the website that needs to open a new window.
	Features:  Uses Modal Dialog method if user is in IE; if in Netscape uses window.open.
		If those fail, they might have a pop-up blocker installed.  In that case, try to 
		load the link in the current window.
*/
function openWindow(loc, h, w, flag) {
	var agt = navigator.userAgent.toLowerCase();
	var isIE = (agt.indexOf("msie") > -1);
	var isMO = (agt.indexOf("mozilla") > -1);
	var params = "";
	var winIsOpen = false;
	if ((isIE) && (!flag)) {
		params = "dialogHeight: " + h + "px; dialogWidth: " + w + "px; edge: Raised; center: Yes; help: No; resizable: No; status: No;";
		try {
			window.showModalDialog(loc, "BabyWindow", params);
			winIsOpen = true;
		} catch (exception) { winIsOpen = false; }
	} else if (isMO) {
		params = "location=no,toolbar=no,scrollbars=yes,directories=no,Status=yes,copyhistory=no,width=" + w + ",height=" + h + ",left=10,top=10,resizable=yes";
		ChildWin = window.open(loc, 'BabyWindow', params);
		winIsOpen = (ChildWin);
	}
	if (!winIsOpen) {
		// if we get here, window open somehow failed. Just directly link.
		window.location.href = loc;
	}
}