jQuery(document).ready(function(){	bindEvents();		jQuery('#flashContainer').flash(	    { 		  src: '/V2/pages/208/map.swf',		  width: 500,		  height: 600		}	);		jQuery('#brands').load('/V2/pages/208/getbrands.php');});jQuery(document).ajaxStop(function(){	bindEvents();});bindEvents = function(){	jQuery('.brandSupply').click(function(){		showBrandForm(jQuery(this));		return false;	});}popup = function(href){	window.open(href, 'Remerciements', 'height=700, width=871, toolbar=no, menubar=yes, location=no, resizable=yes, scrollbars=no, status=no');}showBrandForm = function(brandObj){	var brandName = brandObj.find('img').attr('alt');	var brandImg = brandObj.find('img').attr('src');	jQuery("#brandRegionForm").show();	jQuery("#brandLogo").attr('src', brandImg);	jQuery("#brandName").html(brandName);}checkBrandRegion = function(){	var region = jQuery("#brandRegionPostCode").val();	var brand = jQuery("#brandName").html();		jQuery(".codeErrorsBrand").hide();	if (region.length <= 0)	{		jQuery(".codeErrorBrand3").show();	}	else if (region.length < 1)	{		jQuery(".codeErrorBrand1").show();	}	else if (region.length > 2)	{		jQuery(".codeErrorBrand2").show();	}	else if (region > 95)	{		jQuery(".codeErrorBrand4").show();	}	else	{		showMapRegionInfo(region, brand);	}	setTimeout('jQuery(".codeErrorsBrand").fadeOut("slow")', 5000);}checkRegion = function(){	var region = jQuery("#regionPostCode").val();		jQuery(".codeErrors").hide();	if (region.length <= 0)	{		jQuery(".codeError3").show();	}	else if (region.length < 1)	{		jQuery(".codeError1").show();	}	else if (region.length > 2)	{		jQuery(".codeError2").show();	}	else if (region > 95)	{		jQuery(".codeError4").show();	}	else	{		showMapRegionInfo(region);	}	setTimeout('jQuery(".codeErrors").fadeOut("slow")', 5000);}showMapRegionInfo = function(region, brand){	var url = '/V2/pages/208/getdistributors.php?region=' + region;		if (typeof brand != "undefined")	{		url = url + '&brand=' + brand;	}		//Boxy.get(this).setContent("<div style=\"padding:30px;\">Sending...</div>");//	var boxy = new Boxy("<p>Test</p>", {title: "test title"});	var options = {		title: "Avec un distributeur", 		modal: true, 		unloadOnHide: true, 		fixed: false, 		y: '200px', 		closeText: '[ close ]',		afterShow: function()		{		//			jQuery(".flash-replaced").hide();//			jQuery("object").hide();//			jQuery("object").css({visibility: 'hidden'});									jQuery('html').animate({scrollTop:0}, 'slow');			jQuery('#site').hide();		},		beforeUnload: function()		{//			jQuery(".flash-replaced").show();//			jQuery("object").show();//			jQuery("object").css({visibility: 'visible'});			jQuery('#site').show();		}	};	var dialog = new Boxy('<div id="boxyContent" style="padding: 50px 100px;"><img src="/V2/pages/208/images/loading.gif" alt="Chargement.." /></div>', options);		$.get(url, function(response){		dialog.setContent(response).center('x');	});	/*	Boxy.load(url, {					title: "Avec un distributeur", 					modal: true, 					unloadOnHide: true, 					fixed: false, 					y: '200px', 					closeText: '[ close ]',					afterShow: function()					{								$.unblockUI;						jQuery(".flash-replaced").hide();						jQuery("object").hide();						jQuery("object").css({visibility: 'hidden'});												jQuery('html').animate({scrollTop:0}, 'slow');					},					beforeUnload: function()					{						jQuery(".flash-replaced").show();						jQuery("object").show();						jQuery("object").css({visibility: 'visible'});					}				}			);	*/	return false;}
