// JavaScript Document


function bannerFloat(posLeft) {
	
	// GET VIEWPORT HEIGHT AND RESIZE HOME PHOTO TO FIT VIEWPORT
	var windowHeight;
	var windowWidth;
	
		// newer browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
		if (typeof window.innerHeight != 'undefined') {
		  windowHeight = window.innerHeight;
		  windowWidth  = window.innerWidth;
		}
		 
		// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
		else if (typeof window.innerHeight == 'undefined') {
		   windowHeight = document.documentElement.clientHeight;
		   windowWidth  = document.documentElement.clientWidth;
		}
		
		if (posLeft > (windowWidth - 420)) { 
		
			var banner = document.getElementById('bannerFloating');
			var bannerWidth = banner.offsetWidth - 1;
			banner.style.width = bannerWidth + 'px';
			
			if (banner.offsetWidth == 0) {	
				banner.style.display = 'none';
				return;
			}
		
		}
		
		move = setTimeout('bannerMove(' + posLeft + ')', 10);
		
}



function bannerMove(posLeft) {

	var banner = document.getElementById('bannerFloating');
	posLeft = posLeft + 1;
	banner.style.left = posLeft + 'px';
	bannerFloat(posLeft);

}



function bannerStop() {

	clearTimeout(move); 
	return;

}




function bannerClose() {

	var banner = document.getElementById('bannerFloating');
	banner.style.display = 'none';
	return;

}



