



//<!-- jQuery menu -->
function lookupcname(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		$('#suggestions1').hide();
	} else {
		$.post('autocomplete_cname.asp', {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				$('#suggestions1').show();
				$('#autoSuggestionsList1').html(data);
			}
		});
	}
} // lookup





function ValidCname(inputString) {

	fillcname();
//document.getElementById("Shopquery").click();
}



function fillcname(thisValue) {
$('#inputString1').val(thisValue);
setTimeout("$('#suggestions1').hide();", 200);
}


function fillccode(thisValue) {
$('#inputString2').val(thisValue);
setTimeout("$('#suggestions2').hide();", 200);
}






function selectOptions(){



if(	$('#l3').value != "")
{

	for(i=0; i<document.getElementById("formlevel3").length; i++)
	{
		if((document.getElementById("formlevel3").options[i].text) == (document.getElementById("l3").value))
		{
			document.getElementById("formlevel3").options[i].selected = true;
			document.getElementById("formlevel3").options[i-1].selected = true;
			document.getElementById("formlevel3").options[i].selected = true;
			document.getElementById("formlevel3").options[i-1].selected = false;

			document.getElementById("lvl4").style.display = "block";
			
/*			
			if((document.getElementById("formlevel4").options[i].text) == (document.getElementById("l4").value))
			{
				document.getElementById("formlevel4").options[i].selected = true;
				document.getElementById("lvl5").style.display = "block";


				if((document.getElementById("formlevel5").options[i].text) == (document.getElementById("l5").value))
				{
					document.getElementById("formlevel5").options[i].selected = true;
				}

			}
			
*/		
			
			
			
		}
		
		
		
		
		
	}

}









}






		// affichage du zoom dynamique
		$('#gallery a.lightbox').mouseover(function(){
				$(this).each(function(i){
					myImg = $(this).children()
					$('#mainImage > img').attr('src', myImg.attr('src'))
	      })
	      return false
	    })
		
		
		
		
		// affichage du zoom dynamique
		$('#gallery a.lightbox').click(function(){
				$(this).each(function(i){
					//$('a#mainImage').attr({'href': this.href, 'title': this.title })
					myImg = $(this).children()
					$('#mainImage > img').attr('src', myImg.attr('src'))
					//$('#mainImage > img').attr('src', this.href)
	      })
	      return false
	    })
	    
	    $('a#mainImage').lightBox()




  
  
  


//init
function init(){


initDynamicOptionLists();


//var sixLevel = new DynamicOptionList("level3","level4","level5");


//listdyn(sixLevel);

  
//selectOptions();


//on trie le tableau des modeles par ordre alphabetique
$("ul#lstmod>li").tsort();
	 $("ul#lstmod>li:odd").css("background-color", "#F4F4F8");
	 $("ul#lstmod>li:even").css("background-color", "#FFF");



}



