function afficheMenu(menu)
{
	cacheMenu();
	document.getElementById(menu).className='visible';
}

	function cacheMenu()
	{
		if (document.getElementById('sousMenu')) document.getElementById('sousMenu').className='invisible';
	}

function survolCase(element){
	element.style.cursor="pointer";
	element.className="caseSurvolee";
}
	
function finSurvolCase(element){
	element.style.cursor="default";
	element.className="case";
}

function load() {
    if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("planGoogle"));
        map.addControl(new GSmallMapControl());
        map.setCenter(new GLatLng(46.723977,2.491064, 16), 13);

		point(46.726087,2.468566,"<p><strong>Cartonnages Franche - Site d'Orval</strong><br />Zone Artisanale Les Noix Brul&eacute;es<br />18200 Orval<br />T&eacute;l : 02 48 96 31 54</p>",map);
		point(46.719483,2.514099,"<p><strong>Cartonnages Franche - Site de Saint Amand Montrond</strong><br />223, Rue Fromenteaux<br />18200 Saint Amand Montrond<br />T&eacute;l : 02 48 606415</p>",map);
}

function point(x,y,texte,map)
{
	var point = new GLatLng(x,y, 16);

	var marker = new GMarker(point);
	marker.value=1;
			
	//marker.icon=letteredIcon;
	GEvent.addListener(marker, "click", function() {
		map.openInfoWindowHtml(point, texte);
		});
		map.addOverlay(marker);
	 }
}

// ================================================ CONTROLE FORMULAIRE
	function validationForm(monform)
	{
		var reg_email = /^[A-Za-z0-9\.\-_]+[@][A-Za-z0-9\-\.]+[\.][A-Za-z][A-Za-z][A-Za-z]?$/;
				
		if (monform.societe.value=='')
		{
			alert("Veuillez indiquer votre société");
			monform.societe.focus();
			return false;
		}
		if (monform.nom.value=='')
		{
			alert("Veuillez indiquer votre nom");
			monform.nom.focus();
			return false;
		}
		if (monform.prenom.value=='')
		{
			alert("Veuillez indiquer votre prénom");
			monform.prenom.focus();
			return false;
		}
		if (monform.poste.value=='')
		{
			alert("Veuillez indiquer votre poste");
			monform.poste.focus();
			return false;
		}
		if (monform.email.value=='')
		{
			alert("Veuillez indiquer votre adresse email");
			monform.email.focus();
			return false;
		}
		if(!reg_email.test(monform.email.value))
		{
			alert("Le format de votre adresse email est incorrect");
			monform.email.focus();
			return false;
		}
		if (monform.texte.value=='')
		{
			alert("Veuillez préciser votre message");
			monform.texte.focus();
			return false;
		}
		if (monform.raisonVisite.value=='')
		{
			alert("Veuillez indiquer la raison de votre visite");
			monform.raisonVisite.focus();
			return false;
		}
		
		return true;
	}
// ================================================ CONTROLE FORMULAIRE
	
// ================================================ AFFICHAGE DES FLASH */
	function afficheFlash(version,nom,largeur,hauteur){
		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='+largeur+' height='+hauteur+'>\n');
		document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
		document.write('<param name="movie" value='+nom+' />\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<param name="wmode" value="transparent" />\n');
		document.write('<embed src='+nom+' quality="high" wmode="transparent" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width='+largeur+' height='+hauteur+'></embed>\n');
		document.write('</object>\n');
	}

	function afficheFlashMp3(version,nom,mp3,largeur,hauteur){
		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='+largeur+' height='+hauteur+'>\n');
		document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
		document.write('<param name="movie" value='+nom+'?mp3='+mp3+' />\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<param name="wmode" value="transparent" />\n');
		document.write('<embed src='+nom+'?mp3='+mp3+' quality="high" wmode="transparent" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width='+largeur+' height='+hauteur+'></embed>\n');
		document.write('</object>\n');
	}	
// ================================================ AFFICHAGE DES FLASH */
