I am somewhat new to xslt; so here is the complete xsl file. I'm not sure
what all is significant to this issue. I don't believe the root element has
a namespace URI.

<?xml version="1.0"?>
<!--
       $Header:
S:/MKS/RCSWORK/Rel9/Projects/Www/applications/DefaultWebApp_Ciws/public_xsl/rcs/toolbar.xsl

1.1 2003/01/08 22:13:54 A07b3zz Development $

       Copyright 2000-2001, 3M IPC. All rights reserved.
       This work is protected by U.S. and international law.

       This style sheet expects an input of the form:
                  <CiwsInfo>
                        <Module>
                              <ModuleName>..</ModuleName>
                              <ModuleHref>..</ModuleHref>
                              <ModuleLink>..</ModuleLink>
                              <ModuleImg>..</ModuleImg>
                        </Module>
                        ...
                  </CiwsInfo>
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version
="1.0">
      <xsl:import href="common_parameters.xsl"/>
      <xsl:import href="common_css.xsl"/>
      <xsl:import href="common_templates.xsl"/>

      <xsl:output method="HTML" indent="yes" doctype-public="-//W3C//DTD
HTML 4.01 Transitional//EN" encoding="UTF-8"/>

      <xsl:param name="authenticateOnly" select='false()'/> <!-- if true,
we were called from thick CW - skip the toolbar build -->
      <xsl:param name
="OSHProfile"><Module-1801><selected_applications><numitems><field>0</field></numitems></selected_applications></Module-1801></xsl:param>
      <xsl:variable name="toolbar" select="document('toolbar.xml')"/>
      <xsl:template match="/">
            <html style="cursor:wait">
                  <head>
                        <META CONTENT="text/javascript" HTTP-EQUIV
="Content-Script-Type"/>
                        <style type="text/css" id="loading">
                              A { cursor:wait }
                        </style>
                        <script>
                              var core = ((null==top.opener ||
"CareInnovation" == top.self.name) ? top : top.opener.top);
                              if (window.dialogArguments != null)
                              {
                                    core = window.dialogArguments[0].core;
                              }
                              var functions = core.frames['scripts'];
                              var toolbar = core.frames['Toolbar'];
                        </script>
                        <title>Toolbar</title>
                        <link rel="stylesheet" href
="/3MCI_static/html/ci_style.css" type="text/css"/>
                        <script type="text/javascript" src
