/**********************************************************************
The following source code is licensed to Tom Nacos Group.
All usage of this code without written approval is strictly prohibited.
Copyright (c) Abstraction Media 2009 // All rights reserved
www.abstractionmedia.com
**********************************************************************/
if(document.images){
	image = new Image; image.src = "gradient.png";
}
delay = 25;
function floorBannerSlide(id, action){
	var obj = document.getElementById(id);
	if(typeof(floorBannerSlideTimeout) == "number"){
		clearTimeout(floorBannerSlideTimeout);
	}
	if(action == true){
		if(obj.floorBannerOffset < 80){
			obj.floorBannerOffset = obj.floorBannerOffset + 5;
			obj.style.top = obj.offsetTop - 5 + "px";
			obj.style.height = obj.floorBannerOffset + "px";
			floorBannerSlideTimeout = setTimeout("floorBannerSlide(\"" +id+ "\", true);", delay);
		}
	} else {
		if(obj.floorBannerOffset > 25){
			obj.floorBannerOffset = obj.floorBannerOffset - 5;
			obj.style.top = obj.offsetTop + 5 + "px";
			obj.style.height = obj.floorBannerOffset + "px";
			floorBannerSlideTimeout = setTimeout("floorBannerSlide(\"" +id+ "\", false);", delay);
		}
	}
}
function floorAjustDiv(){
	var obj = document.getElementById("floorDiv");
	if(typeof(floorBannerSlideTimeout) == "number"){
		clearTimeout(floorBannerSlideTimeout);
	}
	var height = document.documentElement.clientHeight;
	var offsety = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
	obj.style.top = height - obj.floorBannerOffset + offsety + "px";
}
function floorAjustBody(){
	var obj = document.getElementById("floorDiv");
	if(navigator.userAgent.indexOf("IE") > 25){
		obj.style.position = "absolute"; obj.style.display = "block";
		setTimeout(floorAjustDiv, 0);
	}
	if(obj.floorBannerOffset === undefined){
		obj.floorBannerOffset = 25;
	}
	var body = document.body, html = document.documentElement;
	var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
	document.body.style.height = height + 0 + "px";
	obj.style.display = "block";
	if(obj.addEventListener){
		obj.addEventListener("mouseover", function(){ floorBannerSlide(obj.id, true); }, false);
		obj.addEventListener("mouseout", function(){ floorBannerSlide(obj.id, false); }, false);
	} else if(obj.attachEvent){
		obj.attachEvent("onmouseenter", function(){ floorBannerSlide(obj.id, true); });
		obj.attachEvent("onmouseleave", function(){ floorBannerSlide(obj.id, false); });
	}
}
if(window.addEventListener){
	window.addEventListener("load", floorAjustBody, false);
	window.addEventListener("resize", floorAjustDiv, false);
} else if(window.attachEvent){
	window.attachEvent("onload", floorAjustBody);
	window.attachEvent("onresize", floorAjustDiv);
	window.attachEvent("onscroll", floorAjustDiv);
}
