/* IE CONTENT AREA FIX
  Created by James Collin Yeadon
  website: http://www.yeadongroup.com
  
  Description:  This script takes content from the container named content_middle and created a new container
  which is positioned over the old.  It corrects a problem with IE's AlphaImageLoader, preventing it from covering
  the content of a container.
*/
var appVer = navigator.appVersion.toLowerCase();
var iePos = appVer.indexOf('msie');
if (iePos !=-1) {
	var is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
	var is_major = parseInt(is_minor);
};
if ((navigator.appName.substring(0,9) == "Microsoft") || (is_major <= 6))  { 

	if(window.attachEvent){
		window.attachEvent("onload", ailHack);
	} else {
		if(typeof window.onload == "function"){
			var fOld = window.onload;
			window.onload = function(){ fOld(); ailHack(); };
		} else {
			window.onload = ailHack;
		};
	};

	if(window.attachEvent){
		window.attachEvent("onresize", ailHackResize);
	} else {
		if(typeof window.onresize == "function"){
			var fOld = window.onresize;
			window.onresize = function(){ fOld(); ailHackResize(); };
		} else {
			window.onresize = ailHackResize;
		};
	};
}
function ailHack() {

	var divRef = document.createElement('div');
	divRef.id = "content_float";
	divRef.style.position = "absolute";
	divRef.style.zIndex = "9999";
	document.body.appendChild(divRef);

	var cmiddle = document.getElementById("content_middle");
	var container = document.getElementById("container");
	var sContent = cmiddle.innerHTML

	cmiddle.style.height = cmiddle.offsetHeight + 'px';
	cmiddle.innerHTML = '';
	divRef.innerHTML = sContent;

	ailHackResize();
}
function ailHackResize() {
	var cmiddle = document.getElementById("content_middle");
	var container = document.getElementById("container");
	var cfloat = document.getElementById("content_float");

	cfloat.style.position = 'absolute';
	cfloat.style.width = cmiddle.offsetWidth + 'px';
	cfloat.style.left = cmiddle.offsetLeft + container.offsetLeft + 10+'px';
	cfloat.style.top = cmiddle.offsetTop +15+ 'px';
}
