<!-- Custom Alert -->
<div style="position:absolute;top:0;left:0;visibility:hidden" id="popmenu-alert">
</div>
<div id="popmenu-top-alert" style="display:none"><?$lang->display("Notice");?></div>
<div id="popmenu-middle-alert" style="display:none"><div id="popmenu-alert-message" style="text-align:left;width:240px;overflow-x:auto;" selectable="1"></div></div>
<div id="popmenu-bottom-alert" style="display:none"><?
$tpl->btn(
$lang->get("Ok"),
"hideMenu('popmenu-alert');"
)
?></div>


<!-- Custom Prompt -->
<div style="position:absolute;top:0;left:0;visibility:hidden" id="popmenu-prompt">
</div>
<div id="popmenu-top-prompt" style="display:none"><?$lang->display("Notice");?></div>
<div id="popmenu-middle-prompt" style="display:none"><div id="popmenu-prompt-message" style="text-align:left;width:260px" selectable="1"></div></div>
<div id="popmenu-bottom-prompt" style="display:none"><div id="popmenu-prompt-buttons" style="white-space:nowrap;"></div></div>



<!-- Quickselect -->
<div style="position:absolute;top:0;left:0;visibility:hidden" id="popmenu-quickselect">
</div>
<div id="popmenu-top-quickselect" style="display:none"><?$lang->display("Select by filename");?></div>
<div id="popmenu-middle-quickselect" style="display:none">
<div style="width:180px">
<input type="text" onKeyDown="if(this.value != ''){AfianHandler.activeTab.customSel('icon_title',this.value, 1);}else{AfianHandler.activeTab.unselectAll();}QuickSelectStatus();" onKeyUp="if(this.value != ''){AfianHandler.activeTab.customSel('icon_title',this.value, 1);}else{AfianHandler.activeTab.unselectAll();}QuickSelectStatus();" value=""><br><span id="quickselcount" style="white-space:nowrap;width:30px">&nbsp;</span>
</div>
</div>
<div id="popmenu-bottom-quickselect" style="display:none"><?
$tpl->btn(
$lang->get("Ok"),
"hideMenu('popmenu-quickselect');AfianHandler.activeTab.onselect()"
)
?></div>

<!-- Upload FORM -->
<div style="position:absolute;top:0;left:0;visibility:hidden" id="popmenu-afian_upload">
</div>
<div id="popmenu-top-afian_upload" style="display:none"><?$lang->display("Upload files");?></div>
<div id="popmenu-middle-afian_upload" style="display:none">
<div style="display:none" id="afian_jupload">
	<div align="right">
	<a href="javascript:;" onclick="switchUploadType('clasic')"><?$lang->display("Switch to classic upload.");?></a>
	</div>
	<br>
	<div style="background-color:white;width:200px;height:200px;border:1px solid silver" id="juploadHTMLCode">
	</div>
	
	<div id="cancelButton" style="display:none">
		<br>
		<?
		$tpl->btn(
		$lang->get("Cancel upload"),
		"cancelJavaUpload()"
		);
		?>
		<br>
		</div>
	
</div>
	<div id="afian_upload_clasic">
	<div align="right">
	<a href="javascript:;" onclick="switchUploadType('java')"><?$lang->display("Switch to Drag&amp;Drop mode.");?></a>
	</div>
	<br>
	<!-- <div align="center">
	<img src="images/interface/upload.gif" width="180" height="60" alt="" border="0">
	</div> -->
	<form action="javascript:;" method="POST" enctype="multipart/form-data" name="afian_upload_form">
	
	<table border="0" cellpadding="0" cellspacing="0" align="center" width="200">
	<tbody id="afian_upload_fields">
	<tr>
		<td align="right"><input type="file" name="uploadfiles[]" class="inputfile" onFocus="javascript:writing=true;" onBlur="javascript:writing=false;"></td>
	</tr>
	<tr>
		<td align="right"><input type="file" name="uploadfiles[]" class="inputfile" onFocus="javascript:writing=true;" onBlur="javascript:writing=false;"></td>
	</tr>
	<tr>
		<td align="right"><input type="file" name="uploadfiles[]" class="inputfile" onFocus="javascript:writing=true;" onBlur="javascript:writing=false;"></td>
	</tr>
	</tbody>
	</table>
	<table border="0" cellpadding="0" cellspacing="0" align="center" width="200" style="margin-top:4px;">
	<tr>
		<td align="right">
		<?
		if ($sys['browser'] != "opera") {
		$tpl->btn(
		$lang->get("Add field"),
		"addUploadFields()"
		);
		}
		?>
		</td>
	</tr>
	<tr>
		<td style="padding-top:5px;padding-bottom:5px;text-align:center">
		<span class="comment"><?$lang->display("Maximum file size allowed %1", array(ini_get("upload_max_filesize")));?></span>
		</td>
	</tr>
	</table>
	</form>
	</div>
</div>
<div id="popmenu-bottom-afian_upload" style="display:none">
<table>
<tr>
	<td id="clasic_upload_btn">
