function openNewWindow(URL, windowName, windowOptions)
{
    var window = getWindow(URL, windowName, windowOptions);
}

function getWindow(URL, windowName, windowOptions)
{
    var newWindow = open(URL, windowName, windowOptions)
    //newWindow.focus();
    //top.allOpenWindows[top.allOpenWindows.length] = newWindow;
    return newWindow;
}
      
//function showHelp(FileName)
//{
    //alert('Starting new help');
    //openNewWindow('help.jsp?id=introduc_htm_211183', 'helpWindow', 'WIDTH=700,HEIGHT=500,resizable=yes');
    //helpwindow=window.open("", "helpwindow", "toolbar=yes,location=no,scrollbars=yes,width=770,height=500,resizable=yes", true);
    //displayHelp(helpwindow, FileName);
//}

function showHelp(URL)
{
    window.open(URL, "helpwindow", "toolbar=yes,location=no,scrollbars=yes,width=770,height=500,resizable=yes", true);
}

function showAdvisorAdminHelp()
{
    var helpFile = top.Dispatch("help");
    showHelp(helpFile);
}

function showProductManagerHelp()
{
    var helpFile = top.Dispatch("getFileName");
    showHelp(helpFile);
}

function showVisualModelerHelp()
{	
    var helpFile = top.getHelpFileName();
    showHelp(helpFile);
}

function displayHelp(DisplayWindow, FileName)
{
    DisplayWindow.document.write('<html>');
    DisplayWindow.document.write('<head>');
    DisplayWindow.document.write('<title>Documentation</title>');
    DisplayWindow.document.write('</head>');
    DisplayWindow.document.write('<frameset frameborder="0" framespacing="0" border="0" cols="275,*" rows="*">');
    DisplayWindow.document.write('<frameset frameborder="0" framespacing="0" border="0" cols="*" rows="0, *">');
    DisplayWindow.document.write('<frame marginwidth="0" marginheight="0" src="../htdocs/help/administ.htm" name="code" noresize scrolling="no" frameborder="0">');
    DisplayWindow.document.write('<frame marginwidth="5" marginheight="5" src="../htdocs/help/menu_empty.html" name="menu" noresize scrolling="auto" frameborder="0">');
    DisplayWindow.document.write('</frameset>');
    DisplayWindow.document.write('<frame marginwidth="5" marginheight="5" src="' + FileName + '" name="text" noresize>');
    DisplayWindow.document.write('</frameset>');
    DisplayWindow.document.write('</html>');
    DisplayWindow.document.close();
}
