// Amazing Frameless Popup Window - Version I
// (C) 2000 www.CodeLifter.com
// Free for all users, but leave in this  header

// set the popup window width and height

var windowW=640 // wide
var windowH=400 // high

// set the screen position where the popup should appear

//var windowX = 260 // from left
//var windowY = 100 // from top
var windowX = (screen.width/2)-(windowW/2);
var windowY = (screen.height/2)-(windowH/2);

// set the url of the page to show in the popup

var urlPop;

// set the title of the page

var title =  "NOS PRODUITS"

// set this to true if the popup should close
// upon leaving the launching page; else, false

var autoclose = true
var g_timer1=null
var frameString="";

// ============================
// do not edit below this line
// ============================

s = "width="+windowW+",height="+windowH;
var beIE = document.all?true:false
var x, y;

function agrandis(fen)
	{
		
		var posx,posy
		x+=64;
    	y+=40;
    	posx = (screen.width/2)-(x/2);
		posy = (screen.height/2)-(y/2);
    	
    	fen.resizeTo(x,y);
    	fen.moveTo(posx,posy);
    	   	
    	if (y>=windowH)
    		{
    			clearInterval(g_timer1); g_timer1=null;
    			fen.resizeTo(windowW,windowH);
    			fen.frames["tope"].location=urlPop;
    			NFW.scrollbars=0;
    			   			
    		}
	}
	

function openFrameless(id){
  
  urlPop = "popup.asp?id="+id;
  
  if (g_timer1 != null)
  		{clearInterval(g_timer1); g_timer1=null;}
  	x=32;
  	y=20;	
  
  if (beIE){
    window.focus()
    NFW = window.open("","popFrameless","fullscreen,"+s)     
    NFW.blur()
    window.focus()
    
    frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"<script>//setTimeout(\"window.open('dom2.html');\", 2000);</script></head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='tope' src='red.html' scrolling='no' >"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
   
    
    NFW.document.open();
    NFW.document.write(frameString)
    NFW.document.close();
    
    
    NFW.resizeTo(x,y)
    NFW.moveTo(windowX,windowY)
   
    	
    		if (g_timer1 == null){g_timer1=setInterval('agrandis(NFW);' , 20);}
    
  
  } else {
    NFW=window.open(urlPop,"popFrameless","scrollbars=0,"+s)
    NFW.blur()
    window.focus() 
    NFW.resizeTo(x,y)
    NFW.moveTo(windowX,windowY)
    
    NFW.resizeTo(windowW,windowH)
    NFW.moveTo(windowX,windowY)
  }   
  NFW.focus()   
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}

