// This script fixes the swoosh image, which is an alpha transparent png image, 
// so that it works properly in Internet Explorer 5, 5.5, and 6.
// This script is called by conditional comments and is only loaded for visitors using IE.
// jcroft, JAN 29 2006

// Run the fixWeatherPng function on page load.
if ( $.browser.msie && ( $.browser.version.substring( 0, 1 ) < '7' )) {
	window.attachEvent("onload", fixSwooshPng);
}



function fixSwooshPng() {
   // First, find the image in question and get it's src value.
   var img = document.getElementById("Swoosh");
   var src = img.src;
   
   // Then, hide the image.
   img.style.visibility = "hidden";
   
   // Then, create a div that uses the image as a background, including MS's AlphaImageLoder filter property for trasparent PNGs.
   var div = document.createElement("DIV");
   div.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizing='scale')";
   div.style.width = "400px";
	div.style.height = "291px";
	div.style.position = "absolute";
	div.style.left = "0";
	div.style.top = "0";

   // Finally, replace the image with the newly created div.
   img.replaceNode(div);   
}

function fixSwoosh2Png() {
   // First, find the image in question and get it's src value.
   var img = document.getElementById("Swoosh2");
   var src = img.src;
   
   // Then, hide the image.
   img.style.visibility = "hidden";
   
   // Then, create a div that uses the image as a background, including MS's AlphaImageLoder filter property for trasparent PNGs.
   var div = document.createElement("DIV");
   div.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizing='scale')";
   div.style.width = "755px";
	div.style.height = "147px";
	div.style.position = "absolute";
	div.style.left = "0";
	div.style.top = "0";

   // Finally, replace the image with the newly created div.
   img.replaceNode(div);   
}

function fixSwoosh3Png() {
   // First, find the image in question and get it's src value.
   var img = document.getElementById("Swoosh3");
   var src = img.src;
   
   // Then, hide the image.
   img.style.visibility = "hidden";
   
   // Then, create a div that uses the image as a background, including MS's AlphaImageLoder filter property for trasparent PNGs.
   var div = document.createElement("DIV");
   div.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizing='scale')";
   div.style.width = "204px";
	div.style.height = "145px";
	div.style.position = "absolute";
	div.style.left = "0";
	div.style.top = "148";

   // Finally, replace the image with the newly created div.
   img.replaceNode(div);   
}