function swap (id) {
	file_name=document.getElementById(id).src
	if (!file_name.match("-over")) {
		new_file = file_name.replace(/(.*?)\.(\w+)$/, "$1-over.$2");
	} else {
		new_file = file_name.replace(/(.*?)-over\.(\w+)$/, "$1.$2");
	}
	document.getElementById(id).src=new_file
}

if( typeof( window.innerHeight ) == 'number' ) {
	//modern browsers
	var window_h=window.innerHeight;
}else if( document.documentElement && ( document.documentElement.clientHeight || document.documentElement.clientwidth ) ) {
	//la mule de microsoft
	var window_h=document.documentElement.clientHeight;
}

function num_preload() {
	var i=0;
	preload_image_object = new Image();
	for(i=0; i<10; i++){
		preload_image_object.src = "pic/credits_chiffres/"+i+".png";
	}
}

function update_links () {
	//on remet target=blank dans certains liens
	$$('.target_blank').each(function(lien) {
		lien.writeAttribute('target', '_blank')
	});
}

//function remove_focus() {
//// Clean out focusoutline from anchors
//if (document.links) {
//try {
//for (var i=0;i< document.links.length;i++) {
//document.links[i].blur();
//}
//} catch(e) {}
//}
//}
//document.onClick = remove_focus();

//Find all link elements and add an onfocus attribute and value
//function hideFocusBorders(){
//var theahrefs = document.getElementsByTagName("a");
//if (!theahrefs){return;}
//for(var x=0;x!=theahrefs.length;x++){
//theahrefs[x].onfocus = function stopLinkFocus(){this.hideFocus=true;};
//}
//}
