function popup(url,name, w, h,p)
{	var param =  p+'toolbar=no,menubar=no,location=no,scrollbars=yes,width=' + w + ',height=' + h;
	var param2 ='top=10000,left=10000,scrollbars=no,menubar=no,width=' + w + ',height=' + h;

	// 1- Fermer la fenêtre ayant ce nom:
	// - Double avantage: en MSIE, la fenêtre annexe passe en avant-plan
	// - Même si le serveur externe est long a répondre, on n'a pas le contenu précédent,
	// mais une fenêtre vierge.
	// NB: il y a des problèmes sur MAC, et avec MSIE4 et antérieurs,
	// et également avec Opera: il sont donc exclus de la refermeture
	var nv = navigator.appName + navigator.appVersion;
	var MAC = (nv.indexOf( "Mac" ) != -1);
	var MSIE4=((nv.indexOf( "MSIE 4" ) != -1) || (nv.indexOf( "MSIE 3" ) != -1) || (nv.indexOf( "MSIE 2" ) != -1))
	var Opera = (nv.indexOf( "Opera" ) != -1);
	// alert( "MAC=" + MAC + ", MSIE4=" + MSIE4 + ", Opera=" + Opera )
	if ( !MAC && !MSIE4 && !Opera )
	{	// On est obligé d'ouvrir pour avoir un identifiant de fenêtre
		w = window.open("", name, param2);
		w.close(); // afin de pouvoir fermer
	}
	
	// 2- Ouverture de la fenêtre demandée
	w = window.open( url,name, param );
	// focus, si supporté (pas par MSIE4 et antérieurs; devrait être OK sur MAC)
	if ( !MSIE4 ) w.focus();
}

function ShowText(strText)
{	window.status=strText;
	return true;
}

function ShowText(strText)
{	window.status=strText;
}

function setCurrentTool(toolindex)
{	setNivZoom(toolindex);
}

// BROWSER SNIFFER (Sniff out the good and bad browsers)

function Is()
{	var agent = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
    this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
    this.ns2 = (this.ns && (this.major == 2));
    this.ns3 = (this.ns && (this.major == 3));
    this.ns4b = (this.ns && (this.minor < 4.04));
    this.ns4 = (this.ns && (this.major >= 4));
    this.ie   = (agent.indexOf("msie") != -1);
    this.ie3  = (this.ie && (this.major == 2));
    this.ie4  = (this.ie && (this.major >= 4));
    this.op3 = (agent.indexOf("opera") != -1);
    this.win   = (agent.indexOf("win")!=-1);
    this.mac   = (agent.indexOf("mac")!=-1);
    this.unix  = (agent.indexOf("x11")!=-1);
}

var is = new Is();

function DoAction(strAction)
{	
	var frm=frames['iframemap'].document.forms['Formulaire'];
	frm.cmd.value = strAction;
	frm.submit();
}

