function initAllFunction()
{
	//initInputs();
	initContactOpener();
}
function initContactOpener()
{
	var btn_1 = document.getElementById("contact-button-1");
	var btn_2 = document.getElementById("contact-button-2");
	var btn_close_1 = document.getElementById("close-contact-1");
	var btn_close_2 = document.getElementById("close-contact-2");
	if(btn_1 && btn_2 && btn_close_1 && btn_close_2)
	{
		btn_1.onclick = function (event) {
			this.parentNode.parentNode.parentNode.className += " active-left";
		}
		document.getElementById("state-2").onclick = function(event){
			this.parentNode.parentNode.className += " active-right";
		};
		btn_2.onclick = function (event) {
			this.parentNode.parentNode.parentNode.className += " active-right";
		}
		document.getElementById("state-1").onclick = function(event){
			this.parentNode.parentNode.className += " active-left";
		};
		
		
		btn_close_1.onclick = function (event) {
			this.parentNode.parentNode.parentNode.parentNode.className = "bottom";
		}
		btn_close_2.onclick = function (event) {
			this.parentNode.parentNode.parentNode.parentNode.className = "bottom";
		}
	}
}
function initInputs()
{
	var inputs = document.getElementsByTagName("input");
	for (var i=0; i<inputs.length; i++)
	{
		if (inputs[i].type == "text" && (inputs[i].name == "address" || inputs[i].name == "numero" || inputs[i].name == "telephone" || inputs[i].name == "email"))
		{
			inputs[i].onfocus = function ()
			{
				if (this.value == "adresse@votreserveur.com" || this.value == "Inscrivez votre numero" || this.name == "telephone" || this.name == "votre e-mail")
					this.value = "";
			}
			inputs[i].onblur = function ()
			{
				if (this.value == "" && this.name == "address") this.value = "adresse@votreserveur.com";
				if (this.value == "" && this.name == "numero") this.value = "Inscrivez votre numero";
			}
		}
	}
}
if (window.addEventListener)
	window.addEventListener("load", initAllFunction, false);
else if (window.attachEvent)
	window.attachEvent("onload", initAllFunction);
