// functions SET coordonnées et taille
	function sX(o,x) {o.style.left=x+'px';}
	function sY(o,x) {o.style.top=x+'px';}
	function sW(o,w) {o.style.width=x+'px';}
	function sH(o,h) {o.style.height=x+'px';}
	function sC(o,x,y) {sX(o,x);sY(o,x);}
	function sL(o,l,x,y){var c= gC(o);sC(l,c[0]+x,c[1]+y);}

// functions GET coordonnées et taille
	function gX(o) {return (o.offsetParent)?(o.offsetLeft+gX(o.offsetParent)):o.offsetLeft;}
	function gYs(obj)
	{
		var curtop = 0;
		if (obj.offsetParent) {while (obj.offsetParent) {curtop += obj.offsetTop;obj = obj.offsetParent;}}
		else if (obj.y) curtop += obj.y;
		return curtop;
	}
	function gY(o) {return (o)?o.offsetTop:false;}
	function gW(o) {return (o)?o.offsetWidth:false;}
	function gH(o) {return (o)?o.offsetHeight:false;}
	function gC(o) {return [gX(o), gY(o)]}
	function gWH() {
		var wH = 0;
		if (typeof(window.innerHeight) == 'number') {wH = window.innerHeight;}
		else if (document.documentElement && document.documentElement.clientHeight) {wH = document.documentElement.clientHeight;}
		else if (document.body && document.body.clientHeight) {wH = document.body.clientHeight;}
		return wH;
	}

// functions elementaires
	function o0(a,o) {if (!o){o=document} return o.getElementById(a)}
	function t0(a,o) {if (!o){o=document} return o.getElementsByTagName(a)}

	function sA(o,a) {
		for( var k in a ) {if (typeof(a[k])=='object'){for(var p in a[k]){o[k][p]=a[k][p];}} else {o.setAttribute(k,a[k]);}}
		return o;
	}

	function oAp(o1,o2) {o1.appendChild(o2);}
	function oRm(o1,o2) {o1.removeChild(o2);}
	function rm(o) {oRm(o.parentNode,o);}

	function c(a) {return document.createElement(a)}
	function tag(a ,ar) {return sA(c(a),ar);}

// function de mise en page
	function af(a,o) {if (!o){o=document} if (o0(a,o)){o0(a,o).style.display=''}}
	function cl(a,o) {if (!o){o=document} if (o0(a,o)){o0(a,o).style.display='none'}}

	window.onload=function () {
		/*init_pointe();*/
	}

/*	window.oncontextmenu=function () {return false;}*/

	function init_pointe()
	{
		var menu=o0('menu');
		var d=t0('div',menu);
		if(o0('pointe')){rm(o0('pointe'));}
		if(o0('pointe2')){rm(o0('pointe2'));}
		for (var i=0;i<d.length;i++)
		{
			var div=d[i];
			if(div.className=="menu_on")
			{
				if(o0('ss_'+div.id))
				{
					var d2=tag('div');
					d2.id="pointe";
					d2.className="vpoint";
					oAp(d2,tag('img',{"src":"images/v2/vpointe.gif","alt":""}));
					o0('sous_menu').insertBefore(d2,o0('sous_menu_gauche'));
					sX(d2,gX(div)+gW(div)/2-7);
					af('ss_'+div.id);
				}
			}
			else
			{
				if(o0('ss_'+div.id))
				{
					div.onmouseover=function () {
						var a=t0("a",this);
						var b=t0("div",this.parentNode);
						this.style.backgroundImage="url('images/v2/menu_bande_on.png')";
						if(b[2]==this){
						b[0].style.backgroundImage="url('images/v2/menu_gauche_on.png')";
						}
						if(b[(b.length-1)]==this){
						b[1].style.backgroundImage="url('images/v2/menu_droite_on.png')";
						}

						a[0].style.color="#ffffff";

						window.clearTimeout(timer);
						r_ss_m();
						if(o0('pointe2')){rm(o0('pointe2'));}
						var d2=tag('div');
						d2.id="pointe2";
						d2.className="vpoint";
						oAp(d2,tag('img',{"src":"images/v2/vpointe.gif","alt":""}));
						o0('sous_menu').insertBefore(d2,o0('sous_menu_gauche'));
						sX(d2,gX(this)+gW(this)/2-7);
					}
					
					div.onmouseout=function () {
						this.style.backgroundImage="url('images/v2/menu_bande_off.png')";
						var a=t0("a",this);
						var b=t0("div",this.parentNode);
						if(b[2]==this){
							b[0].style.backgroundImage="url('images/v2/menu_gauche_off.png')";
						}
						if(b[(b.length-1)]==this){
						b[1].style.backgroundImage="url('images/v2/menu_droite_off.png')";
						}
						a[0].style.color="#434240";
						reinit();
					}
				}
			}
		}
		if(typeof main =="function"){main();}
	}

var timer;

function r_ss_m() {}
function reinit() {r_ss_m();init_pointe();}
