//trap onload event
window.onload = function () {
	//Determine browser, we only need this for Internet Explorer
	if (navigator.appName == "Microsoft Internet Explorer") {
		//Array of elements to be replaced
		var arrElements = new Array(3);
		arrElements[0] = "object";
		arrElements[1] = "embed";
		arrElements[2] = "applet";
		
		//Loop over element types
		for (n = 0; n < arrElements.length; n++) {		
			//set object for brevity
			replaceObj = document.getElementsByTagName(arrElements[n]);

			//loop over element objects returned
			for (i = 0; i < replaceObj.length; i++ ) {
				//set parent object for brevity
				parentObj = replaceObj[i].parentNode;

				//grab the html inside of the element before removing it from the DOM
				newHTML = parentObj.innerHTML;

				//remove element from the DOM
				parentObj.removeChild(replaceObj[i]);

				//stick the element right back in, but as a new object
				parentObj.innerHTML = newHTML;
			}
		}
	}
}

function masquer() {
	//alert(navigator.appName);
	/*
	if(!window.ie) {
		var div_test = $('test'); 												//On récupère la balise portant l'id test
		var body = document.getElementsByTagName('body')[0];					//On récupère la balise BODY 	
		var fx = new Fx.Styles(div_test, {duration: 1000, wait: false}); 		//On défini où l'effet de transition s'applique et sur quelle durée 

		fx.options.transition = Fx.Transitions['Bounce']['easeOut'];			//On définie la variable de transition (en fonction du type de transition et de son option) 
		fx.options.duration = parseFloat('1000');								//On définie la variable de durée de la transition

		if(document.getElementById('test').style.left == '0px') {
			fx.start(
			{																	//On lance la transition
				'left': [body.getLeft() - 286]									//Jusqu'à la colonne de pixels du pointeur de  la souris -25 (surement la moitié de la taille du carré)
			});
		}
		else {
			fx.start(
			{																	//On lance la transition
				'left': [body.getLeft()]										//Jusqu'à la colonne de pixels du pointeur de  la souris -25 (surement la moitié de la taille du carré)
			});
		}
	}
	else {
		if(document.getElementById('test').style.left == '0px') {
			document.getElementById('test').style.left = '-286px';
		}
		else {
			document.getElementById('test').style.left = '0px';
		}
	}
	*/
	//alert('lol');
	
	//La ligne ci-dessous marche avec IE6, IE7 et Firefox mais pas Opera ni Safari
	window.open('http://www.tatoographic.fr/video.html', '', 'resizable=no, location=no, width=499, height=411, menubar=no, status=no, scrollbars=no, menubar=no');	
}

function masquerProduits(unID, uneMethode, unBoutonMore, unBoutonLess) {
	//alert (unID);
	//alert (uneMethode);
	//alert (unBoutonMore);
	//alert (unBoutonLess);
	
	if (uneMethode == 'more') {
		document.getElementById(unID).style.display = 'block';
		document.getElementById(unBoutonMore).style.display = 'none';
		document.getElementById(unBoutonLess).style.display = 'inline';
		if(!window.ie && document.getElementById(unID).style.left == '-1000px')
		{
			document.getElementById(unID).style.left = '0px';
		}
	}
	else {
		document.getElementById(unID).style.display = 'none';
		document.getElementById(unBoutonMore).style.display = 'inline';
		document.getElementById(unBoutonLess).style.display = 'none';
		if(!window.ie)
		{
			document.getElementById(unID).style.left = '-1000px';
		}
	}
}