function Confirma(){
	var agree = confirm("Deseja excluir este registro?");
	if (agree) {
		return(true);
	} else {
		return(false)
	}
}

function checkRestrito() {
missinginfo = "";
if ((document.form_restrito.usuario.value == "") || (document.form_restrito.usuario.value == "Login")) {
missinginfo += "\n     -  Usuário";
}
if (document.form_restrito.senha.value == "") {
missinginfo += "\n     -  Senha";
}
if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"Você não preencheu corretamente:\n" +
missinginfo + "\n_____________________________" +
"\nPor favor, preencha novamente!";
alert(missinginfo);
return false;
}
else return true;
}

function checkCliente() {
missinginfo = "";
if (document.form.contato.value == "") {
missinginfo += "\n     -  Contato";
}
if (document.form.cliente.value == "") {
missinginfo += "\n     -  Cliente";
}
if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"Você não preencheu corretamente:\n" +
missinginfo + "\n_____________________________" +
"\nPor favor, preencha novamente!";
alert(missinginfo);
return false;
}
else return true;
}

function popup(URL) {
   var width = 450;
   var height = 450;
   var left = 10
   var top = 10
   window.open(URL,'Popup', 'width='+width+', height='+height+', top='+top+', left='+left+', toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, fullscreen=no');
}

function checkContato() {
missinginfo = "";
if (document.form.nome.value == "") {
missinginfo += "\n     -  Nome";
}
if ((document.form.email.value == "") || 
(document.form.email.value.indexOf('@') == -1) || 
(document.form.email.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Email";
}
if (document.form.telefone.value == "") {
missinginfo += "\n     -  Telefone";
}
if (document.form.assunto.value == "") {
missinginfo += "\n     -  Assunto";
}
if (document.form.mensagem.value == "") {
missinginfo += "\n     -  Mensagem";
}
if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"Você não preencheu corretamente:\n" +
missinginfo + "\n_____________________________" +
"\nPor favor, preencha novamente!";
alert(missinginfo);
return false;
}
else return true;
}

