	var window_handle='';

	
	function openPopUp(page)
	{	    
   			window_handle = window.open(page,'');
   			window_handle.focus(); // focus sur popup
	}

	function openPopUp(page,name,width,height,scrollbars,resizable,status)
	{	    
			window_handle = window.open(page, name, "scrollbars=" + scrollbars + ",status=" + status +",resizable=" + resizable +",width=" + width + ",height=" + height);
   			window_handle.focus(); // focus sur popup
	}
   	
   	function openPopUp(page,name,width,height,scrollbars,resizable,status,menubar)
	{	    
			var windowOption = "";
			windowOption = "scrollbars=" + scrollbars 
							+ ", status=" + status 
							+ ", resizable=" + resizable 
							+ ", menubar=" + menubar 
							+ ", width=" + width 
							+ ", height=" + height
							+ "";
  			window_handle = window.open(page, name, windowOption);
   			window_handle.focus(); // focus sur popup
   	}
   	
	function openPopUp(page,name,width,height,left,top,scrollbars,resizable,status,menubar)
	{	    
			var windowOption = "";
			windowOption = "width=" + width 
							+ ", height=" + height
							+ ", left=" + left
							+ ", top=" + top
							+ ", scrollbars=" + scrollbars 
							+ ", status=" + status 
							+ ", resizable=" + resizable 
							+ ", menubar=" + menubar 
							+ "";

   			window_handle = window.open(page, name, windowOption);
   			window_handle.focus(); // focus sur popup
   	}

    function openModalPopUp(page,name,width,height,scrollbars,resizable,status,menubar)
	{	    
			var windowOption = "";
			if (window.showModalDialog)
            {
                windowOption = "scroll:" + scrollbars + ";"
							    + ", status:" + status + ";"
							    + ", resizable:" + resizable + ";"
//							    + ", menubar=" + menubar 
							    + ", dialogWidth:" + width + "px;" 
							    + ", dialogHeight:" + height + "px;"
							    + "";
      			window_handle = window.showModalDialog(page, name, windowOption);
      		}
      		else
      		{
      		    // NS
      		    windowOption = "modal, width=" + width 
							+ ", height=" + height
							+ ", left=" + left
							+ ", top=" + top
							+ ", scrollbars=" + scrollbars 
							+ ", status=" + status 
							+ ", resizable=" + resizable 
							+ ", menubar=" + menubar 
							+ "";
      		    window_handle = window.open(page, name, windowOption);
      		    window_handle.focus(); // focus sur popup
      		}
   	}