// JavaScript Document

function initMenu()
{
	var tabId = new Array("btn-reno","btn-main","btn-depa","btn-form");
	var tabURL = new Array("mig-renovation-01.htm","mig-maintenance-01.htm","mig-depannage-sav-01.htm","mig-formation-01.htm");

	for( i=0; i<tabId.length; i++)
	{
		var btn = document.getElementById(tabId[i]);
		btn.url = tabURL[i];

		btn.onclick = function(){ document.location.href = this.url };

		if( btn.style.backgroundColor != 'rgb(102, 102, 102)' && btn.style.backgroundColor != '#666666' )
		//if( btn.style.backgroundColor == '' )
		{
			btn.onmouseover = function()
			{
				this.style.backgroundColor = '#B7B6B6';
				this.firstChild.style.color = '#666666';
			};

			btn.onmouseout = function()
			{
				this.style.backgroundColor = '#2f2e2e'
				this.firstChild.style.color = '#dcdcdc';
			};
		}
		else
		{
			btn.firstChild.style.color = '#ffffff';
		}
	}
}

function initMenuIndex()
{
	var tabId = new Array("btn-reno","btn-main","btn-depa","btn-form");
	var tabURL = new Array("mig-pages/mig-renovation-01.htm","mig-pages/mig-maintenance-01.htm","mig-pages/mig-depannage-sav-01.htm","mig-pages/mig-formation-01.htm");

	for( i=0; i<tabId.length; i++)
	{
		var btn = document.getElementById(tabId[i]);
		btn.url = tabURL[i];

		btn.onclick = function(){ document.location.href = this.url };

		if( btn.style.backgroundColor == '' )
		{
			btn.onmouseover = function()
			{
				this.style.backgroundColor = '#B7B6B6';
				this.firstChild.style.color = '#666666';
			};

			btn.onmouseout = function()
			{
				this.style.backgroundColor = '#2f2e2e'
				this.firstChild.style.color = '#dcdcdc';
			};
		}
	}
}
