$(document).ready(function()
{
	/**
	* GOOGLE MAP
	*/
	var aLocations = new Array();
	var aTitles = new Array();
	var aDetails = new Array();

	aLocations = [
				'lmi reconstruction saulnes france',
				'37 rue prosper cabriol, 54940 bellville',
				'90 rue de cessange, 1320 Luxembourg'
				];
				
	aTitles = [
			'LMI Reconstruction',
			'LMI Reconstruction',
			'LMI Reconstruction'
			];
			
	aSummary = [
			'<h3>LMI Reconstruction</h3><p>Zoning Industriel, 54650 Saulnes</p>',
			'<h3>LMI Reconstruction</h3><p>37 rue Prosper Cabriol, 54940 Belleville</p>',
			'<h3>LMI Reconstruction</h3><p>90 Rue de Cessange, 1320 Luxembourg</p>'
			];

	$('#gmap').GoogleMap(aLocations, aTitles, aSummary, {
		type: 3,
		zoom: 6,
		width: '450px',
		height: '180px'
	});
	
	
	/**
	* DEVIS
	*/
	function getUrlVars()
	{
	    var vars = [], hash;
	    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
	    for(var i = 0; i < hashes.length; i++)
	    {
	        hash = hashes[i].split('=');
	        vars.push(hash[0]);
	        vars[hash[0]] = hash[1];
	    }
	    return vars;
	}
	if ($(".machine input"))
	{
		var machine = getUrlVars()["machine"];
		ma = decodeURIComponent(machine);
		$(".machine input").attr("value", ma);
	}
	
});
