/*********************************************************************

Function: frameCheck

**********************************************************************

Checks if current page is inside a frame. If it is not, then check to
see if a search parameter was passed to the page:
  a) if no parameter, load the dynamic frame page (dyn_frm.htm)
     and pass it the current page name
  b) if a parameter was passed, then reset the class of the 
     body and main page division -- this allows for 
     applying styles for the noframes version

© Crossroads Solutions, Inc. (www.crossroads-solutions.com)

**********************************************************************

Call syntax:
  frameCheck()

Notes: 

*********************************************************************/

function frameCheck() {
  if (window == top) { 
    if (!location.search) {
      top.location.replace("dyn_frm.htm?" + location.href);
    } else {
      if (location.search == "?noframe") {
        if (document.getElementById("bodyPageId"))
          document.getElementById("bodyPageId").className="bodyPageNoF";
        if (document.getElementById("bodyDivId"))
          document.getElementById("bodyDivId").className="bodyDivNoF";
        if (document.getElementById("footDivId"))
          document.getElementById("footDivId").className="footDivNoF";
      }
    }
  }
}

