t = null;
//var isIE = false;
// on !IE we only have to initialize it once
if (window.XMLHttpRequest) {
	xhr = new XMLHttpRequest();
}


function right(evnt) {
	if (navigator.appName.toUpperCase().match(/NETSCAPE/) != null) {
		if (evnt.which >= 2){
			alert("Bouton droit desactive\n \Desole !\n");
			return false;
		}
	}
	else
	if (event.button>=2)
	alert("Bouton droit desactive\n \Desole !\n");
}

document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;


function changeContent(script , target) {

	var target = document.getElementById(target);

	if (window.XMLHttpRequest) {
	  xhr.onreadystatechange = function() {
	  if ( ( xhr.readyState == 4 || xhr.readyState == 3 ) && xhr.status == 200) {;
		  target.innerHTML = xhr.responseText;
			refreshPub();
		}
	  }
	} else if (window.ActiveXObject) {
		xhr = new ActiveXObject("Microsoft.XMLHTTP");
	    xhr.onreadystatechange = function() {
			if ( ( xhr.readyState == 4 ) && xhr.status == 200) {
				target.innerHTML = xhr.responseText;
				refreshPub();
			}
		}
	}

	xhr.open("GET", script);
	xhr.send(null);

	return false;
}

function refreshPub() {

	document.getElementById('pub').src = 'pub.php?r=' + Math.floor(Math.random() * 9999);

}
