// JavaScript Document
var xmlHttp;

function sendInfos(page)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }

xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",page+'.html',true);
xmlHttp.send(null);
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("content").innerHTML=xmlHttp.responseText;
window.scroll(0,0);
}
}

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;
}

var submenu = null;
function expand(id)	{
	
	if (submenu == null)	{
		document.getElementById('submenu').style.display = 'block';
		document.getElementById(id).style.display = 'block';
		submenu = id;
		
		document.getElementById('content').style.marginLeft = '480px';
	}
	else if (submenu == id)	{
		document.getElementById('submenu').style.display = 'none';
		document.getElementById(id).style.display = 'none';	
		submenu = null;
		
		document.getElementById('content').style.marginLeft = '350px';
	}
	else	{
		document.getElementById(submenu).style.display = 'none';
		document.getElementById(id).style.display = 'block';
		submenu = id;
	}
	
}

function button_change(obj, button)	{
		obj.src = "menu_icon/" + button + ".png";
}

function size_change(maxi)	{
	if (maxi)
		document.getElementById('submenu').style.height = '417px';
	else
		document.getElementById('submenu').style.height = '40px';
}