YAHOO.namespace("example.container");
 
function init() {
	
	// Define various event handlers for Dialog
	var handleSubmit = function() {
		YAHOO.example.container.dialog.hide();
	};
	var handleCancel = function() {
	};
	
	
	var handleSuccess = function(o) {

	};
	

	var handleFailure = function(o) {
	};
 
	// Instantiate the Dialog
	YAHOO.example.container.dialog = new YAHOO.widget.Dialog("dialog", 
							{ width : "50 em",
							  fixedcenter : true,
							  visible : false, 
							  constraintoviewport : false,
							  buttons : [ { text:"Close", handler:handleSubmit }]
							});
 
 
	// Wire up the success and failure handlers
	YAHOO.example.container.dialog.callback = { success: handleSuccess,
						     failure: handleFailure };

	// Render the Dialog
	YAHOO.example.container.dialog.render();
}
 
YAHOO.util.Event.onDOMReady(init);

		/*
			Function to swapp 2 imagesd on mouse over	
		*/
		function changeimages() {
			if (document.images) {
				for (var i=0; i<changeimages.arguments.length; i+=2) {
					document[changeimages.arguments[i]].src = changeimages.arguments[i+1];
				}
			}
		}
		
		function openDialogMap(id, lang) {
			td = document.getElementById("dlogo");
			td.innerHTML=( "<img height=\"30 px.\" src=\"/images/logo.gif\">" );
			
			tdh = document.getElementById("dheader");
			tdm = document.getElementById("message");
			if( id == 1 ) {
				if( lang == 1 ) {
					tdh.innerHTML=( "<p class=\"transpro\"><b>&nbsp;&nbsp;États-Unis</b></p>" );
				}
				else {
					tdh.innerHTML=( "<p class=\"transpro\"><b>&nbsp;&nbsp;United States</b></p>" );
				}
				tdm.innerHTML=( "<img width=\"630 px.\" src=\"/images/map/usa.jpg\">" );
			}
			else if( id == 2 ) {
				tdh.innerHTML=( "<p class=\"transpro\"><b>&nbsp;&nbsp;Canada</b></p>" );
				tdm.innerHTML=( "<img width=\"630 px.\" src=\"/images/map/canada.jpg\">" );
			}
			else if( id == 3 ) {
				if( lang == 1 ) {
					tdh.innerHTML=( "<p class=\"transpro\"><b>&nbsp;&nbsp;Mexique</b></p>" );
				}
				else {
					tdh.innerHTML=( "<p class=\"transpro\"><b>&nbsp;&nbsp;Mexico</b></p>" );
				}
				tdm.innerHTML=( "<img width=\"630 px.\" src=\"/images/map/mexico.jpg\">" );
			}			
			YAHOO.example.container.dialog.show();
		}
		
		function openDialog( id ) {
			td = document.getElementById("dlogo");
			td.innerHTML=( "<img height=\"30 px.\" src=\"/images/logo.gif\">" );
			
			tdh = document.getElementById("dheader");
			tdm = document.getElementById("message");
			if( id == 1 ) {
				tdh.innerHTML=( "<p class=\"lessard\"><b>&nbsp;&nbsp;Message from our president</b></p>" );
				tdm.innerHTML=( "<p>Dear valued customers,</p><p>Transport Lessard 2000\'s experienced team remains committed to provide you services of the highest quality.</p><p>We provide transport services using Refrigerated, Dry and Intermodal equipments for full (TL) shipments.</p><p>Along with our long-term alliances with over 100 independent carriers throughout the United States and Canada, our experienced staff in multiple industry sectors, complimented by our innovative and cutting edge technology, we will continue to provide on time pick-up and delivery ratio well above industry standards.</p><p>As we have been operating under the same MC number since 1999 and benefit from a very solid financial position, we can, and will, meet your requirements and expectations.</p><p>To all new customers, we are anxiously looking forward to bringing you on board and take part in the success of your distribution network.</p><p>You can always depend on our unparalleled high level of service and security, all at very competitive rates.</p><p>Thank you for your continued loyalty over the past 10 years!</p><p><b>Steve Lessard</b><br>President and Founder</p>" );
			}
			else if( id == 2 ) {
				tdh.innerHTML=( "<p class=\"lessard\"><b>&nbsp;&nbsp;Message de notre président</b></p>" );
				tdm.innerHTML=( "<p>Chers clients,</p><p>L\'équipe chevronnée de Transport Lessard 2000 continue de respecter sa promesse de vous fournir des services de transport du plus haut calibre.</p><p>Que votre marchandise soit réfrigérée, chauffée ou sèche, nous avons accès aux  services de transport correspondants, incluant l'intermodal et ce, pour tous vos chargements complets.</p><p>Grâce à une flotte sans cesse croissante ainsi qu’à des ententes négociées à long terme avec plus d’une centaine de transporteurs œuvrant aux États-Unis et au Canada, notre personnel d'expérience, bien informé des besoins particuliers d'une multitude de secteurs industriels et notre technologie de pointe, nous continuerons à afficher un rendement qui surclasse les normes de l'industrie quant à la ponctualité de nos cueillettes et livraisons.</p><p>Transport Lessard 2000 étant toujours immatriculée sous le même numéro MC depuis 1999 et soutenue par une excellente situation financière, nous pouvons satisfaire vos attentes et exigences à long terme, et nous nous engageons à le faire.</p><p>Quant à tous nos nouveaux clients, nous sommes heureux de vous accueillir et espérons pouvoir développer une solide collaboration mutuellement bénéfique et ainsi devenir un excellent partenaire au sein de votre réseau de distribution.</p><p>Vous pouvez compter sur le calibre inégalé de notre service et de notre sécurité, le tout, à des tarifs très concurrentiels.</p><p>Nous vous remercions pour la confiance que vous continuez de nous accorder depuis 10 ans!</p><p><b>Steve Lessard</b><br>Président et fondateur</p>" );
			}
			YAHOO.example.container.dialog.show();
		}