// JavaScript Document
<!--
	function valida_form() {
		with (frm_exemplares) {
			if (nome.value=="") {
				alert("O nome deve ser preenchido");
				nome.focus();
				return false;
			}
			if (email.value=="") {
				alert("O e-mail deve ser preenchido");
				email.focus();
				return false;
			}
			if ((telefone_residencial.value=="") && (telefone_comercial.value=="")) {
				alert("Um dos telefones devem ser preenchidos");
				telefone_residencial.focus();
				return false;
			}
			//Verifica se algum exemplar foi marcado
			rev=false;
			for (cont=0; cont<edicoes_solicitadas.length; cont++) {
				if(edicoes_solicitadas[cont].checked==true) {
					rev=true;
				}
			}
			if (rev==false) {
				alert("Você deve escolher pelo menos uma edição\n para aquisição");
				telefone_residencial.focus();
				return false;
			}
			if ((forma_pagamento[0].checked == false) && (forma_pagamento[1].checked == false)) {
				alert("Você deve selecionar uma forma de pagamento \n Depósito ou Boleto");
				return false;
			}
			if (forma_pagamento[0].checked == true) {
				action = "formmail/formmail_exemplares.php";
				target = "";
			}
			if (forma_pagamento[1].checked == true) {
				alert("Atenção:\n\nSerá aberta uma nova janela para a impressão do boleto.\nClique no Botão ok para prosseguir");
				window.open('','janela_boleto');
				action = "cobrebem/cb_exemplares.php";
				target = "janela_boleto";
				submit();
				return false;
			}
		}
	return true;
	}
	function calcula_pedido() {
		qtde=0;
		with (frm_exemplares) {
			for (cont=0; cont<edicoes_solicitadas.length; cont++) {
				if(edicoes_solicitadas[cont].checked==true) {
					++qtde;
				}
			}
			total_geral = qtde * 10.80;
			total_geral = total_geral.toFixed(2);
			valor_total.value = "R$ " + total_geral;
		}
	}
//-->