<!-- Debut script
// Fenetre BEOS par ED Prod
// http://www.ifrance.com/ed
// Ne fonctionne qu'avec IE, les autres navigateurs se contentent d'un fenetre normale

// quelques variables pour la position et la taille de la fenetre
// avec fpx et fpy : position X et Y de la fenetre (inutile de modifier les valeurs elles sont changer plus tard)
//      ftx et fty : taille X et Y de la fenetre (a spécifier ici)
//      fichier : nom du fichier HTML a afficher dans la fenetre (la page vide pour la création de la fenetre)
//      titre : titre le la fenetre
//      ftbx : longueur de la zone de titre
var navigateur=navigator.appName;var abrege=navigateur.substring(0,2);
var fpx=0;var fpy=0;
var ftx=580;var fty=350;
var fichier="vide.htm";var titre="Offi.CIEL? Jacques HIGELIN"
var ftxb=220;

// construction de la fenetre
fchaine=''
+'<div id="fenetrebe" style="position:absolute;visibility:hidden;z-index:10;top:'+fpy+'px;left:'+fpx+'px;width:'+ftx+'px;height:'+fty+'px;bgcolor:#0000ff;">'
+'<div id="window" style="position:absolute;top:21px;left:0px;width:'+(ftx)+'px;height:'+(fty)+'px;">'
+'<div id="hg" style="position:absolute;top:0px;left:0px;width:6px;height:6px;"><img src="images/hg.gif" width="6" height="6"></div>'
+'<div id="hd" style="position:absolute;top:0px;left:'+(ftx-6)+'px;width:6px;height:6px;"><img src="images/hd.gif" width="6" height="6"></div>'
+'<div id="bg" style="position:absolute;top:'+(fty-6)+'px;left:0px;width:6px;height:6px;"><img src="images/bg.gif" width="6" height="6"></div>'
+'<div id="bd" style="position:absolute;top:'+(fty-6)+'px;left:'+(ftx-6)+'px;width:6px;height:6px;"><img src="images/bd.gif" width="6" height="6"></div>'
+'<div id="h" style="position:absolute;top:0px;left:6px;width:1px;height:6px;"><img src="images/h.gif" width="'+(ftx-10)+'" height="6"></div>'
+'<div id="b" style="position:absolute;top:'+(fty-6)+'px;left:6px;width:1px;height:6px;"><img src="images/b.gif" width="'+(ftx-10)+'" height="6"></div>'
+'<div id="g" style="position:absolute;top:6px;left:0px;width:6px;height:1px;"><img src="images/g.gif" width="6" height="'+(fty-10)+'"></div>'
+'<div id="d" style="position:absolute;top:6px;left:'+(ftx-6)+'px;width:6px;height:1px;"><img src="images/d.gif" width="6" height="'+(fty-10)+'"></div>'
+'</div>'
+'<div id="titre" style="position:absolute;top:1px;left:0px;width:'+(ftx)+'px;height:21px;">'
+'<table CELLPADDING=0 CELLSPACING=0 border=0 width="'+(ftxb)+'" height="21"><tr><td background="images/tm.gif"><FONT FACE="verdana" SIZE=1><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+titre+'</B></FONT></td></tr></table>'
+'<div style="position:absolute;top:0px;left:0px;"><a href="#" onclick="javascript:return close_beos();"><IMG src="images/tg.gif" BORDER=0 WIDTH=21 HEIGHT=21></A></div>'
+'<div style="position:absolute;top:0px;left:'+(ftxb-4)+'px;"><IMG src="images/td.gif" BORDER=0 WIDTH=4 HEIGHT=21></div>'
+'</div>'
+'<div id="interieur" style="position:absolute;top:27px;left:6px;width:'+(ftx-12)+'px;height:'+(fty-12)+'px;">'
+'<iframe name="inbeosf" TOP=0 LEFT=0 WIDTH='+(ftx-12)+' HEIGHT='+(fty-12)+' border=0 FRAMEBORDER=0 scrolling=AUTO src="'+fichier+'"></iframe>'
+'</DIV>'
+'</div>'
+'</div>'

//insertion de la fenetre dans la page html (elle est invisible pour le momment)
if (abrege=="Mi"){document.write(fchaine);}

// fonction qui change le contenue de la fenetre et la rend visible
// c'est cette fonction qui est appelée via un lien dans la page html
// avec fichier: nom de la page a afficher
//      posx : position X de la fentre (-1, fenetre centrée)
//      posy : position Y de la fentre (-1, fenetre centrée)

function open_beos(fichier,posx,posy) {
if (abrege=="Mi"){	
if (posy==-1){document.all.fenetrebe.style.top=document.body.scrollTop+(document.body.clientHeight/2)-(fty/2);} else{document.all.fenetrebe.style.top=posy}
if (posx==-1){document.all.fenetrebe.style.left=(document.body.clientWidth/2)-(ftx/2);} else{document.all.fenetrebe.style.left=posx;}
document.all.fenetrebe.style.visibility="visible";
inbeosf.location.href=fichier;
}
else {myWindow=open(fichier, titre, "width="+ftx+",height="+fty+",menubar=no,resizable=no,scrollbars=YES,status=no,toolbar=no");}
return false;
}

// fonction interne utilisée pour fermer la fenetre
function close_beos() {
inbeosf.clearTimeout();inbeosf.clearInterval();
inbeosf.location.href="vide.htm"
document.all.fenetrebe.style.visibility="hidden";
return false;
}
//  Fin script -->