jQuery(document).ready(function(){
	jQuery(".MenuWebtv, .MenuWebtvOn, #webtv_lives").hover(function() { //Hover over event on list item
		jQuery("#webtv_lives").show(); //Show the subnav
	} , function() { //on hover out...
		jQuery("#webtv_lives").hide(); //Hide the subnav
	});

	jQuery('img').each(function() {
		jQuery('img').error(function() {
			jQuery(this).unbind("error").attr("src", "/img/aaa_image_cassee.png");
		});
		jQuery(this).attr("src", jQuery(this).attr("src"));
	});
	

});

/*	jQuery("img").error(function () {
		jQuery(this).attr("src", "/img/aaa_image_cassee.png");
//		jQuery(this).one("error").attr("src", "/img/aaa_image_cassee.png");
	});

	jQuery(window).bind("load", function() {
		jQuery('img').each(function() {
if ((typeof this.naturalWidth != "undefined" && this.naturalWidth == 0)
	|| this.readyState == 'uninitialized' ) 
			{
				jQuery(this).attr('src', '/img/aaa_image_cassee.png');
			}
		});
			});

*/
function multiClass(eltId) {
	arrLinkId = new Array('_0','_1','_2','_3','_4','_5');
	intNbLinkElt = new Number(arrLinkId.length);
	arrClassLink = new Array('current','ghost');
	strContent = new String()
	for (i=0; i<intNbLinkElt; i++) {
		strContent = "menu"+arrLinkId[i];
		if ( arrLinkId[i] == eltId ) {
			document.getElementById(arrLinkId[i]).className = arrClassLink[0];
			document.getElementById(strContent).className = 'on content';
		} else {
			document.getElementById(arrLinkId[i]).className = arrClassLink[1];
			document.getElementById(strContent).className = 'off content';
		}
	}	
}
function GetId(id)
{
	return document.getElementById(id);
}
var i = false;
function move(e){
	if (i)
	{
		if (navigator.appName!="Microsoft Internet Explorer")
		{
			GetId("curseur").style.left = e.pageX + 5 - 160 + "px";
			GetId("curseur").style.top = e.pageY + 10 + "px";
//			GetId("curseur").style.left = 0 + "px";
//			GetId("curseur").style.top = 0 + "px";
		}
		else
		{
//			if (document.documentElement.clientHeight > 0)
//			{
				GetId("curseur").style.left = 20 + event.x + document.body.scrollLeft+"px";
				GetId("curseur").style.top = 10 + event.y + document.body.scrollTop+"px";
/*			} else {
				GetId("curseur").style.left = 20 + event.x + document.body.scrollLeft+"px";
				GetId("curseur").style.top = 10 + event.y + document.body.scrollTop+"px";
			}*/
		}
	}
}
function montre(text) {
	if (i == false)
	
	{
		GetId("curseur").style.visibility="visible";
		GetId("curseur").innerHTML = text;
		i = true;
	}
}

function cache() {
	if (i==true)
	{
		GetId("curseur").style.visibility="hidden";
		i = false;
	}
}
document.onmousemove = move;

function btn_toggle(div_dest, div_source)
    {
    if (document.getElementById(div_dest).style.display=='block')
        {
        document.getElementById(div_dest).style.display='none';
        document.getElementById(div_source).src='/images/icones/plus.png';
        }
    else
        {
        document.getElementById(div_dest).style.display='block';
        document.getElementById(div_source).src='/images/icones/minus.png';
        }   
    }


