 request = null;
 paginaAtual = 1;
 getDataJson = null;
 pagUltGan = 1;
 tried = 0;
 intChat = null;
 
 serverDownVisible=false;



try {
  request = new XMLHttpRequest();
} catch (trymicrosoft) {
  try {
    request = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (othermicrosoft) {
    try {
      request = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (failed) {
      request = null;
    }
  }
}

 function setPagina(pag){
	 paginaAtual = pag;
	 clearInterval(getDataJson);
	 getDataJson = setInterval('obterDados()',1000);	 
	 }
 
 
if (request == null){ 
 tried=30;
 showServerDown('<h1>Atenção!</h1><br><br>Não possível criar um objeto necessário (XMLHttpRequest) para que o Clickideal funcione corretamente em seu browser.<br>Por favor, verifique se seu browser suporta "AJAX"');
 // alert("Erro de comunicação: XMLHttpRequest");
}
 
// alert(request); 
function obterDados() {
  //document.title = '';
  var url = "auctions/auctions"+paginaAtual;
  url = url + "?cache=" + new Date().getTime();//para evitar problemas com o cache do navegador
  request.open("GET", url, true);
  request.onreadystatechange = exibe;//chame a função sem os parênteses 
  request.send(null);
  // alert(url);
  //document.title = url;
 	//alert(dataserv);
	$('#spHoraServ').html(dataExt(dataserv));
	dataserv.setTime(dataserv.getTime() + 1000); 
}
 
function exibe(){
if (request.readyState == 3 || request.readyState == 4) {//verifica o estado de prontidão
 
if (request.status == 200 || request.status == 404) {//verifica o status da requisição
 
 
 tried = 0;
 //document.title = request.responseText;
 try
  {
    var jsonData = eval('(' + request.responseText + ')');
	 //document.title = jsonData.data[0].seg;
  }
catch(err)
  {
	 // alert(request.responseText)
  //	if (tried < )
//	obterDados();
	return;
  }
//recupera os dados e os converte em um objeto

//o navegador trata a JSON com texto, portanto utilize o responseText
//trabalhando com os dados

//document.title = ($('#produto_segundos_'+id).length + '  - '+id);	
	//document.title = jsonData.data.length;	
var jsleng = jsonData.data.length; 	
//var i = 0;
for (i=0; i<jsleng; i++) {
	

	id = jsonData.data[i].id;
	seg  = jsonData.data[i].seg;
	
	//if (i==0)
	//document.title =  jsonData.data[i].seg +'  -  '+i+'  - '+paginaAtual ;

	if ($('#produto_valor_'+id).length){ //muda preço
			
			vlr =  $('#produto_valor_'+id).html();
			
			if (vlr != 'R$ ' + jsonData.data[i].vlr.replace('.',','))
			{
				$('#produto_valor_'+id).html('R$ ' + jsonData.data[i].vlr.replace('.',','));
				$('#produto_valor_'+id).attr('value','0')
				$("#produto_valor_"+id).animate( { backgroundColor: '#00FF66' }, 300).animate({ backgroundColor: "transparent"}, 300, null, function() { this.style.backgroundColor='transparent'; });
				if ($('#tdVlrAt_'+id).length)
				{
					  	//alert($('#tdTotAt_'+id).html());
						$('#tdVlrAt_'+id).html(jsonData.data[i].vlr.replace('.',','));
						$('#tdTotAt_'+id).html('R$ ' + jsonData.data[i].frt.replace('.',','));
						//alert($('#tdTotAt_'+id).html());
				}
				/*if ( $('#tblUltimoslancesLogs_'+id).length )
				  {
					$('#tblUltimoslancesLogs_'+id+' tr:first').css({'color':'#777','font-weight':'normal'});
					$('#tblUltimoslancesLogs_'+id+' tr:first').before('<tr style="color:red; font-weight:bold;"><td style="width:125px; padding-left:14px;">'+jsonData.data[i].us+':</td><td>R$ '+jsonData.data[i].vlr+'</td></tr>');
	 				$('#tblUltimoslancesLogs_'+id+' tr:last').remove();
				  }*/

				//$("#produto_valor_"+id).animate( { backgroundColor: '#00FF66' }, 300).animate( { backgroundColor: '#fff' }, 100).animate( { backgroundColor: '#00FF66' }, 300).animate({backgroundColor:"transparent"}, 100, null, function() { this.style.backgroundColor='transparent'; });
			} 
	}
	if ($('#produto_segundos_'+id).length || $('#MBproduto_segundos_'+id).length)	{
		
		if (seg<1 ) {
			 setTimeout('xajax_ended('+id+')',600);		
		} else {
			
			//if ($('#produto_name_'+id).length)	
			$('#produto_name_'+id).html(jsonData.data[i].us);
			//if ($('#dvHoraInicio'+id).length)	
			$('#dvHoraInicio'+id).html(jsonData.data[i].ini);		
		}
		
		//alert(dt - jsonData.data[i].unx)
		if (jsonData.data[i].act == '0' ) {
			//if ($('#dvBox).length
			//mudaClass('produto_segundos_'+id,'countGray');
			if ($('#dvBox_'+id).length)
				$('#dvBox_'+id).css('background-image', 'url(./images/boxBigBlue.gif)'); 
			$('#produto_segundos_'+id).html((jsonData.data[i].tmp)>9?jsonData.data[i].tmp:'0'+jsonData.data[i].tmp);
			if ($('#MBproduto_segundos_'+id).length)
			 	$('#MBproduto_segundos_'+id).html((jsonData.data[i].tmp)>9?jsonData.data[i].tmp:'0'+jsonData.data[i].tmp);
			//$('#tarjaInicio_'+id).show();
		} else
		{
			//alert(jsonData.data[i].act);
			if ($('#tarjaInicio_'+id).length) $('#tarjaInicio_'+id).hide();
			if ($('#MBtarjaInicio_'+id).length) $('#MBtarjaInicio_'+id).hide();
			
			if ($('#tblMiniBox_'+id).length) {
				$('#tdDetBot'+id).removeClass().addClass('tdDetBotAct');
			 	$('#tdDetTop'+id).removeClass().addClass('tdDetTopAct');
				$('#tdDetMid'+id).removeClass().addClass('tdDetMidAct');
				//alert($('.tdDetMid'));
			}
			if ($('#dvBox_'+id).length)
				$('#dvBox_'+id).css('background-image', 'url(./images/boxBigGreenActive.gif)'); 
			
			
			//document.title+= $('#tblMiniBox_'+id).length + '  - '+id+'  '; 
			if (seg>0) {
				if ($('#produto_segundos_'+id).length)					
					  $('#produto_segundos_'+id).html((seg)>9?(seg):'0'+(seg));
				
				if ($('#MBproduto_segundos_'+id).length)					
					  $('#MBproduto_segundos_'+id).html((seg)>9?(seg):'0'+(seg));
				
				
				if (seg <=10){
					mudaClass('produto_segundos_'+id,'countRed'); 
					mudaClass('MBproduto_segundos_'+id,'mbDivCounter mbRed'); 	
				}else
				if (seg > 10) {
					mudaClass('produto_segundos_'+id,'countGreen'); 
					mudaClass('MBproduto_segundos_'+id,'mbDivCounter mbGreen'); 	
				}
			} else xajax_ended(id);// else document.title = id+' - '+ seg
		}

	} //else  document.title = id+' - '+ seg
}
			if (serverDownVisible==true) {  
				document.location.reload();
			}

} else  showServerDown('<h3 style="color:Red">N&atilde;o foi poss&iacute;vel obter os dados do servidor.</h3>Tente atualizar a p&aacute;gina, caso n&atilde;o resolva, verifique sua conex&atilde;o com a internet.<Br> Se o Clickideal.com estiver fora do ar, pedimos desculpas pelo incoveniente e garantimos que os leil&otilde;es que est&atilde;o em andamento neste momento ser&atilde;o continuados futuramente, partindo da mesma situa&ccedil;&atilde;o em que pararam.'); //document.title='status: '+request.status

			if (serverDownVisible==true) {  
				document.location.reload();
			};
			
} else showServerDown('<h3 style="color:Red">N&atilde;o foi poss&iacute;vel obter os dados do servidor.</h3>Tente atualizar a p&aacute;gina, caso n&atilde;o resolva, verifique sua conex&atilde;o com a internet.<Br> Se o Clickideal.com estiver fora do ar, pedimos desculpas pelo incoveniente e garantimos que os leil&otilde;es que est&atilde;o em andamento neste momento ser&atilde;o continuados futuramente, partindo da mesma situa&ccedil;&atilde;o em que pararam.'); //document.title='readyState: '+request.readyState
} 

	
function showServerDown(msg){
	if (serverDownVisible==true){ return false; }
	tried++;
	//$(document).attr('title',tried)
	if (tried==80 || tried%800==0) {
		serverDownVisible=true;
		tried = 0;
		var maskHeight = $(document).height();
		var maskWidth = $(window).width();
	
		$('#maskModal').css({'width':maskWidth,'height':maskHeight});

		$('#maskModal').fadeIn(1000);	
		$('#maskModal').fadeTo("slow",0.8);	
	
		//Get the window height and width
		var winH = $(window).height();
		var winW = $(window).width();
              
		$('#notepadModal').css('top',  winH/2-$('#notepadModal').height()/2);
		$('#notepadModal').css('left', winW/2-$('#notepadModal').width()/2);
	
		$('#notepadModal').fadeIn(2000); 
		$('#notepadModal').center();
		}
		$('#dvMsgServerDown').html(utf8_decode(msg));
	$('.windowModal .closeModal').click(function (e) {
			serverDownVisible=false;
			e.preventDefault();			
			$('#maskModal').fadeOut();
			$('.windowModal').fadeOut('slow');
		});		
		
	$('#maskModal').click(function () {
			serverDownVisible=false;
			$(this).fadeOut('slow');
			$('.windowModal').fadeOut('slow');
		});	
	
	}


function mudaCaixaLogin(logado){
	
	if (logado==1) {
		$('#dvBoxLogin').hide('fast');
		$('#tblLogin').css('background-image','url(images/afterLogin.jpg)');
		$('#dvBoxLogado').show('fast');
			
	}
	else
	if (logado==0){
		$('#tblLogin').css('background-image','url(images/login.jpg)');	
		$('#dvBoxLogin').show();
		$('#dvBoxLogado').hide();
		}
	}	
	
function alertChat(msg,tipo){
	
	$('#dvAlertChat div:first').hide();
	if (tipo=='erro')
		$('<div style="width:830px; height:35px; border:1px solid red; background:#DFE7FF; color:red; text-align:left; font-family:\'Courier New\', Courier, monospace; font-size:13px; padding:6px; font-weight:bold; background:url(images/green_icon.jpg) no-repeat; padding-left:30px; ">'+msg+'</div>').appendTo('#dvAlertChat'); else
	if (tipo=='info')
		$('<div style="width:830px;height:35px; border:1px solid #039; background:#DFE7FF; color:#069; text-align:left; font-family:\'Courier New\', Courier, monospace; font-size:13px; padding:6px; font-weight:bold; background:url(images/green_icon.jpg) no-repeat; padding-left:30px; ">'+msg+'</div>').appendTo('#dvAlertChat');
	
	
	setTimeout('$("#dvAlertChat div:first").show(); $("#dvAlertChat div:last").remove();',3000);
		
	}	
	
function refUlttGan(){
	$('#dvUltimosGanhadores').load('ultimosganhadores.php?pag='+pagUltGan);
	}
function refPagItens(){
	$('#paginatorItens').load('paginator.php?pag='+paginaAtual+'&itens=6&stt=3');
	}	
	
function utf8_decode ( str_data ) {
 
    var tmp_arr = [], i = 0, ac = 0, c1 = 0, c2 = 0, c3 = 0;
 
    str_data += '';
 
    while ( i < str_data.length ) {
        c1 = str_data.charCodeAt(i);
        if (c1 < 128) {
            tmp_arr[ac++] = String.fromCharCode(c1);
            i++;
        } else if ((c1 > 191) && (c1 < 224)) {
            c2 = str_data.charCodeAt(i+1);
            tmp_arr[ac++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));
            i += 2;
        } else {
            c2 = str_data.charCodeAt(i+1);
            c3 = str_data.charCodeAt(i+2);
            tmp_arr[ac++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
            i += 3;
        }
    }
 
    return tmp_arr.join('');
}

function removeEl(id){
	if ($('#'+id).length) $('#'+id).remove();
	}

	
function setTimeServ(ano, mes,dia,hora,minuto,segundo){
	dataserv = new Date( ano, mes, dia, hora, minuto, segundo);
	}


function boxTitle(parent, width, title, id, state,content, actiOnclose){
	
tdW = width-34;	
display = (state=='up' || state=='close')?'':'display:none';
var target =  $('#'+parent).length?$('#'+parent):$(document);

html = '<Table id="tblBoxTitle'+id+'" style="table-layout:fixed" width="'+width+'" cellpadding="0" cellspacing="0"><tr><td style="background:url(images/boxTitle/dirTop_s1.gif) no-repeat; width:6px; height:21px;"></td><td style="background:url(images/boxTitle/xtop_s1.gif) repeat-x; ; height:19px; padding-left:3px; font-size:13px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#666666;" valign="middle"><div style="width:'+tdW+'px; height:17px; margin-top:3px; float:left">'+title+'</div><div style="float:left; padding-top:2px;"><img id="imgTogTit'+id+'" style="cursor:pointer;" src="images/arrow_'+state+'.gif" /> </div> </td> <td style="background:url(images/boxTitle/lefttop_s1.gif) no-repeat; width:8px; height:21px;"></td></tr><tr id="trContBoxTit1'+id+'" style="'+display+'"><td style="background:url(images/boxTitle/yleft_s1.gif) repeat-y; width:6px;"></td> <td valign="top" width="'+tdW+'" style="padding:0px; margin:0px; width:'+tdW+'px; max-width:'+tdW+'px; overflow:hide;"><div style="width:'+tdW+'px; max-width:'+tdW+'px; overflow:hide; margin:0px; padding:0px;" id="tdBoxTitCont'+id+'">&nbsp;</div></td><td style="background:url(images/boxTitle/ydir_s1.gif) repeat-y; width:6px;"></td></tr><tr id="trContBoxTit2'+id+'" style="'+display+'"><td style="background:url(images/boxTitle/botleft_s1.gif) no-repeat; width:6px; height:6px;"></td><td style="background:url(images/boxTitle/xbot_s1.gif) repeat-x; height:6px;"></td> <td style="background:url(images/boxTitle/botdir_s1.gif) no-repeat; width:8px; height:6px;"></td></tr></Table><br><script type="text/javascript">';
if (state=='close'){
	html += '$("#imgTogTit'+id+'").click(function(){$("#tdBoxTitCont'+id+'").slideToggle("slow", function(){$("#tblBoxTitle'+id+'").remove()}); '+actiOnclose+'}); $("#tdBoxTitCont'+id+'").css("overflow","hide"); if("'+content+'"!="") { $("#tdBoxTitCont'+id+'").load("'+content+'");}<\/script>';
	} else
if (display=='') 
 	html += ' $("#imgTogTit'+id+'").toggle( function(){ $("#trContBoxTit1'+id+'").toggle("slow"); $("#trContBoxTit2'+id+'").toggle("slow"); $("#imgTogTit'+id+'").attr("src","images/arrow_down.gif"); $("#imgTogTit'+id+'").attr("tittle","Mostrar"); }, function() {  $("#trContBoxTit1'+id+'").toggle("slow"); $("#trContBoxTit2'+id+'").toggle("slow");  $("#imgTogTit'+id+'").attr("src","images/arrow_up.gif"); $("#imgTogTit'+id+'").attr("tittle","Esconder");}); $("#tdBoxTitCont'+id+'").css("overflow","hide"); if("'+content+'"!="") { $("#tdBoxTitCont'+id+'").load("'+content+'");}<\/script>'; else
 	
	html += ' $("#imgTogTit'+id+'").toggle(  function() {  $("#trContBoxTit1'+id+'").toggle("slow"); $("#trContBoxTit2'+id+'").toggle("slow");  $("#imgTogTit'+id+'").attr("src","images/arrow_up.gif"); $("#imgTogTit'+id+'").attr("tittle","Esconder");}, function(){ $("#trContBoxTit1'+id+'").toggle("slow"); $("#trContBoxTit2'+id+'").toggle("slow"); $("#imgTogTit'+id+'").attr("src","images/arrow_down.gif"); $("#imgTogTit'+id+'").attr("tittle","Mostrar"); }); $("#tdBoxTitCont'+id+'").css("overflow","hide"); if("'+content+'"!="") { $("#tdBoxTitCont'+id+'").load("'+content+'");}<\/script>'; 
 
 $('#'+parent).html(html); 

}

function carregaDetalheProd(id){
	boxTitle('dvAuctions','915','Detalhes do leil&atilde;o #'+id,'boxItemDetalhes','close','itens_detalhe.php?idesc='+id,'showActionsTitle(); showBaixoTitle();');	
	}

function dataExt(data){

var year=data.getYear()
if (year<2000)
year += (year < 1900) ? 1900 : 0
var day=data.getDay()
var month=data.getMonth()
var daym=data.getDate()
var hr = data.getHours()>9?data.getHours():'0'+data.getHours();
var mi = data.getMinutes();
var se = data.getSeconds();
if (se == 60){
	se=0;
	mi++;
	}
 mi = mi>9?mi:'0'+mi;	
var se = se>9?se:'0'+se;
if (daym<10)
daym="0"+daym
var dayarray=new Array("domingo","segunda","ter&ccedil;a","quarta","quinta","sexta","s&aacute;bado")
var montharray=new Array(" de janeiro de "," de fevereiro de "," de março de "," de abril de "," de maio de "," de junho de "," de julho de "," de agosto de "," de setembro de "," de outubro de "," de novembro de "," de dezembro de ")
return dayarray[day]+", "+daym+" "+montharray[month]+year+" - "+hr+':'+mi+':'+se;
	
}

//carrega javascript em tempo de execucao

function loadScript(id ,url, callback){
	if (document.getElementById(id) != null){
		 callback();
		 return;
	}
    var script = document.createElement("script")
	script.id = id;
    script.type = "text/javascript";

    if (script.readyState){  //IE
        script.onreadystatechange = function(){
            if (script.readyState == "loaded" ||
                    script.readyState == "complete"){
                script.onreadystatechange = null;
                callback();
            }
        };
    } else {  //Others
        script.onload = function(){
            callback();
        };
    }

    script.src = url;
    document.getElementsByTagName("head")[0].appendChild(script);
}

function esqueceuSenha(){	
	if( $("#esquecisenha" ).dialog('isOpen')==true) {alert('Já existe uma janela aberta.'); return false;}
	$("#esquecisenha" ).dialog({
			resizable: false,
			height:230,
			width:398,
			modal: false,
			autoOpen: true,
			buttons: {
				"Enviar": function() {
					xajax_reenviasenha($('#txtesqueceuemail').val());
					$( this ).dialog( "close" );
				},
				'Cancelar': function() {
					$( this ).dialog( "close" );
				}
			},
			open: function(){ $('#txtesqueceuemail').val('')}
	})
}

function getDialogButton( dialog_selector, button_name )
{
  var buttons = $( dialog_selector + ' button' );
  for ( var i = 0; i < buttons.length; ++i )
  {
     var jButton = $( buttons[i] );
	 alert(jButton.text())
     if ( jButton.text() == button_name )
     {
		 return jButton;
     }
  }
  alert('n achou');
  return null;
}


function novoDepoimento(){
	if( $("#novoDepoimento" ).dialog('isOpen')==true) {alert('Já existe uma janela aberta.'); return false;}
	$("#novoDepoimento" ).dialog({
			resizable: false,
			height:475,
			width:600,
			modal: false,
			autoOpen: true,
			buttons: {
				'Enviar': function() {
					submitDepoiment();
				},
				Sair: function() {
					$( this ).dialog( "close" );
				}
			},
			open: function(){ /* $('#txtesqueceuemail').val('') */}
	})
			
	
	}

function indicaAmigo(){	
	if( $("indicaamigo" ).dialog('isOpen')==true) {alert('Já existe uma janela aberta.'); return false;}
	$("#indicaamigo" ).dialog({
			resizable: false,
			height:360,
			width:398,
			modal: false,
			autoOpen: true,
			buttons: {
				"Enviar": function() {
					xajax_indicaAmigo($('#txtemailindica').val(), $('#txtnomeindica').val() );
					$( this ).dialog( "close" );
				},
				'Cancelar': function() {
					$( this ).dialog( "close" );
				}
			},
			open: function(){ $('#txtemailindica').val(''); $('#txtnomeindica').val(''); }
	})
}

function reativaconta(){	
	if( $("reativarconta" ).dialog('isOpen')==true) {alert('Já existe uma janela aberta.'); return false;}
	$("#reativarconta" ).dialog({
			resizable: false,
			height:230,
			width:398,
			modal: false,
			autoOpen: true,
			buttons: {
				"Enviar": function() {
					xajax_reativaconta($('#txtreativaconta').val());
					$( this ).dialog( "close" );
				},
				'Cancelar': function() {
					$( this ).dialog( "close" );
				}
			},
			open: function(){ $('#txtreativaconta').val('')}
	})
}

function chatNow(){
	//$("#dialog-chat" ).dialog('close');
	if( $( "#dialog-chat" ).dialog('isOpen')==true) {alert('Já existe uma janela de atendimento aberta.'); return false;}


	$( "#dialog-chat" ).dialog({
			resizable: false,
			height:230,
			width:398,
			modal: false,
			close:function(){ xajax_fechouChat(); $('#dialog-chat').html('<br><table width="350" cellpadding="10" align="center" style="font-size:13px;"><tr><td>Seu Nome:</td><td><input type="text" id="txtnomeChat" style="height:17px; width:230px;" /></td></tr><tr><td style="padding-top:20px;">Seu Email:</td><td style="padding-top:20px;"><input type="text" id="txtemailChat" style="height:17px; width:230px;" /> </td></table>');},
			open: function(){
				$(this).dialog('option','height','230');
				$( this ).dialog( "option", "buttons", 
				[{text: "Iniciar atendimento", click: function() { 
									xajax_iniciaChat($('#txtnomeChat').val(), $('#txtemailChat').val());
				 												 }
				 },
				  { text: "Cancelar", click: function() { $( this ).dialog( "close" ); }}	 
				]);
				$('#dialog-chat').html('<br><table width="350" cellpadding="10" align="center" style="font-size:13px;"><tr><td>Seu Nome:</td><td><input type="text" id="txtnomeChat" style="height:17px; width:230px;" /></td></tr><tr><td style="padding-top:20px;">Seu Email:</td><td style="padding-top:20px;"><input type="text" id="txtemailChat" style="height:17px; width:230px;" /> </td></table>');
				},
			autoOpen: true
		/*	buttons: {
				"Iniciar atendimento": function() {
					xajax_iniciaChat($('#txtnomeChat').val(), $('#txtemailChat').val());
					$( this ).dialog( "option", "buttons", [{text: "Encerrar", click: function() { $(this).dialog("close"); } }]);
					$( this ).dialog( "option", "height", "445");
					//$( this ).dialog( "close" );
				},
				'Cancelar': function() {
					$( this ).dialog( "close" );
				}
			}*/
		});
	}
	
	

function montaChat(){
	$( '#dialog-chat' ).dialog( "option", "height", "455");
	$( '#dialog-chat' ).dialog( "option", "buttons", [{text: "Encerrar", click: function() { $(this).dialog("close"); } }]);
	}	

function fechaDialog(){
	$("#dialog-chat").dialog("close");
	xajax_fechouChat();
	}	
	
function morechat(nome, email){
	var confirma = confirm('Já existe uma requisição de atendimento online aberta. Deseja encerra-la e abrir uma nova')
	if (confirma)
	 {
		xajax_fechouChat();
		//fechaDialog();
		$( "#dialog-chat" ).html("<br><br><br><h3>Iniciando uma nova sess&atilde;o...");	
		//$('#txtnomeChat').val(nome); 
		//$('#txtemailChat').val(email);
		
		setTimeout('xajax_iniciaChat("'+nome+'","'+email+'")',5000);
		//clearInterval(intChat);	
	}
}
	
function stopChatRefresh(){
	clearInterval(intChat);
//	alert('parou chatrefresh')	
	}	
	
function startChatRefresh(){
//	alert('iniciou chatrefresh')
	intChat = setInterval('xajax_refreshChat()',5000);

	}	
function scrollChat(){

$("#dvChatAtendContent").attr({ scrollTop: $("#dvChatAtendContent").attr("scrollHeight") });
	//alert('foi??')

}





getDataJson = setInterval('obterDados()',1000);
//alert('bosta depois')
setInterval('xajax_dataServ()',60000);
setInterval('xajax_rotBanner()',40000);

//setInterval('mostraHoraServ()',1000);

