// JavaScript Document
if(document.all && navigator.userAgent.indexOf("MSIE 8") != -1) {
	var z = "class";
} else if (document.all) {
	var z = "className";		// bug IE 7 et <
} else  {
	var z = "class";
}

function effaceOffre() {
	img = Array();
	img =	document.getElementById('offreGd').getElementsByTagName('img');
	for(i=0; i<img.length; i++) {
		if(!img[i].hasAttribute(z)) {
			img[i].setAttribute(z, 'noDisplay');
		}
	}
}

function displayOffre(id) {
	effaceOffre();
	document.getElementById(id).removeAttribute(z);
}

/*function formSubmit(id) {
	document.getElementById(id).submit();
}*/

function planBottin(aff) {
	if(aff == 'off') {
		document.getElementById('plan').setAttribute(z, 'noDisplay');
		document.getElementById('croix').setAttribute(z, 'noDisplay');
	} else {
		document.getElementById('plan').setAttribute(z, '');
		document.getElementById('croix').setAttribute(z, '');
		/*document.getElementById('plan').removeAttribute(z);
		document.getElementById('croix').removeAttribute(z);*/
	}
}

function justDoIt (aff, numPDV) {
	planBottin(aff);
	document.getElementById('iframe_plan').src = 'http://fc1.1bis.com/netto/map.asp?id=NETTO'+numPDV;
}

function listePDVparticipant(aff, id, id2) {
	if(aff == 'off') {
		document.getElementById('listePDVparticipant').setAttribute(z, 'noDisplay');
		document.getElementById('croix').setAttribute(z, 'noDisplay');
		if(id != null) {
			document.getElementById(id).setAttribute(z, 'noDisplay');
		}
		if(id2 != null) {
			document.getElementById(id2).setAttribute(z, 'noDisplay');
		}
	} else {
		document.getElementById('listePDVparticipant').setAttribute(z, '');
		document.getElementById('croix').setAttribute(z, '');
		if(id != null) {
			document.getElementById(id).setAttribute(z, '');
		}
	}
}

function displayOff(id) {
  element = document.getElementById(id);
	element.style.display = "none";
}

