// JavaScript Document
	var objGrapg = null;
	var graphTimer = new Array();
	var graphI = 0;
	var arrAnim = new Array(
		'<div></div>',
		'<div class="popLook" style="width:20%; height:20%"></div>',
		'<div class="popLook" style="width:40%; height:40%"></div>',
		'<div class="popLook" style="width:60%; height:60%"></div>',
		'<div class="popLook" style="width:80%; height:80%"></div>'
	);
	function showGraph(strObjContainer, strSrc) {
		if (graphTimer!=null) clearTimeout(graphTimer[graphTimer.length-1]);
		if (objGrapg!=null) objGrapg.closeDiv();
		objGrapg = new classGraphique(strObjContainer, strSrc);
		objGrapg.objDiv.style.display = "block";
		objGrapg.animShowGraph(graphI);
	}
	function hideGraph(strObjContainer) {
		if (graphTimer!=null) clearTimeout(graphTimer[graphTimer.length-1]);
		objGrapg.animHideGraph(arrAnim.length-1);
	}
	
	function classGraphique(strObjContainer, strSrc) {
		this.objDiv = document.getElementById(strObjContainer);
		this.preloadImg = new Image;
		this.preloadImg.src = strSrc;
		this.animShowGraph = function() {
			if (graphI == -1) graphI = 0;
			if (graphI == arrAnim.length) {
				this.objDiv.innerHTML = '<div class="popLook" style="width:100%; height:100%"><img src="' + strSrc + '" /></div>'
			} else {
				this.objDiv.innerHTML = arrAnim[graphI];
				graphI++;
				graphTimer[graphTimer.length] = setTimeout("objGrapg.animShowGraph()", 35);
			}
		}
		this.animHideGraph = function() {
			if (graphI == 0) {
				this.closeDiv();
			} else {
				graphI--;
				this.objDiv.innerHTML = arrAnim[graphI];
				graphTimer[graphTimer.length] = setTimeout("objGrapg.animHideGraph()", 35);
			}
		}
		this.closeDiv = function() {
			this.objDiv.innerHTML = "";
			this.objDiv.style.display = "none";
		}
	}
	
///////////////////////////////////////////////////////////////////////////
var lastUrl = null;
function voirGraphique(strDiv, strUrl) {
	
	var objDiv = $id(strDiv);
	objDiv.style.display = "block";
	
	if (objDiv.getAttribute("loaded") == "false" || strUrl != lastUrl) {
		objDiv.innerHTML = "Chargement";
		//alert("objDiv.innerHTML = " + objDiv.innerHTML);
		var tmpAjax = new Ajax().getValue(strDiv, strUrl, null);
		objDiv.setAttribute("loaded", "true");
	}
}
function cacheGraphique(strDiv) {
	var objDiv = $id(strDiv);
	objDiv.style.display = "none";
}
//////////////////////////////////////////////////////////////////////////
