function EnviaMural(){
	De = document.frm_mural.De.value;
	Para = document.frm_mural.Para.value;
	Recado = document.frm_mural.Recado.value;
	
	if(De=="" || Para=="" || Recado==""){
		alert('Por favor, preencha todos os campos!');
		return false;
	}else{
		return true;
	}
}

function CheckContato(){
	Nome = document.frm_cli.Nome.value;
	Email = document.frm_cli.Email.value;
	Telefone = document.frm_cli.Telefone.value;
	Mensagem = document.frm_cli.Mensagem.value;
	
	if(Nome=="" || Email=="" || Telefone=="" || Mensagem==""){
		alert('Todos os campos são obrigatórios!');
		return false;
	}else{
		return true;
	}
}

function OpenUrl(Link){
	window.opener.location.reload(Link);
	window.close();
	window.opener.focus();
}

function Url(Link){
	location.href = Link;
}
function DmP(Link){
	location.href = Link;
}

function ConteudoFlash(swf,largura,altura,LocalId){
	STRFlash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+largura+'" height="'+altura+'">'
	STRFlash += '<param name="movie" value="'+swf+'" />'
    STRFlash += '<param name="quality" value="high" />'
    STRFlash += '<param name="wmode" value="transparent" />'
	STRFlash += '<embed src="'+swf+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'" wmode="transparent"></embed>'
	STRFlash += '</object>'
	document.getElementById(LocalId).innerHTML = STRFlash;
}

function AguardePop(){
	document.getElementById('bt').style.display = 'none';
	document.getElementById('msg').style.display = '';
}

function AguardeConfirme(Msg){
	if(confirm(Msg)){
		STRLeyer = '<div style="position:absolute; font-family:Verdana; color:#D36114; font-size:12px; line-height:100px; border-style:solid; border-color:#D36114; border-width:2px;width:300px;height:100px;z-index:1;background-color: #FFFEE8;left:0px;top:0px; text-align:center;">Por favor aguarde...</div>';
		document.getElementById('corpo').innerHTML = STRLeyer;
	}else{
		return false;
	}
}

// ******************************************************
// *********** mostra determinada area ************
// ******************************************************
function ShowHide(IdObjeto){
	if (document.all) {if (document.getElementById(IdObjeto).style.display == ''){
		document.getElementById(IdObjeto).style.display = 'none';}
	else {
		document.getElementById(IdObjeto).style.display = '';
		}
	}
}

function Show(IdObjeto){
	document.getElementById(IdObjeto).style.display = '';
}

function Hide(IdObjeto){
	document.getElementById(IdObjeto).style.display = 'none';
}


// ******************************************************
// ******************* ABRE UMA NOVA JANELA POPUP *************
// ******************************************************
function AbreJanela(link,x,y,s) {
//	window.showModalDialog(link,"Testando","dialogHeight:"+y+"px;dialogWidth:"+x+"px;help:no;status:no;unadorned:yes;")
	var t = (screen.height - y) / 2;
	var e = (screen.width - x) / 2;
	window.open(link,x+y+s,'width=' + x + ',height=' + y + ',scrollbars=' + s + ',toolbar=0,location=0,status=0,menubar=0,resizable=0,left=' + e + ',top=' + t + '');
}

// ******************************************************
// ******************* cancelar *************
// ******************************************************
function Cancela(){
	if (confirm('Deseja cancelar esta operação?')==true){
		window.opener.location.reload();
		window.close();
	}
}

function Fecha(){
	window.close();
}


function TxtStatus(TXT){
	window.status = TXT;
}
			
// ******************************************************
// *********** Galeria de imagem ************
// ******************************************************
function VerFoto(Imagem,idFoto){
	document.getElementById(idFoto).src=Imagem
}

// ******************************************************
// *********** Galeria de imagem ************
// ******************************************************
function FocaCampo(Frm,CampoId){
	document.getElementById(CampoId).focus();
}

function Passa(Frm,CampoId){
	document.getElementById(CampoId).focus();
}

// ******************************************************
// *********** Envia valor ************
// ******************************************************
function MM(Frm,Campo,Valor){
	document.getElementById(Campo).value = Valor;
}

// ******************************************************
// *********** Envia formulário ************
// ******************************************************
function Envia(FrmId){
	document.getElementById(FrmId).submit();
}

// ******************************************************
// *********** Reseta formulário ************
// ******************************************************
function Reset(FrmId){
	document.getElementById(FrmId).reset()
}