// 上下条新闻 begin
KindEditor.plugin('nsyupdownnews', function(K) {
			var self = this, name = 'nsyupdownnews',lang = self.lang(name + '.');
			self.plugin.nsyupdownnews = {
	            edit : function() {
		            var html = [
			            '<div style="padding:20px;">',
			            '<label style="width:60px;">'+lang.displaymode+'</label>',
			            '<select id="modes" name="modes">',
				        '<option value="0">' +lang.modeone+ '</option>',
				        '<option value="1">' +lang.modetwo+ '</option>',
				        '<option value="2">' +lang.modethree+ '</option>',
				        '</select> &nbsp; ',
			            '</div>'
		            ].join('');
		            var dialog = self.createDialog({
			            name : name,
			            width : 300,
			            title : self.lang(name),
			            body : html,
			            yesBtn : {
				            name : self.lang('yes'),
				            click : function(e) {
        						var modes = modesBox.val();
					            var html = "<button id=\"QXNSY2005\" name=\"111?type="+modes+"\" style=\"WIDTH: 200px;\" >"+lang.show+"</button>";
					            self.insertHtml(html).hideDialog().focus();
				            }
			            }
		            }),
		            div = dialog.div,
		            modesBox = K('[name="modes"]', div);
		            //加载右键菜单
		            var img = self.plugin.getSelectedNsyupdownnews();
		            
			        if (img) {
			        
			            //读取修改参数
				        var names=img[0].name.split('?');
				        var URLParams = new Object() ;
                        var aParams =names[1].split('@') ;
                        for (i=0 ; i < aParams.length ; i++) {
	                        var aParam = aParams[i].split('=') ;
	                        URLParams[aParam[0]] = aParam[1] ;
	                    }
				        var lstype=URLParams["type"];
				        modesBox.val(lstype);
			        }
			        modesBox[0].focus();
		            
	            }
            };
	    //加载控件
	    self.clickToolbar(name, self.plugin.nsyupdownnews.edit);
		});

// 上下条新闻 end