

function popup(url,nom,largeur,hauteur,options) {
if (window.winref && !window.winref.closed) {
	window.winref.replace(url);
	}
else{
	var haut=(screen.height)/2;
	var Gauche=(screen.width)/4;
	f=window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
	}
self.blur();
}

function setVisible(obj)
{
	obj = document.getElementById(obj);
	obj.style.visibility = 'visible';
}

function setUnvisible(obj) {
	obj = document.getElementById(obj);
	obj.style.visibility = 'hidden';
	}

function setClass(obj, newclass) {
	document.getElementById(obj).className=newclass;
}
	
function setCookieParPage(nomDeCookie) {
	document.cookie=nomDeCookie+"="+document.getElementById('nbParPage').value+";expires='Thu, 31-Dec-2020 00:00:00 GMT';";
	}

function setCookie(nomDeCookie, valeur) {
	document.cookie=nomDeCookie+"="+valeur+";expires='Thu, 31-Dec-2020 00:00:00 GMT';";
	}

function setTriAgence(tri) {
	document.cookie="triAgence="+tri+";expires='Thu, 31-Dec-2020 00:00:00 GMT';";
	}
function setTriContrat(tri) {
	document.cookie="triContrat="+tri+";expires='Thu, 31-Dec-2020 00:00:00 GMT';";
	}	
function setTriProspect(tri) {
	document.cookie="triProspect="+tri+";expires='Thu, 31-Dec-2020 00:00:00 GMT';";
	}
	
function opaque(el1, attribut1, el2, attribut2) {
	obj1=document.getElementById(el1);
	var x=attribut1;
	obj1.style.visibility=x;
	
	var y=attribut2;
	obj2=document.getElementById(el2);
	option='-moz-opacity';
	obj2.style.opacity=y;
	if (y<1) {obj2.style.filter=' alpha(opacity='+y*100+')';}
	else {obj2.style.filter=' alpha(opacity=100)';}
	}
function NumMask(e){
	var IE5 = false;
	
	if (!e) var e = window.event;
	if (e.keyCode){
		IE5= true; code = e.keyCode;
	}
	else if (e.which) {code = e.which ;}
	
	//test du code
	if (code < 48 || code > 57) {
		if(IE5){
			e.returnValue = false;
		}
		else {
			e.preventDefault();
		}
	}
}