/*
** This software is part of a product of Xias by U. Kalatchoff & A. Z'Graggen
** Copying and reusing this software without prior authorization of Xias is explicitely
** forbidden. (contact: info@xias.ch)
*/

/*
** Functions to enter in edit mode
**
** Last modified: 19.10.2005
**
*/

function init_edit(){
   x_runtime.loginPointElt=document.getElementById('loginPoint');
   if(x_runtime.loginPointElt){
      x_runtime.loginDialog=new Dialog('loginMask');
      x_runtime.loginPointElt.onclick=function(evt){x_runtime.loginDialog.show();}
      x_runtime.loginDialog.onHide=hideLoginDialogHandler;
   }
   if(x_runtime.user!=''){
      setEditMode();
   }
}

// Login mask handlers

function hideLoginDialogHandler(){
   var inputElts=x_runtime.loginDialog.elt.getElementsByTagName('input');
   inputElts[1].value='';
}


// Functions to start edit mode
setLocalEditMode=null;
function setEditMode(){
   if(setLocalEditMode)setLocalEditMode();
}