function goPage(pag,div){
	
	$.ajax({
		type: "GET",
		url: pag,
		success: function(texto){
			$("#"+div).html(texto);
		}
	});
	
}

//////////////////// MURAL ////////////////////


function emoticon(text, campodi) {
	//document.getElementById('frecado')
	var txtarea = campodi
	text = ' ' + text + ' '
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
		txtarea.focus();
	}
	else {
		txtarea.value  += text;
		txtarea.focus();
	}
}


//////////////////// TIRAR ESPAÇO DO INICIO E FINAL DA PALAVRA ////////////////////
function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
