function roll2(ImageName, gf)
{  var path;
	path='images/';
	document.images[gf].src = path + ImageName;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function ouvrefenetren(url,name,w,h) {
popup=window.open(url, name, 'width='+w+', height='+h+', location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=yes, left=10, top=10');
popup.focus();
}

function ouvrelabo(url) {
chemin = "media/";
fullchemin = chemin + url;
popup=window.open(fullchemin, 'labo', 'width=704, height=528, location=no, menubar=no, status=no, toolbar=yes, scrollbars=yes, resizable=yes, left=10, top=10');
popup.focus();
}

function ouvrelp(url) {
popup=window.open(url, 'labo', 'width=786, height=400, location=no, menubar=no, status=no, toolbar=yes, scrollbars=yes, resizable=yes, left=10, top=10');
popup.focus();
}

function fermer() {
window.close();
}

function ami() {
var url=document.location.href;
var title=document.title;
window.open("ami.html?art="+url+"&titre="+title,'','toolbar=no, location=no, menubar=no, directories=no, status=no, scrollbars=no, resizable=yes, copyhistory=no, height=345, width=530, left=10, top=10');
}

function ecrire() {
window.open("ecrire.html",'','toolbar=no, location=no, menubar=no, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no, height=300, width=530, left=10, top=10');
}

function imprime(){
	var machine = navigator.platform;
	var navigateur = navigator.appName;
	if (machine == 'MacPPC') {
		if (navigateur == 'Microsoft Internet Explorer') {
			alert ("Cette fonction n'est pas disponible sur Macintosh.\n Veuillez utiliser la fonction imprimer d'Internet Explorer");
		} else if (navigateur == 'Netscape') {
			alert ("Cette fonction n'est pas disponible sur Macintosh.\n Veuillez utiliser la fonction imprimer de Netscape");
		} else {
			alert ("Cette fonction n'est pas disponible sur Macintosh.\n Veuillez utiliser la fonction imprimer de votre navigateur");
		}
	} else {
		window.print() ;
	}
}

function ferme_popup() {
  if (popup) popup.close();
  popup = null;
}

function gocitefenetre() {
if (window.opener && !window.opener.closed && window.focus) {
	adresse = window.opener.location.href;
	alert(adresse);
	re = new RegExp("cite-sciences","i");
	if (re.test(adresse)) {
		window.opener.location="http://www.cite-sciences.fr";
		self.close();	
	}
} else {
	window.open("http://www.cite-sciences.fr");
	self.close();
}
}
