function fn_Submit (inc, dpt, pag, aux)
{
	if (inc != '') { document.fSubmit.inc.value = inc; }
	if (dpt != 0) { document.fSubmit.dpt.value = dpt; }
	document.fSubmit.pag.value = pag;
	document.fSubmit.aux.value = aux;
	document.fSubmit.submit();
}

function fn_SubmitContato (theForm)
{
	if(!validaitem(theForm.txtNome,'s','3','100','Nome')) { return (false); }
	if(!validaitem(theForm.txtEmail,'s','3','100','E-mail')) { return (false); }
	if(!splitemail(theForm.txtEmail)) { return (false); }

	theForm.submit();
}

function fn_SubmitCadastro (theForm)
{
	if(!validaitem(theForm.txtNome,'s','3','100','Nome')) { return (false); }
	if(!validaitem(theForm.txtEmail,'s','3','100','E-mail')) { return (false); }
	if(!splitemail(theForm.txtEmail)) { return (false); }
	if(!validaitem(theForm.txtLogin,'s','5','30','Login')) { return (false); }
	if(!validaitem(theForm.txtSenha,'s','5','15','Senha')) { return (false); }
	if(!validaitem(theForm.txtConf,'s','5','15','Confirmar Senha')) { return (false); }
	
	if (theForm.txtSenha.value != theForm.txtConf.value)
	{ alert('Senha não confere!'); return (false); }

	theForm.submit();
}

function fn_SubmitDivulgue (theForm)
{
	if (!validaitem(theForm.txtNome,'s','3','100','Noma da festa')) { return (false); }
	if (!validaitem(theForm.txtLocal,'s','3','100','Local da festa')) { return (false); }
	if (theForm.ddlDepto.value == 0) { alert('O campo Cidade/UF é obrigatório!'); return (false); }
	if (!validaitem(theForm.txtEmail,'s','5','150','E-mail')) { return (false); }
	if(!splitemail(theForm.txtEmail)) { return (false); }
	if (!validaitem(theForm.dddTel,'s','2','2','DDD')) { return (false); }
	if (!validaitem(theForm.txtTel,'s','8','8','Telefone')) { return (false); }
	if (!validaitem(theForm.txtData,'s','10','10','Data')) { return (false); }
	if (!validaitem(theForm.txtHora,'s','5','5','Horário')) { return (false); }
	if (!validaitem(theForm.txtImage,'s','3','','Panfleto')) { return (false); }

	theForm.submit();
}

function fn_SubmitMural (theForm)
{
	if (!validaitem(theForm.txtNome,'s','3','100','Destinatário')) { return (false); }
	theForm.submit();
}


function fn_Image (cod, image)
{
	document.getElementById('evento_img').src = image;
	document.getElementById('inp_foto').value = cod;
	document.getElementById('cont_fEvento').style.display = 'block';
	document.getElementById('img_Foto').style.display = 'block';
	document.getElementById('cont_coments').innerHTML = document.getElementById('coments_' + cod).value;
}

function fn_Album (image)
{
	document.getElementById('album_img').src = image;
}


function fn_SubmitLogin (theForm)
{
	if(!validaitem(theForm.txtLogin,'s','5','30','Login')) { return (false); }
	if(!validaitem(theForm.txtSenha,'s','5','15','Senha')) { return (false); }

	theForm.submit();
}
