// JavaScript Document

 if(navigator.userAgent.indexOf('Firefox') != -1) {
    theObjects = document.getElementsByTagName("object");
    for (var i = 0; i < theObjects.length; i++) {
     theObjects[i].outerHTML = theObjects[i].outerHTML;
    }
}


// When the page loads:
window.onload = function(){
   if(navigator.userAgent.indexOf('IE') != -1) {  
      if (document.getElementsByTagName) {
        // Get all the tags of type object in the page.
          var objs = document.getElementsByTagName("object");
          for (i=0; i<objs.length; i++) {
            // Get the HTML content of each object tag
            // and replace it with itself.
            objs[i].outerHTML = objs[i].outerHTML;
          }
       }
   }
}
// When the page unloads:
window.onunload = function() {
  if(navigator.userAgent.indexOf('IE') != -1) {  
      if (document.getElementsByTagName) {
        //Get all the tags of type object in the page.
        var objs = document.getElementsByTagName("object");
        for (i=0; i<objs.length; i++) {
          // Clear out the HTML content of each object tag
          // to prevent an IE memory leak issue.
          objs[i].outerHTML = "";
        }
      }
  }
}
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	document.writeln('<style type="text/css">img { visibility:hidden; } </style>');
	window.attachEvent("onload", fnLoadPngs);
}

function fnLoadPngs() {
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
		if (itsAllGood && img.src.match(/\.png$/i) != null) {
			var src = img.src;
			img.style.width = img.width + "px";
			img.style.height = img.height + "px";
			img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
			img.src = "images/x.gif";
		}
		img.style.visibility = "visible";
	}
}
