<!--

function RunFoo(swf, hauteur, largeur, couleur, nom, version) {
	document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+version+",0,0,0\" width=\""+hauteur+"\" height=\""+largeur+"\" id=\""+nom+"\" align=\"middle\">\n");
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />\n");
	document.write("<param name=\"wmode\" value=\"transparent\" />\n");
	document.write("<param name=\"movie\" value=\""+swf+"\" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\""+couleur+"\" /><embed src=\""+swf+"\" quality=\"high\" bgcolor=\""+couleur+"\" width=\""+hauteur+"\" height=\""+largeur+"\" name=\""+nom+"\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\n");
	document.write("</object>\n");
}

function afficher(calque) {
	document.getElementById(calque).style.display="inline";
}

function masquer(calque) {
	document.getElementById(calque).style.display="none";
}

function hauteurDiv(){
	var hauteurs = new Array(document.getElementById('colgche').offsetHeight, document.getElementById('ventre').offsetHeight, document.getElementById('coldroite').offsetHeight);
				
	hauteurMax=Math.max(parseInt(hauteurs[0]), parseInt(hauteurs[1]), parseInt(hauteurs[2]));
	
	document.getElementById('contenu').style.height=parseInt(hauteurMax)+"px";
	document.getElementById('colgche').style.height=parseInt(hauteurMax)+"px";
	document.getElementById('coldroite').style.height=parseInt(hauteurMax)+"px";
	document.getElementById('ventre').style.height=parseInt(hauteurMax)+"px";
}

function load() {
	if (GBrowserIsCompatible()) {         
		var map = new GMap2(document.getElementById("divmap"));
		map.setCenter(new GLatLng(50.687894444444444444444444444444, 3.1815583333333333333333333333333), 16);
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		var point = new GLatLng(50.687894444444444444444444444444, 3.1815583333333333333333333333333);
		var marker = new GMarker(point);
		map.addOverlay(marker);
		marker.openInfoWindowHtml("<b>Soci&eacute;t&eacute; APEN</b><br/>114, Rue Saint Jean<br/>59100 ROUBAIX");
	}
}

/*=================================================================================
Les photos
=================================================================================*/
function changerPhoto(id)
{
	document.getElementById('photoprincipale').innerHTML=document.getElementById('laphoto'+id).innerHTML;
}

function photoAps(total)
{
	for (i=total; i>1; i--)
	{
		etat=document.getElementById("photo"+i).style.display;
		if(etat=="none")
		{
			etatPhotoPrec=document.getElementById("photo"+(i-1)).style.display;
			if(etatPhotoPrec=="block")
			{
				document.getElementById("photo"+i).style.display="block";
				dep=i-5;
				document.getElementById("photo"+dep).style.display="none";
				break;
			}	
		}
	}
}

function photoAvt(total)
{
	for (i=0; i<total; i++)
	{
		etat=document.getElementById("photo"+i).style.display;
		if(etat=="none")
		{
			etatPhotoSuiv=document.getElementById("photo"+(i+1)).style.display;
			if(etatPhotoSuiv=="block")
			{
				document.getElementById("photo"+i).style.display="block";
				dep=i+5;
				document.getElementById("photo"+dep).style.display="none";
				break;
			}	
		}
	}
}

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
   {
   for(var i=0; i<document.images.length; i++)
	  {
   var img = document.images[i]
   var imgName = img.src.toUpperCase()
   if (imgName.substring(imgName.length-3, imgName.length) == "PNG" )
	  {
   var imgID = (img.id) ? "id='" + img.id + "' " : ""
   var imgClass = (img.className) ? "class='" + img.className + "' " : ""
   var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
   var imgStyle = "display:inline-block;" + img.style.cssText
   if (img.align == "left" ) imgStyle = "float:left;" + imgStyle
   if (img.align == "right" ) imgStyle = "float:right;" + imgStyle
   if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
   var strNewHTML = "<span " + imgID + imgClass + imgTitle
   + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
   + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
   img.outerHTML = strNewHTML
   i = i-1
	  }
	  }
   }
  

//-->