// JavaScript Document
	// JavaScript Document
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="body"]', {
				cssPath : 'kindeditor-4.1.10-l/plugins/code/prettify.css',
				uploadJson : 'kindeditor-4.1.10-l/asp/upload_json.asp',
				fileManagerJson : 'kindeditor-4.1.10-l/asp/file_manager_json.asp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});



KindEditor.ready(function(K) {
  var editor = K.editor({
      fileManagerJson : 'kindeditor-4.1.10-l/asp/file_manager_json.asp'
  });
  K('#filemanager').click(function() {
      editor.loadPlugin('filemanager', function() {
          editor.plugin.filemanagerDialog({
              viewType : 'VIEW',
              dirName : 'image',
              clickFn : function(url, title) {
                  K('#url').val(url);
                  editor.hideDialog();
              }
          });
      });
  });
});



			KindEditor.ready(function(K) {
				var editor = K.editor({
					allowFileManager : false
				});
				K('#insertfile').click(function() {
					editor.loadPlugin('insertfile', function() {
						editor.plugin.fileDialog({
							fileUrl : K('#url2').val(),
							clickFn : function(url, title) {
								K('#url2').val(url);
								editor.hideDialog();
							}
						});
					});
				});
			});
			

 function GetKeyTags()//获取关键词
{
  var text=escape($('input[name=Productname]').val());
  if (text!=''){
	  $('#KeyWord').val('加载中,正在自动获取...');
	  $("#KeyWord").attr("disabled",true);
	  $.get("ajaxs.asp", { action: "GetTags", text: text,maxlen:10},
	  function(data){
		$('#KeyWord').val(unescape(data));
		$('#KeyWord').attr("disabled",false);
	  });
  }else{
   alert('请先输入标题!');
  }
}
	