/* 
################################################################################
      	auteur 		:: André Beaudry
      	date		:: juillet 2003 
    	description	:: outils d'édition | aide.js
		© 2003, André Beaudry. Tous droits réservés.    		 
################################################################################     
*/


/* ########################################################################## */
// openDxDy 
/* ########################################################################## */

function openDxDy(str_page, int_dx, int_dy, boo_scroll) 
{
    var yes = 1;
    var no = 0;
    var menubar = no;      
    var scrollbars = boo_scroll;   
    var locationbar = no;  
    var directories = no;  
    var resizable = no;    
    var statusbar = no;   
    var toolbar = no;     
    var int_left 	= ( screen.width - int_dx > 0 ) ? (screen.width-int_dx)*0.5 : 0;
    var int_top 	= ( screen.height - int_dy > 0 ) ? (screen.height-int_dy)*0.5 : 0;
    var int_left 	= 50;
    var int_top 	= 50;
    	 
    var	str_prop = "width=" + int_dx + ",height=" + int_dy + ",top="+int_top+",left="+int_left;
    	str_prop += (menubar ? ",menubars" : "") +
    	(scrollbars ? ",scrollbars" : "") +
    	(locationbar ? ",location" : "") +
    	(directories ? ",directories" : "") +
    	(resizable ? ",resizable" : "") +
    	(statusbar ? ",status" : "") +
    	(toolbar ? ",toolbar" : "");
    	
    	var str_pop_name = String ( "popUp" + Math.round( Math.random()*100 ) )
    	var winId = window.open(str_page, str_pop_name, str_prop)	
    	
    	return winId
}

var obj_pop = null ;
var str_a = "andre" ;
function pop_ouvrir(str_href, dx, dy, scroll)
{
	pop_fermer();  	
    obj_pop = openDxDy(str_href, dx, dy, scroll);	
}

function pop_fermer()
{
	if (obj_pop != null)
	 	obj_pop.close();
	obj_pop = null;
}

window.onunload = function() {
    pop_fermer();   
}



