// Circulo Militar

// Abre links em outra janela ( Padrão da W3C )
function AbrirJanela(endereco){
	window.open(endereco);
}

// Cadastra o Email pelo site
function insereEmail(){
	var rtn = true;
	var obj;
	obj = $("txtnewsletter");
	
	if (obj.value == "") {
		alert('Informe o email!');
		obj.focus();
		rtn = false;
	} else {
		if (!isEmail(obj.value)) {
			alert('Email inválido!');
			obj.focus();
			rtn = false;
		}
	}
	
	if (rtn) {
		var op = "operacao=insereEmail";
		op += "&Email="+ $("txtnewsletter").value;
		fnAjax("GET", "divEmail", aplUrl + "inc/ajax.asp", op, "posEmail();", "");
		
	}
}

//Msg Email
function posEmail() {
	alert(document.getElementById("ret_email").value);
	document.getElementById("txtnewsletter").value = "";
}

function fnAtend(form) {	
	if (Spry.Widget.Form.validate(form) == true){
		$("cmdAtend").disabled = true;
		$("operacao").value="sav";

		form.submit();
	} else {
		alert("Atenção. Há campos que não foram preenchidos corretamente!");	
	}
}

// posicionamento do flash
function fnMenu(status){
	
	if(status == 'S'){
		document.getElementById("menuFL").style.zIndex = 1;
	} else {
		document.getElementById("menuFL").style.zIndex = 0;
	}
	
}
