function ChangerBackgroundColor() {
	var Couleurs = new Array("rgb(253, 241, 184)", 
		"rgb(90, 58, 34)", 
		"rgb(119, 181, 254)", 
		"rgb(190, 245, 116)", 
		"rgb(224, 205, 169)");
	$("body").css("background-color", Couleurs[Math.floor(Math.random() * Couleurs.length)]);
}
function ChangerBackgroundImage() {
	var Motifs = new Array("url(http://www.zerotieme.fr/public/images/bgifrance.png)", "url(http://www.zerotieme.fr/public/images/bgjeuvie.png)", "url(http://www.zerotieme.fr/public/images/bgcarres.png)");
	$("body").css("background-image", Motifs[Math.floor(Math.random() * Motifs.length)]);
}

div = {
	modifieVisibilite: function(elem, visibility, zIndex) {
		document.getElementById(elem).style.visibility = visibility;
		document.getElementById(elem).style.zIndex = zIndex;
	},
	modifiePosition: function(elem, position, top, left) {
		document.getElementById(elem).style.position = position;
		document.getElementById(elem).style.top = top + "px";
		document.getElementById(elem).style.left = left + "px";
	},
	showCenter: function(elem, width, height) {
		var larg = 1000;
		var haut = 700;
		var correction = 0;
		if(navigator.appName == 'Microsoft Internet Explorer') {
			if(document.body) {
				larg = (document.body.clientWidth);
				haut = (document.body.clientHeight);
			}
			correction = 170;
		}
		else
		{
			larg = (window.innerWidth);
			haut = (window.innerHeight);
		}
		larg = Math.round((larg - width) / 2);
		haut = Math.round(((haut - height) / 2) + correction);
		div.modifiePosition(elem, "absolute", haut, larg);
		div.modifieVisibilite(elem, "visible", "100");
	},
	mettreEnAvant: function(divMasque, divAffiche, width, height) {
		div.modifieVisibilite(divAffiche, 'visible', '100');
		div.modifieVisibilite(divMasque, 'hidden', '-1');
		div.showCenter(divAffiche, width, height);		
	}
}
input = {
	arrive: function(valeurParDefaut, elem) {
		inputElement = document.getElementById(elem);
		if(inputElement.value == valeurParDefaut) {
			inputElement.value = '';
		}	
	},
	quitte: function(valeurParDefaut, elem, container) {
		if(inputElement.value == '') {
			inputElement.value = valeurParDefaut;
		}
		document.getElementById(container).style.visibility = 'hidden';
	}
}
body = {
	menuJS: function(menuMasque, menuAffiche, afficherMetro) {
		div.modifieVisibilite(menuAffiche, 'visible', '100');
		div.modifieVisibilite(menuMasque, 'hidden', '-1');	
		if(afficherMetro == 1) {
			div.showCenter('planMetro', 697, 271);
		}
	}
}