<div id="iframesContainer" style="display:none"></div>
<script>
AfianHandler = new Object;
AfianHandler.iframesContainer = getById('iframesContainer');
</script>

<div id="treeContainerOverflowDiv" style="visibility:hidden;position:absolute;width:190px;top:140px;left:470px;background-color:whitesmoke;border:1px solid gray">
<div style="height:20px;" id="folderSelectionTitleBar"><div style="float:left;padding:3px;"><b><?$lang->display("Select a folder");?></b>:</div><div style="float:right;padding:5px;"><a href="javascript:hideMenu('treeContainerOverflowDiv')" title="(Close)"><img src="images/interface/x.gif" width="8" height="8" alt="" border="0" title="(Close)"></a></div></div>
<div style="background-color:white;overflow:auto;height:215px;border:1px solid silver;margin:2px;">
<div style="margin:10px;">
<script language="JavaScript1.2" type="text/javascript">
var tree = new AfianTree("<?echo $str->safeJS($_SERVER["HTTP_HOST"]);?>", 'javascript:;');
<?
if ($fm->os == "win") {
	$driveLetters = array("C:", "D:", "E:", "F:", "G:");
} else {
	$driveLetters = array("/");
}

if ($settings->config['limit_admin_browse']) {
	$driveLetters = explode("|", $settings->config['limit_admin_browse']);
}

	$i=0;
	foreach ($driveLetters as $drive) {
	$i++;
	?>
	var Folder_<?echo $i?> = new AfianDynTreeItem('<?echo $drive?>', 'index.php?folder_browser_data_feeder=1&path=<?echo $drive?>', 'javascript:writePath(\'<?echo $drive?>\')');
	Folder_<?echo $i?>.path = '<?echo $drive?>';
	Folder_<?echo $i?>.icon = 'images/tree/drive.gif';
	Folder_<?echo $i?>.openIcon = 'images/tree/drive.gif';
	tree.add(Folder_<?echo $i?>);
	<?
	}
?>
document.write(tree);

function writePath(path) {
	folderBrowserSelected(path);
	hideMenu('treeContainerOverflowDiv');
}
Drag.init(getById('folderSelectionTitleBar'), getById('treeContainerOverflowDiv'));
</script>
</div>
</div>
</div>
