<!--
cntxRoot="apostolaki"
var layerStyleRef, layerRef, styleSwitch, bodyHeight;
var SubCatOpen="";
var Timer;
var menuMouseOver=false;

if (document.layers) {
  layerStyleRef="layer.";
  layerRef="document.layers";
  styleSwitch="";
  bodyHeight=innerHeight-105;
}
else if(document.all){
  layerStyleRef="layer.style.";
  layerRef="document.all";
  styleSwitch=".style";
  bodyHeight=(window.screen.availHeight-window.screenTop-127);
}
else if(document.getElementById){
  layerStyleRef="layer.style.";
  layerRef="document.getElementById";
  styleSwitch=".style";
  bodyHeight=innerHeight-105;
}

function ChangeCatVisibility(CatID){
 if(eval(layerRef + '("Category' + CatID + '")')){
  if (SubCatOpen != "" && SubCatOpen != CatID){
    eval(layerRef + '("Img' + SubCatOpen + '").src="/'+cntxRoot+'/images/plus.gif"');
    eval(layerRef + '("Category' + SubCatOpen + '")' + styleSwitch + '.display="none"');
  }
  if(eval(layerRef + '("Category' + CatID + '")' + styleSwitch + '.display=="none"')){
    eval(layerRef + '("Img' + CatID + '").src="/'+cntxRoot+'/images/minus.gif"');
    eval(layerRef + '("Category' + CatID + '")' + styleSwitch + '.display="block"');
    SubCatOpen=CatID;
  }
  else{
    eval(layerRef + '("Img' + CatID + '").src="/'+cntxRoot+'/images/plus.gif"');
    eval(layerRef + '("Category' + CatID + '")' + styleSwitch + '.display="none"');
  }
 }  
}


function SiteMap_showHide(CatID){
 if(eval(layerRef + '("SiteMap' + CatID + '")')){
  if (SubCatOpen != "" && SubCatOpen != CatID){
    eval(layerRef + '("SiteMap' + SubCatOpen + '")' + styleSwitch + '.display="none"');
  }
  if(eval(layerRef + '("SiteMap' + CatID + '")' + styleSwitch + '.display=="none"')){
    eval(layerRef + '("SiteMap' + CatID + '")' + styleSwitch + '.display="block"');
    SubCatOpen=CatID;
  }
  else{
    eval(layerRef + '("SiteMap' + CatID + '")' + styleSwitch + '.display="none"');
  }
 }  
}


  
  function ChangeBackground(Ref){
    if (Ref.className=="CategoryItem")
      Ref.className="CategoryItemOver";
    else
      Ref.className="CategoryItem";
  }
  
  function frmLogonOnSubmit(){
    if (document.frmLogon.edtUserName.value.trim()==''){
      alert("Πρέπει να συμπληρώσετε όνομα 'χρήστη'")
      document.frmLogon.edtUserName.select();
      return false;
    }
    else if (document.frmLogon.edtPassword.value.trim()==''){
      alert("Πρέπει να συμπληρώσετε 'κωδικό'")
      document.frmLogon.edtPassword.select();
      return false;
    }
    else
      return true;
  }
  
  function frmSearchOnSubmit(){
    if((document.frmSearch.searchString.value.trim()!='') && (document.frmSearch.searchString.value.indexOf("'")==-1) && (document.frmSearch.searchString.value.indexOf('"')==-1)){
      switch (document.frmSearch.searchTo.options[document.frmSearch.searchTo.selectedIndex].value){
        case "1":
          window.open('http://www.google.com/search?q=' + document.frmSearch.searchString.value + '&sa=Google+Search');
          break;
        case "2":
          window.open('http://www.anazitisis.gr/cgi-bin/htsearch?VTI-GROUP=1&words=' + document.frmSearch.searchString.value + '&VTI-GROUP=0');
          break;;
      }
    }
    else{
      alert('Δεν έχετε εισάγει κείμενο αναζήτησης');
      document.frmSearch.searchString.select();
      return false;
    }
  }
  
  String.prototype.trim=function(){
    return this.replace(/(^\s*)|(\s*$)/g,"");
  }

