<!--
var layerStyleRef, layerRef, styleSwitch, client_Height, client_Width;
if (document.layers) {
  layerStyleRef="layer.";
  layerRef="document.layers";
  styleSwitch="";
  client_Height=innerHeight;
  client_Width=innerWidth;
}
else if(document.all){
  layerStyleRef="layer.style.";
  layerRef="document.all";
  styleSwitch=".style";
  client_Height=(window.screen.availHeight-window.screenTop)
  client_Width=window.screen.availWidth;
}
else if(document.getElementById){
  layerStyleRef="layer.style.";
  layerRef="document.getElementById";
  styleSwitch=".style";
  client_Height=innerHeight;
  client_Width=innerWidth;
}

  
  function frmLogonOnSubmit(){
    var df=document.frmLogon;
    if (df.edtUserName.value==''){
      alert("Πρέπει να συμπληρώσετε όνομα 'χρήστη'")
      df.edtUserName.select();
      return false;
    }
    else if (df.edtPassword.value==''){
      alert("Πρέπει να συμπληρώσετε 'κωδικό'")
      df.edtPassword.select();
      return false;
    }
    else
      return true;
  }
  
  
  function frmSearchOnSubmit(){
    if((document.frmSearch.searchString.value!='') && (document.frmSearch.searchString.value.indexOf("'")==-1) && (document.frmSearch.searchString.value.indexOf('"')==-1)){
      document.frmSearch.submit();
      return true;
    }
    else{
      alert('Δεν έχετε εισάγει κείμενο αναζήτησης');
      document.frmSearch.searchString.select();
      return false;
    }
  }
  
  
  function checkEmail(value){
    var apos, dotpos, valueLength
    apos=value.indexOf("@"); 
    dotpos=value.lastIndexOf(".");
    valueLength=value.length-1;
    if (apos<1 || dotpos-apos<2 || valueLength-dotpos>3 || valueLength-dotpos<2)
      return false;
    else 
      return true;
  }
  
  function frmMailOnSubmit(frmMailField){
    if (checkEmail(eval(frmMailField + '.value')))
      return true;
    else{
      alert('Μη αποδεκτή διεύθυνση e-mail');
      eval(frmMailField + '.select()');
      return false;
    }
  }  
  
  
  
function frmAction_OnSubmit(action, recId){
  document.frmAction.hdAction.value=action;
  document.frmAction.hdId.value=recId;  
    
  if(action!="d"){
    
    if(document.frmAction.edtDate){
      if(document.frmAction.edtDate.value==""){
        alert('Δεν έχετε συμπληρώσει ημερομηνία');
        document.frmAction.edtDate.select();
        return false;
      }
      else if(!isGreekDate(document.frmAction.edtDate.value)){
        alert('Η τιμή του πεδίου πρέπει να είναι ημερομηνία της μορφής ηη/μμ/χχχχ ');
        document.frmAction.edtDate.select();
        return false;
      }
    }
    
    if(document.frmAction.edtTitle){
      if(document.frmAction.edtTitle.value.trim()==""){
        alert('Δεν έχετε συμπληρώσει "Τίτλο"');
        document.frmAction.edtTitle.focus();
        return false;
      }
    }
    if(document.frmAction.tarTitle){
      if(document.frmAction.tarTitle.innerText.trim()==""){
        alert('Δεν έχετε συμπληρώσει "Τίτλο"');
        document.frmAction.tarTitle.select();
        return false;
      }
    }
    if(document.frmAction.edtURL){
      if(document.frmAction.edtURL.value.trim()==""){
        alert('Δεν έχετε συμπληρώσει "URL"');
        document.frmAction.edtURL.select();
        return false;
      }
    }
    if(document.frmAction.tarText){
      if(document.frmAction.tarText.innerText.trim()==""){
        alert('Δεν έχετε συμπληρώσει "Κείμενο"');
        document.frmAction.tarText.select();
        return false;
      }
    }  
    return true;
  }
  else{
    return true;
  }
    
}
  
  
  String.prototype.trim=function(){
    return this.replace(/(^\s*)|(\s*$)/g,"");
  }
  
//-->