// Return confirmation for delete operation. It is transf. as GET (is_confirmed=1) in address bar

function confirmLink(Link, action){
  var is_confirmed = confirm(action);
    if (is_confirmed) {
        Link.href += '&is_confirmed=1';
    }
    return is_confirmed;
}

// Cheks for valid key. If user try to enter a key that is not in chk_ok
function chksym(sym) {
 var chk_ok = " .@0123456789.:;?!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÜÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúüþÿ";
 for (var i = 0;  i < chk_ok.length;  i++) {
 if(sym == chk_ok.charCodeAt(i))
   return true;
 }
 return false;
}

// Returns error if user entered string that is not valid. Uses chksym function.
function text_check(txtObj) {
  if(chksym(event.keyCode) == false) {
    alert("Invalid character. Please use only A-Z, a-z and digits simbols as well as @ (for e-mails).");
    event.returnValue = false;
    return;		
  }
}

// Change the background of the object to color on mouseOver.
function mOvr(src, clr) {
   if (!src.contains(event.fromElement)) {
     src.style.cursor = 'hand';
     src.bgColor = clr;
   }
}

// Change the background of the object to color on mouseOut.
function mOut(src, clr) {
   if (!src.contains(event.toElement)) {
     src.style.cursor = 'default';
     src.bgColor = clr;
   }
}