function MM_openBrWindow(theURL,winName,features) 
{ 
  window.open(theURL,winName,features);
}

function ac_smilie(thesmile)
{
	document.form.commento.value += " "+thesmile+" ";
	document.form.commento.focus();
}

function x ()
{
	return;
}




function DoPrompt(action)
{
  var revisedMessage;
  var currentMessage = document.form.commento.value;
  if (action == "url")
  {
	var thisURL = prompt("Inserisci l'URL del link.", "http://");
	if (!thisURL) return;
	var thisTitle = prompt("Inserisci il titolo del sito web", "Page Title");
	thisURL = thisURL.replace(/^\s*|\s*$/g,"");
	thisTitle = thisTitle.replace(/^\s*|\s*$/g,"");
	if (thisURL == "" || thisTitle == "") return;
	var urlBBCode = "[URL="+thisURL+"]"+thisTitle+"[/URL]";
	revisedMessage = currentMessage+urlBBCode;
	document.form.commento.value=revisedMessage;
	document.form.commento.focus();
	return;
  }
  if (action == "email")
  {
	var thisEmail = prompt("Inserisci l'indirizzo email.", "");
	thisEmail = thisEmail.replace(/^\s*|\s*$/g,"");
	if (thisEmail == "") return;
	var emailBBCode = "[EMAIL]"+thisEmail+"[/EMAIL]";
	revisedMessage = currentMessage+emailBBCode;
	document.form.commento.value=revisedMessage;
	document.form.commento.focus();
	return;
  }
  if (action == "bold")
  {
	var thisBold = prompt("Inserisci il testo da formattare in grassetto.", "");
	thisBold = thisBold.replace(/^\s*|\s*$/g,"");
	if (thisBold == "") return;
	var boldBBCode = "[B]"+thisBold+"[/B]";
	revisedMessage = currentMessage+boldBBCode;
	document.form.commento.value=revisedMessage;
	document.form.commento.focus();
	return;
  }
  if (action == "italic")
  {
	var thisItal = prompt("Inserisci il testo da formattare in corsivo.", "");
	thisItal = thisItal.replace(/^\s*|\s*$/g,"");
	if (thisItal == "") return;
	var italBBCode = "[I]"+thisItal+"[/I]";
	revisedMessage = currentMessage+italBBCode;
	document.form.commento.value=revisedMessage;
	document.form.commento.focus();
	return;
  }
  if (action == "underline") {
	var thisUndl = prompt("Inserisci il testo da sottolineare.", "");
	thisUndl = thisUndl.replace(/^\s*|\s*$/g,"");
	if (thisUndl == "") return;
	var undlBBCode = "[U]"+thisUndl+"[/U]";
	revisedMessage = currentMessage+undlBBCode;
	document.form.commento.value=revisedMessage;
	document.form.commento.focus();
	return;
  }
  if (action == "image")
  {
	var thisImage = prompt("Inserisci l'URL dell'immagine.", "http://");
	thisImage = thisImage.replace(/^\s*|\s*$/g,"");
	if (thisImage == "") return;
	var imageBBCode = "[IMG]"+thisImage+"[/IMG]";
	revisedMessage = currentMessage+imageBBCode;
	document.form.commento.value=revisedMessage;
	document.form.commento.focus();
	return;
  }

}