/* MENU */var objMenu = null;var divMenu = null;var cacheMenu = null;function showMenu(obj,div) {	if (objMenu != null) {		objMenu.className = '';	}	if (divMenu != null) {		divMenu.style.display = 'none';	}			divMenu = document.getElementById(div);	if (typeof(divMenu) == 'undefined') {		divMenu = null;	}	objMenu = obj;	if (objMenu != null) {		objMenu.className = 'hover';	}	if (divMenu != null) {		divMenu.style.display = 'inline';		divMenu.focus();	}		cacheMenu.style.display = 'inline';}function hideMenu() {	if (objMenu != null) {		objMenu.className = '';	}	if (divMenu != null) {		divMenu.style.display = 'none';	}	objMenu = null;	divMenu = null;	cacheMenu.style.display = 'none';}function initMenu() {	cacheMenu = document.getElementById('m_cache');}/* VIGNETTES */var divVignette = null;var timerVignette = null;function showVignette(div) {	if (divVignette != null) {		hideVignette();	}		divVignette = document.getElementById(div);	if (typeof(divVignette) == 'undefined') {		divVignette = null;	}	if (divVignette != null) {		divVignette.style.display = 'inline';	}}function hideVignette() {	if (divVignette != null) {		divVignette.style.display = 'none';	}	divVignette = null;}/* DIVERS */function allerAncre(obj) {	var ancre = obj[obj.selectedIndex].value;	document.location = '#' + ancre;}function allerSousFamille(obj,url,id) {	var ancre = obj[obj.selectedIndex].value;	document.location = url + 'rayon.php?id=' + id + '#' + ancre;}function allerRayon(obj,url) {	var id = obj[obj.selectedIndex].value;	document.location = url + 'rayon.php?id=' + id;}function agrandirVisuel(key, txtAlt) {	var zoom = document.getElementById('zoomVisuel');	var srcZoom = zoom.src.substr(0,zoom.src.length-5);	var textAlteZoom = zoom.alt;	var visuel = document.getElementById('visuel_' + key);		zoom.src = visuel.src.substr(0,visuel.src.length-5) + 'm.jpg';	zoom.alt = txtAlt;		visuel.src = srcZoom + 'p.jpg';	visuel.alt = textAlteZoom;		return false;}function ajouterPanier(idenProd) {	var oForm = document.getElementById('formPanier');	var tabErreurs = new Array();		var oQte = document.getElementById('articles_' + idenProd + '_qte');	if (IsEmpty(oQte)) {		tabErreurs[tabErreurs.length] = 'La quantité est obligatoire';		}	var oTail = document.getElementById('articles_' + idenProd + '_tail');	if (oTail.options.length > 1) {		if (!IsSelected(oTail)) {			tabErreurs[tabErreurs.length] = 'La taille est obligatoire';			}	}		if (tabErreurs.length > 0) {		var strAlert = '';		for (var i=0; i<tabErreurs.length; i++) {			if (i > 0) {				strAlert += '\n\r';			}			strAlert += tabErreurs[i];		}		alert(strAlert);	} else {		oForm.formPanier_iden_prod.value = idenProd;		oForm.formPanier_iden_tail.value = oTail.options[oTail.selectedIndex].value;		oForm.formPanier_qte.value = oQte.value;		oForm.submit();	}	return false;}/* FORMS */// Fonction TestChampVide('chaine de caractere') => Test si le champ est videfunction IsEmpty(oChamp) {	var bRetour = true;	if (oChamp.value != '') bRetour = false;	return bRetour;}// Fonctionfunction IsChecked(oChamp) {	var bRetour = false;	if (oChamp.checked) bRetour = true;	return bRetour;}// Fonctionfunction IsRadioChecked(oChamp) {	var bRetour = false;	for (var i=0; i<oChamp.length; i++) {		if (oChamp[i].checked) bRetour = true;	}	return bRetour;}// Fonctionfunction IsSelected(oChamp) {	var bRetour = false;	if (oChamp.selectedIndex > 0) bRetour = true;	return bRetour;}// Fonctionfunction IsEmail(oChamp) {	var bRetour = false;	var RegExp = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]{2,}[.][a-zA-Z]{2,4}$/;	if (RegExp.exec(oChamp.value) != null) bRetour = true;	return bRetour;}