function verificaMural(){
	var frm = document.frm_mural;
	var vc_erro = "";
	var vc_foco = 0;
	
	
	if(frm.vc_destinatario.value == ""){
		vc_erro += "- Destinatário\n";
		if(vc_foco == 0){
			vc_foco = frm.vc_destinatario;
		}
	}
	if(frm.tx_mensagem.value == "" || frm.tx_mensagem.value.toLowerCase() == "(mensagem)"){
		vc_erro += "- Mensagem\n";
		if(vc_foco == 0){
			vc_foco = frm.tx_mensagem;
		}
	}
	
	if(vc_erro == ""){
		frm.submit();
	}else{
		alert("Atenção campos obrigatórios\n\n"+vc_erro);
		vc_foco.focus();
	}
}

//mudar pagina
function mudaPagina(id_caixa){
	var it_valor = document.getElementById(id_caixa).value;
	if(it_valor == "" || isNaN(it_valor)){
		alert("Digite um número na caixa de texto ao lado");
	}else{
		var it_pag = parseInt(it_valor);
		location.href = "default.asp?actA=14&pagIT="+it_pag;
	}
	
	
	
}

/*funcao para abrir link para facebook*/
function fbs_click() {
	u=location.href;
	t=document.title;
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
}

/*funcao para link myspace*/
function GetThis(T, C, U, L)
{
    var targetUrl = 'http://www.myspace.com/index.cfm?fuseaction=postto&' + 't=' + encodeURIComponent(T)
    + '&c=' + encodeURIComponent(C) + '&u=' + encodeURIComponent(U) + '&l=' + L;
    window.open(targetUrl);
}


/*funcao para mudar ordem da busca*/
function ordenaMural(areaID){
	var obj = document.getElementById("ordemVC");
	var indice = obj.options.selectedIndex;
	var vc_ordem = obj.options[indice].value;
	var vc_queryString = "";

	if (areaID.length >0 && parseInt(areaID) !=0){
		vc_queryString = "?actA=20&actB=5&areaID="+areaID;
	}else{
		vc_queryString = "?actA=14"
	}

	if (vc_ordem.length > 0){
		location.href = "default.asp"+vc_queryString+"&ordemVC="+vc_ordem
	}else{
		alert("Escolha a ordem que deseja que o resultado seja exibido.");
	}
}


