// created by After Hours Teleconsulting
// developed for the H2O Harmony skin
// ensures the skin does not break in IE6 and IE7

iIEVersion = parseFloat(navigator.appVersion.split("MSIE")[1]);

if (iIEVersion == 7 || iIEVersion == 6)
{	
	interval = setInterval("skinFix()","100");
}

function skinFix()
{	
	sPageBgColor = getStyle(document.getElementById("contentPaneWrap"), "backgroundColor"); // IE specific context for compliant browsers use backgournd-color
	if (sPageBgColor.toLowerCase() == "#0c1436") // if home.ascx
	{
		if (getHeight("contentPaneWrap") < 842)
		{
			document.getElementById("contentPaneWrap").style.height = "842px";
		}
	} else
	{
		if (getHeight("contentPaneWrap") < 488)
		{
			document.getElementById("contentPaneWrap").style.height = "488px";
		}
	}
}

function getHeight(sID) 
{
	var iReturnValue = 0;
	if(sID != null) 
	{	
		if (document.getElementById(sID)) // test for existance of element to avoide runtime errors
		{
			iReturnValue = parseInt(document.getElementById(sID).offsetHeight); // removes the "px" at the end
		}else
		{
			iReturnValue = 0;
		}
	}
	return iReturnValue;
}

function getStyle(oElement, styleProp)
{
	if (oElement.currentStyle)
	{
		return oElement.currentStyle[styleProp];
	}else if (window.getComputedStyle)
	{
		return document.defaultView.getComputedStyle(oElement,null).getPropertyValue(styleProp);
	}
}

