
function doVoto(conto_codigo, tipo_voto){
	var ajax = new AJAX();
	ajax.callPage("../site/conto_info.asp?id=" + conto_codigo + "&info=voto&tipo=" + tipo_voto + "", writeVoto);
}
function writeVoto(response){
	obj = document.getElementById("voto");
	obj.innerHTML = response;
}

function doContoViews(conto_codigo){
	var ajax = new AJAX();
	ajax.callPage("../site/conto_info.asp?id=" + conto_codigo + "&info=views", writeViews);
	doContoNota(conto_codigo);
}
function writeViews(response){
	obj = document.getElementById("conto_views");
	obj.innerHTML = "Este conto já foi visto <br>por " + response + " vezes.";
}
function doContoNota(conto_codigo){
	var ajax = new AJAX();
	ajax.callPage("../site/conto_info.asp?id=" + conto_codigo + "&info=nota", writeNota);
}
function writeNota(response){
	obj = document.getElementById("conto_nota");
	if (response!=""){
		obj.innerHTML = response;
		obj.style.display = "block";
	}
}
function doVitrine(){
	writeVitrine('<iframe src="../site/banner.asp?o=V" frameborder="0" width="137" marginwidth="0" marginheight="0" height="300" scrolling="no"></iframe>');
	writeVitrine2('<iframe src="../site/banner.asp?o=H" frameborder="0" width="468" marginwidth="0" marginheight="0" height="175" scrolling="no"></iframe>');
}
function writeVitrine(response){
	obj = document.getElementById("vitrine");
	obj.innerHTML = response;
}
function writeVitrine2(response){
	obj = document.getElementById("vitrine2");
	obj.innerHTML = response;
}
//***************************************************
// A U T O   S C R O L L 
//***************************************************
var CF_TimeOut = 0;
var CF_Current = 0;
var CF_bolScroll = false;

//Pre-Load
var CR_Img = new Image();
CR_Img.src='../imagens/icones/ico_hand2.gif';
CR_Img.src='../imagens/icones/ico_hand.gif';

function doPlayScroll(){
	document.getElementById("btScroll").innerHTML = "<img src='../imagens/icones/ico_hand2.gif' width='35' height='36' border='0' align='absmiddle'> Ler <u>COM</u> as mãos";
	
	CF_bolScroll = true;
	if (CF_Current < 0) CF_Current=0;
	window.scroll(0,CF_Current);
	CF_Current=CF_Current + 2;
	CF_TimeOut=setTimeout("doPlayScroll()",200);
}

function doStopScroll(){
	document.getElementById("btScroll").innerHTML = "<img src='../imagens/icones/ico_hand.gif' width='35' height='36' border='0' align='absmiddle'> Ler SEM as mãos";
	
	CF_bolScroll = false;
	clearTimeout(CF_TimeOut);
}

function doContoScroll(){
	if(CF_bolScroll){doStopScroll();}
	else{doPlayScroll();}
}