
banner_top = 140;
banner_speed = 1;
min_width = 1000;

window.onscroll = startBannerScroll;

window.onresize = function()
{
	GetNav()
	if(winW < min_width)
	{
		if(document.getElementById('LbnrDiv1'))
		{
			document.getElementById('LbnrDiv1').style.display = 'none';
		}
		if(document.getElementById('LbnrDiv2'))
		{
			document.getElementById('LbnrDiv2').style.display = 'none';
		}
	}
	else
	{
		if(document.getElementById('LbnrDiv1'))
		{
			document.getElementById('LbnrDiv1').style.display = 'block';
		}
		if(document.getElementById('LbnrDiv2'))
		{
			document.getElementById('LbnrDiv2').style.display = 'block';
		}
	}
}

window.onload = function()
{
	GetNav();
	if(winW < min_width)
	{
		if(document.getElementById('LbnrDiv1'))
		{
			document.getElementById('LbnrDiv1').style.display = 'none';
		}
		if(document.getElementById('LbnrDiv2'))
		{
			document.getElementById('LbnrDiv2').style.display = 'none';
		}
	}
	else
	{
		if(document.getElementById('LbnrDiv1'))
		{
			document.getElementById('LbnrDiv1').style.display = 'block';
		}
		if(document.getElementById('LbnrDiv2'))
		{
			document.getElementById('LbnrDiv2').style.display = 'block';

		}
	}
	startBannerScroll();
}

// functions for side banner scroll and position
function setBannerTop(topLocation)
{
	 if(topLocation < banner_top)
	 {
		 topLocation = banner_top;
	 }
 	if(document.getElementById('LbnrDiv1'))
	{
		document.getElementById('LbnrDiv1').style.top = topLocation
	}
	 if(document.getElementById('LbnrDiv2'))
	{
		document.getElementById('LbnrDiv2').style.top = topLocation
	}
}

function startBannerScroll()
{
	var doScroll = 0;
 	if (document.documentElement && document.documentElement.scrollTop)
	 {
		 theTop = document.documentElement.scrollTop + banner_top;
	 	doScroll = 1
	 }
	 else if (document.body)
	 {
		 theTop = document.body.scrollTop + banner_top;
		 doScroll = 1
	 }
	 else
	 {
	 	theTop = banner_top;
	 	doScroll = 0;
 	}

	 if(doScroll)
	 {
	 	window.setTimeout("setBannerTop(" + (theTop + banner_speed) + ")",100);
	 }
}

function GetNav()
{
	 if (parseInt(navigator.appVersion)>3)
	 {
		 if (navigator.appName=="Netscape")
		 {
			 winW = window.innerWidth;
			 winH = window.innerHeight;
		 }
		 if (navigator.appName.indexOf("Microsoft")!=-1)
		 {
			 winW = document.body.offsetWidth;
			 winH = document.body.offsetHeight;
		 }
	 }
}
