/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
// Recommander le site

function sendUrl(){ 
url = "http://amap.cirad.fr"; 
titre = document.title; 
sujet = "J'ai pensé que cela pourrait vous intéresser"; 
mail1 = "E-mail de votre ami"; 
window.location = "mailto:"+mail1+"?subject="+sujet+"&body="+titre+" "+url; 
   } 

//Pop up centré sur la page
// Utilisation: spop( 'monfichier.html', 'MaPopup', 100, 100, 'Mes options (Facultatif)' )
    // spop( fichier, nom, largeur, hauteur, options )
    function spop( fichier, nom, largeur, hauteur, options )
        {
            var id = Math.round( Math.random() * 100 );
            var gauche = ( screen.width - largeur ) / 2;
            var haut = ( screen.height - hauteur ) / 2;
            if ( options )
                {
                    options = 'width=' + largeur + 'px, height=' + hauteur + 'px,  top=' + haut + ', left=' + gauche + ', ' + options;
                }
            else
                {
                    options = 'width=' + largeur + 'px, height=' + hauteur + 'px,  top=' + haut + ', left=' + gauche;
                }
            document.open( fichier, nom + id, options );
        }
// Ouverture d'un popup aux dimensions de l'image
function PopupImage(img) {
titre="Agrandissement";
w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no');
w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>");
w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt=' Image dans pop-up '>");
w.document.write("</TD></TR></TABLE>");
w.document.write("</BODY></HTML>");
w.document.close();
}

window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}
/*
Site au démarrage du navigateur
SCRIPT TROUVE SUR WEBJS
*/
versionNav = navigator.appVersion;
placeMSIE5 = versionNav.indexOf("MSIE 5");

function AfficheHomePage()
	{
	if (placeMSIE5 > -1)
		{
		document.write('<img src="../icones/picto_home.gif" align="absmiddle" alt="Mettre ce site en page de démarrage" />&nbsp;<A HREF="#" onClick="HomePage(this);return(false);">Mettre ce site en page de démarrage</A><BR>');
		}
	}
function HomePage(obj)
	{
	obj.style.behavior='url(#default#homepage)';
	obj.setHomePage('http://umramap.cirad.fr/amap1/fr/maquette/index.php');
	}

/*
Basculer Français-Anglais Anglais-Français
*/
function tradlien(langue)
{
var lienatraduire = document.location +"";
if (langue=="anglais")
{
var traductionlien=lienatraduire.replace("/fr/","/en/");
//alert(traductionlien);
document.location.href=traductionlien;
}
else
if (langue=="francais")
{
var traductionlien=lienatraduire.replace("/en/","/fr/");
//alert(traductionlien);
document.location.href=traductionlien;
}
}	
