function addEvent(ObjectDef, EventDef, FunctionToRun)
{ 
	if (ObjectDef.addEventListener) { 
		ObjectDef.addEventListener(EventDef, FunctionToRun, true); 
		return true; 
	}
	else if (ObjectDef.attachEvent) { 
		var returnValue = ObjectDef.attachEvent("on"+EventDef, FunctionToRun); 
		return returnValue; 
	} 
	else return false; 
}

function removeEvent(ObjectDef, EventDef, FunctionToRun)
{ 
	if (ObjectDef.addEventListener) {
		ObjectDef.removeEventListener(EventDef, FunctionToRun, true)
	}
	else if (ObjectDef.attachEvent) {
		ObjectDef.detachEvent("on"+EventDef, FunctionToRun);
	}
}

addEvent(window, 'load', ShowFloatingBanner);
addEvent(window, 'resize', ShowFloatingBanner);

function ShowFloatingBanner()
{
	if (document.getElementById("LeftFloatBanner").innerHTML != "") 
	{		
		if (document.body.offsetWidth > 1000)
		{
			document.getElementById("LeftFloatBanner").style.display = "block";	
			// ********************************************************* 
			//     * You may use this code for free on any web page provided that 
			//     * these comment lines and the following credit remain in the code.
			//     * TopRight Floating Div from http://www.javascript-fx.com
			//     ********************************************************  -->
			function JSFX_FloatTopLeft()
			{
				var startX2 = 10, startY2 = 10;
				var ns2 = (navigator.appName.indexOf("Netscape") != -1);
				var d2 = document;
				var px2 = document.layers ? "" : "px";
				function ml2(id)
				{
					var el2=d2.getElementById?d2.getElementById(id):d2.all?d2.all[id]:d2.layers[id];
					if(d2.layers)el2.style=el2;
					el2.sP=function(x,y){this.style.Left=x+px2;this.style.top=y+px2;};
					el2.x = startX2; el2.y = startY2;
					return el2;
				}
				window.stayTopLeft=function()
				{
					var pY2 = ns2 ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
					ftlObj2.y += (pY2 + startY2 - ftlObj2.y)/8;
					ftlObj2.sP(ftlObj2.x, ftlObj2.y);
					setTimeout("stayTopLeft()", 30);
				}
				ftlObj2 = ml2("LeftFloatBanner");
				stayTopLeft();
			}
			JSFX_FloatTopLeft();
		}
		else
		{
			document.getElementById("LeftFloatBanner").style.display = "none";
		}
	}
	if (document.getElementById("RightFloatBanner").innerHTML != "") 
	{	
		if (document.body.offsetWidth > 1000)
		{
			document.getElementById("RightFloatBanner").style.display = "block";	
			//    ********************************************************* 
			//     * You may use this code for free on any web page provided that 
			//     * these comment lines and the following credit remain in the code.
			//     * TopRight Floating Div from http://www.javascript-fx.com
			//    ********************************************************  -->
			function JSFX_FloatTopRight()
			{
				var startX = 10, startY = 10;
				var ns = (navigator.appName.indexOf("Netscape") != -1);
				var d = document;
				var px = document.layers ? "" : "px";
				function ml(id)
				{
					var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
					if(d.layers)el.style=el;
					el.sP=function(x,y){this.style.right=x+px;this.style.top=y+px;};
					el.x = startX; el.y = startY;
					return el;
				}
				window.stayTopRight=function()
				{
					var pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
					ftlObj.y += (pY + startY - ftlObj.y)/8;
					ftlObj.sP(ftlObj.x, ftlObj.y);
					setTimeout("stayTopRight()", 30);
				}
				ftlObj = ml("RightFloatBanner");
				stayTopRight();
			}
			JSFX_FloatTopRight();
		}
		else
		{
			document.getElementById("RightFloatBanner").style.display = "none";
		}
	}	
}
