function montre(calque) {
	calque.style.display='block'; 
}
function cache(calque) { 
	calque.style.display='none'; 
}

// ENLEVE LE FOCUS SUR LES LIENS
function blurLinks(){
	lnks = document.getElementsByTagName('a');
	for (i = 0; i < lnks.length; i++){
		lnks[i].onfocus = new Function("if(this.blur) this.blur()");
	}
	lnks2 = document.getElementsByTagName('area');
	for (j = 0; j < lnks2.length; j++){
		lnks2[j].onfocus = new Function("if(this.blur) this.blur()");
	}
}

// LANCE UNE FONCTION AU CHARGEMENT DE LA PAGE
function addOnloadEvent(fnc){
  if ( typeof window.addEventListener != "undefined" )
    window.addEventListener( "load", fnc, false );
  else if ( typeof window.attachEvent != "undefined" ) {
    window.attachEvent( "onload", fnc );
  }
  else {
    if ( window.onload != null ) {
      var oldOnload = window.onload;
      window.onload = function ( e ) {
        oldOnload( e );
        window[fnc]();
      };
    }
    else
      window.onload = fnc;
  }
}



function openpopup( fichier, nom, largeur, hauteur, options ){
	var id = Math.round( Math.random() * 100 );
	var gauche = ( screen.width - largeur ) / 2;
	var haut = ( screen.height - hauteur ) / 2;
	if ( options ){
		options = 'width=' + largeur + 'px, height=' + hauteur + 'px,  top=' + haut + ', left=' + gauche + ', ' + options;
		}
		else{
			options = 'width=' + largeur + 'px, height=' + hauteur + 'px,  top=' + haut + ', left=' + gauche;
			}
			document.open( fichier, nom, options );
		}
		


function view(c){
	c.style.filter='alpha(opacity=100)';
	//c.style.-moz-opacity='1';
	c.style.opacity='1';
}
function hide(c){
	c.style.filter='alpha(opacity=60)';
	//c.style.-moz-opacity='0.6';
	c.style.opacity='0.6';
}
function show(c){
    $("#div_ajax").html('<img class="photoL" src="'+c+'" alt="Nodaiwa - La salle, les plats en photos" name="main_pic" id="main_pic" />');
}

function ajax_me(id){
    $("#mask").css("display", "block");
    $("#div_ajax").load("virtual_tour"+id+".htm");
    var loading = setTimeout('$("#mask").css("display", "none");', 1500);
}
