function updateContant(thepage) {
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function() {
    if(xmlHttp.readyState==4)  {
	    if (xmlHttp.responseText != "")  {
		   var contentArea = document.getElementById('content');
		   var replaceWith = xmlHttp.responseText;
		   contentArea.innerHTML = replaceWith;
           document.body.setAttribute("class",document.body.getAttribute("class").replace(' wait',""));
	    }
    }	
  }
  document.body.setAttribute("class",document.body.getAttribute("class") + ' wait');
  xmlHttp.open("GET",thepage,true);
  xmlHttp.send(null);
}

function loadPage(thePage) {
	window.location.href = thePage;
}

function RemoveClass(tagObj,className)  {
	if (!tagObj) return;
	var StartClass =  tagObj.getAttribute("class");
	if (!StartClass) return;
	StartClass = StartClass.replace(className,"");
	tagObj.setAttribute("class",StartClass);
}

function AddClass(tagObj,className)  {
	if (!tagObj) return;
	var StartClass =  tagObj.getAttribute("class");
	if (!StartClass) StartClass = "";
	StartClass = StartClass.replace(className,"")+ " " + className;
	tagObj.setAttribute("class",StartClass);
}

var nested_selected = false;
function doHighlighlight(div)  {
	var divParent = div.parentNode;
	var parentArray = new Array();
	while (divParent && divParent.tagName == "DIV")  {
	  parentArray[parentArray.length] = divParent;
      RemoveClass(divParent,'AccordionPanelClosed');
      RemoveClass(divParent,'AccordionFocused');
	  divParent = divParent.parentNode;
	}
  AddClass(div.parentNode,'AccordionPanelOpen');
  if (nested_selected && nested_selected!=div) {
	  if (parentArray.indexOf(nested_selected.parentNode) == -1)  {
	    RemoveClass(nested_selected.parentNode,'AccordionPanelOpen');
        AddClass(nested_selected.parentNode,'AccordionPanelClosed');
	  }
  }
  nested_selected= div;
}


function doNestedHighlighlight(div)  {
	$$('.accordion dt').removeClass('selected');
	div.addClass('selected');
}

