function TinyMCE_upload_getControlHTML(control_name) {
    switch (control_name) {
        case "upload":
            return '<img id="{$editor_id}_upload" src="{$pluginurl}/images/upload.gif" title="上传图片、影音、文件" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceUpload\');" />';
    }

    return "";
}

function TinyMCE_upload_execCommand(editor_id, element, command, user_interface, value) {
    if(command == "mceUpload")
    {
		var template = new Array();

		template['file']   = '../../plugins/upload/upload.htm'; // Relative to theme
		template['width']  = 400;
		template['height'] = 442;

		tinyMCE.openWindow(template, {editor_id : editor_id});		
		return true;
	}

   return false;
}
