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; }};
		}
	}
}

writeFlash = function(id,mwidth,mheight,vars){
	if (document.getElementById(id)){
		switch(id){
			case 'gv-gnoi':
				var movie = "http://www.youtube.com/v/KBdEwpRQRD0&hl=en&fs=1&";
				break    
			case 'gv-mk':
				var movie = "http://www.youtube.com/v/jK7IPbnmvVU&hl=en&fs=1&";
				break    
			case 'gv-val':
				var movie = "http://www.youtube.com/v/FPBACTS-tyg&hl=en&fs=1&";
				break    
			case 'gv-mini':
				var movie = "http://www.youtube.com/v/Yh8rWgrlKb0&hl=en&fs=1&";
				break    
			case 'gv-miniuk':
				var movie = "http://www.youtube.com/v/F-yi0rMBCqs&hl=en&fs=1&";
				break    
			case 'gv-popeye':
				var movie = "http://www.youtube.com/v/PH-I9dc870g&hl=en&fs=1&";
				break  
			case 'vim-digg':
				var movie = "http://vimeo.com/moogaloop.swf?clip_id=6905398&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1";
				break    
		}
	document.getElementById(id).innerHTML = '<object type="application/x-shockwave-flash" data="'+ movie +'" width="'+ mwidth +'" height="'+ mheight +'"><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="movie" value="'+ movie +'" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\"#ffffff\" /><param name=\"wmode\" value=\"opaque\" /></object>';
	}
}

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>');
}