
function setCookie(param, value) {
	document.cookie = param + "=" + value;
}

function getCookie(param) {
	var cookValue = "";
	var egal = document.cookie.indexOf(param + "=");
	cookValue = document.cookie.substring (egal + param.length);
	return cookValue;
}




// Class permettant de récupérer la position d'un objet
function GetObjectPosition( obj ) {
	this.Left = 0 ; this.Top = 0;
	if (obj) {
		var objTemp = obj.offsetParent;
		this.Left = obj.offsetLeft;
		this.Top = obj.offsetTop;
		while (objTemp) {
			this.Left = this.Left + objTemp.offsetLeft;
			this.Top = this.Top + objTemp.offsetTop;
			objTemp = objTemp.offsetParent;
		}
	}
	return this;
}

// Classe permettant de récupérer la taille d'un object
function GetObjectSize( obj ) {
	this.Width = 0; this.Height = 0;
	if (obj) {
		if (obj.offsetWidth != null) {
			this.Width = obj.offsetWidth;
			this.Height = obj.offsetHeight;
		}
	}
	return this;
}

// Class permettant de déplacer et redimensionner un object
function MoveAndSizeObject(objRef, left, top, width, height) {
	objRef.style.left = left;
	objRef.style.top = top;
	objRef.style.width = width;
	objRef.style.height = height;
}

// Lors du chargement du document
function OnDocuemntLoad() {
	var tableMatrixTR = document.getElementById( "TestTR" );
	var tableMatrixTRDivPosition = new GetObjectPosition( tableMatrixTR );
	var tableMatrixTRDivSize = new GetObjectSize( tableMatrixTR );
		
	var testDiv = document.getElementById( "TestDIV" );
	MoveAndSizeObject(	testDiv, 
						tableMatrixTRDivPosition.Left, 
						tableMatrixTRDivPosition.Top, 
						tableMatrixTRDivSize.Width, 
						tableMatrixTRDivSize.Height );
	testDiv.style.visibility = "visible";
}

















