function showmodal()
      {
        $(".modalHP_close1").click(killmodal);
		$(".modalHP_close2").click(killmodal);
		$(".modalHP_closebt").click(killmodal);
        
        var top = $(window).scrollTop()+($(window).height()/2)-($(".modalHP").height()/2);
        var left = ($(window).width()/2)-($(".modalHP").width()/2);
        $(".modalHP").css({
          top : top+"px",
          left : left+"px"
        });
        
        $('<div class="black_boxHP" style="filter: alpha(opacity=40);" onclick="killmodal();" ></div>').css({zIndex:250,width: $(window).width(), height: 									$(document).height()}).appendTo(document.body).fadeIn("slow",function(){$(".modalHP").fadeIn("slow");});
        
        $.ifixpng2('<%=sRootPathImage%>/000-COMMUN/1ptrans.gif');
        $('img').ifixpng2();
      }
      
      function killmodal()
      {
        $('.modalHP').fadeOut("slow",function(){$(".black_boxHP").fadeOut("slow",function(){$('.black_boxHP').remove()})});
		$('#recherche1').focus();
      }


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.com/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';
}
function appel2(){
				var mail = "";
				if(document.getElementById("emailnewsletterHP").value){mail=document.getElementById("emailnewsletterHP").value;}
					window.open('http://kiabi.ems6.net/Mlist/step1_v2.asp?email=' + mail,'Inscription','width=330,height=470,scrollbars=no,resizable=no,top=100,left=100');
				}

				function appel_HP(){
				var mail = "";
				if(document.getElementById("emailnewslettermod").value){mail=document.getElementById("emailnewslettermod").value;}
					window.open('http://kiabi.ems6.net/Mlist/step1_v2.asp?email=' + mail,'Inscription','width=330,height=470,scrollbars=no,resizable=no,top=100,left=100');
				}				
				
