/* $VERSION: lancement_cgi.js 3.1.032.1.2011.02.09.09.11	 */
var ggWinLancementCGI;

// Ecriture dans le document
LancementCGI.prototype.wwrite = function(wtext) {
	this.gWinLancementCGI.document.writeln(wtext);
}

// Ecriture dans le document
LancementCGI.prototype.wwriteA = function(wtext) {
	this.gWinLancementCGI.document.write(wtext);
}

LancementCGI.prototype.show = function()
{
	this.gWinLancementCGI.document.open();
	this.wwrite("<html>");
	this.wwrite("<head><title>" + this.gNom + " </title>");
	this.wwrite("<script>");
	this.wwrite("function load(){");
	if (this.reload)
		this.wwrite("self.opener.location=self.opener.location;");
	this.wwrite("window.parent.document.body.rows='0,*';");
	this.wwrite("window.resizeTo(800,600)");
	this.wwrite("}");
	this.wwrite("</script>");
	this.wwrite("</head>");
	this.wwrite("<frameset rows='*,0' frameborder='NO' border='0' framespacing='0' onLoad='javascript:load()'>");
	this.wwrite("<frame name='lancementcgi' src='/composants/patientez_cgi.html' scrolling=no>");
	this.gUrl=this.gUrl.replace(/\'/g,"&#39;");
	this.wwrite("<frame name='cgi' src='"+this.gUrl+"'>");
	this.wwrite("</frameset>");
	this.wwrite("<noframes>");
	this.wwrite("<body>");
	this.wwrite("</body>");
	this.wwrite("</noframes>");
	this.wwrite("</html>");
	
	this.gWinLancementCGI.document.close();
}

// Constructeur
function LancementCGI(p_nom, p_url, p_reload)
{
	this.gNom = p_nom;
	this.gUrl = p_url;
	this.reload = p_reload;
	this.gWinLancementCGI = ggWinLancementCGI;
}

function BuildLancementCGI(p_nom, p_url, p_reload)
{
	gLancementCGI = new LancementCGI(p_nom, p_url, p_reload);
	gLancementCGI.show();
}

function show_LancementCGI()
{
	p_nom = arguments[0];
	p_url = arguments[1];
	p_reload = arguments[2];
	
	vWinLancementCGI = window.open(
		"", 
		"LancementCGI",
		"width=350,height=140,status=no,menubar=yes,toolbar=yes,resizable=yes,left=200,scrollbars=no,dependant=yes");
	vWinLancementCGI.opener = self;
	ggWinLancementCGI = vWinLancementCGI;
	BuildLancementCGI(p_nom, p_url, p_reload);
}
