﻿
function ouvrirDime(Page,width,height){
    window.open(Page,'','resizable=1,scrollbars=1,toolbar=0,directories=0,location=0,status=0,width='+ width +',height='+height);
}

function ouvrirDimeCentre(Page, width, height) {
    var top=(screen.height-height)/2;
    var left=(screen.width-width)/2;
    window.open(Page,'','resizable=1,scrollbars=1,toolbar=0,directories=0,location=0,top='+ top + ',left='+ left +',status=0,width='+ width +',height='+height);
}

jQuery(window).load(function() {
    var h, w;
    $("#scroller img").each(function() {
        w = $(this).width() / $(this).height() * 70;
        if (w > 250) {
            h = Math.round($(this).height() / $(this).width() * 250);
            $(this).attr({ height: h });
            $(this).attr({ width: "250" });
        } else {
            $(this).attr({ width: w });
            $(this).attr({ height: "70" });
        }
        $(this).css("visibility", "visible");
    });

    $("#scroller_container").css("visibility", "visible");
    
    $("#lesPartenaires img").each(function() {
        w = $(this).width() / $(this).height() * 100;
        if (w > 220) {
            h = Math.round($(this).height() / $(this).width() * 220);
            $(this).attr({ height: h });
            $(this).attr({ width: "220" });
        } else {
            $(this).attr({ width: w });
            $(this).attr({ height: "100" });
        }
        $(this).css("visibility", "visible");
    });
})
/*
$(document).ready(function() {
    $("#nav-one li").hover(
		function() { $("ul", this).fadeIn("fast"); },
		function() { }
	);
    if (document.all) {
        $("#nav-one li").hoverClass("sfHover");
    }
});

$.fn.hoverClass = function(c) {
    return this.each(function() {
        $(this).hover(
			function() { $(this).addClass(c); },
			function() { $(this).removeClass(c); }
		);
    });
};*/
$(document).ready(function() {
    /*
    $("#produits").hover(
    function() { $(".sousMenuProduit").fadeIn("fast"); },
    function() { $(".sousMenuProduit").fadeOut("fast"); }
    );
    $(".sousMenuProduit").hover(
    function() { $(".sousMenuProduit").show(); },
    function() { $(".sousMenuProduit").hide(); }
    );
    */
$("#produits, #sousMenuProduit").hover(
  function() {
      $("#sousMenuProduit").show(); //addClass(".sousMenuProduit");
  },
  function() {
      $("#sousMenuProduit").hide(); //removeClass(".sousMenuProduit");
  }
);

});

function prolys(){
    document.getElementById('boiteprolys').style.visibility = 'visible';
}
function prodoc() {
    document.getElementById('boiteprodoc').style.visibility = 'visible';
}
function proloc() {
    document.getElementById('boiteproloc').style.visibility = 'visible';
}

function closeprolys() {
    document.getElementById('boiteprolys').style.visibility = 'hidden';
}
function closeprodoc() {
    document.getElementById('boiteprodoc').style.visibility = 'hidden';
}
function closeproloc() {
   document.getElementById('boiteproloc').style.visibility = 'hidden';
}	 

