/*
	Desenvolvido por Vinicius B. Peixoto - SEO Marketing
	Developed by Vinicius B. Peixoto - SEO Marketing
	17 de Março de 2009
	March 17th, 2009
*/
function floatBanner(startTop,startLeft,endTop,endLeft,interval,contentID)
{
	document.getElementById(contentID).style.zIndex = "1";
	document.getElementById(contentID).style.position = "absolute";
	document.getElementById(contentID).style.top = startTop + "px";
	document.getElementById(contentID).style.left = startLeft + "px";

	var top = parseInt(document.getElementById(contentID).style.top.replace("px",null));
	var left = parseInt(document.getElementById(contentID).style.left.replace("px",null));
	
	if (startTop>endTop) 
	{
		top = top - 5;
		if (top>endTop) document.getElementById(contentID).style.top = top + "px";
	}
	else if (startTop<endTop)
	{
		top = top + 5;
		if (top<endTop) document.getElementById(contentID).style.top = top + "px";
	}
	
	if (startLeft>endLeft) 
	{
		left = left - 5;
		if (left>endLeft) document.getElementById(contentID).style.left = left + "px";
	}
	else if (startLeft<endLeft) 
	{
		left = left + 5;
		if (left<endLeft) document.getElementById(contentID).style.left = left + "px";
	}

	if (((startTop>endTop)&&(top>endTop))||((startTop<endTop)&&(top<endTop))||((startLeft>endLeft)&&(left>endLeft))||((startLeft<endLeft)&&(left<endLeft)))
		setTimeout(function(){floatBanner(top,left,endTop,endLeft,interval,contentID);},interval);
}