var IFrameSubjectImages={objQnImagesHeaderTab:0,objQnImagesContentTab:0,ImagesListData:0,HTML:'<div style="margin:0px; float:left; padding:0px;"><div class="qnImagesBoxHeader">    <a href="javascript:void(0)" class="qnImagesBoxHeaderLi qnImagesBoxHeaderLiCurr" id="IFrameQnInsertImageTabUpload" onclick="IFrameSubjectImages.SwitchTab($(this),\'1\')" title="上传图片">上传图片</a>    <a href="javascript:void(0)" class="qnImagesBoxHeaderLi " id="IFrameQnInsertImageTabImages" onclick="IFrameSubjectImages.SwitchTab($(this),\'0\');" title="图片列表" >图片列表</a>    <a href="javascript:void(0)" class="qnImagesBoxHeaderLi" style="display:none;" id="IFrameQnInsertImageTabBigImg" onclick="IFrameSubjectImages.SwitchTab($(this),\'2\')" title="预览图片">预览图片</a></div><iframe src="'+LKConfig.URLAssembly.Subject.IFrame.get("SubjectImages")+'" onload="IFrameSubjectImages.loadComplete(this);" width="800px" height="415px" frameborder="0"></iframe></div>',ImagesBox:0,ImagesBoxWin:0,callback:0,loadIFrame:function(a){if(this.ImagesBoxWin){a();return}this.callback=a;this.ImagesBox=this.ImagesBox||new Boxy(this.HTML,{title:"图片管理",closeText:"[关闭]",show:false,modal:true})},loadComplete:function(a){this.ImagesBoxWin=a.contentWindow;this.callback&&this.callback()},showImagesBox:function(){this.ImagesBox.show();this.ImagesListData==0&&this.GetImagesList()},GetImagesList:function(){var a=GlobalManage.get_cookie_uname();$.ajax({type:"POST",url:LKConfig.URLAssembly.Subject.Aspx.get("GetSubjectImages"),data:{},dataType:"json",success:function(b){IFrameSubjectImages.GetImagesSuccess(b,a)},error:function(b,a){alert("获取图片错误！"+a)}})},GetImagesSuccess:function(d,e){for(var c=d.result?d.info:[],a=[],b=c.length-1;b>=0;b--)a.push(c[b]);this.ImagesListData=a;this.ImagesBoxWin.ListImages.UserName=e;this.ImagesBoxWin.ListImages.Init(a)},SwitchTab:function(b,a){this.objQnImagesHeaderTab=this.objQnImagesHeaderTab||$(".qnImagesBoxHeaderLi");this.objQnImagesHeaderTab.removeClass("qnImagesBoxHeaderLiCurr");b.addClass("qnImagesBoxHeaderLiCurr");this.ImagesBoxWin.ListImages.SwitchTab(a)},EditTabName:function(a){this.InitButton();this.elButtonUpload.text(a)},InsertFckImages:function(c,a){var b='<img src="/UploadFiles/'+c+"/Images/"+a+'" />';IFrameFckEditor.insertFckHtml(b,function(){IFrameSubjectImages.ImagesBox.hide()})},DelIamges_验证:function(a,c){var d=GlobalManage.get_cookie_uname(),b=this;if(a==null||a!=d)LK_LoginReg.show({是否提示未登录:true,预回调函数:function(){b.GetImagesList()}});else b.DelIamges(a,c)},DelIamges:function(b,a){window.confirm("确定删除该图片？")&&$.ajax({type:"POST",url:LKConfig.URLAssembly.Subject.Aspx.get("DelSubjectImages"),data:{Type:"DelImages",UserName:b,FileName:a},dataType:"json",success:function(a){if(a.result==true)IFrameSubjectImages.ImagesBoxWin.ListImages.DelSuccess(a.info);else{alert(a.info);return}},error:function(){}});return;var c='<div style="width:400px; height:110px; display:block; margin:0px; padding:0px;">        <div style="height:25px; line-height:25px; ">确定删除该图片吗？(如果图片已被题目引用,删除后将无法显示)</div>        <div style="height:90px; margin-top:5px;">        <div class="delImagesPicBg">            <img src="/UploadFiles/'+b+"/Images/"+a+'" />        </div>        </div>    </div>';Boxy.confirm(c,function(){$.ajax({type:"POST",url:LKConfig.URLAssembly.Subject.Aspx.get("DelSubjectImages"),data:{Type:"DelImages",UserName:GlobalManage.getCookie("Members","Uname",null),FileName:a},dataType:"json",success:function(a){if(a.result==true)IFrameSubjectImages.ImagesBoxWin.ListImages.DelSuccess(a.info);else{alert(a.info);return}},error:function(){}})},{title:"删除提示！"})},elButtonUpload:0,elBigImage:0,elImageList:0,InitButton:function(){this.elButtonUpload=this.elButtonUpload||$("#IFrameQnInsertImageTabUpload");this.elBigImage=this.elBigImage||$("#IFrameQnInsertImageTabBigImg");this.elImageList=this.elImageList||$("#IFrameQnInsertImageTabImages")},AutoShowImage:function(a){this.InitButton();if(a==0)this.elButtonUpload.click();else if(a==2)this.elBigImage.click().show();else a==1&&this.elImageList.click().show()}}