function showmodal()
      {
        //on rend le bouton close actif
        $(".modalHP_close1").click(killmodal);
		$(".modalHP_close2").click(killmodal);
		$(".modalHP_closebt").click(killmodal);
        
        //On calcul pour positionner la modal au milieu de la page
        var top = $(window).scrollTop()+($(window).height()/2)-($(".modalHP").height()/2);
        var left = ($(window).width()/2)-($(".modalHP").width()/2);
		//alert ("hauteur"+top);
		//alert ("largeur"+left);
		//$(".modalHP").bgiframe();
        $(".modalHP").css({
          top : top+"px",
          left : left+"px"
        });
        
        //On cree la black box, on l'insere dans le body, on fade, puis on fade la modale
        $('<div class="black_boxHP" style="filter: alpha(opacity=40);"></div>').css({zIndex:250,width: $(window).width(), height: 									$(document).height()}).appendTo(document.body).fadeIn("slow",function(){$(".modalHP").fadeIn("slow");});
        
        //Reexecution de la transparence
        $.ifixpng2('<%=sRootPathImage%>/000-COMMUN/1ptrans.gif');
        $('img').ifixpng2();
      }
      
      //Fermeture de la modal
      function killmodal()
      {
        //Fondu de la black box puis de la modal et on detruit la black box
        $('.modalHP').fadeOut("slow",function(){$(".black_boxHP").fadeOut("slow",function(){$('.black_boxHP').remove()})});
      }
	  

if(!LireCookie("hp"))
{
	maDate1 = new Date();
	maDate1.setHours((maDate1.getHours())+1);
	EcrireCookie("hp", "1",maDate1);
	
	$(document).ready(function(){
		
			showmodal();
		
	});
}


function PopUpJeux()
{
    window.open('http://www.kiabi.es/casting','_blank','top=0,left=0,toolbar=yes,scrollbars=yes,width=1024,height=800,resizable=yes');
    ns_onclick(this,'','concours','clickout','kiabi');
    CloseDhtml();
    return false;
}

function montrercacher()
{
document.getElementById('calque1').style.display='none';
document.getElementById('calque2').style.display='block';
}