function TinyMCE_webCam_getControlHTML(control_name) {
    switch (control_name) {
        case "webCam":
            return '<img id="{$editor_id}_webCam" src="{$pluginurl}/images/webcam.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}\',\'mcewebCam\');" />';
    }

    return "";
}

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

		template['file']   = '../../plugins/webCam/webCam.htm'; // Relative to theme
		template['width']  = 345;
		template['height'] = 325;

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

   return false;
}
