// JavaScript Document
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}

function afficherAnimation()
{
	document.write('<DIV style="margin-left:1px;"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="720" height="576">'
+'<PARAM name="movie" value="introduction-11.swf">'
+'<PARAM name="quality" value="high">'
+'<EMBED src="introduction-11.swf" width="720" height="576" QUALITY="high" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" TYPE="application/x-shockwave-flash"></EMBED>'
+'</OBJECT></DIV>');
}

function activerAnimation()
{
	MM_showHideLayers('animationIntroduction','','show','lienInterieur','','show','fondPageSansVagues','','hide','fondPage','','hide');
}

function afficherContenu( contenu, titre )
{
	document.getElementById('Ifrm').src = contenu;
	MM_showHideLayers('contenuIframe','','show');
	document.getElementById('titreRubrique').innerHTML='<IMG src="/image/en/titre-'+ titre +'.png" width="230" height="11" border=0  onload="fixPNG(this)">'
}

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; }
}

// -- Taille écran --------------------------------------------------------------------
var PETIT_ECRAN = true;

function calculerTailleEcran()
{

var frameWidth = 0;
var frameHeight = 0;

if (self.innerWidth)
{
	frameWidth = self.innerWidth;
	frameHeight = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientWidth)
{
	frameWidth = document.documentElement.clientWidth;
	frameHeight = document.documentElement.clientHeight;
}
else if (document.body)
{
	frameWidth = document.body.clientWidth;
	frameHeight = document.body.clientHeight;
}

if (frameHeight > 718){ PETIT_ECRAN = false; }

}

// -- Affichages --------------------------------------------------------------------

var LANGUAGE ='';

function ShowCollection(collection)
{
	if(LANGUAGE != '')
	{
		document.getElementById('Ifrm').src = 'collection/'+collection+'/index.php?lang='+LANGUAGE;
		MM_showHideLayers('contenuIframe','','show');
	}
}

function DownloadPDF(filename)
{
	if(LANGUAGE != '')
	{
		document.location='download.php?file='+filename+'-'+LANGUAGE+'.pdf';
	}
}


