function mailer(eml)
{
	var file  = '/mail/mailrelay.php';
	var mailr = window.open(file+'?'+eml, 'mailer',
		'toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0,status=0,'+
		'copyhistory=0,top=8,left=8,width=480,height=150');
	mailr.focus();
}

function preloadimages()
{
	for (i=0;i<preloadimages.arguments.length;i++) {
		myimages[i]=new Image();
		myimages[i].src=preloadimages.arguments[i];
	}
}

function image(img, wdt, hgt, ttl)
{
	var imgw =
		window.open('', '_new',
		'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,personalbar=0,resizable=0,'+
		'copyhistory=0,left='+(screen.width-wdt)/2+',top='+((screen.height-hgt)/2-16)+',width='+wdt+',height='+hgt);
	imgw.focus();
	imgw.document.write(
		'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"\n>'
		+'<html><head>\n'
		+'<title>'+ttl+'</title>\n'
		+'<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"\n>'
		+'</head><body style="margin:0px 0px">\n'
		+'<img src="'+img+'" width="'+wdt+'" height="'+hgt+'" alt="'+ttl+'" title="'+ttl+'">'
		+'</body></html>\n');
		imgw.document.close();
}

function openpop(url, wdt, hgt, resizable, scrollbars)
{
  var imgw =
		window.open(url,'_new','height='+hgt+',width='+wdt+',resizable='+resizable+',scrollbars='+scrollbars+','+
  'status=0,titlebar=0,toolbar=0,left='+
  ((screen.width-wdt)/2)+',top='+(((screen.height-hgt)/2)-50)+''); 
	imgw.focus();
}

function csplitt(msiz)
{
	if (screen.width<msiz)
		document.write('</td></tr><tr><td>');
	else
		document.write('</td><td>');
}

function chkweb()
{
	if (confirm("ATTENTION: cette adresse est destinée à écrire au WEBMESTRE du site.\n"+
		"Le webmestre du site N'EST PAS Hubert Reeves.\n"+
		"À qui désirez-vous écire?\n"+
		"-----> Au WEBMESTRE du site: cliquez OK.\n"+
		"-----> À HUBERT REEVES: Cliquez Annuler (ou Cancel)."))
		return true;
	alert(
		"À notre grand regret, vous ne pouvez pas écrire directement à Hubert Reeves à partir de ce site.\n"+
		"Merci de bien vouloir transmettre votre message à Nelly, chargée des relations avec Hubert Reeves\n"+
		"(dans la rubrique « Contacts »).\n\n"+
		"Cordialement, le webmestre.");
	return false
}

function video_object(url, width, height)
{
	var type='application/x-shockwave-flash';
	var wmode='transparent';
	document.write('<object width="'+width+'" height="'+height+'">');
	document.write('<param name="movie" value="'+url+'">');
	document.write('<param name="wmode" value="'+wmode+'">');
	document.write('<embed src="'+url+'" type="'+type+'" wmode="'+wmode+'" width="'+width+'" height="'+height+'"></embed>');
	document.write('</object>');
}

function video_object_vimeo(clip, width, height, clr)
{
	var type='application/x-shockwave-flash';
	var wmode='transparent';
	var url='http://vimeo.com/moogaloop.swf?clip_id='+clip+'&amp;server=vimeo.com';
	var title='&amp;show_title=1';
	var bylin='&amp;show_byline=0';
	var portr='&amp;show_portrait=0';
	var color='&amp;color='+clr;
	document.write('<object width="'+width+'" height="'+height+'">');
	document.write('<param name="allowfullscreen" value="true">');
	document.write('<param name="allowscriptaccess" value="always">');
	document.write('<param name="movie" value="'+url+title+bylin+portr+color+'&amp;fullscreen=1">');
	document.write('<embed src="'+url+title+bylin+portr+color+'&amp;fullscreen=1" type="'+type+'" allowfullscreen="true" allowscriptaccess="always" width="'+width+'" height="'+height+'"></embed>');
	document.write('</object>');
}
