// Fonction d'ouverture de fenetre popup centree
// Simon - egzakt.com
// 2004-10-28
//
function egz_openwindow(lien,cible,w,h) {
	var _win;
	_win = window.open(lien,cible,'width=' + w + ',height=' + h + ',top=' + (screen.height - 400)/2 + 'left='+ (screen.width - 400)/2);
	_win.moveTo((screen.width - w)/2,(screen.height - h)/2);
	_win.focus();

	return _win;
}

// Fonction d'ouverture de fenetre popup centree
// Simon - egzakt.com
// 2004-10-28
//
function egz_openwindow_param(lien,cible,w,h,param) {
	var _win;
	_win = window.open(lien,cible,param);
	_win.moveTo((screen.width - w)/2,(screen.height - h)/2);
	_win.focus();

	return _win;
}

function moveOn(imgNameA,imgA) {
	document.images[imgNameA].src= imgA;
}
function moveOut(imgNameA,imgA) {
	document.images[imgNameA].src= imgA;
}


// Fonction de show/hide d'un div
// Emilie - egzakt.com
// 2005-02-01
// Param	objet	: id du div
// Modification : Simon
function showhide(objlien,objet,total) {
	for (i=1;i<=total;i++) {
		if (objet != "id"+i) {
			if (document.getElementById("id"+i).style.display == 'block') {
				document.getElementById("id"+i).style.display = 'none';
			}
		}
	}
	if (document.getElementById(objet).style.display == 'block') {
		document.getElementById(objet).style.display = 'none';
		document.getElementById(objet).style.visibility = 'hidden';
		objlien.className='titre';
	}
	else {
		document.getElementById(objet).style.visibility = 'visible';
		document.getElementById(objet).style.display = 'block';
		objlien.className='titrein';
	}
	return true;
}

// Fonctions d'evenements pour capsules
function fqrover(obj,idetat) {
	obj.className = 'qrover';
	return true;
}
function fqrout(obj,idetat) {
	if (document.getElementById(idetat).style.display == 'block') {
		obj.className = 'qrover';
	} else {
		obj.className = 'qr';
	}
	return true;
}
function fqrclick(obj,idetat,total) {
	showhide(obj,idetat,total);
	//fqrover(obj,idetat);
	return true;
}