
function changeContent(topic,encre)
{
	var signature='<br clear=all /><hr width=100%><p class="legend">&copy; Maison-passion - tous droits réservés<br/><a href="http://www.cayenne.be" target="_BLANK">Powered by Cayenne</a></p></div>';

	var label=topic;

	if(topic=="portes_fenetres" || topic=="portes" || topic=="fenetres" )
	{
		changebackground();	
	}
	else
	{
		changebacktonormal();
	}
	var myRequest = new Request({method: 'get', url: 'getContent.php',onComplete: function(response) { $('content').innerHTML=response+"</div>"+signature; if(encre!=null && encre.length > 0) {document.location="#"+encre}else{document.location="#"}}});
 	
	golabel(label);
	myRequest.send('content='+topic);
	
}


//var movieName = "animFlash";
var movieName = "instrore";

function changebackground()
{

	document.body.style.backgroundImage = "url('./images/background_abihome.jpg')";
	document.body.style.backgroundColor="#7c9dbe";
}

function changebacktonormal()
{

	document.body.style.backgroundImage = "url('./images/background.png')";
	document.body.style.backgroundColor="#b2361c";
}


function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  }	else {
    return document[movieName]
  }
}

// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
  if (typeof(theMovie) != "undefined") {
    return theMovie.PercentLoaded() == 100;
  } else {
    return false;
  }
}


function go(theFrame) {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).GotoFrame(theFrame);
  }
}


function golabel(thelabel) {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).TGotoLabel("_level0/",thelabel);
  }
}



	function checkform()
	{
		var error="";

 		if(document.getElementById('Nom').value=="")
 		{
			error+="Le champs nom est obligatoire\n";
 		}
 
 		if(document.getElementById('Prenom').value=="")
 		{
 			error+="Le champs prénom est obligatoire\n";
 		}

 		if(document.getElementById('Telephone').value=="")
 		{
 			error+="Le champs téléphone est obligatoire\n";
 		}

		if(error.length > 0)
 		{
 			alert(error);
			return false;
 		}
 		else
 		{
 			document.getElementById('contactform').submit();
 		}
	}

