
function open_popup(page) {
    window_handle = window.open(page,'popupWindowName');
    window_handle.focus();
    return false;
}
// http://tech.irt.org/articles/js205/index.htm#4
// The variable window_handle is used to retain the reference
//to the pop-up window throughout the life of the current document.
//As soon as the pop-up window is created, or its contents are requested to be changed,
//then the focus() method ensures that it is brought to the top of the stack of visible windows


function autreNote(url,width,height,scrollbars)
{
var paramNotes = "scrollbars="+scrollbars+",resizable=no,width="+width+",height="+height;
var monurl= url

window_handle  = window.open(monurl,"note",paramNotes);
window_handle.close();
window_handle = window.open(monurl,"note",paramNotes);
window_handle.focus();
    return false;

}

function ouvrirNote(url,width,height,scrollbars)
{
var paramNotes = "scrollbars="+scrollbars+",resizable=no,width="+width+",height="+height;
var monurl= url
    window_handle = window.open(monurl,'note',paramNotes);
    window_handle.focus();
    return false;
}

// lien vers fenetre principale
function remote2(url){
window.opener.location=url;
window.close()
}
//-->


/*
centre le popup dans l'écran
*/

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}