function send_login_form(ajaxUrl, form) {
  document.getElementById('registrationLoad').style.display='inline';
  new Ajax.Request(ajaxUrl, {asynchronous:true, parameters:Form.serialize(form), method: 'post', onSuccess: formResponseLogin});
  return false;
}

function formResponseLogin(transport) {
  var json = transport.responseText.evalJSON();
  document.getElementById('registrationLoad').style.display='none';

  if(json.error){
    for(i = 0; i < json.errorArray.length; i++){
      inputName = json.errorArray[i];
      setErrorInput(json.component + "_" + inputName);
      $(inputName).value = '';
    }
  } else {
    // ha nincs hiba vagyis belepett, akkor frissitsuk a bal oldali üzenetek ablakot
    document.getElementById(json.divId).innerHTML = json.divContent;
    url = "/ajax.php?action=message";
    ajaxGetUrl('message', url);
  }
}

function setErrorInput(mezonev){
  elem = document.getElementById(mezonev);
  if( null != elem.style ){
    elem.style.color = '#FF9300';
  }
}

function setErrorInputBack(){
  if( null != elem.style ){
    this.style.color = '#000000';
    this.style.backgroundColor = '#EFEFEF';
  }
}


