// JavaScript Document
function mouseOver(id){
	var btn =  document.getElementById(id);
	if (btn.style.backgroundImage!="url(img/selection.png)")
	{
		btn.style.backgroundImage ="url('img/rollover.png')";
	}
	
}

function mouseOut(id)
{
	var btn =  document.getElementById(id);
	if (btn.style.backgroundImage!="url(img/selection.png)")
	{
		btn.style.backgroundImage ="url('img/normal.png')";
	}
}

function selectionBouton(name, onglet){
	var id = "btn1";

	switch(name)
	{
		case "acceuil":
		id ="btn1";
		break;
		case "cosmetiques":
		id ="btn2";
		break;
		case "client":
		id ="btn3";
		if(onglet =="") onglet = "visite";
		break;
		case "professionnel":
		id ="btn4";
		if(onglet =="") onglet = "recrutement";
		break;
		case "media":
		id ="btn5";
		if(onglet =="") onglet = "tv";
		break;
		case "contact":
		id ="btn6";
		break;
		default:
		break;
		
	}
	var btn =  document.getElementById(id);
	btn.style.background ="url('img/selection.png')";
	//alert(btn.style.backgroundImage);
	if(onglet!="")
	{
		var btno =  document.getElementById(onglet);
		btno.style.background ="url('img/ongletOn.png')";
	}
}
 

function ongletOver(id, cur){
	if(id!=cur){
	var onglet =  document.getElementById(id);
	onglet.style.backgroundImage ="url('img/ongletOver.png')";
	}
}

function ongletOut(id, cur)
{
	if(id != cur){
var btn =  document.getElementById(id);
btn.style.background ="url('img/onglet.png')";
	}
}

function imgOver(id){
	var img =  document.getElementById(id);
	img.src = "img/"+id+"Over.jpg";
	//img.style.backgroundImage ="url('img/"+id+"Over.png')";
}

function imgOut(id)
{
var img =  document.getElementById(id);
img.src = "img/"+id+".jpg";
}


function FillExperience(val)
{
	if(val == "0")
	{
		document.forms[0].expDomicileSalarie.value = "0";
		document.forms[0].expDomicileArtisan.value = "0";
		document.forms[0].expSalonSalarie.value = "0";
		document.forms[0].expSalonGerant.value = "0";
	}
}

function ShowAnimal(id)
{
	document.getElementById("chien1").style.display = "none";
	document.getElementById("chien2").style.display = "none";
	document.getElementById("chien3").style.display = "none";
	document.getElementById("chien4").style.display = "none";
	document.getElementById("chien5").style.display = "none";
	document.getElementById(id).style.display = "inline";
}

function ShowNextAnimal()
{
	if(document.forms[0].nomC1.value.length != 0 && document.forms[0].raceC1.value.length != 0 && document.forms[0].ageC1.value.length != 0)
	{
		document.getElementById("scp1").innerHTML = document.forms[0].nomC1.value;
		ShowAnimal("chien2");
	}
	if(document.forms[0].nomC2.value.length != 0 && document.forms[0].raceC2.value.length != 0 && document.forms[0].ageC2.value.length != 0)
	{
		document.getElementById("scp2").innerHTML = document.forms[0].nomC2.value;
		ShowAnimal("chien3");
	}
	if(document.forms[0].nomC3.value.length != 0 && document.forms[0].raceC3.value.length != 0 && document.forms[0].ageC3.value.length != 0)
	{
		document.getElementById("scp3").innerHTML = document.forms[0].nomC3.value;
		ShowAnimal("chien4");
	}
	if(document.forms[0].nomC4.value.length != 0 && document.forms[0].raceC4.value.length != 0 && document.forms[0].ageC4.value.length != 0)
	{
		document.getElementById("scp4").innerHTML = document.forms[0].nomC4.value;
		ShowAnimal("chien5");
	}
	if(document.forms[0].nomC5.value.length != 0 && document.forms[0].raceC5.value.length != 0 && document.forms[0].ageC5.value.length != 0)
	{
		document.getElementById("scp5").innerHTML = document.forms[0].nomC5.value;
	}
}

function UnderLineOver(id)
{
document.getElementById(id).style.textDecoration = "underline";
}
function UnderLineOut(id)
{
document.getElementById(id).style.textDecoration = "none";
}