function elem(id) {
    if (document.getElementById != null) {
        return document.getElementById(id);
    }
    if (document.all != null) {
        return document.all[id];
    }
    if (document.layers != null) {
        return document.layers[id];
    }
    return null;
}

function height(id) {
    var e = elem(id);
    if (e) {
        return parseInt(e.offsetHeight);
    }
    return 0;
}

function windowHeight() {
    var height = 0;
    if( typeof( window.innerHeight ) == 'number' ) {
	//Non-IE
	height = window.innerHeight;
    } else if( document.documentElement && document.documentElement.clientHeight ) {
	//IE 6+ in 'standards compliant mode'
	height = document.documentElement.clientHeight;
    } else if( document.body && document.body.clientHeight ) {
	//IE 4 compatible
	height = document.body.clientHeight;                                                                                                                   }
    return parseInt(height);
}

function checkBodyHeight(obj) {
	
	if(obj != 'home') {

	var bannerGroup = elem("bannerGroup"); //full height
	var bodyGroup = elem("bodyGroup"); //full rightCol


	var navGroup = elem("navGroup"); //navigation
	var addressGroup = elem("addressGroup"); //address

	var imageGroup = elem("imageGroup"); //image
	var bodyContent = elem("bodyContent"); //body below image
	
	var lftColHeight = height("navGroup") + height("addressGroup");
	var rtColHeight = height("bodyGroup");
	
	if (lftColHeight <= rtColHeight) {
		 navGroup.style.height = ( (height("bodyGroup") ) +"px");
//		 alert('nav less than\n left:'+ lftColHeight +'\n right:'+ rtColHeight );

	} else if(lftColHeight > rtColHeight) {
		 bodyContent.style.height = ((height("navGroup")-height("imageGroup"))+height("addressGroup")+30)+"px";
		 navGroup.style.height = (height("imageGroup")+height("bodyContent")+"px");
//		 alert('nav greater than');

	}
	
	
	}


}	



function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
