<textarea cols="50" rows="20" id="MyFilesContextMenus">
<!-- FILE MENU -->
<div id="afian_context_file" class="menu">
<div class="contextMenu">
<img src="images/interface/x.gif" width="8" height="8" border="0" alt="" style="position:absolute;top:2px;right:2px;cursor:hand;" onClick="javascript:AfianHandler.activeTab.unselectAll()" title="<?$lang->display("Clear selection");?>">
<strong>
<a href="javascript:;" onClick="javascript:get()" class="item"><?$lang->display("Download");?></a>
</strong>
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>


<span id="MyFilesContextZipOption">
<?/*if (!$permissions['readonly']) {*/?>
<a href="javascript:;" onClick="javascript:MyFilesZip()" class="item"><?$lang->display("Add to zip");?></a>
<?/*}else{?>
<a href="javascript:;" onClick="javascript:msg('noperm')" class="itemdisabled"><?$lang->display("Add to zip");?></a>
<?}*/?>
<br>
</span>


<span id="MyFilesContextUnzipOption" style="display:none">
<img src="images/interface/dropdown-dot.gif" width="10" height="13" border="0" alt=""> <a href="javascript:;" onClick="javascript:MyFilesBrowseZip()" class="item"><?$lang->display("View contents");?></a>

<br>


<?/*if (!$permissions['readonly']) {*/?>
<img src="images/interface/dropdown-dot.gif" width="10" height="13" border="0" alt=""> <a href="javascript:;" onClick="javascript:MyFilesUnZip()"  class="item"><?$lang->display("Extract arhive");?></a>

<?/*}else{?>
<img src="images/interface/dropdown-dot.gif" width="10" height="13" border="0" alt=""> <a href="javascript:;" onClick="javascript:msg('noperm')" class="itemdisabled"><?$lang->display("Extract arhive");?></a>
<?}*/?>

<br>

</span>

<span id="afian_context_edit_text">
<?/*if (!$permissions['readonly']) {*/?>
<a href="javascript:;" onClick="javascript:MyFilesEditText()" class="item"><?$lang->display("Edit as text");?></a>
<?/*}else{?>
<a href="javascript:;" onClick="javascript:msg('noperm')" class="itemdisabled"><?$lang->display("Edit as text");?></a>
<?}*/?>
</span>


<span id="MyFilesContextByMailOption" style="display:none">
	<br>
	<a href="javascript:;" onClick="javascript:MyFilesByMail()" class="item"><?$lang->display("Send by mail");?></a>
</span>
	
<br>

<a href="javascript:;" onClick="javascript:MyFilesComment()" class="item"><?$lang->display("Comments..");?></a> <span id="file_comments_extra" class="comment"></span>


<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>
	<a href="javascript:;" onClick="javascript:clipboardAction='copy';clipSelected()" class="item"><?$lang->display("Copy");?></a>
<br>
<a href="javascript:;" onClick="javascript:clipboardAction='cut';clipSelected()" class="item"><?$lang->display("Cut");?></a>

<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>

<a href="javascript:;" onClick="javascript:MyFilesRename()" class="item"><?$lang->display("Rename");?></a>
<br>
<a href="javascript:;" onClick="javascript:MyFilesDel()" class="item"><?$lang->display("Delete");?></a>
</div>
</div>


<!-- DIR MENU -->

<div id="afian_context_dir" class="menu" >
<div class="contextMenu">
<img src="images/interface/x.gif" width="8" height="8" border="0" alt="" style="position:absolute;top:2px;right:2px;cursor:hand;" onClick="javascript:AfianHandler.activeTab.unselectAll()" title="<?$lang->display("Clear selection");?>">
<strong><a href="javascript:;" onClick="javascript:cd()" class="item"><?$lang->display("Browse");?></a></strong>

<br>
<a href="javascript:;" onClick="javascript:cd(false, true, false)" class="item"><?$lang->display(".. in new tab");?></a>

<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>
<a href="javascript:;" onClick="javascript:MyFilesZip()" class="item"><?$lang->display("Add to zip");?></a>

<span id="MyFilesContextShareOption" style="display:none">
<br>
<a href="javascript:;" onClick="javascript:MyFilesShare()" class="item"><?$lang->display("Share..");?></a>
</span>



<br>

<a href="javascript:;" onClick="javascript:MyFilesComment()" class="item"><?$lang->display("Comments..");?></a> <span id="dir_comments_extra" class="comment"></span>


<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>
<a href="javascript:;" onClick="javascript:clipboardAction='copy';clipSelected()" class="item"><?$lang->display("Copy");?></a>
<br>
<a href="javascript:;" onClick="javascript:clipboardAction='cut';clipSelected()" class="item"><?$lang->display("Cut");?></a>

<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>


<a href="javascript:;" onClick="javascript:MyFilesRename()" class="item"><?$lang->display("Rename");?></a>


<br>

<a href="javascript:;" onClick="javascript:MyFilesDel()" class="item"><?$lang->display("Delete");?></a>

</div>
</div>



<!-- MULTIPLE SELECTION -->
<div id="afian_context_multiple" class="menu" >
<div class="contextMenu">
<img src="images/interface/x.gif" width="8" height="8" border="0" alt="" style="position:absolute;top:2px;right:2px;cursor:hand;" onClick="javascript:AfianHandler.activeTab.unselectAll()" title="<?$lang->display("Clear selection");?>">

<a href="javascript:;" onClick="javascript:multiget()" class="item"><?$lang->display("Download zipped");?></a>
<br>
<a href="javascript:;" onClick="javascript:MyFilesZip()" class="item"><?$lang->display("Add to zip");?></a>
<br>
<span id="MyFilesContextByMailMultipleOption" style="display:none">
<a href="javascript:;" onClick="javascript:MyFilesByMail()" class="item"><?$lang->display("Send by mail");?></a>
</span>

<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>

<a href="javascript:;" onClick="javascript:clipboardAction='copy';clipSelected()" class="item"><?$lang->display("Copy");?></a>

<br>
<a href="javascript:;" onClick="javascript:clipboardAction='cut';clipSelected()" class="item"><?$lang->display("Cut");?></a>

<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>


<a href="javascript:;" onClick="javascript:MyFilesRename()" class="item"><?$lang->display("Rename");?></a>
<br>
<a href="javascript:;" onClick="javascript:MyFilesDel()" class="item"><?$lang->display("Delete");?></a>

</div>
</div>


</textarea>


<script>
ht = document.getElementById('MyFilesContextMenus').value;
parent.AfianHandler.loadHTMLComponent('MyFilesContextMenus', ht);
parent.AfianHandler.components['MyFilesContextMenus'].loaded = true;

parent.makeDragable('afian_context_file');
parent.makeDragable('afian_context_dir');
parent.makeDragable('afian_context_multiple');

sharecontextoption = parent.document.getElementById('MyFilesContextShareOption');
publiccontextoption = parent.document.getElementById('MyFilesContextPublicOption');
bymailcontextoption = parent.document.getElementById('MyFilesContextByMailOption');
bymailmultiplecontextoption = parent.document.getElementById('MyFilesContextByMailMultipleOption');
if (parent.AfianUserPermissions['share'] != false) {
	sharecontextoption.style.display='inline';
}

if (parent.AfianUserPermissions['byemail'] != false) {
	bymailcontextoption.style.display='inline';
	bymailmultiplecontextoption.style.display='inline';
}
</script>