// JavaScript Document
function switch_language(item) {
	if (item.value != "") {
		window.location.replace(item.value);
	} else { alert("erreur"); }
}
function afficher(baliseId)
{
    if (document.getElementById && document.getElementById(baliseId) != null)
    {
		document.getElementById(baliseId).style.visibility='visible';
		document.getElementById(baliseId).style.display='block';
    }
  }

function cacher(baliseId)
{
  if (document.getElementById && document.getElementById(baliseId) != null)
  {
		document.getElementById(baliseId).style.visibility='hidden';
		document.getElementById(baliseId).style.display='none';
  }
}

function degage(){
	var remove_el	= document.getElementsByTagName("div");
	var i			= 0;
	
	for(i=0;i<remove_el.length;i++){
		if(remove_el[i].title == 'hidden'){
			remove_el[i].style.display = 'none';
		}
	}
}

function revertback(){
setTimeout("window.location.reload()",50)
}
window.onbeforeprint=degage
window.onafterprint=revertback

function print_doc(){
	var navi = navigator.appName;
	if(navi !="Microsoft Internet Explorer"){
		degage();
		window.print();
		setTimeout("window.location.reload()",50);
	}else{
		window.print();
	}	
	return;
}