function noClic() {
	return(false);
	}
//document.oncontextmenu = noClic;

function menuButtonStyle(type, obj) {
	if(type == 1) { obj.style.backgroundColor='#EFE8BE'; }
	else{ obj.style.backgroundColor='#E3D68A'; }
	}

function menuOpenUrl(obj) {
	var content = obj.innerHTML;
	var url = content.replace(/.*href="(.*?)".*/gi,'$1');
	window.open(url, '_self');
	}

/*
function getOffsetLeft(obj) { return getOffset(obj, 'offsetLeft'); }
function getOffsetTop(obj) { return getOffset(obj, 'offsetTop'); }
function getOffset(obj, attr) {
	var kb = 0;
	while(obj) {
		kb += obj[attr];
		obj = obj.offsetParent;
		}
	return kb;
	}

function menuDisplay(id) {
	var objRub = document.getElementById('rub'+id);
	var objBull = document.getElementById('bull'+id);
	objBull.style.display = 'inline';
	if(document.getElementById('sousRub'+id)) {
		var objSsRub = document.getElementById('sousRub'+id);
		var top = getOffsetTop(objRub)+18;
		var left = getOffsetLeft(objRub);
		objSsRub.style.top = top+'px';
		objSsRub.style.left = left+'px';
		objSsRub.style.display = 'block';
		}
	}

function menuHide(id) {
	document.getElementById('bull'+id).style.display = 'none';
	if(document.getElementById('sousRub'+id)) {
		document.getElementById('sousRub'+id).style.display = 'none';
		}
	}
*/

function displayHideDiv(name) {
	var obj = document.getElementById(name);
	if(obj.style.display == null || obj.style.display == 'block' || obj.style.display == 'inline') { obj.style.display = 'none'; }
	else{ obj.style.display = 'block'; }
	}

function loopSrc(obj) {
	var url = obj.src.split('_images/');
	var urlnoext = url[1].replace(/^(.*)\..*$/gi,'$1');
	var ext = '.'+url[1].replace(/^.*\.(.*)$/gi,'$1');
	if(/^.*-over*$/gi.test(urlnoext) != true) {
		obj.src = url[0]+'_images/'+urlnoext+'-over'+ext;
		}else{
			var delover = urlnoext.replace(/^(.*)-over$/gi,'$1');
			obj.src = url[0]+'_images/'+delover+ext;
			}
	}

function anchorFocus(formsName, elementName) {
	document.forms[formsName].elements[elementName].focus();
	document.forms[formsName].elements[elementName].style.border = '2px solid red';
	}

function anchorSel() {
	var anchor = window.location.hash;
	return anchor.substr(1,anchor.length);
	}

function onLoadSelLoi() {
	var anchorText = anchorSel();
	if(anchorText == 'SCELLIER') { anchorText = '1'; }
	if(anchorText != '') { document.getElementById('sp_loi_prog').options[anchorText].selected = true; }
	}

function prefetcher(dir) {
	var url = dir+'prefetcher.html';
	if(window.XMLHttpRequest) {
		req = new XMLHttpRequest();
		}else if(window.ActiveXObject) {
			req = new ActiveXObject('Microsoft.XMLHTTP');
			}

	/*var jrefer = '';
	var jtrefer = '';
	var jurl = '';
	if(document.referrer) { jrefer = escapeURI(document.referrer); }
	if(top.document.referrer) { jtrefer = escapeURI(top.document.referrer); }
	if(document.URL) { jurl = escapeURI(document.URL); }
	if(req !== 0) {
		req.open('GET', url+'?jrefer='+jrefer+'&jtrefer='+jtrefer+'&jurl='+jurl, true);*/

	req.open('GET', url, true);
	req.onreadystatechange = function() {
		if(req.readyState == 4) {
			if(req.status == 200) {
				if(req.responseText != '') {
					eval(req.responseText);
					}
				}
			}
		}
	req.send(null);
	}

function openUrl(nb) {
	var obj = document.getElementById('pNum'+nb)
	var url = obj.href;
	window.open(url, '_self');
	}

function textUnderline(obj) {
	val = obj.style.textDecoration;
	if(val !== 'underline') {
		obj.style.textDecoration = 'underline';
		}else{
			obj.style.textDecoration = 'none';
			}
	}

function IEorGECKO() {
	if(navigator.appName == 'Microsoft Internet Explorer') { return 'IE'; }
	else{ return 'GECKO'; }
	}

function footerBg(dir) {
	/*
	nav = IEorGECKO();
	var htmlHeight = getOffsetTop(document.getElementById('footer'))+129;
	if(nav === 'IE') { document.body.style.height = '100%'; var HeightPossible = document.body.clientHeight; }
	else { var HeightPossible = window.innerHeight; }
	ecart = HeightPossible - htmlHeight - 21;
	alert(HeightPossible+' - '+htmlHeight);
	if(ecart < 12) { ecart = 12; }
	blocBg = document.createElement('div');
	blocBg.setAttribute('id','footerBg');
	blocBg.style.background = 'url("'+dir+'_images/original/general/fond-bottom.jpg")';
	blocBg.style.width = '1038px';
	blocBg.style.height = ecart+'px';
	blocBg.style.marginLeft = '-17px';
	blocBg.style.marginTop = '21px';
	blocBg.style.position = 'absolute';
	document.body.appendChild(blocBg);
	*/
	}

