// JavaScript Document

// Specify content for different products
var benefit_titles = new Array();
benefit_titles["eliminate-dusting"] = "images/title-eliminate-dusting.jpg";
benefit_titles["avoid-ballast-contamination"] = "images/title-avoid-ballast-contamination.jpg";
benefit_titles["product-and-freight-loss"] = "images/title-product-and-freight-loss.jpg";
benefit_titles["save-fuel"] = "images/title-save-fuel.jpg";
benefit_titles["improve-unloading"] = "images/title-improve-unloading.jpg";
benefit_titles["enhance-corporate-image"] = "images/title-enhance-corporate-image.jpg";
benefit_titles["additional-benefits"] = "images/title-additional-benefits.jpg";

var benefit_content = new Array();
benefit_content["eliminate-dusting"] = "<br /><p>Dusting is a serious issue with some products such as coal or mineral concentrates. Tests have shown that chemical sprays are only partially effective in reducing dusting. Ecofab covers completely eliminate dusting issues.<br><br>Turbulence often causes as much dust loss from an empty railcar as a full one. Ecofab Covers will eliminate dusting from empty railcars.</p>";

benefit_content["avoid-ballast-contamination"] = "<br /><p>Dusting from some products, especially coal, can damage the rail corridor’s ballast. This damage can result in unstable track, necessitating speed restrictions, and in some cases has resulted in derailments. With Ecofab covers eliminating this ballast contamination, less ballast cleaning equipment is required, resulting in major savings. In addition, reduction in ballast cleaning also results in fewer associated track closures and speed restrictions.</p>";

benefit_content["product-and-freight-loss"] = "<br /><p>Losses due to dusting cost the industry millions of dollars every year. The Ecofab Cover System completely eliminates these losses.</p>";

benefit_content["save-fuel"] = "<br /><p>Major fuel savings can be gained with the use of Ecofab covers. A study for the D.O.E. in the NASA-Ames wind tunnel in California indicates fuel savings of more than $.15 per ton based on the 2002 diesel price of $1 per gallon.<br><br>For these and other independent studies, contact Ecofab.</p>";

benefit_content["improve-unloading"] = "<br /><p>With an Ecofab cover, railcars are kept free of water, snow and ice. The result is better material flow and improved unloading with less reliance on antifreeze chemicals. In addition, there is a reduction in use of railcar shakers, less heating in thaw sheds and a reduction in carry-back of product in empty railcars.</p>";

benefit_content["enhance-corporate-image"] = "<br /><p><p class=\"list_desc\">Ecofab covers will:</p><ul><li>Improve fuel efficiency, resulting in less greenhouse gasses.</li><li>Avoid wastage of water from spraying operations.</li><li>Provide highly visible environmental protection.</li><li>Eliminate community dusting concerns.</li></ul></p>";

benefit_content["additional-benefits"] = "<br /><p><p class=\"list_desc\">Ecofab covers provide a number of additional benefits:</p><ul><li>Railcars are kept free from contamination.</li><li>No cross-contamination of other products on rail.</li><li>Backhaul possibilities, example: Flyash</li><li>Empty trains can operate on a faster schedule</li><li>No loading restrictions, i.e. can load fines</li><li>Quantity and quality of delivered product is the same as was loaded, which means</li><li class=\"sub\">No change in moisture content</li><li class=\"sub\">No contamination with chemicals</li><li class=\"sub\">No change in quantity of product</li></ul></p>";


var benefit_photo = new Array();
benefit_photo["eliminate-dusting"] = '<br /><img src="images/photo-eliminate-dusting.jpg" alt="" />';
benefit_photo["avoid-ballast-contamination"] = '<br /><img src="images/photo-avoid-ballast-contamination.jpg" alt="" />';
benefit_photo["product-and-freight-loss"] = '<br /><img src="images/photo-product-and-freight-loss.jpg" alt="" class="photo" />';
benefit_photo["save-fuel"] = '<br /><img src="images/photo-save-fuel.jpg" alt="" />';
benefit_photo["improve-unloading"] = '<br /><img src="images/photo-improve-unloading.jpg" alt="" class="photo" />';
benefit_photo["enhance-corporate-image"] = '<br /><table><tr><td><img src="images/photo-enhance-corporate-image-A.jpg" alt="" /></td><td><img src="images/photo-enhance-corporate-image-B.jpg" alt="" /></td></tr></table>';
benefit_photo["additional-benefits"] = '<br /><img src="images/photo-benefits.jpg" alt="" />';

function showBenefit( benefit_name ) {
	
	var title = document.getElementById("benefits_title");
	var content = document.getElementById("benefits_content");
	var photo = document.getElementById("benefits_photo");
	
	// Swap div containers with product material
	title.src = benefit_titles[ benefit_name ];
	content.innerHTML = benefit_content[ benefit_name ];
	photo.innerHTML = benefit_photo[ benefit_name ];
	
}

function loadBenefitImages() {
	MM_preloadImages("images/title-eliminate-dusting.jpg", "images/title-avoid-ballast-contamination.jpg", "images/title-product-and-freight-loss.jpg.jpg", "images/title-save-fuel.jpg", "images/title-improve-unloading.jpg", "images/title-enhance-corporate-image.jpg", "images/title-additional-benefits.jpg", "images/photo-eliminate_dusting.jpg", "images/photo-avoid-ballast-contamination.jpg", "images/photo-product-and-freight-loss.jpg.jpg", "images/photo-save-fuel.jpg", "images/photo-improve-unloading.jpg", "images/photo-enhance-corporate-image.jpg", "images/photo-additional-benefits.jpg");
}

window.onLoad = loadBenefitImages;