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 : "700 px.",
							  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 src=\"/images/map/usa.jpg\">" );
			}
			else if( id == 2 ) {
				tdh.innerHTML=( "<p class=\"transpro\"><b>&nbsp;&nbsp;Canada</b></p>" );
				tdm.innerHTML=( "<img 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 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=\"transpro\"><b>&nbsp;&nbsp;Message from our president</b></p>" );
				tdm.innerHTML=( "<p>Dear valued customers,</p><p>Trans-Pro\'s experienced team remains committed to provide you services of the highest quality.</p><p>We provide transport services using Refrigerated, Dry, Flat Bed and Intermodal equipments on both full (TL) and partial shipments (LTL).</p><p>Along with our long-term alliances with over 1,200 independent carriers throughout the United States, Canada and Mexico, 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 1989 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 20 years!</p><p><b>Peter Boyko</b><br>President and Co-Founder</p>" );
			}
			else if( id == 2 ) {
				tdh.innerHTML=( "<p class=\"transpro\"><b>&nbsp;&nbsp;Message de notre président</b></p>" );
				tdm.innerHTML=( "<p>Chers clients,</p><p>L\'équipe chevronnée de Trans-Pro 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, en vrac, sèche, ou surdimensionnée, nous avons accès à tous les types de services en transport incluant l\'intermodal. De plus, nous couvrons autant des chargements partiels que complets.</p><p>Grâce à nos ententes à long terme avec plus de 1 200 transporteurs oeuvrant aux États-Unis, au Canada et au Mexique, 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>Trans-Pro étant toujours immatriculée sous le même numéro MC depuis 1989 et soutenue par une excellente situation financière, nous pouvons satisfaire à long terme à vos attentes et exigences, et nous nous engageons à le faire.</p><p>Quant à tous nos nouveaux clients, nous envisageons avec plaisir la création d\'une solide collaboration entre nos entreprises et notre participation à 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 20 ans!</p><p><b>Peter Boyko</b><br>Président et cofondateur</p>" );
			}
			else if( id == 3 ) {
				tdh.innerHTML=( "<p class=\"transpro\"><b>&nbsp;&nbsp;Spanish</b></p>" );
				tdm.innerHTML=( "<p>Dear valued customers,</p><p>Trans-Pro\'s experienced team remains committed to provide you services of the highest quality.</p><p>We provide transport services using Refrigerated, Dry, Flat Bed and Intermodal equipments on both full (TL) and partial shipments (LTL).</p><p>Along with our long-term alliances with over 1,200 independent carriers throughout the United States, Canada and Mexico, 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 1989 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 20 years!</p><p><b>Peter Boyko</b><br>President and Co-Founder</p>" );
			}			
			YAHOO.example.container.dialog.show();
		}