var FacWinObj;
var facopen=0;
var facURL;     
      
function openFacWindow(URL,width,height){
if(navigator.appName == "Netscape"){
        var scroll = "yes";
}else{
        var scroll = "yes";
}
if(navigator.appVersion.indexOf("Mac")>=0 && navigator.appName.indexOf("Netscape")>=0){
        winoffset=0;
}else{
        winoffset=16;
}
width=432+winoffset;
height=509;
    if (facopen==0){
        facopen=1;
        FacWinObj = window.open(URL,'facWin','toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,scrollbars='+scroll+',width='+width+',height='+height)
        facURL = URL;
        //FacWinObj.focus();
        FacWinObj.moveTo(0,0);
        setTimeout("FacWinObj.focus()",250);
    }else{
    if (FacWinObj.closed) {
        facopen=0;
        openFacWindow(URL,width,height);
    }else {}
    if (URL != facURL) {
        facURL = URL;
        FacWinObj.document.location.href=URL;
        FacWinObj.moveTo(0,0);
        //FacWinObj.resizeTo(width,height);
        setTimeout("FacWinObj.focus()",250);
    }else{
        //FacWinObj.focus();
        FacWinObj.moveTo(0,0);
        //FacWinObj.resizeTo(width,height);
        setTimeout("FacWinObj.focus()",250);
        }
    }
      
}
function openWindow(URL,width,height){
openFacWindow(URL,width,height);      
}


