//********************************************// Javascript d'ouverture de fenetre multiplateforme// Hubert Gailly hgailly@quantix.fr// Copyright Quantix 2000-2001//********************************************// Les variablesvar params;var strns;var strie;var w;var h;var xvar y;// Pour la platformevar isNS = (navigator.appName == "Netscape");var isMAC = (navigator.platform.indexOf('Mac') != -1); // Les parametres NS_MAC : NS-PC : IE_MAC : IE_PC// Marge LargeurdeltaWidth = (isNS)? ((isMAC)? -10 : -20) : ((isMAC)? -20 : -20);// Marge HauteurdeltaHeight = (isNS)? ((isMAC)? -50 : -62) : ((isMAC)? -5 : -70);// Décalage gauchedeltaLeft = (isNS)? ((isMAC)? -6 : -6) : ((isMAC)? -5 : -5);// Décalage hautdeltaTop = (isNS)? ((isMAC)? -30 : -30) : ((isMAC)? -10 : -30);// Les tableaux pour retenir les fenetresvar arWinRef = new Array();var arWinName = new Array();var thiswindow;function getSize(width , height  , margeleft , margetop  , adroite , enbas){			if(width == null || height == null) {		w = screen.width + deltaWidth; 		h = screen.height + deltaHeight;	}	else {		w = width;		h = height;	}	if(margeleft != null){		if(adroite == null || adroite == false)			x = margeleft + deltaLeft;		else			x = screen.width - w - margeleft + deltaLeft;	}	else{		x = (screen.width - w) / 2 + deltaLeft;	}	if(margetop != null){		if(enbas == null || enbas == false)			y = margetop + deltaTop + 30;		else			y = screen.height - h - margetop + deltaTop - 20;	}	else{		y = (screen.height - h) / 2 + deltaTop;	}}function openWindow (theUrl , Nom , width , height , margeleft , margetop , adroite , enbas , winparams) {		// openwindow(Url , Nom) -> ouvre en plein écran //	// openwindow(Url , Nom , width , height ) -> ouvre centré //		// openwindow(Url , Nom , width , height  , margeleft , margetop  , adroite , enbas) -> ouvre positionné  //		getSize(width , height  , margeleft , margetop  , adroite , enbas);		if(winparams == null){		strns = 'scrollbars=no,status=no,resizable=no,width=' + w + ',height=' + h + ',screenX=' + x + ',screenY=' + y;		strie = 'scrollbars=no,status=no,resizable=no,width=' + w + ',height=' + h + ',left=' + x + ',top=' + y;	}	else{				strns = winparams + ',width=' + w + ',height=' + h + ',screenX=' + x + ',screenY=' + y;		strie = winparams + ',width=' + w + ',height=' + h + ',left=' + x + ',top=' + y;	}		topparams = (isNS) ? strns  : strie;	var indice = findInArray(Nom);	if(findInArray(Nom) == -1){		thiswindow = window.open(theUrl , Nom , topparams);		thiswindow.focus();		arWinRef = new Array(arWinRef.length + 1);		arWinRef[arWinRef.length-1] = thiswindow;		arWinName = new Array(arWinName.length + 1);		arWinName[arWinName.length-1] = Nom;	}	else{		if(arWinRef[indice].closed){			thiswindow = window.open(theUrl , Nom , topparams);			thiswindow.focus();			arWinRef[indice] = thiswindow;		}		else{			thiswindow = arWinRef[indice].open(theUrl , Nom);			arWinRef[indice].focus();		}	}		}function moveWindow (width , height , margeleft , margetop , adroite , enbas , thiswindow) {		getSize(width , height  , margeleft , margetop  , adroite , enbas);	if(navigator.appName == "Netscape"){		h = h - 80;	}	else{			w = w + 10		h = h + 30;	}	top.resizeTo(w, h);	top.moveTo(x,y)}function findInArray(Name){	var i = -1;	for(j = 0 ; j < arWinName.length ; j++){		if(arWinName[j] == Name){			i = j			j = arWinName.length		}		}	return i;}