function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function JL_openFullScreenWindow(id) {

	f = "/VirtualeMuseum/Datas/oeuvreSeule3.asp?o=" + id ;

	x=screen.availWidth;
	y=screen.availHeight;
	
	target = parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf('.')-1,navigator.appVersion.length));
	
	if ((navigator.appVersion.indexOf("Mac")!=-1) && (navigator.userAgent.indexOf("MSIE")!=-1) && (parseInt(navigator.appVersion)==4)) {
		window.open(f, 'oeuvreSeule', 'scrollbars=no,status=no,width=510,height=510,alwaysRaised=yes,titlebar=no') ;
	} else {
		if (target >= 4){
			if (navigator.appName=="Netscape"){
				var MachakFull=window.open(f,"MachakFull",'scrollbars=yes','width='+x+',height='+y+',top=0,left=0');
				MachakFull.moveTo(0,0);
				MachakFull.resizeTo(x,y);
			}
			if (navigator.appName=="Microsoft Internet Explorer")
				window.open(f,"MachakFull","fullscreen=yes");
		}
		else
			window.open(f,"sub",'scrollbars=yes');
	}
}


function JL_openFullScreenWindowFromFile(f) {


	x=screen.availWidth;
	y=screen.availHeight;
	
	target = parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf('.')-1,navigator.appVersion.length));
	
	if ((navigator.appVersion.indexOf("Mac")!=-1) && (navigator.userAgent.indexOf("MSIE")!=-1) && (parseInt(navigator.appVersion)==4)) {
		window.open(f, 'oeuvreSeule', 'scrollbars=no,status=no,width=510,height=510,alwaysRaised=yes,titlebar=no') ;
	} else {
		if (target >= 4){
			if (navigator.appName=="Netscape"){
				var MachakFull=window.open(f,"MachakFull",'scrollbars=yes','width='+x+',height='+y+',top=0,left=0');
				MachakFull.moveTo(0,0);
				MachakFull.resizeTo(x,y);
			}
			if (navigator.appName=="Microsoft Internet Explorer")
				window.open(f,"MachakFull","fullscreen=yes");
		}
		else
			window.open(f,"sub",'scrollbars=yes');
	}
}


function JL_redirect(langue) {
	var s = window.location.pathname + window.location.search ;
	//re = /\.Fr\.|\.Ca\.|\.It\.|\.Es\.|\.Pt\.|\.Ro\./gi ;
	//s = s.replace(re, "." + langue + ".") ;
	re = /Fr\.|Ca\.|It\.|Es\.|Pt\.|Ro\./gi ;
	s = s.replace(re, langue + ".") ;
	location = s ;
}


function JL_redirectHome() {
	var s = window.location.pathname + window.location.search ;
	re = /Fr|It|Es|Pt|Ro/ ;
	i = s.search(re) ;
	s = s.substring(i, i+2) ;
	location = "/VirtualeMuseum/index" + s + ".htm" ;
}


function oeuvreSimple(langue, id) { 
	url = "http://" + window.location.host ;

	if (window.location.host == "dcc.unilat.org") {
		url = url + "/VirtualeMuseum" ;
	} else {
		url = url + "/UnionLatine" ;
	}
	
	url = url + "/Datas/oeuvreSimple.asp?l=" + langue + "&o=" + id ;
	window.open(url, 'oeuvreSimple', 'resizable=no,width=485,height=300');
}

function courriel(destinataire, site, ext, texte) {
	var e = destinataire + '@' + site + '.' + ext;
	if(texte=='') texte = e;
	document.write('<a href="mailto:' + e + '">' + texte + '</a>');
}
