function inFrame(masterPage)
{
	if (frames.name!='contentFrame')
	{
	var sPath = window.location.pathname;
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
		window.name='pid=' + sPage;
		window.location=masterPage;
	}
}

function inFrame2(masterPage)
{
	var sPath = parent['contentFrame'].location.pathname;
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
		window.name='pid=' + sPage;
		window.location=masterPage;
}

function fillMenu(navigationObj) {
    var navigationTarget = document.getElementById('jjnavigation');
    // clear existing content 
    navigationTarget.innerHTML = "";
    // set new content
	navigationTarget.innerHTML = navigationObj;
}

function fillLeftColumn(leftColumnObj) {
    var leftColumnTarget = document.getElementById('jjleftcolumn');
    // set new content
	leftColumnTarget.innerHTML = leftColumnObj;
}

function loadNavigation(siteMap) {
	if (siteMap != undefined) {
        // get the requested sitemap
        httpRequest(siteMap + '.html', fillMenu);
    } else {
        // get default sitemap
		httpRequest('sitemap.html', fillMenu);
    }
}

function loadLeftColumn(leftColumn) {
	if (leftColumn != undefined) {
        // get the requested left column
        httpRequest(leftColumn + '.html', fillLeftColumn);
    } else {
        // get default left column
		httpRequest('leftcolumn.html', fillLeftColumn);
    }
}

function calcHeight(frameId)
{
  //find the height of the internal page
  var the_height=
    document.getElementById(frameId).contentWindow.
      document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById(frameId).height=
      the_height + 2;
}

function minHeight(frameId)
{
//change the height of the iframe
  parent.document.getElementById(frameId).height=20;
}

function maxHeight(frameId)
{
  //find the height of the internal page
  var the_height=
    parent.document.getElementById(frameId).contentWindow.
      document.body.scrollHeight;

  //change the height of the iframe
  parent.document.getElementById(frameId).height=
      the_height;
}

