function ouvrePopup(w, h, id) {
	window.open('',id,"width="+w+",height="+h+",top="+(screen.height-h)/2+",left="+(screen.width-w)/2+",statusbar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=no");
	return false;
}

function boutonFlash(fond, url, texteBtn, aCharger) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="80" height="115">');
	document.write('<param name="movie" value="/SWF/btn_nav4.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="'+fond+'" />');
	document.write('<param name="flashvars" value="texteBtn='+texteBtn+'&aCharger='+aCharger+'&url='+url+'" />');
	document.write('<embed src="/SWF/btn_nav4.swf"  bgcolor="'+fond+'" flashvars="texteBtn='+texteBtn+'&aCharger='+aCharger+'&url='+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="80" height="115"></embed>');
	document.write('</object>');
}

function lanceCarto( 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 );
}

function carteFlash() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100%" height="100%">');
	document.write('<param name="movie" value="carte.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<embed src="carte.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="725"></embed>');
	document.write('</object>');
}

function addBookmark(titre, url) {
   if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) {
      window.sidebar.addPanel(titre, url, "");
   } else if (window.external) {
      window.external.AddFavorite(url, titre);
   } else {
      alert("Pour ajouter 'Mairie de Gien' à vos favoris, utilisez <CTRL>+D.");
   }
   return true;
}

function policePlus (tailleOrig) {
	if (!document.body.style.fontSize) var size = Number(tailleOrig + 10);
	else var size = Number(parseInt(document.body.style.fontSize, 10) + 10);
	document.body.style.fontSize = size+"%";
	
}

function policeMoins (tailleOrig) {
	if (!document.body.style.fontSize) var size = Number(tailleOrig - 10);
	else var size = Number(parseInt(document.body.style.fontSize, 10) - 10);
	document.body.style.fontSize = size+"%";
	
}