
function addproperty(){
 openpopup();
 ajaxload(docname,'ajax=new','popupmsg', 'optional_addproperty()');
 }

function editproperty(id){
 openpopup();
 ajaxload(docname,'ajax=edit&id='+id,'popupmsg', 'optional_editproperty()');
 }

function optional_addproperty(id){
 document.body.removeChild(getElem('lbOverlay'));
 document.body.removeChild(getElem('lbCenter'));
 document.body.removeChild(getElem('lbBottomContainer'));
 setTimeout(Lightbox.init.bind(Lightbox),10);
 }

function optional_editproperty(id){
 document.body.removeChild(getElem('lbOverlay'));
 document.body.removeChild(getElem('lbCenter'));
 document.body.removeChild(getElem('lbBottomContainer'));
 setTimeout(Lightbox.init.bind(Lightbox),10);
 }

function submitform() {
 return true;
 }

function delitem(id){
 name = getElem(id).getAttribute('name');
 title = 'Are you sure you wish to DELETE "'+name+'"?';
 if (confirm(title)){
  if(getElem('submit')){cancelpopup();}
  window.location = '?delete='+id;
  }
 }

function deletefile(tablename,id,param,filename,folderpath){
 title = 'Are you sure you wish to DELETE file: "'+filename+'"?\r\nAny text changes will be cancelled.';
 if (confirm(title)){
  ajaxload('../_deletefile.php','ajax=delfile&table='+tablename+'&id='+id+'&param='+param+'&filename='+filename+'&folderpath='+folderpath, false, 'editproperty('+id+')');
  }
 }




