function votar(id) { for (i = 0; i < (document.forms['formulario'].resposta.length); i++) { if (document.forms['formulario'].resposta[i].checked) { resposta = document.forms['formulario'].elements[i].value; break } } abrir('enquete/xt_votar.asp?id='+id+'&resposta='+resposta,'njEnquete','wi360','he280','le225','to80') }
function votar_int(id) { for (i = 0; i < (document.forms['formulario'].resposta.length); i++) { if (document.forms['formulario'].resposta[i].checked) { resposta = document.forms['formulario'].elements[i].value; break } } abrir('../enquete/xt_votar.asp?id='+id+'&resposta='+resposta,'njEnquete','wi360','he280','le225','to80') }
function votar_int2(id) { for (i = 0; i < (document.forms['formulario'].resposta.length); i++) { if (document.forms['formulario'].resposta[i].checked) { resposta = document.forms['formulario'].elements[i].value; break } } abrir('../../enquete/xt_votar.asp?id='+id+'&resposta='+resposta,'njEnquete','wi360','he280','le225','to80') }
function mOvr(src,cursor) {src.style.cursor = cursor;src.bgColor = "#90bbdc"}
function mOut(src) {src.style.cursor = 'default';src.bgColor = "#ffffff"}
function voltar() {window.history.back()}
function imprimir() {window.print()}
function fechar() {window.close()}
function abrir() {
	var windowFeatures = "", nomeArquivo = "", nomeJanela = "", erro = null
	Argumentos = abrir.arguments
	noArgumentos = Argumentos.length
	nomeArquivo = Argumentos[0]
	for (i = 1; i < noArgumentos; i++) {
		valor = Argumentos[i].substring(2,Argumentos[i].length)
		switch(Argumentos[i].substring(0,2)) {
			case "nj" : nomeJanela = valor; break
			case "to" : windowFeatures += "top=" + valor + ", "; break
			case "le" : windowFeatures += "left=" + valor + ", "; break
			case "he" : windowFeatures += "height=" + valor + ", "; break
			case "wi" : windowFeatures += "width=" + valor + ", "; break
			case "lb" : windowFeatures += "location=" + valor + ", "; break
			case "mb" : windowFeatures += "menubar=" + valor + ", "; break
			case "sc" : windowFeatures += "scrollbars=" + valor + ", "; break
			case "st" : windowFeatures += "status=" + valor + ", "; break
			case "tb" : windowFeatures += "toolbar=" + valor + ", "; break
			case "tt" : windowFeatures += "titlebar=" + valor + ", "; break
			case "re" : windowFeatures += "resizable=" + valor + ", "; break
			default : erro = '"Código de atributo não informado no '+(i+1)+' º argumento (' +Argumentos[i]+ ')"'
		}
	}
	windowFeatures = windowFeatures.substring(0,windowFeatures.lastIndexOf(","))
	if (erro) { alert(erro) } else { novaJanela = window.open(nomeArquivo, nomeJanela, windowFeatures) }
}
function initInput() { if (document.forms[0].supSenha.value != 'Senha') document.forms[0].supSenha.style.textAlign = "left"; if (document.forms[0].supUsuario.value != 'ID') document.forms[0].supUsuario.style.textAlign = "left" }
function escolher() { Index = document.form_escolha.escolha.selectedIndex; Selecao = document.form_escolha.escolha.options[Index].value; if (Selecao != '') window.location = Selecao; document.form_escolha.escolha.options[0].selected=true }
function prepareInput(input,op) {
	if (op && input.value == '') {
		if (input.name == 'supUsuario') eval('document.forms[0].' + input.name + '.value = "ID"')
		else eval('document.forms[0].' + input.name + '.value = "Senha"')
		eval('document.forms[0].' + input.name + '.style.textAlign = "center"')
	} else
		if ((input.value == 'ID') || (input.value == 'Senha')) {
			eval('document.forms[0].' + input.name + '.value = ""'); eval('document.forms[0].' + input.name + '.style.textAlign = "left"')
		}
}