<?
$tpl->btn(
$lang->get("Upload"),
"if (!upload2share){Mput();}else{BSharePut();}"
)
?>
	</td>
	<td>
<?
$tpl->btn(
$lang->get("Cancel"),
"document.afian_upload_form.reset();hideMenu('popmenu-afian_upload')"
)
?>
	</td>
</tr>
</table>
</div>






<!-- MKDIR FORM -->

<div style="position:absolute;top:0;left:0;visibility:hidden" id="popmenu-afian_mkdir">
</div>
<div id="popmenu-top-afian_mkdir" style="display:none"><?$lang->display("New folder");?></div>
<div id="popmenu-middle-afian_mkdir" style="display:none">

<div style="width:180px">
<form action="javascript:MyFilesNewFolder();" name="mkdirForm" method="post" onsubmit="hideMenu('popmenu-afian_mkdir')">
<input type="text" name="dirName" value="<?$lang->display("Folder Name");?>" onFocus="javascript:writing=true;" onBlur="javascript:writing=false;" tabindex="1000">
</form>
</div>

</div>
<div id="popmenu-bottom-afian_mkdir" style="display:none">
<table>
<tr>
	<td><?
$tpl->btn(
$lang->get("Ok"),
"MyFilesNewFolder()",
"",
false,
" tabindex=\"1001\""
)
?></td>
	<td><?
$tpl->btn(
$lang->get("Close"),
"hideMenu('popmenu-afian_mkdir')",
"",
false
)
?></td>
</tr>
</table>
</div>


<!-- RENAME FORM -->
<div style="position:absolute;top:0;left:0;visibility:hidden" id="popmenu-afian_rename">
</div>
<div id="popmenu-top-afian_rename" style="display:none"><?$lang->display("Rename");?></div>
<div id="popmenu-middle-afian_rename" style="display:none">

<div style="width:180px">
<form action="javascript:MyFilesRenameSubmit();" name="renameForm" method="post">
<span id="renameCust"></span>
</form>
</div>

</div>
<div id="popmenu-bottom-afian_rename" style="display:none">
<table>
<tr>
	<td><?
$tpl->btn(
$lang->get("Rename"),
"MyFilesRenameSubmit()",
"",
false
)
?></td>
	<td><?
$tpl->btn(
$lang->get("Cancel"),
"hideMenu('popmenu-afian_rename');AfianHandler.activeTab.onselect()",
"",
false
)
?></td>
</tr>
</table>
</div>









<!-- ZIP FORM -->
<div style="position:absolute;top:0;left:0;visibility:hidden" id="popmenu-afian_zip">
</div>
<div id="popmenu-top-afian_zip" style="display:none"><?$lang->display("Zip files");?></div>
<div id="popmenu-middle-afian_zip" style="display:none">

<div style="width:180px">
<form action="javascript:;" name="zipForm">
<input type="text" name="zipname" value="<?$lang->display("archive name");?>.zip" onFocus="javascript:writing=true;" onBlur="javascript:writing=false;">
</form>
</div>

</div>
<div id="popmenu-bottom-afian_zip" style="display:none">
<table>
<tr>
	<td>
<?
$tpl->btn(
$lang->get("Ok"),
"if(fileNameExists(document.zipForm.zipname.value)){alert('An object named \''+document.zipForm.zipname.value+'\' already exists');return false;}else{if(!isLegalFilename(document.zipForm.zipname.value)){alert('".$str->safeJS($lang->get("A file or folder name cannot contain any of the following characters: \ / : * ? < > | &quot"))."');} else {MyFilesZipSubmit();}}",
"",
false
)
?>
	</td>
	<td>
<?
$tpl->btn(
$lang->get("Cancel"),
"hideMenu('popmenu-afian_zip');AfianHandler.activeTab.onselect()",
"",
false
)
?>
	</td>
</tr>
</table>
</div>




<!-- UNZIP FORM -->

<div style="position:absolute;top:0;left:0;visibility:hidden" id="popmenu-afian_unzip">
</div>
<div id="popmenu-top-afian_unzip" style="display:none"><?$lang->display("Unzip arhive");?></div>
<div id="popmenu-middle-afian_unzip" style="display:none">

<div style="">
<form action="javascript:MyFilesUnZipSubmit();" name="unzipForm">
<?$lang->display("To folder");?> <input type="text" name="foldername" value="<?$lang->display("extracted archive");?>" onFocus="javascript:writing=true;" onBlur="javascript:writing=false;">
</form>
</div>

</div>
<div id="popmenu-bottom-afian_unzip" style="display:none">
<table>
<tr>
	<td><?
$tpl->btn(
$lang->get("Unzip"),
"MyFilesUnZipSubmit()",
"",
false
)
?></td>
	<td><?
$tpl->btn(
$lang->get("Cancel"),
"hideMenu('popmenu-afian_unzip');AfianHandler.activeTab.onselect()",
"",
false
)
?></td>
</tr>
</table>
</div>