// --------------------------------------- Agenda -------------------------------------------------------
var img_pasta = '../images'
function agenda(dt1, eve1, id1, dt2, eve2, id2, dt3, eve3, id3)
{
	this.dt1 = dt1;
	this.dt2 = dt2;
	this.dt3 = dt3;
	this.eve1 = eve1;
	this.eve2 = eve2;
	this.eve3 = eve3;
	this.id1 = id1;
	this.id2 = id2;
	this.id3 = id3;

	this.showAgenda = showAgenda;
	this.printAgenda = printAgenda;
}

function showAgenda()
{
	printAgenda(this.dt1, this.eve1, this.dt2, this.eve2, this.dt3, this.eve3, this.id1, this.id2, this.id3);
}

function printAgenda(dt1, eve1, dt2, eve2, dt3, eve3, id1, id2, id3) 
{
	document.writeln('</td>');
	document.writeln('</tr>');
	document.writeln('<tr>');
	document.writeln('<td align="right">');
	document.writeln('<div><img src="'+img_pasta+'/agenda_topo.gif" alt="agenda" width="171" height="20" usemap="#mais_agenda" border="0"> </div>');
	if (dt1 != ''){
	document.writeln('<div class="agendatexto">' + dt1 + ' -<A href="javascript: abrir_agenda(\''+ id1 +'\');" class="ultimahoratexto">' + eve1 + '</A></div>');
	}
	if (dt2 != ''){
	document.writeln('<div class="agendatexto">' + dt2 + ' -<A href="javascript: abrir_agenda(\''+ id2 +'\');" class="ultimahoratexto">' + eve2 + '</A></div>');
	}
	if (dt3 != ''){
	document.writeln('<div class="agendatexto">' + dt3 + ' -<A href="javascript: abrir_agenda(\''+ id3 +'\');" class="ultimahoratexto">' + eve3 + '</A></div>');
	}
	document.writeln('<div><img src="'+img_pasta+'/agenda_acabamento.gif" alt="borda" width="171" height="7"></div>');
	document.writeln('</td>');
	document.writeln('</tr>');
	document.writeln('<map name="mais_agenda"><area shape="rect" coords="110,0,190,24" href="javascript: abrir_hist_agenda()"></map>');
}
// -----------------------------------------------------------------------------------------------------

// --------------------------------------- Enquete -------------------------------------------------------
function enquete(perg, op1, op2, op3, op4, id)
{
	this.perg = perg;
	this.op1 = op1;
	this.op2 = op2;
	this.op3 = op3;
	this.op4 = op4;
	this.id = id;
	

	this.showEnquete = showEnquete;
	this.printEnquete = printEnquete;
}

function showEnquete()
{
	printEnquete(this.perg, this.op1, this.op2, this.op3, this.op4, this.id);
}


function printEnquete(perg, op1, op2, op3, op4, id){

document.writeln('<tr>');
document.writeln('<td align="right"><br>');
document.writeln('<div><img src="'+img_pasta+'/enquete_topo.gif" alt="agenda" width="171" height="20"> </div>');
document.writeln('<div class="enquetepergunta">'+perg+'</div>');
document.writeln('<div class="enquetetexto">');
document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.writeln('<tr>');
document.writeln('<td width="10"><input name="radiobutton" type="radio" value="cont_op1" onClick="click_radio(this.value)"></td>');
document.writeln('<td>'+op1+'</td>');
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('</div>');
document.writeln('<div class="enquetetexto">');
document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.writeln('<tr>');
document.writeln('<td width="10"><input name="radiobutton" type="radio" value="cont_op2" onClick="click_radio(this.value)"></td>');
document.writeln('<td>'+op2+'</td>');
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('</div>');

if (op3 != ''){
document.writeln('<div class="enquetetexto">');
document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.writeln('<tr>');
document.writeln('<td width="10"><input name="radiobutton" type="radio" value="cont_op3" onClick="click_radio(this.value)"></td>');
document.writeln('<td>'+op3+'</td>');
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('</div>'); 
}

if (op4 != ''){
document.writeln('<div class="enquetetexto">');
document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
document.writeln('<tr>');
document.writeln('<td width="10"><input name="radiobutton" type="radio" value="cont_op4" onClick="click_radio(this.value)"></td>');
document.writeln('<td>'+op4+'</td>');
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('</div>'); 
}

document.writeln('<img src="'+img_pasta+'/bots_enquete.gif" alt="bot&otilde;es" width="171" height="25" border="0" usemap="#enquete"><map name="enquete"><area shape="rect" coords="1,4,80,21" href="javascript: votar('+id+');"><area shape="rect" coords="89,4,167,21" href="javascript: resultado();"></map>'); 
document.writeln('<div><img src="images/agenda_acabamento.gif" alt="borda" width="171" height="7"></div>'); 
document.writeln('</td>'); 
document.writeln('</tr>'); 
document.writeln('</table>'); 

}
// -----------------------------------------------------------------------------------------------------