//
// Parameters:
//   ID names - List of Div ID's that should be acted upon
//
// Example:
//   ForceDivMaxHeights('SiteSideBarLeft','SiteContentWell','SiteSideBarRight');
//

function ForceDivMaxHeights() {
	var t,i;
	var DivMaxHeight = 0;
	// Make a very simple check for arguments and argument type
	if(arguments.length > 0 && typeof arguments[0] == 'string') {
		for (i = 0; i < arguments.length; i++) {
			if(document.getElementById)t=document.getElementById(arguments[i]);else t=document.all(arguments[i]);
			if(t!=null) {
				if(t.offsetHeight > DivMaxHeight) { DivMaxHeight = t.offsetHeight; }
			}
		}
		for (i = 0; i < arguments.length; i++) {
			if(document.getElementById)t=document.getElementById(arguments[i]);else t=document.all(arguments[i]);
			if(t!=null) {
				t.style.cssText = 'height:'+ Math.round(DivMaxHeight) +'px;';
			}
		}
	}
}

function hoverEffect(obj) {
	if (! obj.hoverDone){
		obj.onmouseover = new Function("this.className = '"+obj.className+" "+obj.className+"_hover';");
		obj.onmouseout = new Function("this.className = '"+obj.className+"';");
		obj.hoverDone = 1;
	}
	return 0;
}

function hoverEffectRemove(obj) {
	if (obj.hoverDone){
		obj.onmouseover = null;
		obj.onmouseout = null;
		obj.hoverDone = 0;
	}
	return 0;
}

function setImageOpacityOn() {
	var t,i;
	// The initial opacity. MSIE takes 0-100 values for opacity. All others take floating points.
	initialOpacity=document.all?50:.5;
	// Make a very simple check for arguments and argument type
	if(arguments.length > 0 && typeof arguments[0] == 'string') {
		for (i = 0; i < arguments.length; i++) {
			if(document.getElementById)t=document.getElementById(arguments[i]);else t=document.all(arguments[i]);
			if(t!=null) {
				// set the opacity of the object. Once for Gecko, once for Safari and once for MSIE.
				t.style.filter="alpha(opacity=" + initialOpacity + ")";
				t.style.MozOpacity=initialOpacity;
				t.style.opacity=initialOpacity;
			}
		}
	}
}

function ForceIE6Overlay() {
	var t,b,HoldHeight;
	t = document.getElementById('overlay-frame');
	if(t!=null) {
		HoldHeight = t.offsetHeight;
		b=document.getElementById('overlay-body');
		if(b!=null) {
			b.style.height=HoldHeight;
		}
	}
}