function setStatusText(Text){
  window.status = Text;
  return true;
}


function Initialize(){
  GetTree();
  
}

 
function getMenu(){
  var str;
  str = '<div id="mnu1" style="position:absolute;display:none;right:2px;top:132px;z-index:100;">'
      + '<table border="0" cellpadding="0" cellspacing="4" width="190" class="mnu" onmouseover="javascript:menuMouseOver=true;" onmouseout="javascript:menuMouseOver=false;startTimer();">'
      + '<tr onmouseover="javascript:this.className=\'mnuHover\'" onmouseout="javascript:this.className=\'mnuOut\'" onclick="javascript:window.open(\'/'+cntxRoot+'/docs/prooptikes1.doc\',\'\',\'\',\'\');return false;">'
      + '<td style="padding:3px" class="LinkWhite2">'
      + '<img src="/'+cntxRoot+'/images/img2.gif" border="0" hspace="2" align="absmiddle">Τεύχος 1: Ιανουάριος 2004'
      + '</td>'
      + '</tr>'
      + '<tr onmouseover="javascript:this.className=\'mnuHover\'" onmouseout="javascript:this.className=\'mnuOut\'" onclick="javascript:window.open(\'/'+cntxRoot+'/docs/prooptikes2.doc\',\'\',\'\',\'\');return false;">'
      + '<td style="padding:3px" class="LinkWhite2">'
      + '<img src="/'+cntxRoot+'/images/img2.gif" border="0" hspace="2" align="absmiddle">Τεύχος 2: Φεβρουάριος 2004'
      + '</td>'
      + '</tr>'
      + '</table>'
      + '</div>'
  return str;
} 


function showHideMnu(elem){
  if(! menuMouseOver){
    for(var i=1;i<=1;i++){
      if(eval(layerRef + '("mnu' + i + '")')){
        if("mnu"+i == elem )
          eval(layerRef + '("mnu' + i + '")' + styleSwitch + '.display="block"');
        else{
          eval(layerRef + '("mnu' + i + '")' + styleSwitch + '.display="none"');
        }
      }
    }
    clearTimeout(Timer);
  }
}
  
  function startTimer(){
    Timer = setTimeout('showHideMnu("")', 1000);
}


function showHide(elem,imgobj){
  if(eval(layerRef + '("' + elem + '")')){
    if(eval(layerRef + '("' + elem + '")' + styleSwitch + '.display=="none"')){
      eval(layerRef + '("' + elem + '")' + styleSwitch + '.display="block"');
      eval(layerRef + '("' + imgobj + '").src="/'+cntxRoot+'/images/nolines_minus.gif"');
      eval(layerRef + '("' + imgobj + '").alt="Πατήστε για να κρύψετε τις λεπτομέρειες"');
    }
    else{
      eval(layerRef + '("' + elem + '")' + styleSwitch + '.display="none"');
      eval(layerRef + '("' + imgobj + '").src="/'+cntxRoot+'/images/nolines_plus.gif"');
      eval(layerRef + '("' + imgobj + '").alt="Πατήστε για να δείτε τις λεπτομέρειες"');
    }
  }
}


function openKatalogWindow(){ 
  katalogos_popup=window.open('/'+cntxRoot+"/admin/katalogos_popup.asp","myDialog","height=600px,width=800px,left=100, top=100, scrollbars=yes")
}

function openModalKartela(personID) { 
  var myDialog = new Object;
  myDialog.hElement="";
  result=window.showModalDialog('/'+cntxRoot+"/admin/kartela_popup.asp?id="+personID,myDialog,"center:yes; help: off; resizable: no; scroll: off; status: off; dialogHeight:320px; dialogWidth:550px");
  if (myDialog.hElement=="c"){
    window.dialogArguments.hElement='c';
    window.close();
  }  
}


function checkEmail(string) {
  if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
    return true;
  else
    return false;
}

function inputClick(objectName){
  if( (objectName.style.color != 'black')  ){
    objectName.value="";
    objectName.style.color="black";
  }
}
//-->