function popWindow(url,width,height) {
    if( width == -1 ) {
       width=screen.width-5;
       posx=0;
    }
    else {
       posx=screen.width/2 - (width/2);
    }

    if(height == -1 ) {
       height=screen.height-60;
       posy=0;
    }
    else {
       posy=screen.height/2 - (height/2);
    }
 	
 	 try {
			 top.POPUP = open(url,'POPUP',"toolbar=0,location=0,top=0,left=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+width+",height="+height);
   			 top.POPUP.moveTo(posx,posy);
  			 top.POPUP.focus();	
	} catch (e) {
			// une erreur javascript est lancée sur IE6... 
			open(url,'POPUP',"toolbar=0,location=0,top=0,left=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+width+",height="+height);
	}  
}

// Pour pouvoir modifier le repertoire spécifié dans les xsl (soit /modules/, soit /pragmalex/ )
function popWindowLinks(url,width,height) {
    if( width == -1 ) {
       width=screen.width-5;
       posx=0;
    }
    else {
       posx=screen.width/2 - (width/2);
    }

    if(height == -1 ) {
       height=screen.height-60;
       posy=0;
    }
    else {
       posy=screen.height/2 - (height/2);
    }
 	
 	 try {
			 top.POPUP = open('/modules'+url,'POPUP',"toolbar=0,location=0,top=0,left=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+width+",height="+height);
   			 top.POPUP.moveTo(posx,posy);
  			 top.POPUP.focus();	
	} catch (e) {
			// une erreur javascript est lancée sur IE6... 
			open('/modules'+url,'POPUP',"toolbar=0,location=0,top=0,left=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+width+",height="+height);
	}  
}

function popWindowBis(url,target,width,height) {
    if( width == -1 ) {
       width=screen.width-5;
       posx=0;
    }
    else {
       posx=screen.width/2 - (width/2);
    }

    if(height == -1 ) {
       height=screen.height-60;
       posy=0;
    }
    else {
       posy=screen.height/2 - (height/2);
    }
    try {
    	top.POPUPBIS = open(url,target,"toolbar=0,location=0,top=0,left=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+width+",height="+height);
    	top.POPUPBIS.moveTo(posx,posy);
    	top.POPUPBIS.focus();	
    } catch (e) {
			// une erreur javascript est lancée sur IE6... 
			open(url,target,"toolbar=0,location=0,top=0,left=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+width+",height="+height);
	}  
}

function GoToLinks(url) {
	location.href="/modules"+url;
}
