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 initopen(stretcher){
	var stretchers = document.getElementsByClassName('stretcher');
	var toggles = document.getElementsByClassName('titremenu');
	var myAccordion = new fx.Accordion(
		toggles, stretchers, {opacity: true, duration: 500,  defaultStretcher: stretcher}
	);
}

function init(){
	var stretchers = document.getElementsByClassName('stretcher');
	var toggles = document.getElementsByClassName('titremenu');
	var myAccordion = new fx.Accordion(
		toggles, stretchers, {opacity: true, duration: 500}
	);
}

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

function page(rub) {
	new Ajax.Updater('page', 'index.php', {parameters:'categorie=' + encodeURIComponent(rub), 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 afficheZoom(id){
	document.getElementById(id).style.display = "";
}

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');
}
function close_window(id){
	document.getElementById(id).style.display = "none";
}
