/*
			Fichier créé par Olivier LIGNY, alias @ntares, le 26/12/2002.
			Le fichier drag.js provient d'autre part.

			Bibliothèque de fonctions permettant la gestion de fenêtres flottantes,
			c'est à dire de zones DIV contenant un élément IFRAME affichant une page.

			Utilisez MinimizeWin(nom) pour réduire une fenêtre,
			et DestroyWin(nom) pour fermer une fenêtre.
*/




function CreateWin(name, title, src, width, height, left, top)
{

var txt2write = "";

txt2write += '<DIV heightinit='+height+' id=\"'+name+'\" \r\n'; 
txt2write += 'style=\"cursor: default; LEFT: '+left+'px; WIDTH: '+width+'px; POSITION: absolute; TOP: '+top+'px; ZHEIGHT: '+(height+20)+'px\">\r\n'; 
txt2write += '<TABLE id=\''+name+'_tab\' height=\"100px\" cellSpacing=0 cellPadding=0 width=\"300px\"  border=0 align=center \r\n'; 
txt2write += 'background=\"\" border=0>\r\n'; 
txt2write += '  <TBODY>\r\n'; 
txt2write += '  <TR>\r\n'; 
txt2write += '    <TD ></TD>\r\n'; 
txt2write += '    <TD ></TD>\r\n'; 
txt2write += '    <TD ></TD></TR>\r\n'; 
txt2write += '  <TR>\r\n'; 
txt2write += '    <TD ></TD>\r\n'; 
txt2write += '    <TD vAlign=top align=middle>\r\n'; 
txt2write += '\r\n'; 
txt2write += '          <TABLE cellSpacing=0 cellPadding=0 width=0 border=0 Zheight=\"285px\">\r\n'; 
txt2write += '             <TBODY>\r\n'; 
txt2write += '             <TR>\r\n'; 
txt2write += '             <TD bgColor=#2A2A2A valign=top align=center height=20><FONT face=Verdana color=#ffffff size=2>\r\n'; 
txt2write += '\r\n'; 
txt2write += '    		     <TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0 height=20>\r\n'; 
txt2write += '      		        <TBODY>\r\n'; 
txt2write += '    	            <TR>\r\n'; 
txt2write += '   	 	            <TD align=left><b><FONT color=#ffffff size=2>\r\n'; 
txt2write += '    	            </FONT></b></TD>\r\n'; 
txt2write += '    	            <TD vAlign=center align=right>\r\n'; 
txt2write += '    	            <IMG \r\n'; 
txt2write += '    		        src=\"http://www.lachartreuse.com/fermeture.gif\" alt=\"Fermer la fenêtre\" width=13 height=13 border=0 onclick=\"DestroyWin(\''+name+'\')\" style=\"cursor: hand;\">&nbsp;</TD></TR>\r\n'; 
txt2write += '		         </TBODY></TABLE>\r\n'; 
txt2write += '\r\n'; 
txt2write += '			</FONT></TD></TR>\r\n'; 
txt2write += '        	<TR>\r\n'; 
txt2write += '       	    <TD ></TD></TR>\r\n'; 
txt2write += '       		 <TR>\r\n'; 
txt2write += '            <TD vAlign=top align=middle  border=0 ><IFRAME \r\n'; 
txt2write += '            style=\"HEIGHT:'+height+'px; BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px\" \r\n'; 
txt2write += '            name=ifrm_'+name+' src=\"'+src+'\" width=\"288px\" heightinit='+(height-18)+' ></IFRAME>\r\n'; 
txt2write += '            </TD></TR>\r\n'; 
txt2write += '        </TBODY></TABLE>\r\n'; 
txt2write += '\r\n'; 
txt2write += '    </TD>\r\n'; 
txt2write += '    <TD ></TD></TR>\r\n'; 
txt2write += '    <TR>\r\n'; 
txt2write += '    <TD ></TD>\r\n'; 
txt2write += '    <TD ></TD>\r\n'; 
txt2write += '    <TD ></TD></TR>\r\n'; 
txt2write += '\r\n'; 
txt2write += '</TBODY></TABLE>\r\n'; 
txt2write += '\r\n'; 
txt2write += '</DIV>\r\n'; 



txt2write += '<DIV id=\"ae_'+name+'\" \r\n'; 
txt2write += 'style=\"cursor: default; visibility: hidden; LEFT: '+left+'px; WIDTH: '+width+'px; POSITION: absolute; TOP: '+top+'px; \">\r\n'; 
txt2write += '<TABLE id=\'ae_'+name+'_tab\' height=\"100%\" cellSpacing=0 cellPadding=0 align=center \r\n'; 
txt2write += 'background=\"\" border=0>\r\n'; 
txt2write += '  <TBODY>\r\n'; 
txt2write += '  <TR>\r\n'; 
txt2write += '    <TD ></TD>\r\n'; 
txt2write += '    <TD  height=6></TD>\r\n'; 
txt2write += '    <TD ></TD></TR>\r\n'; 
txt2write += '  <TR>\r\n'; 
txt2write += '    <TD width=6 ></TD>\r\n'; 
txt2write += '    <TD vAlign=top align=middle>\r\n'; 
txt2write += '\r\n'; 
txt2write += '          <TABLE cellSpacing=0 cellPadding=0 width=100% border=0 Zheight=\"100%\">\r\n'; 
txt2write += '             <TBODY>\r\n'; 
txt2write += '             <TR>\r\n'; 
txt2write += '             <TD bgColor=#003366 valign=top align=center height=20><FONT face=Verdana color=#ffffff size=2>\r\n'; 
txt2write += '\r\n'; 
txt2write += '    		     <TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0 height=20>\r\n'; 
txt2write += '      		        <TBODY>\r\n'; 
txt2write += '    	            <TR>\r\n'; 
txt2write += '   	 	            <TD align=left height=4><FONT color=#ffffff size=2>&nbsp;'+title+' \r\n'; 
txt2write += '    	            </FONT></TD>\r\n'; 
txt2write += '    	            <TD vAlign=center align=right>\r\n'; 
txt2write += '    	            <IMG \r\n'; 
txt2write += '    		        src=\"fermeture.gif\" alt=\"Fermer la fenêtre\" width=13 height=13 border=0 onclick=\"DestroyWin(\''+name+'\')\" style=\"cursor: hand;\"></TD></TR>\r\n'; 
txt2write += '		         </TBODY></TABLE>\r\n'; 
txt2write += '\r\n'; 
txt2write += '			</FONT></TD></TR>\r\n'; 
txt2write += '        </TBODY></TABLE>\r\n'; 
txt2write += '\r\n'; 
txt2write += '    </TD>\r\n'; 
txt2write += '    <TD width=6 background=right.gif></TD></TR>\r\n'; 
txt2write += '    <TR>\r\n'; 
txt2write += '    <TD background=coin_bg.gif></TD>\r\n'; 
txt2write += '    <TD background=bottom.gif height=6></TD>\r\n'; 
txt2write += '    <TD background=coin_bd.gif></TD></TR>\r\n'; 
txt2write += '\r\n'; 
txt2write += '</TBODY></TABLE>\r\n'; 
txt2write += '\r\n'; 
txt2write += '</DIV>\r\n'; 

document.write(txt2write);
new dragElement(name);
new dragElement("ae_"+name);

return false;

}

function DestroyWin(name)
{
  document.getElementById("ae_"+name).style.visibility = "hidden";
  document.getElementById(name).innerHTML = "";
  document.getElementById(name).id = "deleted_"+parseInt(Math.random()*10000);
  return false;
}


