window.onload = function() {
	if (document.getElementById) {

//external links to open in a new window
		var anchors = document.getElementsByTagName('a');
		for (var i=0; i<anchors.length; i++){
			var anchor = anchors[i];
			if (anchor.getAttribute('href') && anchor.getAttribute('rel') == 'externe'){ anchor.target = '_blank'; anchor.className = 'extlink' }
		}

// search onfocus cleaning
		if(document.getElementById('s')){
			var searchbox = document.getElementById('s');
				searchbox.onfocus = function () { if(this.value == 'recherche'){ this.value=''; }};
				searchbox.onblur = function () { if(this.value.replace(/\s+/g,"") == ''){ this.value=this.defaultValue; }};
		}

// email onfocus cleaning
		if(document.getElementById('regemail')){
			var emailbox = document.getElementById('regemail');
				emailbox.onfocus = function () { if(this.value == 'votre adresse e-mail'){ this.value=''; }};
				emailbox.onblur = function () { if(this.value.replace(/\s+/g,"") == ''){ this.value=this.defaultValue; }};
		}
	}
}

displayE = function(whose){
var d = 'propulsr';
var at = '@';
var tld = '.com';

document.write('<a href="mailto:' + whose + at + d + tld + '">' + whose + at + d + tld + '</a>');
}
