// Globals constant
menuTopLeft = 1;
menuBelow = 2;
//

var NavName=navigator.appName;
var NavVer=new String(navigator.appVersion);
var NavVersion=(NavVer.split(".")[0]);
var SubMenu=0;

function ShowMenu(Who)
{
	if(document.all){eval(Who+'.style.visibility="visible";');}
	else{eval("document.layers['"+Who+"'].visibility = 'show'");}
}

function Position()
{
	this.x = 0;
	this.y = 0;
}

function ComputePosition( o )
{
	if( o == null )
		return new Position();
	var result = ComputePosition( o.offsetParent );
	result.x += o.offsetLeft;
	result.y += o.offsetTop;
	return result;
}

function ShowMenuBy( opener, menu, where )
{
	if(document.all)
	{
		var posOpener = ComputePosition( opener );
		if( where == menuBelow )
			posOpener.y += opener.offsetHeight;
		else if( where == menuTopLeft )
			posOpener.x += opener.offsetWidth;
		eval( menu+'.style.top='+posOpener.y+';'+menu+'.style.left='+posOpener.x+';'+menu+'.style.visibility="visible";');
	}
	else document.layers[menu].visibility = 'show';
}

function inspect( o )
{
	var p = '';
	for( v in o )
		p += v + ": " + o[v] + ", ";
	alert( p );
}

function HiddenMenu(Who)
{
	if(document.all){eval(Who+'.style.visibility="hidden";');}
	else{eval("document.layers['"+Who+"'].visibility = 'hide'");}
}

function HiddenSubMenu(Who)
{
	if(SubMenu != 0){eval(Who+'.style.visibility="hidden";');SubMenu=0;}
	else{SubMenu=1;}
}

function RollCaseOn(WhatTD)
{eval(WhatTD+'.style.backgroundColor="#6699CC";')}

function RollCaseOff(WhatTD)
{eval(WhatTD+".style.backgroundColor='#006699';")}

function HideAllMenuTop( recurse )
{
	if( typeof(recurse) == 'undefined' )
		HideAllMenuLeft( 1 );
		
	if(document.all)
	{
		//Products.style.visibility="hidden";
		//RegionalEnergy.style.visibility="hidden";
		//Services.style.visibility="hidden";
		//About.style.visibility="hidden";
	}
	else
	{
		//document.layers['Products'].visibility = 'hide';
		//document.layers['RegionalEnergy'].visibility = 'hide';
		//document.layers['Services'].visibility = 'hide';
		//document.layers['About'].visibility = 'hide';
	}
}



function WriteMenu()
{
	//WriteProducts( 150, 32 );
	//WriteRegionalEnergy( 126, 277 );
	//WriteServices( 97, 212 );
	//WriteAbout( 97, 264 );
}


if(NavName!='Netscape') //&& NavVersion !=5
{
	WriteMenu();
	
	document.write('<TABLE BGCOLOR="#006699" BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>');
	document.write('<TR>');
	document.write('<TD><IMG SRC=/HMF/images/x.gif WIDTH=10 HEIGHT=22></TD>');
	document.write('<TD CLASS=Menu NOWRAP NOWRAP><A HREF="/index.html" OnMouseOver="HideAllMenuTop();"><SPAN CLASS=Menu ID="Menu01" OnMouseOver=RollCaseOn(\'Menu01\'); OnMouseOut=RollCaseOff(\'Menu01\');>Accueil</SPAN></A> | <A HREF="mailto:messagerie@hmf.fr" OnMouseOver="HideAllMenuTop();"><SPAN CLASS=Menu ID="Menu06" OnMouseOver=RollCaseOn(\'Menu06\'); OnMouseOut=RollCaseOff(\'Menu06\');>Contact</SPAN></A></TD>');
	document.write('<TD WIDTH=100%><IMG SRC=/HMF/images/x.gif WIDTH=1 HEIGHT=1></TD>');
	document.write('</TR>');
	document.write('</TABLE>');

	document.write('<TABLE OnMouseOver="HideAllMenuTop();" BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>');
	document.write('<TR VALIGN=TOP>');
	document.write('<TD BGCOLOR="#FFD400"><IMG WIDTH=100% HEIGHT=1 SRC=/HMF/images/x.gif></TD>');
	document.write('</TR>');
	document.write('</TABLE>');
}





