var re=/mac/i;
var mac=re.test(navigator.platform);
startY = 50;
var leDiv = "menu_footer";
var DivRef = document.getElementById('menu_footer');
var IfrRef = document.getElementById('DivShim');
var ident ="";

if(document.all && !mac && !is_ie5 &&!is_ie55)
{	
ident = document.documentElement;
}
else if(document.all && mac)
{
ident = document.body;
}

if((is_ie5) || (is_ie55))
{
ident = document.body;
}

var dom = (document.getElementById) ? true : false;
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie55 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5")!=-1) );


if(!window.bi)bi=new Object();

if(!bi.bw)bi.bw = new Object();

if(navigator.appName.indexOf("Netscape") != -1)
{
	bi.bw.getCanvasWidth	= function() {return innerWidth;}
	bi.bw.getCanvasHeight	= function() {return innerHeight;}
	bi.bw.getWindowWidth 	= function() {return outerWidth;}
	bi.bw.getWindowHeight	= function() {return outerHeight;}
	bi.bw.getScreenWidth 	= function() {return screen.width;}
	bi.bw.getScreenHeight	= function() {return screen.height;}
	bi.bw.getMinX		= function() {return(pageXOffset);}
	bi.bw.getMinY		= function() {return(pageYOffset);}
	bi.bw.getMaxX		= function() {return(pageXOffset+innerWidth);}
	bi.bw.getMaxY		= function() {return(pageYOffset+innerHeight);}

}
else
{
	bi.bw.getCanvasWidth	= function() {return ident.clientWidth;}
	bi.bw.getCanvasHeight	= function() {return ident.clientHeight;}
	bi.bw.getWindowWidth 	= function() {return ident.clientWidth;}
	bi.bw.getWindowHeight	= function() {return ident.clientHeight;}
	bi.bw.getScreenWidth	= function() {return screen.width;}
	bi.bw.getScreenHeight	= function() {return screen.height;}
	bi.bw.getMinX		= function() {return(ident.scrollLeft);}
	bi.bw.getMinY		= function() {return(ident.scrollTop);}
	bi.bw.getMaxX		= function() {return(ident.scrollLeft + ident.clientWidth);}
	bi.bw.getMaxY 		= function() {return(ident.scrollTop + ident.clientHeight);}
}


function stayBottom()
{
	
	var hWin = bi.bw.getCanvasHeight();
	var scrollWin = bi.bw.getMinY();
	var pY = hWin + scrollWin - startY;
	if(is_ie5 || is_ie55)pY = ident.offsetHeight + document.body.scrollTop - 54;
	var lDiv = document.getElementById(leDiv).style.width;
	var hDiv = document.getElementById(leDiv).style.height;
	document.getElementById(leDiv).style.top = pY+"px";
	document.getElementById(leDiv).style.display="block";
	
	if(document.all && document.getElementById && !mac)
	{
	   IfrRef.style.width = '1000px';
	   IfrRef.style.height = '50px';
	   IfrRef.style.top = document.getElementById(leDiv).style.top;
	   IfrRef.style.zIndex = 1;
	   if(!is_ie5)IfrRef.style.display = "block";
	}
	window.setTimeout("stayBottom()", 10);
}


function menuBottom()
{
stayBottom();
}

window.onload=menuBottom;
window.onresize=menuBottom;