////////////////////////////////////////////////

////////////////////////////////////////////////

//////////                            //////////

////////// Popup ver 3.0f Windows-Mac //////////

//////////                            //////////

////////// Agence Elypse     Ronan    //////////

//////////                            //////////

////////////////////////////////////////////////

////////////////////////////////////////////////





// Agence Elypse 42, rue Pierre Belon 72000 Le Mans



//___________________________________________________________________________________________

// Attention :                                                                       

//             								

// Entre les deux balises Head mettre :													

//																					

// <script language="JavaScript" src="popup.js">										

// </script>																			

//			

// Dans la balise body mettre   onload="init();"									

//																		Pour une page standard :

				

// Ouvrir une page en mettant        	<a href="#" onClick="openpop('page.htm')">lien</a>	

// ou              	   		<a href="javascript:openpop('page.htm')">lien</a>	

//

// Pour une page de taille spécifique :

				

// Ouvrir une page en mettant        	<a href="#" onClick="openpop('page.htm',largeur,hauteur,x,y,indépendant)">lien</a>	

// ou              	   		<a href="javascript:openpop('page.htm',largeur,hauteur,x,y,indépendant)">lien</a>	

//

//indépendant :

//oui = nom de la fenetre

//non = ne rien mettre			

//____________________________________________________________________________________________







//____________________________Déclarations de variable_________________________________________



var a = 1;



// largeur standard



var ws = 565;



// hauteur standard



var hs = 368;



// x standard



var xs = 60;



// y standard



var ys = 60;



var micro = navigator.platform;

var mic= micro.charAt(0);





//____________________________fin declaration de varaiable_____________________________________



function MM_findObj(n, d) { //v3.0

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

	    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

		  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;

		  }



		  function MM_showHideLayers() { //v3.0

		    var i,p,v,obj,args=MM_showHideLayers.arguments;

			  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];

			      if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }

				      obj.visibility=v; }

}





function init() {



//definit la variable fenetre pour eviter les erreurs



fenetre=window.open("temp.cfm","fenetre","width=10,height=10");

setTimeout( "fenetre.close();" , 0)

self.name="parentWin";

}



function openpop(page,w,h,x,y,i) {

//alert("Variab':    page= "+page+"  w= "+w+"  h= "+h+"  x= "+x+"  y= "+y+"  i= "+i);



	if (w==null)

	{

		var param="'toolbar=no,hotkeys=no,menubar=no,titlebar=no,status=no,scrollbars=yes,directories=no,dependent=yes,resizable=yes,width="+ws+",height="+hs+"'";

	}

	else

	{

		var param="'toolbar=no,hotkeys=no,menubar=no,titlebar=no,status=no,scrollbars=yes,directories=no,dependent=yes,resizable=yes,width="+w+",height="+h+"'";

	}



	if (i==null) {

		if (mic=="W")

			{

				if (fenetre.closed)

					{

					fenetre = window.open(page,"fenetre",param);

					}		

				else

					{

					fenetre.close();

					fenetre = window.open(page,"fenetre",param);

					}

			}

		else

			{

			fenetre=window.open(page,"fenetre",param);

			}

		// placement de la fenetre

		if (x==null)

		{fenetre.moveTo(xs,ys);}

	else

		{fenetre.moveTo(x,y);}

		

	}// fin du ifi



	else

 	{	f= window.name;

		a = a+1;

		f = f+a;

		f= window.open(page,f,param);

		if (x==null)

			f.moveTo(xs,ys);

		else

			f.moveTo(x,y);

 	}// fin du else







}//fin total

