<?php
/*
Simple:Press Forum
File Manager - Startup FM Window
$LastChangedDate: 2009-11-24 19:34:55 +0000 (Tue, 24 Nov 2009) $
$Rev: 3020 $
*/

require_once("fm-config.php");

$tbpath = pathinfo($_SERVER['SCRIPT_NAME']);
$fmTab = $tbpath['dirname']."/".$filemanager['deftab'];
$filemanager['obfuscate'] = wp_generate_password(20);

?>
function sf_filemanager(field_name, url, type, win)
{
	var fmURL = "<?php echo $fmTab; ?>" + "?type=" + type;

	tinyMCE.activeEditor.windowManager.open({
		file : fmURL,
		title : 'Simple:Press File Manager',
        width : 790,
        height : 550,
		resizable : "yes",
		scrollbars : "yes",
		inline : "yes",
		close_previous : "no"
	}, {
		window : win,
		input : field_name
	});
	return false;
}