 //The openWindow array will hold the handles of all open child windows
 var openWindow = new Array();
            
 //Track open adds the new child window handle to the array.
function trackOpen(winName) {
    openWindow[openWindow.length]=winName;
}

//loop over all known child windows and try to close them.  No error is
//thrown if a child window(s) was already closed.
function closeWindows() {
    var openCount = openWindow.length;
    for(r=0;r<openCount;r++) {
        openWindow[r].close();
    }
}


function NewWindow(url)	{
	if (!window.reportWindow || window.reportWindow.closed){
		var szWinFeatures = "toolbar=no,location=no,directories=no,status=no,screenleft=100,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=850,height=820";
		reportWindow = window.open("","NewWindow",szWinFeatures);
		trackOpen(reportWindow);}	
	else {
	reportWindow.focus()
	}
	reportWindow.location = url;
}

function NewWindowReport(url)	{
	if (!window.reportWindow || window.reportWindow.closed){
		var szWinFeatures = "toolbar=yes,location=no,directories=no,status=no,screenleft=100,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=850,height=940";
		reportWindow = window.open("","NewWindowReport",szWinFeatures);
		trackOpen(reportWindow);}	
	else {
	reportWindow.focus()
	}
	reportWindow.location = url;
}

function NewWindowiQuote(url)	{
	if (!window.reportWindow || window.reportWindow.closed){
		var szWinFeatures = "toolbar=no,location=no,directories=no,status=no,screenleft=100,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=1100,height=940";
		reportWindow = window.open("","NewWindowiQuote",szWinFeatures);
		trackOpen(reportWindow);}	
	else {
	reportWindow.focus()
	}
	reportWindow.location = url;
}

function closeModelerWins()
 {
     if (reportWindow!=null)
     {
        if (!reportWindow.closed)
          reportWindow.close();
     }
}


function NewWindowModeler(url)	{
	if (!window.reportWindow || window.reportWindow.closed){
		var szWinFeatures = "toolbar=no,location=no,directories=no,status=no,screenleft=100,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=1100,height=940";
		reportWindow = window.open("","NewWindowModeler",szWinFeatures);
		trackOpen(reportWindow);}	
	else {
	reportWindow.focus()
	}
	reportWindow.location = url;
}

function NewWindowConfigurator(url)	{
	if (!window.reportWindow || window.reportWindow.closed){
		var szWinFeatures = "toolbar=no,location=no,directories=no,status=no,screenleft=100,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=850,height=820";
		reportWindow = window.open("","NewWindowConfigurator",szWinFeatures);
		trackOpen(reportWindow);}	
	else {
	reportWindow.focus()
	}
	reportWindow.location = url;
}

function NewWindowStandardConfigurator(url)	{
	if (!window.reportWindow || window.reportWindow.closed){
		var szWinFeatures = "toolbar=no,location=no,directories=no,status=no,screenleft=100,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=1020,height=680";
		reportWindow = window.open("","NewWindowStandardConfigurator",szWinFeatures);
		trackOpen(reportWindow);}	
	else {
	reportWindow.focus()
	}
	reportWindow.location = url;
}


function NewWindowHelpQL(url)	{
	if (!window.reportWindow || window.reportWindow.closed){
		var szWinFeatures = "toolbar=no,location=no,directories=no,status=no,screenleft=100,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=703,height=506";
		reportWindow = window.open("","NewWindowHelpQL",szWinFeatures);
		trackOpen(reportWindow);}	
	else {
	reportWindow.focus();
	}
	reportWindow.location = url;
	reportWindow.focus();
}

function NewWindowHelpQS(url)	{
	if (!window.reportWindow || window.reportWindow.closed){
		var szWinFeatures = "toolbar=no,location=no,directories=no,status=no,screenleft=100,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=717,height=539";
		reportWindow = window.open("","NewWindowHelpQS",szWinFeatures);
		trackOpen(reportWindow);}	
	else {
	reportWindow.focus();
	}
	reportWindow.location = url;
	reportWindow.focus();
}
