function submitform()
{
  document.f_login.submit();
}


function replyIMG(formID) {
var imgURL = prompt ("Type the full URL of the image in here including the http://","http://");
if(imgURL){
document[formID].message.value += "[IMG]" + imgURL + "[/IMG]";
}
}

function replyEML(formID) {
var emailADD = prompt ("Type the email address","");
if(emailADD){
document[formID].message.value += "[MAIL]" + emailADD+ "[~]" + emailADD + "[/MAIL]";
}
}

function replyURL(formID) {
var linkURL = prompt ("Type the full URL in here including the http://","http://");
var linkNAME = prompt ("Type the name of the link (what people will see) in here","");
if(linkNAME){
document[formID].message.value += "[LINK]" + linkURL+ "[~]" + linkNAME + "[/LINK]";
}
}

function replyBOLD() {
   GetSelection("[B]","[/B]");
}

function replyITAL() {
   GetSelection("[I]","[/I]");
}

function replyALLEFT() {
   GetSelection("[ALIGN_L]","[/ALIGN]");
}

function replyALCENTER() {
   GetSelection("[ALIGN_C]","[/ALIGN]");
}

function replyALRIGHT() {
   GetSelection("[ALIGN_R]","[/ALIGN]");
}

function replyALJUST() {
   GetSelection("[ALIGN_J]","[/ALIGN]");
}

function smilie(smCLK,formID) {
document[formID].message.value += smCLK;
}

function GetSelection(varL,varR)
{
  var textComponent = document.getElementById('entrybox');
  var selectedText;
  // IE version
  if (document.selection != undefined)
  {
    if (document.selection.createRange().parentElement().tagName == 'TEXTAREA') {
	var sel = document.selection.createRange();
    selectedText = sel.text;
	sel.text = varL + selectedText + varR;
	}
  }
  // Mozilla version
  else if (textComponent.selectionStart != undefined)
  {
    var startPos = textComponent.selectionStart;
    var endPos = textComponent.selectionEnd;
    selectedText = textComponent.value.substring(startPos, endPos)
	
	textComponent.value = textComponent.value.substring(0,startPos) + varL + selectedText + varR + textComponent.value.substring(endPos,textComponent.value.length);
  }
}

function changeMouse(chain){
    document.body.style.cursor = chain;
}