function getCookie(name){
	var ToExec = new RegExp(name + "=([^;]+)");
	var valeur = ToExec.exec(document.cookie);
	return (valeur != null) ? unescape(valeur[1]) : null;
}
function setCookie(name, value) {
	document.cookie=  name + "=" + escape(value) + "; path=/";
}


function getObj(name){
	if (document.getElementById){
  		if(document.getElementById(name)){
  			this.obj = document.getElementById(name);
			this.style = document.getElementById(name).style;
		}
		else this.obj = false;
	}
  	else if (document.all){
  		if(document.all[name]){
			this.obj = document.all[name];
			this.style = document.all[name].style;
		}
		else this.obj = false;
	}
}
function getTop(objectId){
	var x = (new getObj(objectId)).obj;
	xTop = x.offsetTop;
	while(x.offsetParent!=null) {
		xParent = x.offsetParent;
		xTop += xParent.offsetTop;
		x = xParent;
	}
	return xTop;
}
function getAbsoluteTop(objectId){
	var x = objectId;
	xTop = x.offsetTop;
	while(x.offsetParent!=null) {
		xParent = x.offsetParent;
		xTop += xParent.offsetTop;
		x = xParent;
	}
	return xTop;
}
function getAbsoluteLeft(objectId){
	var x = objectId;
	xLeft = x.offsetLeft;
	while(x.offsetParent!=null){
		xParent = x.offsetParent;
		xLeft += xParent.offsetLeft;
		x = xParent;
	}
	return xLeft;
}
function getWidth(objectId){
	var x = (new getObj(objectId)).obj;
	return x.offsetWidth;
}

function getHeight(objectId){
	var x = (new getObj(objectId)).obj;
	return x.offsetHeight;
}
function openPop(f,l,h,op)
{
	longueur=l;
	hauteur=h;
	haut = screen.height/2 - hauteur/2;
	dim = screen.width/2 - longueur/2;
	window.open(f,'','width='+longueur+',height='+hauteur+',left='+dim+',top='+haut+',resizable=no,'+op+'');
}