="/3MCI_static/javascript/inbox.js"></script>
                        <script type="text/javascript"><![CDATA[
                              var gbInboxDefChecked = false;      //
indicates whether we've checked or not
                              var   giInboxPollId = 0;
                        // id of interval timer for cancellation
                              var giInboxChecked = 0;
            // indicates whether we've checked for inbox defs or not
                              var dataArea = null;
                              var dataAreaDoc = null;
                              var gCloseFrame = null;
                              var iframeObj = null;
                              var intervalId = new Array();
                              var startupId = -1;
                              var initId = -1;
                              var modulesShowing = false;
                              var giIbIntervalId = -1;
                              var giShutdownTimerId = -1;        // Used
for shutdown retry
                              var gbCIDcalled = false;
                              var gbCIDreplaced = false;
                              var gbAuthenticateOnly = false;           //
reflects $authenticateOnly param (called by CW if true)
                              var gbIncludeSummary = false; // reflects if
Summary module is enabled
                              var gbPingID = -1;
                              var gbLoggingOut = false;           //
logging out via Logout
                              var gblogout = false;               //
logging out via logout{}

                              var larr = new Image();
                              var rarr = new Image();

                              larr.src
= "/3MCI_static/images/leftarrow.gif";
                              rarr.src
= "/3MCI_static/images/rightarrow.gif";

                              function showModules()
                              {
                                    if (!modulesShowing)
                                    {
                                          var nonPatient =
document.getElementById("nonPatientModules");
                                          var patient =
document.getElementById("patientModules");

                                          functions.setCSS(nonPatient,
"display:none");

document.body.removeChild(nonPatient);
                                          functions.setCSS(patient,
"display:block;visibility");
                                          if (!top.menuAlwaysShowing)
                                          {
                                                functions.setCSS(patient,
"overflow:none");
                                                functions.setCSS(patient,
"display:none");
                                                functions.setCSS(patient,
"overflow:auto");
                                          }
                                          modulesShowing = true;
                                    }
                              }

                              function openModule(moduleName, moduleURL,
closeBar)
                              {
                                    if ("complete" == top.frames
['scripts'].document.readyState &&
                                                "complete" == top.frames
['PatientIdLine'].document.readyState)
                                    {
                                          if (-1 != startupId)
                                          {
                                                clearInterval(startupId);
                                                startupId = -1;
                                          }
                                          if (null == dataArea)
                                          {
                                                dataArea = top.frames
['DataArea'];
                                                dataAreaDoc =
dataArea.document;
                                          }
                                          if (null == gCloseFrame)
                                          {
                                                gCloseFrame = top.frames
['closeModule'];
                                                gCloseFrame.gDataAreaDoc =
dataAreaDoc;
                                          }
                                          if (null == functions)
                                                functions = top.frames
['scripts'];

functions.setCSS(dataAreaDoc.body, "border-left-width:0px;
border-top-width:0px");
                                          if (null != iframeObj)
                                                functions.setCSS(iframeObj,
"z-index:1");

                                          // inbox might try to open
summary when it's not available
                                          if (moduleName == "Summary" &&
gbIncludeSummary == false)
                                          {
                                                alert("The Patient Summary
module is not available.");
                                                top.frames
['PatientIdLine'].document.all.IDpatIdLineTbl.style.display='none';
                                                return;
                                          }


                                          if (moduleName == "AlertReview")
                                          {
                                                if (null == top.frames
['scripts'].goModuleData['ClinicianSelected'])
                                                {
                                                      top.frames
['scripts'].goModuleData['ClinicianSelected']=true;
                                                }
                                                //alert("In alert
review....")
//                                 if (top.frames['scripts'].goModuleData
['ClinicianSelected'])
//                                 {
//                                     top.frames
['PatientIdLine'].document.all.IDpatIdLineTbl.style.display='none';
//                                 }
//                                 else
//                                 {
//                                     top.frames
['PatientIdLine'].document.all.IDpatIdLineTbl.style.display='block';
//                                 }
                                          }
                                          if (arguments.length < 3)
                                                closeBar = true;
                                          iframeObj =
dataArea.document.getElementById(moduleName);
                                          if (null == iframeObj)
                                          {
                                                iframeObj =
dataAreaDoc.createElement("iframe");
                                                functions.setCSS(iframeObj,
"position:absolute; z-index:10; top: 0; left: 0; height: 100%");

functions.SetAttribute(iframeObj, "src", "about:blank");

functions.SetAttribute(iframeObj, "name", moduleName);

functions.SetAttribute(iframeObj, "id", moduleName);

functions.SetAttribute(iframeObj, "width", "100%");

functions.SetAttribute(iframeObj, "marginHeight", "0");

functions.SetAttribute(iframeObj, "marginWidth", "0");

functions.SetAttribute(iframeObj, "frameBorder", "0");

dataAreaDoc.body.appendChild(iframeObj);
                                                var modframe =
dataAreaDoc.frames[moduleName];
                                                modframe.name = moduleName;

modframe.location.replace(moduleURL);
                                                var newModInterval = new
Object();
                                                newModInterval.obj =
iframeObj;
                                                var ckReadyState
= "readystateComplete(\"".concat(moduleName,"\")");
                                                newModInterval.intervalId
= setInterval(ckReadyState, 1000);

intervalId.push(newModInterval);
                                          }
                                          else
                                          {
                                                functions.setCSS(iframeObj,
"z-index:10; display:block");
                                                dataArea.scrollTo(0,0);
                                                var modframe =
dataAreaDoc.frames[moduleName];
                                                if (moduleURL !=
modframe.location.pathname.concat(modframe.location.search))

modframe.location.replace(moduleURL);


modframe.document.body.focus();
                                                hidePatient(modframe);

gCloseFrame.setCurTop(modframe);
                                          }
                                    }
                                    else if(-1 == startupId)
                                    {
                                          var modCmd = "openModule
(\"".concat(moduleName, "\",\"", moduleURL, "\")");
                                          startupId = setInterval(modCmd,
1000);
                                    }
                                    return false;
                              }

                              function readystateComplete(objName)
                              {
                                    var ckObj = null;
                                    for (var i=0; i<intervalId.length; i++)
                                    {
                                          ckObj = intervalId.shift();
                                          if (objName == ckObj.obj.name)
                                          {
                                                var modframe =
dataAreaDoc.frames[objName];
                                                if ("interactive" ==
ckObj.obj.readyState || "complete" == ckObj.obj.readyState)
                                                {

clearInterval(ckObj.intervalId);
                                                      modframe.myIFrame =
ckObj.obj;
                                                      if (ckObj.obj ==
iframeObj)

gCloseFrame.setCurTop(modframe);

dataArea.scrollTo(0,0);

hidePatient(modframe);
                                                }
                                                else

intervalId.push(ckObj);
                                                break;
                                          }
                                          intervalId.push(ckObj);
                                    }
                              }

                              function toggleIFrame(moduleName)
                              {
                                    var curFrame = iframeObj;
                                    var modframe =
dataAreaDoc.frames[iframeObj.name];
                                    var prevIframeObj = null;
                                    if (toggleIFrame.arguments.length != 0)
                                          prevIframeObj =
dataAreaDoc.getElementById(moduleName);
                                    else
                                    {
                                          var iframes =
dataAreaDoc.getElementsByTagName("IFRAME");
                                          for (var i=0; i<iframes.length;
i++)
                                                if (iframeObj ==
iframes[i])
                                                {
                                                      prevIframeObj =
iframes[(0==i) ? iframes.length-1 : --i];
                                                      break;
                                                }
                                    }
                                    if ((null != prevIframeObj) &&
(prevIframeObj != iframeObj))
                                    {
                                          if (null != iframeObj)
                                                functions.setCSS(iframeObj,
"z-index:1");
                                          functions.setCSS(prevIframeObj,
"z-index:10; display:block");
                                          dataArea.scrollTo(0,0);
                                          modframe =
dataAreaDoc.frames[prevIframeObj.name];
                                          modframe.document.body.focus();
                                          hidePatient(modframe);
                                          iframeObj = prevIframeObj;
                                          prevIframeObj = curFrame;
                                    }
                                    else
                                          modframe = dataArea;

                                    gCloseFrame.setCurTop(modframe);
                                    return curFrame;
                              }

                              // Hide the patient id line based on the
presence of the 'HidePat' attribute
                              // in the specified modframe.  Special
handling for AlertReview.
                              function hidePatient(modframe)
                              {
                                    var atHidePat = null;

                                    if (modframe != null
                                        && modframe.document != null
                                          && modframe.document.body !=
null)
                                    {
                                       atHidePat =
modframe.document.body.getAttribute("HidePat");
                                    }

                                    if (atHidePat != null)
                                    {
                                          if (modframe.name
== "AlertReview")
                                          {
                                                if (top.frames
['scripts'].goModuleData['ClinicianSelected'])
                                                      top.frames
['PatientIdLine'].document.all.IDpatIdLineTbl.style.display='none';
                                                else
                                                      top.frames
['PatientIdLine'].document.all.IDpatIdLineTbl.style.display='block';
                                          }
                                          else
                                                top.frames
['PatientIdLine'].document.all.IDpatIdLineTbl.style.display='none';
                                    }
                                    else
                                          top.frames
['PatientIdLine'].document.all.IDpatIdLineTbl.style.display='block';
                              }

                              function abortShutdown(moduleName)
                              {
                                    toggleIFrame(moduleName);
                                    if (-1 != giShutdownTimerId)
                                          clearTimeout(giShutdownTimerId);
                              }

                              function shutdownError(curIframe)
                              {
                                    var bRetryModule = confirm("The " +
curIframe.id + " module has not responded to the shut down request.\n" +

                         "\nPress \"OK\" to retry the module's shut down
or" +

                         "\n\"Cancel\" to kill the module.");
                                    if (!bRetryModule)

dataAreaDoc.body.removeChild(curIframe);
                                    goodNightGracie();
                              }

                              function retryShutdown(moduleName)
                              {
                                    giShutdownTimerId = -1;
                                    closeModules();
                                    if (0 != dataArea.frames.length)
                                    {
                                          if (-1 != giShutdownTimerId)

clearTimeout(giShutdownTimerId);
                                          giShutdownTimerId = -1;

shutdownError(dataAreaDoc.getElementById(moduleName));
                                    }
                                    else
                                          goodNightGracie();
                              }

                              function closeModules()
                              {
                                    // If there are no modules open, we can
just shut down
                                    if (null != dataArea && 0 !=
dataArea.frames.length)
                                    {
                                          for (var i=0;
i<dataArea.frames.length; i++)
                                          {
                                                var frameObj =
dataArea.frames[i];
                                                var moduleName =
frameObj.name;
                                                var curIframe =
dataAreaDoc.getElementById(moduleName);
                                                // If the frame has some
housekeeping then let it happen
                                                var state =
frameObj.shutdown ? frameObj.shutdown() : functions.READY;
                                                switch (state)
                                                {
                                                      case functions.READY
:

dataAreaDoc.body.removeChild(curIframe);
                                                            i--;
                                                            break;

                                                      case functions.RETRY
:
                                                            if (-1 !=
giShutdownTimerId)

clearTimeout(giShutdownTimerId);

giShutdownTimerId = setTimeout("retryShutdown(".concat("'", moduleName,
"')"), 5000);
                                                            break;

                                                      case
functions.NOT_READY :

abortShutdown(curIframe.id);
                                                            return;

                                                }
                                          }
                                    }
                              }

                              function goodNightGracie()
                              {
                                    gbLoggingOut = true;
                                    if (-1 != giShutdownTimerId)
                                          clearTimeout(giShutdownTimerId);
                                    if (null == dataArea)
                                    {
                                          dataArea = top.frames
['DataArea'];
                                          dataAreaDoc = dataArea.document;
                                    }
                                    if (null == functions)
                                          functions = top.frames
['scripts'];
                                    closeModules();
                                    if (0 == dataArea.frames.length)
                                    {
                                          top.location.replace
('/UserLogout.mmm?xslRequest=unreguser.xsl&amp;xslReply=splash.xsl&amp;Logout=true');
                                          top.close();
                                    }
                              }

                              function pingWeb()
                              {
                                    var criteria = null;
                                    criteria = new String
("moduleNcid=1801&amp;delimiter=;
&amp;xslRequest=webping_req.xsl&amp;xslReply=webping_rep.xsl");
                                    top.frames
['webping'].document.location.replace("/CareInnovation.mmm?"+criteria);
                              }


                              function CheckInboxDef()
                              {
                                    var sUrl;

                                    gbCIDcalled = true;
                                    if (giIbIntervalId != -1)
                                    {
                                          clearInterval(giIbIntervalId);
                                          giIbIntervalId = -1;
                                    }

                                    if (top.frames['scripts'] != null &&
top.frames['inboxpoll'] != null)
                                          if (top.frames
['scripts'].document != null && top.frames['inboxpoll'].document != null)
                                                if ("complete" ==
top.frames['scripts'].document.readyState && "complete" == top.frames
['inboxpoll'].document.readyState)
                                    {
                                          if (gbInboxDefChecked == false)
                                          {
                                                      //alert
("CheckInboxDef do it");
                                                      sUrl
="/BrowserLiaison.mmm?moduleId=ciws.InboxModuleHome&amp;UsageReq=ToolbarReq&amp;UsageRep=AdminRep&amp;Action=dooperation&amp;cacheKey=inbox&amp;refresh=true&amp;"
                                                      top.frames
["inboxpoll"].document.location.replace(sUrl);
                                                      gbCIDreplaced = true;
                                          }
                                    }
                                    else
                                    {
                                          giIbIntervalId = setTimeout
("CheckInboxDef()", 500);
                                    }
                              }

                              // This function is called on the return of
the CheckInboxDef function above.
                              function CheckInboxDefCallback(iInboxId,
iPollInterval, iLstSrchTime,iAdminMinPoll)
                              {
                                    var iUsePollInterval = 0;

                                    // this object may have been created by
Inbox already
                                    if ( top.frames['scripts'].goModuleData
['Inbox'] == null)
                                          top.frames
['scripts'].goModuleData['Inbox'] =  new IbPersistData();

                                    if (top.frames['scripts'].goModuleData
['Inbox'].gsPollInboxId == "0")
                                          top.frames
['scripts'].goModuleData['Inbox'].gsPollInboxId = iInboxId;
                                    if (top.frames['scripts'].goModuleData
['Inbox'].gsLastSearchGMTime == "20010101010101.001")
                                          top.frames
['scripts'].goModuleData['Inbox'].gsLastSearchGMTime = iLstSrchTime;

                                    top.frames['scripts'].goModuleData
['Inbox'].giAdminMinPollInterval = iAdminMinPoll;


                                    // the admin poll interval sets the
minimum allowable value
                                    if (iAdminMinPoll == 0 || iPollInterval
== 0) // one or other is 0
                                          iUserPollInterval = 0;
                                    else
                                          iUserPollInterval = iAdminMinPoll
< iPollInterval ?  iPollInterval : iAdminMinPoll;

                                    gbInboxDefChecked = true;

                                    if (iInboxId > 0 && iUserPollInterval >
0)

StartInboxPolling(iUserPollInterval);

                              }


                              // If user has polling for new inbox data
turned on, start it here.
                              function StartInboxPolling(iPollingInterval)
                              {

                                    if (top.frames['scripts'].goModuleData
['Inbox'].gsPollInboxId == "0")
                                    {
                                          alert("Error:  StartInboxPolling
called with a 0 InboxId.");
                                          return;
                                    }

                                    if (iPollingInterval == 0)
                                          return;

                                    if (iPollingInterval < 0 ||
iPollingInterval > 100)
                                    {
                                          alert("Error:  invalid polling
interval specified.  Interval must be between 0 and 100 minutes.");
                                          return;
                                    }

                                    if(iPollingInterval > 0)
                                                DoInboxPoll();    // let's
check right away
                                    giInboxPollId =
self.setInterval(DoInboxPoll, iPollingInterval*60000);      //  and start
the polling
                              }

                              // Check for new inbox data
                              function DoInboxPoll()
                              {
                                    var sUrl;

                                    sUrl = "/BrowserLiaison.mmm?
&Action=doreadsummary&UsageReq=PollReq&UsageRep=PollRep&cacheKey=inbox&refresh=true&moduleId=ciws.InboxModuleHome&InboxId

" + top.frames['scripts'].goModuleData['Inbox'].gsPollInboxId + "
&LastSearchTime=" + top.frames['scripts'].goModuleData
['Inbox'].gsLastSearchGMTime;
                                    top.frames
["inboxpoll"].document.location.replace(sUrl);
                              }

                              // Callback from DoInboxPoll()
                              function
DoInboxPollCallback(iNewEvents,sLastSearchTime)
                              {
                                    //alert("DoInboxPollCallback: " +
iNewEvents);
                                    if (iNewEvents > 0)
                                          ShowNewDataMsg(true);
                              }

                              function StopInboxPolling()
                              {
                                    self.clearInterval(giInboxPollId);
                              }


                              function ShowNewDataMsg(bShow)
                              {

                                    if (gbAuthenticateOnly == true)
                                    {
                                                var aParams = [bShow];
                                                CallCW
("WebNewData",aParams);
                                    }

                                    top.frames
["InboxMsg"].ShowInboxMsg(bShow);
                              }

/*                            function setupMenus()
                              {
                                    var menusFrame = top.frames['menus'];
                                    if ("complete" ==
menusFrame.readyState)
                                    {
                                          if (-1 != startupId)
                                                clearInterval(startupId);
                                          var clinicalModules = new Array
();
                                          var patientModules = new Array();
                                          var anchors =
document.getElementsByTagName("a");
                                          for (var i=0; i<anchors.length;
i++)
                                          {
                                                var anchor = anchors[i];
                                                if (-1 != anchor.id.index("
_lnk"))
                                                {
                                                      var childNode =
anchor.firstChild;
                                                      if (Node.TEXT_NODE
== childNode.nodeType)
                                                      {
                                                            var nodeObj =
new Object();
                                                            nodeObj.name =
childNode.nodeValue;
                                                            nodeObj.id =
anchor.id;
                                                            if
("PatientSearch" != anchor.name &&

"PatientList" != anchor.name &&

"ClinicSchedule" != anchor.name)

clinicalModules.push(nodeObj);
                                                            else

patientModules.push(nodeObj);
                                                      }
                                                }
                                          }

menusFrame.clinicalModules(clinicalModules);

menusFrame.patientModules(patientModules);
                                    }
                              } */

                              function slideIn()
                              {
                                    var menuDiv = document.getElementById
("nonPatientModules");
                                    if (null == menuDiv) menuDiv =
document.getElementById("patientModules");
                                    functions.setCSS(menuDiv,
"display:none");

functions.setCSS(document.getElementById("IDOpenMenuDiv"),
"visibility:visible");

functions.setCSS(document.getElementById("IDCloseMenuDiv"),
"visibility:hidden");
                                    saveMenuState(false);
                              }

                              function slideOut()
                              {
                                    var menuDiv = document.getElementById
("nonPatientModules");
                                    if (null == menuDiv) menuDiv =
document.getElementById("patientModules");
                                    functions.setCSS(menuDiv,
"display:block");

functions.setCSS(document.getElementById("IDCloseMenuDiv"),
"visibility:visible");

functions.setCSS(document.getElementById("IDOpenMenuDiv"),
"visibility:hidden");
                                    saveMenuState(true);
                              }

                              function saveMenuState(state)
                              {
                                    // This is a toggle so if it is
currently none, it will
                                    // become inline, meaning that it is
turned on.
                                    if ((top.menuAlwaysShowing = state))
                                    {
                                          // Show Icons & Text
                                          var nextYear = new Date();

nextYear.setFullYear(nextYear.getFullYear()+1);
                                          document.cookie
= "3MCI_MenuAlwaysShowing=1; expires=" + nextYear.toUTCString();
                                    }
                                    else
                                    {
                                          // Show Icons Only
                                          var nextYear = new Date();

nextYear.setFullYear(nextYear.getFullYear()-1);
                                          document.cookie
= "3MCI_MenuAlwaysShowing=0; expires=" + nextYear.toUTCString();
                                    }
                              }

                              function testComplete(testWin, funcToCall)
                              {
                                    if ("complete" ==
testWin.document.readyState &&
                                                "complete" == top.frames
['scripts'].document.readyState &&
                                                "complete" == top.frames
['PatientIdLine'].document.readyState)
                                    {
                                          clearInterval(initId);
                                          funcToCall();
                                    }
                              }





                        /*
                        *Function Name:         DoCWLiaison
                        *
                        *Parameters: none
                        *
                        *Description:  This function is used to communicate
between thick CW and the Web module.
                        *                                               It
is attached to a local <div> onclick event.  The caller sets attributes on
the
                        *                                               div
to pass function call information.  If the caller is CW, the function is
dispatched
                        *
here.
        *
                        *Returns:         If caller is CW, returns the
whatever is returned from the function call thru
                        *                                               the
event.returnValue property.
                        *
                        */
                              function DoCWLiaison()
                              {
                                    var elCWDiv;      // the div that got
the event
                                    var sSource;            // called from
'cw' or 'web'
                                    var sFunction;    // function to call
                                    var sParams;      // params to pass
                                    var iParamCount;        //


                                    elCWDiv = event.srcElement;

                                    sSource = elCWDiv.getAttribute
("source");

                                    if (sSource == null)
                                    {
                                          alert("Error:  DoCWLiaison called
without source");
                                          return;
                                    }

                                    sFunction = elCWDiv.getAttribute
("function");
                                    if (sFunction  == null )
                                    {
                                          alert("Error:  DoCWLiaison called
without function");
                                          return;
                                    }


                                    // if sSource is from CW, we evaluate
the function here.  If it's from Web, we just return.
                                    if (sSource == "cw")
                                    {

                                          sParams = elCWDiv.getAttribute
("params");

                                          if (sParams == null )
                                                      sParams ="()";

                                          event.returnValue =
eval(sFunction +  sParams);
                                    }
                                    else if (sSource != "web")          //
validate the source, not that it matters much
                                          alert("Error: invalid source set
for DoCWLiaison");

                              }

                              /*
                              *Function Name:         CallCW
                              *
                              *Parameters:
                              *
sFunction - function name for CW to 'CallByName'
                              *
asParams - an array of params to pass to sFunction, may be null
                              *
                              * Description:  This function is for Web
modules to make calls out to thick CW.
                              *
                  The CW module will use CallByName to call the specified
'sFunction'
                              *
                  with the specified 'asParams'.  This function will click
the CWLiaison
                              *
            div, which is hooked to the DoCWLiaison() here, which causes
                              *
            the mdocToolbar_onclick() event to fire in the CW Module.
                              *
                              *Returns: nothing
                              *
                              */
                              function CallCW(sFunction, asParams)
                              {
                                    var elDivCWLiaison;
                                    var iParamCount = 0;

                                    if (sFunction == null)
                                    {
                                          alert("Error: CallCW called with
no function");
                                          return;
                                    }

                                    if (asParams == null)
                                          iParamCount = 0
                                    else
                                    {
                                          if ((typeof asParams) !
= "object")
                                          {
                                                alert("Error in CallCW:
asParams must be an array");
                                                return;
                                          }
                                          iParamCount = asParams.length;

                                    }

                                    elDivCWLiaison =
document.getElementById("CWLiaison");

                                    elDivCWLiaison.clearAttributes();
                                    elDivCWLiaison.setAttribute("source",
"web");
                                    elDivCWLiaison.setAttribute
("function",sFunction);
                                    elDivCWLiaison.setAttribute
("param_count", iParamCount);
                                    for (i=0; i<iParamCount; i++)
                                          elDivCWLiaison.setAttribute
("param" + i, asParams[i]);


                                    elDivCWLiaison.click();

                              }

                              // Called by thick CW.  Calls the module's
shutdown() function, if present.
                              function CWShutDown()
                              {

                                    if (null != dataArea && 0 !=
dataArea.frames.length)
                                    {
                                                var frameObj =
dataArea.frames[0];

                                                if (frameObj.shutdown !=
null)
                                                            return
frameObj.shutdown(true);
                                                else
                                                            return
functions.READY;

                                    }
                                    else
                                                return functions.READY;
                              }

                              // Called by thick CW.  Used to do other
processing for Inbox.
                              function CWOpenModule(sModname, sModhref)
                              {
                                    openModule(sModname,sModhref);
                              }

                              // Called by thick CW.  Calls the module's
refreshModule() function.
                              function CWRefresh()
                              {
                                          top.frames
["menuFrame"].refreshCurrent();
                              }

                              // Called by thick CW.  Calls the module's
showProperties function.
                              function CWProperties(bCalledByDesigner)
                              {
                                                // there should only be one
frame here
                                          if (null != dataArea && 0 !=
dataArea.frames.length)
                                          {
                                                      var frameObj =
dataArea.frames[0];

                                                      if
(frameObj.showProperties)

frameObj.showProperties(bCalledByDesigner);

                                          }
                                          else
                                                      alert("Error:
CWProperties - no dataArea frame");

                              }

                              // called by thick CW to update the inbox
polling LastSearchTime.  This
                              // is called by Inbox in Summary mode, since
it runs in a different instance
                              // of the WebBrowser than the polling module.
                              function CWUpLastSearchTime(sLastSearchTime)
                              {
                                    top.frames['scripts'].goModuleData
['Inbox'].gsLastSearchGMTime = sLastSearchTime;
                              }

                              function init()
                              {
                                    var pingMsec = 0;
                                    var pingInterval = 45;

                                    functions.setCSS(document.body,
"cursor:wait");
                                    // startupId = setInterval("setupMenus
()", 1000);
                                    core = ((null==top.opener ||
"CareInnovation" == top.self.name) ? top : top.opener.top);
                                    functions = core.frames['scripts'];
                                    toolbar = core.frames['Toolbar'];

functions.setCSS(document.getElementById("patientModules"),
"display:none;visibility:show");

functions.setCSS(document.getElementById("idLarr"), "visibility");

functions.setCSS(document.getElementById("idRarr"), "visibility");
                                    if (!top.menuAlwaysShowing &&
gbAuthenticateOnly == false)
                                          top.slideIn();

functions.setCSS(top.document.getElementById("menuFrameset"),
"cursor:default");
                                    functions.setCSS(document.body,
"cursor:default");
                                    document.getElementById
("loading").disabled = true;
                                    ]]>
                                          <xsl:if test
="$OSHProfile/Web_Ping_Interval/PingMinutes/field">
                                                <![CDATA[pingInterval
=]]><xsl:value-of select
="$OSHProfile/Web_Ping_Interval/PingMinutes/field"/><![CDATA[;]]>
                                          </xsl:if>
                                    <![CDATA[
                                    if (pingInterval == null ||
pingInterval <= 0)
                                    {
                                          pingInterval = 45;
                                    }
                                    pingMsec = pingInterval * 60 * 1000;
                                    gbPingID = setInterval ("pingWeb()",
pingMsec);
                              }]]>
                        </script>
                  </head>
                  <body scroll="no" oncontextmenu="return false;"
background="/3MCI_static/images/patternbkg.gif" onload="initId=setInterval
('testComplete(top, init)', 100);" style
="cursor:wait;margin-left:1;margin-top:1" onunload
="clearInterval(gbPingID)">
                        <xsl:call-template name="BodyAttributes"/>

                        <!-- See if the have rights to inbox module -->
                        <!-- xsl:variable name="IncludeInbox" select
="$OSHProfile/selected_applications/*/field='MMMHISInbox.Inbox'"/ -->
                        <xsl:variable name="IncludeInbox" select="false
()"/>
                        <xsl:if test='$authenticateOnly=true()'>
                                    <script type="text/javascript">
<![CDATA[gbAuthenticateOnly = true;]]></script>
                        </xsl:if>
                        <xsl:variable name="IncludeSummary" select
="$OSHProfile/summary/patient/field='ON' and number
($OSHProfile/selected_applications/numitems/field)>1"/>
                        <xsl:if test='$IncludeSummary=true()'>
                                    <script type="text/javascript">
<![CDATA[gbIncludeSummary = true;]]></script>
                        </xsl:if>
                        <a name="noPatient"/>
                        <!--  This Div is used to interface to the THICK
client CW -->
                        <div name="CWLiaison" id="CWLiaison" onclick
="DoCWLiaison()" style="display:none"/>
                        <div name="nonPatientModules" id
="nonPatientModules" style
="top:0;left:0;position:relative;overflow:auto;width:105%;height:expression
((document.body.clientHeight-30))">
                              <!-- this table displays the actual toolbar
-->
                              <table border="0" cellpadding="0" cellspacing
="6">
                                    <xsl:if test="$authenticateOnly=false
()">
                                          <xsl:for-each select
="CiwsInfo/Module/Item">
                                                <xsl:if
                                                      test
="$OSHProfile/selected_applications/*/field=ModuleObject or ModuleObject
='Always' or (ModuleObject='Summary' and $IncludeSummary)">
                                                      <xsl:variable name
="ModName"><xsl:value-of select="ModuleName"/></xsl:variable>
                                                      <xsl:variable name
="ModHref"><xsl:value-of select="ModuleHref"/></xsl:variable>
                                                      <xsl:variable name
="ModImg"><xsl:value-of select="ModuleImg"/></xsl:variable>
                                                      <xsl:variable name
="Target"><xsl:if test="$ModHref!='
#noPatient'">DataArea</xsl:if></xsl:variable>
                                                      <tr>
                                                      <td style
="background-image:/3MCI_static/images/patternbkg.gif;" align="left" valign
="middle">
                                                            <a name="
{$ModName}" id="{$ModName}_img" target="_self">

<xsl:attribute name="onClick">

<xsl:call-template name="LinkAttribute">

<xsl:with-param name="ModHref" select="$ModHref"/>

<xsl:with-param name="ModName" select="$ModName"/>

</xsl:call-template>

</xsl:attribute>

<xsl:call-template name="LinkHref"><xsl:with-param name="ModHref" select
="$ModHref"/></xsl:call-template>
                                                                  <img src
="{$ModImg}" width="16" height="16" border="0" alt="{$ModName}"/>
                                                            </a></td>
                                                      <td style
="background-image:/3MCI_static/images/patternbkg.gif;" align="left" valign
="middle" nowrap="">
                                                            <a name="
{$ModName}" id="{$ModName}_lnk" target="_self">

<xsl:attribute name="onClick">

<xsl:call-template name="LinkAttribute">

<xsl:with-param name="ModHref" select="$ModHref"/>

<xsl:with-param name="ModName" select="$ModName"/>

</xsl:call-template>

</xsl:attribute>

<xsl:call-template name="LinkHref">

<xsl:with-param name="ModHref" select="$ModHref"/>

<xsl:with-param name="ModName" select="$ModName"/>

</xsl:call-template>

<xsl:value-of select="ModuleLink"/>
                                                            </a></td>
                                                      </tr>
                                                </xsl:if>
                                          </xsl:for-each>
                                    </xsl:if>
                                    <tr>
                                          <td><xsl:text>
&#160;</xsl:text></td>
                                          <td><xsl:text>
&#160;</xsl:text></td>
                                    </tr>
                                    <tr>
                                          <td><xsl:text>
&#160;</xsl:text></td>
                                          <td><a id="Logout" name="Logout"
href="#Logout" onClick="javascript:goodNightGracie();">Logout</a></td>
                                    </tr>
                              </table>
                        </div>

                        <div name="patientModules" id="patientModules"
style
="visibility:hidden;top:0;left:0;position:relative;overflow:auto;width:105%;height:expression

(document.body.clientHeight-30))">
                        <!-- this table displays the actual toolbar -->
                        <table border="0" cellpadding="0" cellspacing="6">
                              <xsl:if test="$authenticateOnly=false()">
                                          <xsl:for-each select
="$toolbar/CiwsInfo/Module/Item">
                                                <xsl:if
                                                      test
="$OSHProfile/selected_applications/*/field=ModuleObject or ModuleObject
='Always' or (ModuleObject='Summary' and $IncludeSummary)">
                                                      <xsl:variable name
="ModName"><xsl:value-of select="ModuleName"/></xsl:variable>
                                                      <xsl:variable name
="ModHref"><xsl:value-of select="ModuleHref"/></xsl:variable>
                                                      <xsl:variable name
="ModImg"><xsl:value-of select="ModuleImg"/></xsl:variable>
                                                      <xsl:variable name
="Target"><xsl:if test="$ModHref!='
#noPatient'">DataArea</xsl:if></xsl:variable>
                                                      <tr>
                                                      <td style
="background-image:/3MCI_static/images/patternbkg.gif;" align="left" valign
="middle">
                                                            <a name="
{$ModName}" id="{$ModName}_img" target="_self">

<xsl:attribute name="onClick">

<xsl:call-template name="LinkAttribute">

<xsl:with-param name="ModHref" select="$ModHref"/>

<xsl:with-param name="ModName" select="$ModName"/>

</xsl:call-template>

</xsl:attribute>

<xsl:call-template name="LinkHref"><xsl:with-param name="ModHref" select
="$ModHref"/></xsl:call-template>
                                                                  <img src
="{$ModImg}" width="16" height="16" border="0" alt="{$ModName}"/>
                                                            </a></td>
                                                      <td style
="background-image:/3MCI_static/images/patternbkg.gif;" align="left" valign
="middle" nowrap="">
                                                            <a name="
{$ModName}" id="{$ModName}_lnk" target="_self">

<xsl:attribute name="onClick">

<xsl:call-template name="LinkAttribute">

<xsl:with-param name="ModHref" select="$ModHref"/>

<xsl:with-param name="ModName" select="$ModName"/>

</xsl:call-template>

</xsl:attribute>

<xsl:call-template name="LinkHref">

<xsl:with-param name="ModHref" select="$ModHref"/>

<xsl:with-param name="ModName" select="$ModName"/>

</xsl:call-template>

<xsl:value-of select="ModuleLink"/>
                                                            </a></td>
                                                      </tr>
                                                </xsl:if>
                                          </xsl:for-each>
                                    </xsl:if>
                              <tr>
                                    <td><xsl:text>&#160;</xsl:text></td>
                                    <td><xsl:text>&#160;</xsl:text></td>
                              </tr>
                              <tr>
                                    <td><xsl:text>&#160;</xsl:text></td>
                                    <td><a id="Logout" name="Logout" href="
#Logout" onClick="javascript:goodNightGracie();">Logout</a></td>
                              </tr>
                        </table>
                        </div>
                        <span id="IDOpenMenuDiv" style
="visibility:hidden;top:expression(document.body.clientHeight-(this.clientHeight));padding:3px;position:absolute;left:0;">
                              <div title="Icons &amp; Text" style
="border:2px solid #F5F5F5;cursor:hand" onmouseover="this.style.border='2px
outset lightgrey'" onmousedown="this.style.border='2px inset lightgrey'"
onmouseup="this.style.border='2px outset lightgrey'" onmouseout
="this.style.border='2px solid #F5F5F5'" onclick="top.slideOut()"><img src
="/3MCI_static/images/rightarrow.gif" style="visibility:hidden;" id
="idRarr"/></div>
                        </span>
                        <span id="IDCloseMenuDiv" style
="visibility:visible;top:expression(document.body.clientHeight-(this.clientHeight));padding:3px;position:absolute;left:0)">
                              <div title="Icons Only" style="border:2px
solid #F5F5F5;cursor:hand" onmouseover="this.style.border='2px outset
lightgrey'" onmousedown="this.style.border='2px inset lightgrey'" onmouseup
="this.style.border='2px outset lightgrey'" onmouseout="this.style.border
='2px solid #F5F5F5'" onclick="top.slideIn()"><img src
="/3MCI_static/images/leftarrow.gif" style="visibility:hidden;" id
="idLarr"/></div>
                        </span>
                        <!--span id="IDOpenMenuDiv" style
="visibility:hidden;top:expression(document.body.clientHeight-(this.clientHeight));padding:3px;position:absolute;left:0;">
                              <div title="Icons &amp; Text" style
="border:2px solid
#F5F5F5;font-family:sans-serif;cursor:hand;font-size:10pt;color:red;font-weight:bolder"

onmouseover="this.style.border='2px outset lightgrey'" onmousedown
="this.style.border='2px inset lightgrey';this.style.fontSize='9.5pt'"
onmouseup="this.style.border='2px outset lightgrey';this.style.fontSize
='10pt'" onmouseout="this.style.border='2px none #F5F5F5'" onclick
="top.slideOut()"><xsl:text disable-output-escaping="yes">&amp;
#9654;</xsl:text></div>
                        </span>
                        <span id="IDCloseMenuDiv" style
="visibility:visible;top:expression(document.body.clientHeight-(this.clientHeight));padding:3px;position:absolute;left:0)">
                              <div title="Icons Only" style="border:2px
solid
#F5F5F5;font-family:sans-serif;cursor:hand;font-size:10pt;color:red;font-weight:bolder"

onmouseover="this.style.border='2px outset lightgrey'" onmousedown
="this.style.border='2px inset lightgrey';this.style.fontSize='9.5pt'"
onmouseup="this.style.border='2px outset lightgrey';this.style.fontSize
='10pt'" onmouseout="this.style.border='2px none #F5F5F5'" onclick
="top.slideIn()"><xsl:text disable-output-escaping="yes">&amp;
#9664;</xsl:text></div>
                        </span-->
                        <!-- This code is time sensitive - it uses the
scratch frame which may not exist if this is moved up -->
                        <xsl:if test='$IncludeInbox=true()'>
                              <xsl:if test='$authenticateOnly=false()'>
                                    <script type="text/javascript">
<![CDATA[CheckInboxDef();]]></script>
                              </xsl:if>
                        </xsl:if>
                  </body>
            </html>
      </xsl:template>

      <xsl:template name="LinkHref">
            <xsl:param name="ModHref"/>
            <xsl:param name="ModName"/>
            <xsl:if test="$ModHref!='#noPatient'">
                  <xsl:attribute name="href"><![CDATA[#]]><xsl:value-of
select="$ModName"/></xsl:attribute>
            </xsl:if>
      </xsl:template>

      <xsl:template name="LinkAttribute">
            <xsl:param name="ModHref"/>
            <xsl:param name="ModName"/>
            <xsl:choose>
                  <xsl:when test="$ModHref='#noPatient'">
                        <xsl:text>javascript:alert('You must first select a
patient.')</xsl:text>
                  </xsl:when>
                  <xsl:otherwise>
                        <xsl:text/><![CDATA[javascript:openModule
(']]><xsl:value-of select="$ModName"/>', '<xsl:value-of select
="$ModHref"/><xsl:text/><![CDATA[')]]><xsl:text/>
                  </xsl:otherwise>
            </xsl:choose>
      </xsl:template>
</xsl:stylesheet>

Reply via email to