function correctPNG() {
	if(navigator.userAgent.indexOf("MSIE") > 0 && navigator.userAgent.indexOf("Opera") < 0) {
		var images = document.getElementsByTagName("IMG");
		for(var i=0;i<images.length;i++) {
			var img = images[i];
			var imgName = img.src;

			if (imgName.indexOf(".png") > 0) {
				var imgID = "";
				if(img.id) { imgID = "id='" + img.id + "' "; }

				var imgClass = "class='msie' ";
				if(img.className) { imgClass = "class='msie " + img.className + "' "; }

				var imgTitle = "";
				if(img.title) { imgTitle = "title='" + img.title + "' "; } else { "title='" + img.alt + "' "; }

				var imgStyle = "";
				var imgStyle = img.style.cssText;

				var imgAttribs = img.attributes;
				for (var j=0; j<imgAttribs.length; j++) {
					var imgAttrib = imgAttribs[j];
					if(imgAttrib.nodeName == "align") {
						if (imgAttrib.nodeValue == "left") { imgStyle = "float:left;" + imgStyle; }
						if (imgAttrib.nodeValue == "right") { imgStyle = "float:right;" + imgStyle; }
						break;
					}
				}

				var w = img.width;
				var h = img.height;

				if(w < 1 || h < 1) {
					var temp = document.body.appendChild(img.cloneNode());
					temp.style.display = "block";
					w = temp.width;
					h = temp.height;
					document.body.removeChild(temp);
				}

				var strNewHTML = "<span " + imgID + imgClass + imgTitle;
				strNewHTML += " style=\"" + "width:" + w + "px; height:" + h + "px;" + imgStyle + ";";
				strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader";
				strNewHTML += "(src='" + img.src + "', sizingMethod='image');\"";
				strNewHTML += "></span>";
				img.outerHTML = strNewHTML;
				i = i-1;
			}
		}
	}
}
function adjustLayout() {
	var columnLeft = document.getElementById("ColumnLeft");
	var columnRight = document.getElementById("ColumnRight");
	columnLeft.style.width = "350px";
	columnRight.style.width = "410px";
	var bodyWidth = document.body.offsetWidth;
	if(bodyWidth) {
		//columnRight.style.width = ((bodyWidth - 350) < 410 ? 410 : ((bodyWidth - 350) > 510 ? 510 : bodyWidth - 350)) + "px";
		columnRight.style.width = ((bodyWidth - 350) < 560 ? 410 : 560) + "px";
	}
}
function init() {
	//correctPNG();
	adjustLayout();
	autoPreload();
}
onload = function() {
	init();
}
onresize = function() {
	adjustLayout();
}
