// Simulation du fonctionnement d'une combobox
jQuery(document).ready( function() {

	//Ouverture de la liste de selection sur click
		jQuery("#comboBox,.tdcombo").click( function() {
			jQuery("#comboContentContainer").show();
		});

		// Attache la fermeture de la liste deselection
		jQuery("#comboContentContainer").find("td").each( function(idx) {
			var item = jQuery(this);
			var mousedownHandler = item.attr("onmousedown");
			item.get()[0].onmousedown = null;
			item.mousedown( function() {
				jQuery("#comboContentContainer").hide(0, function() {
					eval(mousedownHandler());
				});

			});
		});

	});

// document.onmousedown=combocloser;
//
// function combocloser(mEvent){
//
// myelmt = (window.attachEvent)?(window.event.srcElement):(mEvent.target);
//
// if(myelmt.className!=""){
//
// switch(myelmt.className){
//
// case "tdcombo":
//
// switch(myelmt.id){
//
// case "comboBox":
//
// with(document.getElementById("comboContentContainer")){style.display=(style.display=="none"
// || style.display=="")?"block":"none"};
//						
// break;
//
//					
//
// case "comboBox2":
//
// with(document.getElementById("comboContentContainer2")){style.display=(style.display=="none"
// || style.display=="")?"block":"none"};
//
// break;
//
// }
//
// break;
//
// }
//
// }
//
// else {
//
// if(document.getElementById("comboContentContainer") !=
// null)document.getElementById("comboContentContainer").style.display="none";
//
// if(document.getElementById("comboContentContainer2") !=
// null)document.getElementById("comboContentContainer2").style.display="none";
//
// }
//
//
//
// }

