function viderChamp(champAVider, valeurDefaut){
	if(document.getElementById(champAVider).value == valeurDefaut) {
		document.getElementById(champAVider).value = "";
	}
}
function remplirChamp(champARemplir, valeurDefaut){
	if(document.getElementById(champARemplir).value == "") {
		document.getElementById(champARemplir).value = valeurDefaut;
	}
}

function ouvrirthickbox(){
	page = "cyberbulletin.php?&amp;courriel="+ document.getElementById('inscription').value +"&amp;keepThis=true&amp;TB_iframe=true&amp;height=350&amp;width=230&modal=true";
	tb_show(null, page,null);
}
function submitform_cyberbulletin(){
	ouvrirthickbox();
	return false;
}
function submitform_rechercher(){
	document.formRechercher.action='boutiques.php?rechercher='+document.forms['formRechercher'].rechercher.value;
}

$(function() {
	
	// Fix for categorie select fixed width on the index page
	if ($.browser.msie) {
		selectBox = $("#rechercherParCategories")	
		if($.browser.version < 7) $("#categories").css("position", "absolute")
		selectBox.click(function() {
			this.isOpen = true;
		})
		selectBox.mouseover(function() {
			$(this).animate({ width:"300px" }, { queue:false, duration:100, easing:"linear" })
		})
		selectBox.mouseout(function() {
			if(!this.isOpen) $(this).animate({ width:"150px" }, { queue:false, duration:100, easing:"linear" })
		})
		selectBox.blur(function() {
			this.isOpen = false;
			$(this).animate({ width:"150px" }, { queue:false, duration:100, easing:"linear" })
		})
	}
	
})
