<!--
// FONCTIONS COMMUNES SITE PUBLIC

/* DOM 
********************************************** */

var nn4 = (document.layers) ? true : false;
var ie5 = (document.all) ? true : false;
var dom = (document.getElementById && !document.all) ? true : false;

function getId(id){
	if(nn4)			path = document.layers[id];
	else if(ie5) 	path = document.all[id];
	else if(dom)	path = document.getElementById(id);
	else				path = false;
	
	return path;
}

/* Fonctions -> Historique 
********************************************** */

function setHistory(valeur){
	var nom	= "pg";
	var argv	= setHistory.arguments;
	var argc	= setHistory.arguments.length;
	var expires	= (argc > 2) ? argv[2] : null;
	var path		= (argc > 3) ? argv[3] : null;
	var domain	= (argc > 4) ? argv[4] : null;
	var secure	= (argc > 5) ? argv[5] : false;
	document.cookie = nom + "=" + escape(valeur) + 
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
	((path == null) ? "" : ("; path=" + path)) +
	((domain == null) ? "" : ("; domain=" + domain)) +
	((secure == true) ? "; secure" : "");
}

/* Fonctions -> Popup 
********************************************** */

function popWindow(p,n,w,h){
	l	= (screen.availWidth-w)/2;
	t	= (screen.availHeight-h)/2;
	x 	= window.open(p,n,'toolbars=0,resizable=1,scrollbars=1,width='+w+',height='+h+',left='+l+',top='+t);
	x.focus();
}

/* Fonctions -> Images 
********************************************** */

imgs = new Array();
var objCount = 0; 

function preload(img) {
	imgs[objCount] 		= new Image();
   imgs[objCount].src 	= img;
	objCount++;
}




// -->