/*	Tools		*/


/*	Les pop up	*/

function pop_glossaire(url_page)
{
	page = window.open(url_page, 'pop_glossaire', 'height=500, width=540, top=100, left=200, toolbar=no, menubar=no, location=no, resizable=no, scrollbars=no, status=yes');
	page.focus();
	return false;
}

function pop_liens(url_page)
{
	page = window.open(url_page, 'pop_liens', 'height=500, width=540, top=100, left=200, toolbar=no, menubar=no, location=no, resizable=no, scrollbars=no, status=yes');
	page.focus();
	return false;
}

function pop_film(url_page)
{
	window.open(url_page, 'pop_film', 'height=400, width=650, top=100, left=200, toolbar=yes, menubar=no, location=no, resizable=yes, scrollbars=no, status=yes').focus(); return false;
}

function pop_decorateur(url_page)
{
	window.open(url_page, 'pop_decorateur', 'height=545, width=895, top=100, left=200, toolbar=no, menubar=no, location=no, resizable=yes, scrollbars=no, status=no').focus(); return false;
}


/*	on/off		*/

function show_note(lien, position, position_top, width)
{
	spans = lien.getElementsByTagName('span');
	if (spans.length == 0)
		return;
	spans[0].style.display = 'block';
	spans[0].style.left = position+'px';
	spans[0].style.top = position_top+'px';
	spans[0].style.width = width+'px';

}

function hidde_note(lien)
{
	spans = lien.getElementsByTagName('span');
	if (spans.length == 0)
		return;
	spans[0].style.display = 'none';
}

function show(zoom)
{
	document.getElementById(zoom).style.display = 'block';
}

function hidde(zoom)
{
	document.getElementById(zoom).style.display = 'none';
}

function handler_change_color(terme)
{
	tab_a = document.getElementById('change_color').getElementsByTagName('a');
	for (i in tab_a)
		tab_a[i].className = "off";

	terme.className = "on";
}

function handler_load_change_color()
{
	term_name = document.location.href.split('#')[1];
	tab_a = document.getElementById('change_color').getElementsByTagName('a');
	for (i in tab_a)
	{
		// IE6: Le premier enregistrement correspond au nombre d'enregistrement...
		// On aura tout vu...
		if (typeof(tab_a[i].href) == 'undefined')
			continue;

		if (tab_a[i].href.split('#')[1] == term_name)
			return handler_change_color(tab_a[i]);
	}
}