function cellFocused(cell)
{
  cell.style.color = 'yellow';
}

function cellUnFocused(cell)
{
  cell.style.color = '#FFFFFF';
}

function openImageWindow(theURL,winName,features)
{
  window.open(theURL,winName,features);
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function stateChangedAfter() 
{ 
if (xmlHttp.readyState==4)
{ 
//document.write(xmlHttp.responseText); //getElementById("header").innerHTML=xmlHttp.responseText;


	if ( document.body.insertAdjacentHTML )
	{
		document.body.insertAdjacentHTML('AfterBegin', xmlHttp.responseText);
	}
	else
	{
		var r = document.createRange();
		r.setStartBefore(document.body);

		var parsedHTML = r.createContextualFragment(xmlHttp.responseText);

		document.body.insertBefore(parsedHTML, document.body.firstChild);
	}

}
}

function stateChangedBefore() 
{ 
if (xmlHttp.readyState==4)
{ 
//document.write(xmlHttp.responseText); //getElementById("header").innerHTML=xmlHttp.responseText;


	if ( document.body.insertAdjacentHTML )
	{
         
		document.body.insertAdjacentHTML('BeforeEnd', xmlHttp.responseText);
	}
	else
	{
		var r = document.createRange();
		r.setStartBefore(document.body);

		var parsedHTML = r.createContextualFragment(xmlHttp.responseText);

		document.body.insertBefore(parsedHTML, document.body.firstChild);
	}

}
}

function loadHttpAfter(str)
{
if (str.length==0)
  { 
  return;
  }
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url=str;
url=url+"?sid="+Math.random();
xmlHttp.onreadystatechange=stateChangedAfter;
xmlHttp.open("GET",url,false);
xmlHttp.send(null);
}

function loadHttpBefore(str)
{
if (str.length==0)
  { 
  return;
  }
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url=str;
url=url+"?sid="+Math.random();
xmlHttp.onreadystatechange=stateChangedBefore;
xmlHttp.open("GET",url,false);
xmlHttp.send(null);
}

function loadHeaderFooter() {
loadHttpAfter("header.htm");
loadHttpBefore("footer.htm");
}