 function popup(page,w,h,center) {
  // ouvre une fenetre sans barre d'etat, ni d'ascenceur, avec une hauteur de 
  if (!w) w=600;
  if (!h) h=300;
  sLeft="";
  sTop="";
  if (center)
  {
  	sLeft="left="+((screen.width-w) / 2)+",";
	sTop="top="+((screen.height-h) / 2)+",";		
  }
  win=window.open(page,'',sLeft+sTop+'width='+w+',height='+h+',toolbar=no,scrollbars=yes,resizable=yes');	
  win.focus();
 // 'toobar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=430,height=420'
 }
 
function VoirEntrepriseRecherche(id,forum,params)
{
	VoirEntreprise(id,forum,params);
 //if (!forum) forum='';
// back1=escape(document.location.href+params);
// back2=back1;
 /* if (!main) path='./';
 	else path='';*/
 document.location.href="fiche_entreprise.php?id="+id+"&"+params; 	 
}

function VoirEntreprise(id,forum,param)
{
	if(forum=='formation'){
		document.location.href="fiche_ecoles.php?id="+id+"&"+param; 
	}
	else{
	document.location.href="fiche_entreprise.php?id="+id+"&"+param; 	
	}
}

function PopupStatsLiens(id,lien)
{
 StatsSociete(id,"LIEN_");
 win=window.open(lien);	
 win.focus();	
}

function PopupStatsBanniere(id,lien)
{
 StatsSociete(id,"BANNIERE_");
 win=window.open(lien);	
 win.focus();	
}

function PopupStatsSite(id,lien)
{
 StatsSociete(id,"SITE_");
 win=window.open(lien);	
 win.focus();	
}

function BlankWindowLienStats(lien,soc_nom)
{	
	soc_nom=FormatForStats(soc_nom);
  	StatsSociete('',"LIEN_",soc_nom);
	window.open(lien);
}

function popupTempStats(page,soc_nom,width,heigth) {
  // ouvre une fenetre sans barre d'etat, ni d'ascenceur, avec une hauteur de 
  if (!width) width=350;
  if (!heigth) heigth=180;
  soc_nom=FormatForStats(soc_nom);
  StatsSociete('',"VOIR_INTERNE_",soc_nom);
  win=window.open(page,'','width='+width+',height='+heigth+',toolbar=no,scrollbars=yes,resizable=yes');	
  win.focus(); 
 }

function StatsSociete(id,prefixe,page)
{
 ref = escape(window.document.referrer);
 //ref = escape(document.location.href);
 if (window.document.location.host.indexOf("web2k3")>=0)
 	urlstats="http://web2k3:81/initialis_new/commun/stats.php?id="+ id+"&disp="+prefixe+"&page="+escape(page)+"&ref="+ref+ "&n="+ Math.round (Math.random () * 1000000000000000);
 else
	urlstats="http://www.initialis.org/commun/stats.php?id="+ id+"&disp="+prefixe+"&page="+escape(page)+"&ref="+ref+ "&n="+ Math.round (Math.random () * 1000000000000000);
//document.write(urlstats);
 img=new Image();
 img.src=urlstats;
}



 /*function popupNoStats(page,width,heigth) {
  // ouvre une fenetre sans barre d'etat, ni d'ascenceur, avec une hauteur de 
  if (!width) width=350;
  if (!heigth) heigth=180;
  win=window.open(page,'','width='+width+',height='+heigth+',toolbar=no,scrollbars=yes,resizable=yes');	
  win.focus();
  }

 function popupTempStats(page,soc_nom,width,heigth) {
  // ouvre une fenetre sans barre d'etat, ni d'ascenceur, avec une hauteur de 
  if (!width) width=350;
  if (!heigth) heigth=180;
  win=window.open(page,'','width='+width+',height='+heigth+',toolbar=no,scrollbars=yes,resizable=yes');	
  win.focus();
  pos=0;
  soc_nom=FormatForStats(soc_nom);
  mesure("Mesure Pro","SPONSOR_"+soc_nom,true);
 }
 



function mesure(_MesurePro, _page,noimg)
{
	return ;
	scr_w = screen.width;
	scr_h = screen.height;
	color = screen.colorDepth;
	ref = escape(window.document.referrer);
	if (!noimg)
		document.write("<IMG src='http://www.direct-stats.com/cgi-bin/pro/stats/clamm/marqueur.pl/"+ "?page="+ _page+ "&n="+ Math.round (Math.random () * 1000000000000000)+ "&reso_w="+ scr_w+ "&reso_h="+ scr_h+ "&color="+color+ "&referer="+ ref+"' border=0>");
	else
		{
			img=new Image()
			img.src="http://www.direct-stats.com/cgi-bin/pro/stats/clamm/marqueur.pl/"+ "?page="+ _page+ "&n="+ Math.round (Math.random () * 1000000000000000)+ "&reso_w="+ scr_w+ "&reso_h="+ scr_h+ "&color="+color+ "&referer="+ ref;
		}
}
*/

function FormatForStats(soc_nom)
{
 while( (pos=soc_nom.indexOf(" "))>=0)
  {
  	temp=soc_nom.substr(0,pos);
	temp+="_";
	temp+=soc_nom.substr(pos+1,soc_nom.length);	
	soc_nom=temp;
  }
  return soc_nom.toUpperCase();
}

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.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 MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function addBookmark(adresse, titre){
	browsername = navigator.appName;
	browserVer = parseInt(navigator.appVersion);
	if (browsername == "Microsoft Internet Explorer" && browserVer >= 4){
		window.external.AddFavorite(adresse, titre);
	}else{
		window.alert("Cliquez sur OK puis tapez Ctrl+D pour ajouter le site dans vos favoris.");
	}
}

//-->

