function zoom(id) {
		if(document.getElementById(id).style.display == "none") {
			document.getElementById(id).style.display = "";
		}
}

function close(id) {
		document.getElementById(id).style.display = "none";
}

function addToFavorites() {
	if (document.all) { window.external.AddFavorite(location.href, document.title); }
	else { alert('Vous pouvez faire CTRL + D pour ajouter cette page dans vos signets, ou favoris.') }
}

function opacity(id,opc) {
	document.getElementById(id).style.filter = "alpha(Opacity="+opc+")";
	document.getElementById(id).style.opacity = opc/100;
}

function page(cat) {
	new Ajax.Updater('page', 'index.php', {parameters:'categorie=' + encodeURIComponent(cat), asynchronous:true, evalScripts:true});
}

function retour() {
	history.go(-1);	
}

function qte_moins(champ) {
	champ2 = champ + "_2";
	qte = document.getElementById(champ).value;
	document.getElementById(champ).value = Number(qte) - 1;
	document.getElementById(champ2).value = Number(qte) - 1;
	frmsubmit('recalc');
}

function qte_plus(champ) {
	champ2 = champ + "_2";
	qte = document.getElementById(champ).value;
	document.getElementById(champ).value = Number(qte) + 1;
	document.getElementById(champ2).value = Number(qte) + 1;
	frmsubmit('recalc');
}

function OpenWin(URL,width,height,nom) {
	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=no");
}

function OpenWin2(URL,width,height,nom) {
	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=yes");
}

function DisplayZoomPopUp(url) {
	window.open(url,'Zoom','height=500,width=500,left=0,top=0,scrollbars=yes');
}