jQuery.extend({
	
	modal2:function(navurl,title,box_width,box_height, couleur, produit)
	{
	    var offset={};
	    var options =
	    {
	    margin:0,
	    border:0,
	    padding:0,
	    scroll:0
	    };
	    //alert(navurl);
	    var win_width =$(window).width();
	    var scrollToLeft=$(window).scrollLeft();
	    var win_height =$(window).height();
	    var scrollToBottom=$(window).scrollTop();
	    var wleft =((win_width/2 )-(box_width/2))+15;
	    var wtop  =((win_height/2)-(box_height/2))+15;
	    w2=box_width-30;		// largeur du DIV qui contient la frame
	    h2=box_height-30;		// hauteur du DIV qui contient la frame
	    
	    toph=0;			// top du header
	    lefth=0;			// left du header
	    widthh=w2;			// largeur du header
	    heighth=25;			// hauteur du hauteur
	    
	    topf=wtop+10;		// a priori, ne sert à rien ....
	    leftf= wleft+10; 		// a priori, ne sert à rien ....
	    wf= (w2-20);		// largeur de la iFRAME
	    hf= (h2-20-heighth);	// hauteur de la iFRAME
	    
	    limg=(widthh+lefth-25);
	    timg=toph;
	    wimg=24;
	    himg=24;
	    param="<div id='modal_produit_div' style='background-color: #FFFFFF; z-index:120;'>";
	    param+="<div name='header_modal' style='background-color: white; left:"+lefth+"px; top:"+toph+"px; width:"+widthh+"px; height:"+heighth+"px;  overflow: visible'>";
	    //param+=title+"<div style='position: absolute; left:"+limg+"; top:"+timg+"; height:"+himg+"; width"+wimg+"; border: solid red 1px;'>";
	    //param+="<img src='include/navigate_cross.png' width='24' height='24' border='0' title='Cliquez pour fermer la fenetre' id='close' style='pointer:hand; z-Index:120;'></div></div>";
	    param+="<table border='0' width='100%'><tr><td>"+title+"</td><td align='right'><img src='include/navigate_cross.png' width='24' height='24' border='0' title='Cliquez pour fermer la fenetre' id='close' style='pointer:hand; z-Index:120;'></td></tr></table>";
	    param+="</div><iframe width='"+wf+"' height='"+hf+"'  frameborder='0' marginwidth='10' marginheight='0' scrolling='auto'  name='frmTest' src='"+navurl+"'></iframe>";
	    param+="</div>";	    
	    $('body').append(param);
	    $('#modal_produit_div').css({
				   	position: 'absolute',
				   	top: wtop,
					left: wleft,
					width: w2+'px',
					height: h2+'px',
					border: 'solid yellow 1px'
					
					
				   });
	
	    
	  
	    $('#close').click( function() 
	    {
	       // 
	       $('#modal_produit_div').fadeOut(500);
	       $('#modal_produit_div').remove();
	        $.dimScreenStopproduit();
	    });
	    // appel de la fonction qui dessine le fond ...
	    $.dimScreenproduit(500, 0.7, function() {$('#ak_modal_div').fadeIn(500);},box_width, box_height, couleur);
	    
	    var offset = {}
	    offset=$("#modal_produit_div").offset({ scroll: false })
	
  	    X_left=offset.left+box_width-16;
	    X_top=offset.top;

	    $('#close').css({left:X_left,top:X_top});

	},
	
	modal_produitRemove:function()
	{
	   $('#modal_produit_div').fadeOut(500);
	   $.dimScreenStopproduit();
	},
	
	modal_produitHideAndRedirect:function(redirect_url)
	{
	    $('#modal_produit_div').fadeOut(500);
	    $.dimScreenStopproduit();
	    window.location=redirect_url;
	}
});	