<!--//

/*

The script first check to make sure we are not in DryDock.  
This prevents the page from being forced into frames when
viewed view 'Preview' in DryDock.  The script then check to 
see if frames are loaded.  If the page is being viewed out of
the standard frameset, the page is passed to a CGI script
that forces the page into frames.  Once frames are verified,
the script checks to see if it is running from the navigation 
or from the content.  If the script is run via a navigation page,
the script quits.  If the script is run via the content page, the
script takes the necessary steps to check if the correct left
and top navigations are loaded.  If the aren't, the script 
corrects that.

*/

function CheckFrames(topNav,leftNav){
   if (top.window.location.pathname != "/drydock/drydock.cgi"){
      // we are not in drydock - lets check to see if the page is out of frames
      if (self.location == top.location){
            // the page is out of frames - lets pass the page to a script that will put it into the required frames
            top.location = "/frameset.cgi?winLocation=" + self.location;
      }
      else{
         // we are in frames - let check to make sure this is the main content page
         if (self.location == top.main.location){
            // this is the main content window - lets check to see if the top nav is correct
            if (top.header.location.pathname != topNav){
               // the top navigation is wrong - lets replace the top nav with the correct page
               top.header.location = topNav;
            }
            // lets check to see if the left nav is correct
            if (top.leftnav.location.pathname != leftNav){
               // the left navigation is wrong - lets replace the left nav with the correct page
               top.leftnav.location = leftNav;
            }
         }
      }
   }
}

//-->