function PostMenu(Menu,url) {
	objForm = document.frmMenu
	objForm.Menu.value = Menu
	objForm.action = url
	objForm.submit()
}

function PopUp(strPage,namePage,larg,alt){
	//larghFinestra=600; /*creo una variabile contenente la larghezza della finestra*/
	//altezFinestra=500; /* creo una variabile contenente l'altezza della finestra */
	sinistra=(screen.width-larg)/2; /*creo una variabile e mi ricavo il valore della posizione della finestra a sinistra dello schermo*/
	alto=(screen.height-alt)/2; /*creo una variabile e mi ricavo il valore della posizione della finestra dall'alto dello schermo */
	window.open(strPage,namePage, "left="+sinistra+",top="+alto+",width="+larg+", height="+alt+",toolbar=no, location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes"); /*creo un oggetto*/
}

function PopUpImages(nameImg,namePage,larg,alt){
	strPage = "/images/" + nameImg
	sinistra = (screen.width-larg)/2; /*creo una variabile e mi ricavo il valore della posizione della finestra a sinistra dello schermo*/
	alto = (screen.height-alt)/2; /*creo una variabile e mi ricavo il valore della posizione della finestra dall'alto dello schermo */
	window.open(strPage,namePage, "left="+sinistra+",top="+alto+",width="+larg+", height="+alt+",toolbar=no, location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes"); /*creo un oggetto*/
}

function emoticon(textEmoticon) {
	var txtarea = document.FormInviaMessaggio.GB_Messaggio;
	textEmoticon = ' ' + textEmoticon + ' ';
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + textEmoticon + ' ' : caretPos.text + textEmoticon;
		txtarea.focus();
	} else {
		txtarea.value  += textEmoticon;
		txtarea.focus();
	}
}
function storeCaret(textEl) {
	if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}

