function trimNodes(elt) {
	for(i=0; i<elt.childNodes.length; i++) {
		if(elt.childNodes[i].nodeType == 3) {
			// remover le node
			elt.removeChild(elt.childNodes[i]);
		}
	}
}

function customMenuRaccourcis() {
	if(document.getElementById('menu_raccourcisSejours')) {
		var tabColors = new Array('#0053a2', '#c41d29', '#00564e');
		var tabLangues = document.getElementById('menu_raccourcisSejours').getElementsByTagName('a');
		var surtitre = document.getElementById('menu_raccourcisSejours').firstChild.firstChild.nodeValue;
		for(itL=0; itL<tabLangues.length; itL++) {
			tabLangues[itL].style.color = tabColors[itL];
			var content = tabLangues[itL].firstChild.firstChild;
			var contentplusNode = document.createElement('em');
			tabLangues[itL].firstChild.insertBefore(contentplusNode, content);
			var contentplus = document.createTextNode(surtitre);
			contentplusNode.appendChild(contentplus);
		}
	}
}

function customForm() {
	var nbForms = document.getElementsByTagName('form');
	if(nbForms.length > 1) {
		if(document.getElementById('formContact_ctDauminSectionIndividuel')) var myForm = document.getElementById('formContact_ctDauminSectionIndividuel');
		if(document.getElementById('formContact_contactDauminSectionTransport')) var myForm = document.getElementById('formContact_contactDauminSectionTransport');
		if(document.getElementById('formContact_contactDauminSectionGroupe')) var myForm = document.getElementById('formContact_contactDauminSectionGroupe');
		 
		var titreForm = document.createElement('h3');
		myForm.insertBefore(titreForm, myForm.firstChild);
		var txtTitreForm = document.createTextNode("Vous êtes intéressé, demandez-nous un devis");
		titreForm.appendChild(txtTitreForm);
	}
}


/****************************************************/
/*				INITIALISATION DE LA PAGE			*/
/****************************************************/
function addLoadListenerPage(func) {
	if (window.addEventListener) {
		window.addEventListener("load", func, false);
	} else if (document.addEventListener) {
		document.addEventListener("load", func, false);
	} else if (window.attachEvent) {
		window.attachEvent("onload", func);
	}
}

if (document.getElementById && document.createTextNode) {
	addLoadListenerPage(function() {
		customMenuRaccourcis();
		customForm();
	});
}
