var arrayPageSize = getPageSize();
var openatendimento =  parseInt(0+arrayPageSize[0]);

if(openatendimento>800){
	//alert(openatendimento);
	var name = document.getElementById("tudo");
	var newX = findPosX(name) + 1;
	var baseonline = document.getElementById('atendeonline');
	baseonline.style.height = "49px";
	baseonline.style.width =  "60px";

	var newY = findPosY(baseonline);
	baseonline.style.top =  newY + 12 + "px";
	baseonline.style.right =  "10px";
	baseonline.style.visibility = "visible";
	//baseonline.style.Zindex = "90";
	//baseonline.innerHTML = '<div id="atendimentoverticalrr" onMouseOver="atendimentoverticalrr.style.clip=\'rect(0px,106px,300px,0px)\';" onMouseOut="atendimentoverticalrr.style.clip=\'rect(0px,106px,100px,0px)\';"></div>';

	baseonline.innerHTML = '<div id="atendimentovertical" class="bannerfechado" onMouseOver="this.className=\'banneraberto\';" onMouseOut="this.className=\'bannerfechado\';"><div id="printflash"></div></div>';
	createcontrol('printflash', 'flashatende', 'printflash', '49', '60', './',URLsite +'boneco.swf', 'transparent');
}

var menu;
var theTop = 12;
var antigo = theTop;

//window.onload = function () {
menu = new getObjeto('atendeonline');
moveatendimento();
//}

function moveatendimento()
{
	if (window.innerHeight)
	{
		  posa = window.pageYOffset
	}
	else if (document.documentElement && document.documentElement.scrollTop)
	{
		posa = document.documentElement.scrollTop
	}
	else if (document.body)
	{
		  posa = document.body.scrollTop
	}
	if (posa < theTop){
	 posa = theTop;
	}
	else{ posa += 12;
	}
	
	if (posa == antigo)
	{
		menu.style.top = posa + 200 + "px";	
	}
	
	antigo = posa;
	temp = setTimeout('moveatendimento()',100);
}
function getObjeto(nome)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(nome);
	this.style = document.getElementById(nome).style;
  }
  else if (document.all)
  {
	this.obj = document.all[nome];
	this.style = document.all[nome].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[nome];
   	this.style = document.layers[nome];
  }
}