var strWin;
var strURL;
var strWinName;
var strScrollBar;
var iWinWidth;
var iWinHeight;
var strToolbar;
var strMenuBar;

function windowOpen(strURL, strWinName, strOptions) {

	var win = window.open(strURL, strWinName, strOptions);
	if (win) {
		try {
			win.focus();
		} catch (e) {
		}
	}

	return win;
}

function windowPopUp(strURL,strWinName,iWinWidth,iWinHeight,strScrollBar,strResize,strToolbar,strMenuBar)
{
	if (strScrollBar == "yes") {
		if (is.ie == true || is.ns == true) { iWinWidth = iWinWidth + 16; }
	}
	if (strWin!=null) {   		/*not first time we've opened the window?*/
		if(!strWin.closed) {	/*window is open now?*/
			strWin.focus();		/*focus on it*/
			strWin.focus();		/*focus on it again, sometimes the browser does not focus properly with one call only*/
								/*load the content again*/
			strWin = windowOpen(strURL,strWinName, "toolbar="+strToolbar+",scrollbars="+strScrollBar+",location=0,directories=0,status=1,resizable=1,width="+iWinWidth+",height="+iWinHeight+",menubar="+strMenuBar);
			return;
		}
	}
	strWin = windowOpen(strURL,strWinName, "toolbar="+strToolbar+",scrollbars="+strScrollBar+",location=0,directories=0,status=1,resizable=1,width="+iWinWidth+",height="+iWinHeight+",menubar="+strMenuBar);	/* open the window */
}



