var Results={0:"设置成功！",1:"修改保存成功！",2:"图片移动完毕，删除相册成功！",3:"删除整个相册成功！",4:"请选择一个相册",5:"相册创建成功！",6:"本吧目前没有相册，请先创建",7:"删除成功！",8:"删除失败！",9:"不能选择本身相册！",3153920:"图片库名称不能为空",3153922:"仅限使用汉字、字母、数字和下划线",3153921:"名称长度不能超过8个汉字，请重试",3153923:"您输入的名称包含不适宜文字，请重试",3158274:"您输入的名称包含不适宜文字，请重试",3153925:"名称长度不能超过15个汉字，请重试",3153929:"简介长度不能超过100个汉字，请重试",3153924:"必须填写相册名称",3153926:"仅限使用汉字、字母、数字和下划线",3153933:"相册名称不得重复",3153927:"您输入的内容包含不适宜文字，请重试",3153931:"您输入的内容包含不适宜文字，请重试",3153932:"该相册已被删除，请重新选择",3153934:"本吧相册数已达到上限，无法创建新相册！",3153937:"图片最大不得超过3M",3153939:"您指定的图片不存在或图片格式不合适",3153938:"您指定的图片不存在或图片格式不合适",3153941:"描述长度不能超过100个汉字，请重试",3153943:"您输入的内容包含不适宜文字，请重试",3153935:"剩余可用空间不足",3153944:"请检查网络",3162114:"链接名称不能超过31个汉字，请重试",3162116:"您输入的链接地址过长，请重试",3162121:"您输入的名称包含不适宜文字，请重试",3162122:"您输入的链接地址包含不适当信息，请重试",3162117:"",3162118:"",3162113:"对不起，添加链接数已达上限！",3162112:"该词条不存在，请重试",3145732:"您已退出登录状态或没有相应权限",3174403:"您输入的名称包含不适宜文字，请重试",3174402:"仅限使用汉字、字母、数字和下划线",3174401:"名称长度不得超过8个汉字，请重试",3174400:"视频模块名称不得为空，请重试",3174412:"视频名称不得为空，请重试",3174413:"视频名称不得超过15个汉字，请重试",3174414:"您输入的内容包含不适宜文字，请重试",3174415:"视频简介不得超过100个汉字，请重试",3174416:"您输入的内容包含不适宜文字，请重试",3174417:"对不起，本吧视频空间不足，请重试",3174418:"您输入的视频分类超过5个，请重试",3174419:"您输入的单个分类长度超过10个汉字，请重试",3174420:"专辑内视频个数达到上线",3174421:"您输入的内容包含不适宜文字，请重试",3174424:"仅限使用汉字、字母、数字和下划线",3174425:"仅限使用汉字、字母、数字和下划线",3174404:"专辑名称不得为空，请重试",3174406:"您输入的内容含有不适宜文字，请重试",3174405:"专辑名称不得超过15个汉字，请重试",3174410:"专辑不得与已有专辑重名，请重试",3174407:"专辑简介不得超过100个汉字，请重试",3174408:"您输入的内容含有不适宜文字",3174411:"本吧专辑数已达上线，无法创建新专辑",3162370:"您输入的内容含有不适宜文字，请重试",3162368:"长度不能超过7个汉字，请重试",3162369:"仅限使用汉字、字母、数字和下划线",3162373:"长度不能超过8个汉字，请重试",3162374:"描述不能为空",3162375:"仅限使用汉字、字母、数字和下划线",3162376:"置顶不能超过三个",3162378:"本吧官方hi群列表已经达到上限",3162371:"您输入的Hi群号码不正确",3162372:"您输入的hi群号码不存在 或 创建不满一天",bigSize:"视频最大不得超过200M，请重试",smallSize:"视频最小不得小于50k，请重试",sizeError:"文件大小错误",unknowError:"未知错误",errorPower:"上传失败，您没有上传权限",errorId:"非法的ID串",IdNotExist:"您所指定的视频文件不存在，请重试",errorDomain:"上传失败，您没有上传权限",transFail:"视频转换失败",errorFileName:"上传失败，请稍候再试",videoDeleted:"视频被删除",transforming:"视频正在转换中",verify:"正在审核中",errorExt:"对不起，暂不支持您所上传的视频格式，请重试",pageError:"您的访问出错了！"};var Url={albumS:"/{0}/tupian/cm",albumNSP:"ct={0}&kw={1}&tn={2}&c={3}",linksG:"/{0}/define/links",defineS:"/{0}/define/cm",videoS:"/{0}/shipin/cm",hallS:"/{0}/star/cm",videoNSP:"ct={0}&kw={1}&sn={2}&c={3}",videoEditP:"ct={0}&kw={1}&vid={2}&vn={3}&vd={4}&vt={5}&ovt={6}&c={7}",videoDelP:"ct={0}&kw={1}&vid={2}&vn={3}&c={4}",videoMoveP:"ct={0}&kw={1}&zn={2}&vid={3}&ozn={4}&vn={5}&c={6}",vAlbEditP:"ct={0}&kw={1}&zn={2}&zs={3}&ozn={4}&c={5}",vAlbDelP:"ct={0}&kw={1}&zn={2}&c={3}",vAlbAddP:"ct={0}&kw={1}&zn={2}&zs={3}&c={4}",archiveNSP:"ct={0}&kw={1}&arn={2}&c={3}",linksNSP:"ct={0}&kw={1}&arn={2}&c={3}",baikeSP:"ct={0}&kw={1}&bk={2}&c={3}",linksAddSP:"ct={0}&kw={1}&ln={2}&la={3}&c={4}",linksDel:"ct={0}&kw={1}&lid={2}&c={3}",linksEdit:"ct={0}&kw={1}&lid={2}&ln={3}&la={4}&c={5}",picUrl:"http://imgsrc.baidu.com/forum/abpic/item/{0}.jpg",picSUrl:"/{0}/tupian/item/{1}.html",albumCreate:"ct={0}&kw={1}&an={2}&as={3}&c={4}",albumG:"/{0}/tupian/modalbum/{1}",albumGAll:"/{0}/tupian/all",albumEdit:"ct={0}&kw={1}&an={2}&as={3}&oan={4}&c={5}",albumList:"/{0}/tupian/list/{1}",albumDel:"ct={0}&kw={1}&an={2}&oan={3}&c={4}",albumSet:"ct={0}&kw={1}&an={2}&c={3}",albumUpload:"/{0}/tupian/upload/{1}",picDel:"ct={0}&kw={1}&pid={2}&c={3}&an={4}",picEdit:"ct={0}&kw={1}&an={2}&pd={3}&pid={4}&c={5}",picSet:"ct={0}&kw={1}&an={2}&pid={3}&c={4}",calendarU:"/{0}/rili/cm",calendarEditTypeP:"ct=203&calType={0}&kw={1}&c={2}",calendarModifyNameP:"ct=200&cn={0}&kw={1}&c={2}",hiS:"/{0}/hi/cm",hiNSP:"ct={0}&kw={1}&name={2}&c={3}",hiDesSP:"ct={0}&kw={1}&hino={2}&hides={3}&c={4}",hiTopSP:"ct={0}&kw={1}&hino={2}&c={3}",hiDelSP:"ct={0}&kw={1}&hino={2}&c={3}",hiAddSP:"ct={0}&kw={1}&hino={2}&hides={3}&c={4}"};var Names={albumNumUpper:100,albumMaxWidth:150,albumMaxHeight:150,xzFL:"选择分类",ycFL:"隐藏分类",djxzFL:"点击选择分类",yyFL:"已有分类",dh:"，",tagSplit:"，|,|；|;|、",edit:"编辑",del:"删除",zlSP:"最热视频",gd:"更多",vLongTime:"片长{0}&nbsp;播放{1}次<br>上传时间：{2}",nullTagStr:"<p>您目前没有分类，欢迎填写。<br/>什么是<a href='http://www.baidu.com/search/cang_faq.html#n1' target='_blank'>分类？</a></p>"};var zy_UI={};zy_UI.toRegPages={Frs:["archive_edit_id","archive_edit2_id","albumFrs_edit_id","links_edit_id","links_edit2_id","videoFrs_edit_id","friend_edit_id","jingpin_edit_id","hall_edit_id","friend_edit_id2","jingpin_edit_id2","hi_edit_id","calendarFrs_edit_id"],PicUpload:["album_add_id","album_upload_confirm","form0","form1","form2","form3","form4","upload_albumList"],AlbumList:["album_create_id","album_set_id"],vUpload:["vAlbum_create_id","expand_id","upload_id"]};zy_UI.register=function(A){var B=0,C=zy_UI.toRegPages[A];switch(A){case"Frs":if(G(C[0])){G(C[0]).onclick=function(){zy_UI.ctrl(C[0]);return false}}if(G(C[1])){G(C[1]).onclick=function(){zy_UI.ctrl(C[0]);return false}}if(G(C[2])){G(C[2]).onclick=function(){zy_UI.ctrl(C[2]);return false}}if(G(C[3])){G(C[3]).onclick=function(){zy_UI.ctrl(C[3]);return false}}if(G(C[4])){G(C[4]).onclick=function(){zy_UI.ctrl(C[3]);return false}}if(G(C[5])){G(C[5]).onclick=function(){zy_UI.ctrl(C[5]);return false}}if(G(C[6])){G(C[6]).onclick=function(){zy_UI.ctrl(C[6]);return false}}if(G(C[7])){G(C[7]).onclick=function(){zy_UI.ctrl(C[7]);return false}}if(G(C[8])){G(C[8]).onclick=function(){zy_UI.ctrl(C[8]);return false}}if(G(C[9])){G(C[9]).onclick=function(){zy_UI.ctrl(C[9]);return false}}if(G(C[10])){G(C[10]).onclick=function(){zy_UI.ctrl(C[10]);return false}}if(G(C[11])){G(C[11]).onclick=function(){zy_UI.ctrl(C[11]);return false}}if(G(C[12])){G(C[12]).onclick=function(){zy_UI.ctrl(C[12]);return false}}break;case"PicUpload":G(C[0]).onclick=function(){zy_UI.ctrl(C[0]);return false};G(C[1]).onclick=function(){zy_UI.ctrl(C[1]);return false};G(document[C[2]]["photo"]).onchange=function(){PicUpload.showDes(C[2])};G(document[C[3]]["photo"]).onchange=function(){PicUpload.showDes(C[3])};G(document[C[4]]["photo"]).onchange=function(){PicUpload.showDes(C[4])};G(document[C[5]]["photo"]).onchange=function(){PicUpload.showDes(C[5])};G(document[C[6]]["photo"]).onchange=function(){PicUpload.showDes(C[6])};break;case"AlbumList":if(G(C[0])){G(C[0]).onclick=function(){zy_UI.ctrl(C[0]);return false}}if(G(C[1])){G(C[1]).onclick=function(){zy_UI.ctrl(C[1]);return false}}break;case"PicList":break;case"vUpload":G(C[0]).onclick=function(){zy_UI.ctrl(C[0]);return false};G(C[1]).onclick=function(){zy_UI.ctrl(C[1]);return false};G(C[2]).onclick=function(){zy_UI.ctrl(C[2]);return false};break}};zy_UI.ctrl=function(A){switch(A){case"hi_edit_id":Frs.popupHtml("hi");return false;break;case"archive_edit_id":Frs.popupHtml("archive");return false;break;case"albumFrs_edit_id":Frs.popupHtml("albumFrs");return false;break;case"links_edit_id":Frs.popupHtml("links");return false;break;case"videoFrs_edit_id":Frs.popupHtml("videoFrs");return false;break;case"friend_edit_id":Frs.popupHtml("friend");return false;break;case"jingpin_edit_id":Frs.popupHtml("jingpin");return false;break;case"friend_edit_id2":Frs.popupHtml("friend");return false;break;case"jingpin_edit_id2":Frs.popupHtml("jingpin");return false;break;case"hall_edit_id":Frs.popupHtml("hall");return false;break;case"album_add_id":if(parseInt(G("albumNum").value)>=Names.albumNumUpper){Common.tip("album_add_tip",Results["3153934"],0)}else{PicUpload.chgState("album_add","show")}return false;break;case"calendarFrs_edit_id":Frs.popupHtml("calendar");return false;break;case"album_upload_confirm":PicUpload.albumUpload();break;case"album_create_id":AlbumList.popupHtml("album_create");break;case"album_set_id":AlbumList.popupHtml("album_set");break;case"vAlbum_create_id":VideoUpload.vAlbumCreate();break;case"expand_id":VideoUpload.expand();break;case"upload_id":VideoUpload.upload();break}};var p,forumName,albumName,crypt,intervalPop;var Common={getRightWH:function(A,D,B,F){var C=0,E=A,H=D;if(A>B){C+=1}if(D>F){C+=2}switch(C){case 1:E=B;E=D*B/A;case 2:H=F;E=A*F/D;case 3:H=(D/F>A/B)?F:D*B/A;E=(D/F>A/B)?A*F/D:B}return[E,H]},initPic:function(C,A,B){setTimeout(function(){Common.resizePic(C,A,B)},10)},initPicCallBack:function(D,C,A,B){setTimeout(function(){Common.resizePic(D,C,A,B)},10)},resizePic:function(C,D,A,J){if(typeof D!="function"){var H=D||Names.albumMaxWidth;var E=A||Names.albumMaxHeight}else{var H=A||Names.albumMaxWidth;var E=J||Names.albumMaxHeight}var F=C;if(F.width==0){var I=this;var K=arguments;setTimeout(function(){K.callee.apply(I,K)},10)}var B=Common.getRightWH(F.width,F.height,H,E);C.style.width=B[0]+"px";C.style.height=B[1]+"px";C.style.visibility="visible";if(typeof D=="function"){D(C)}},resize:function(){var D=document.getElementById("container")||false;var E=document,A=document.documentElement;if(E.compatMode&&E.compatMode!="BackCompat"){var C=A.scrollHeight}else{var C=E.body.scrollHeight}if(D){var B=C;B=(parseInt(B)>400)?B:420;D.style.height=B+"px"}},statistic:function(E,A){var C=new Date(),D=C.getTime();function F(J){var I=[];for(var H in J){I.push(encodeURIComponent(H)+"="+encodeURIComponent(J[H]))}return I.join("&")}if(document.images){var B=null;if(A){B=new Image();window["bd_"+(new Date()).getTime()]=B;B.src="http://static.tieba.baidu.com/static/tb/img/c.jpg?ct="+E+"&t="+D+"&"+F(A)}else{B=new Image();window["bd_"+(new Date()).getTime()]=B;B.src="http://static.tieba.baidu.com/static/tb/img/c.jpg?ct="+E+"&t="+D}}},clearCt:function(){var A=arguments.length;for(var B=0;B<A;B++){if(navigator.userAgent.indexOf("MSIE")>0){G(arguments[B]).focus();document.execCommand("selectall");document.execCommand("Delete")}else{G(arguments[B]).value=""}}},tip:function(C,A,B){Element.show(C);if(B==1){G(C).innerHTML="<font color='black'>{0}</font>".format(A)}else{if(B==0){G(C).innerHTML="<font color='red'>{0}</font>".format(A)}}},setRefresh:function(B,A){if(B){B.setContent("isReloadOnClose",A)}},closePopup:function(A){if(A){setTimeout(function(){A.reset()},500)}},p_close:function(C){if(G(C)){var A=G(C),B=parseInt(A.innerHTML);if(B>1){A.innerHTML=B-1}else{window.clearInterval(intervalPop);if(p){p.close()}location.href="/"+forumNameUrl+"/shipin/all"}}else{window.clearInterval(intervalPop)}},validate:function(url,type,_method,_pars,_tip,callback){new Ajax.Request(url,{method:_method||"get",parameters:_pars||"",onComplete:function(xmlHttp){var JData="("+xmlHttp.responseText+")";var rst=eval(JData);var no=rst.resultNo;var tipInfo=Results[no]||"未知错误，请检查网络！";switch(type){case"name_edit":if(no=="0"){if(_pars.match(/ct=151(?=&)/)){Common.setRefresh(p,true);Common.closePopup(p)}else{G(type).setAttribute("oldValue",G(type).value);Frs.chgState("name_modify","hide");Common.setRefresh(p,true)}}else{Common.tip("name_edit_tip",tipInfo,0)}break;case"baike_edit":if(no=="0"){Common.tip("baike_edit_tip",tipInfo,1);Common.setRefresh(p,true);Common.closePopup(p)}else{Common.tip("baike_edit_tip",tipInfo,0)}break;case"calendar_edit":if(no=="0"){Common.tip("calendar_edit_tip",tipInfo,1);Common.setRefresh(p,true);Common.closePopup(p)}else{Common.tip("calendar_edit_tip",tipInfo,0)}break;case"addLinks":if(no=="0"){Common.clearCt("links_addName","links_addUrl");Common.setRefresh(p,true);setTimeout(function(){Common.initPopUp("links")},500)}else{if(no.match(/^3162114|3162121$/)){Common.tip("links_addName_tip",tipInfo,0)}else{Common.tip("links_addUrl_tip",tipInfo,0)}}break;case"delLink":Common.setRefresh(p,true);setTimeout(function(){Common.initPopUp("links")},500);break;case"editLink":if(no=="0"){Common.setRefresh(p,true);setTimeout(function(){Common.initPopUp("links")},500)}else{Common.tip(_tip,tipInfo,0)}break;case"album_edit":if(no=="0"){Common.tip("album_edit_success",Results["1"],1);if(document.URL.match(/([0-9]{4}|baidu\.com|tieba|post|club)\/[^\/]+\/tupian\/list/)){setTimeout(function(){location.href="/"+forumNameUrl+"/tupian/list/"+encodeURIComponent(G("album_name_edit").value.Alltrim().rOneBk())},500)}else{Common.closePopup(p)}}else{if(no.match(/^3153924|3153933|3153927|3153926$/)){Common.tip("album_name_edit_tip",tipInfo,0)}else{Common.tip("album_des_edit_tip",tipInfo,0)}}break;case"album_delete1":if(no=="0"){Common.tip("album_delete_tip",Results["2"],1);if(callback){eval(callback+"()")}else{Common.setRefresh(p,true);Common.closePopup(p)}}else{Common.tip("allAlbums_tip",tipInfo,0)}break;case"album_delete2":if(no=="0"){Common.tip("album_delete_tip",Results["3"],1);if(callback){eval(callback+"()")}else{Common.setRefresh(p,true);Common.closePopup(p)}}else{Common.tip("album_delete_tip",tipInfo,0)}break;case"album_add":if(no=="0"){if(!G("allAlbums")&&G("nullAlbums")){G("nullAlbums").innerHTML="<select id='allAlbums' style='width:120px'></select>"}var sl=new Sel("allAlbums");sl.addSel(G("album_name").value.Alltrim());sl.selOption(G("album_name").value.Alltrim(),"value");PicUpload.chgState("album_add","hide")}else{Common.tip("album_add_tip",tipInfo,0)}break;case"album_add2":if(no=="0"){if(!G("allAlbums")&&G("nullAlbums")){G("nullAlbums").innerHTML="<select id='allAlbums' style='width:120px'></select>"}var sl=new Sel("allAlbums");sl.addSel(G("album_name").value.Alltrim());sl.selOption(G("album_name").value.Alltrim(),"value");AlbumSurvivor.chgState("album_add","hide")}else{Common.tip("album_add_tip",tipInfo,0)}break;case"album_create":if(no=="0"){Common.tip("album_create_success",Results["5"],1);Common.setRefresh(p,true);Common.closePopup(p)}else{if(no.match(/^3153924|3153933|3153927|3153926$/)){Common.tip("album_create_name_tip",tipInfo,0)}else{Common.tip("album_create_des_tip",tipInfo,0)}}break;case"album_set":if(no=="0"){Common.tip("album_set_success",tipInfo,1);Common.closePopup(p)}else{if(no.match(/^3145732$/)){Common.tip("album_set_success",tipInfo,0)}else{Common.tip("allAlbums_tip",tipInfo,0)}}break;case"pic_edit":if(no=="0"){Common.tip("pic_edit_success",tipInfo,1);if(callback){eval(callback+"()")}else{Common.setRefresh(p,true);Common.closePopup(p)}}else{if(no.match(/^3153932$/)){Common.tip("allAlbums_tip",tipInfo,0)}else{Common.tip("pic_edit_des_tip",tipInfo,0)}}break;case"pic_delete":if(no=="0"){if(p){Common.tip("pic_delete_confirm",Results["7"],1)}}else{if(p){Common.tip("pic_delete_confirm",tipInfo,0)}}if(callback){eval(callback+"()")}else{Common.setRefresh(p,true);Common.closePopup(p)}break;case"pic_set":if(no=="0"){setTimeout(function(){window.location.reload()},500)}break;case"pic_move":if(no=="0"){setTimeout(function(){window.location.reload()},500)}else{Common.tip("allAlbums_tip",tipInfo,0)}break;case"albumSurvivor_delete":if(no=="0"){Common.closePopup(p)}else{alert(no)}break;case"album_add2":if(no=="0"){var sl=new Sel("allAlbums");sl.addSel(G("album_name").value);sl.selOption(G("album_name").value,"value");AlbumSurvivor.chgState("album_add","hide")}else{alert(no)}break;case"video_upload_chk":if(no=="0"){var _succ=function(commitreturn){VideoUpload.uploadZyq(commitreturn)};var _fail=function(errNo){Common.tip("file_tip",Results[errNo],0)};BaiduVideo.upload("file",g_str,_succ,_fail)}else{if(no.match(/3174417|3174420/)){Common.tip("file_tip",tipInfo,0)}else{if(no.match(/3174412|3174413|3174414/)){Common.tip("vName_tip",tipInfo,0)}else{if(no.match(/3174415|3174416/)){Common.tip("vDes_tip",tipInfo,0)}else{if(no.match(/3174418|3174419|3174421|3174425/)){Common.tip("vClass_tip",tipInfo,0)}else{Common.tip("file_tip",tipInfo,0)}}}}}break;case"video_upload":if(no=="0"){var vName=G("vName").value.escapeHTML();var _ct=[];_ct.push("<table style='margin:50px;line-height:25px'>");_ct.push("	<tr>");_ct.push("		<td width='50' valign='top'><img src='http://static.tieba.baidu.com/static/tb/img/loading.gif'></td>");_ct.push("		<td>视频<span style='color:blue'>"+vName+"</span>上传成功，目前正在处理中，现在已经可以在<a href='/{0}/shipin/proc'>正在处理的视频</a>中看到您上传的视频了。<br/><br/>您可以<a href='/{0}/shipin/upload'>继续上传</a>，或者去<a href='/{0}/shipin/all/'>视频列表页</a>，查看其他已经完成的视频。</td>".format(forumNameUrl));_ct.push("	</tr></table>");p=new Popup({width:550,height:230});p.html(_ct.join(""),"上传视频")}else{if(no.match(/3174417/)){Common.tip("file_tip",tipInfo,0)}else{var _ct="<table style='margin:40px 25px;line-height:25px' width='90%'><tr><td align='center'>视频上传失败</td></tr></table>";p=new Popup({width:300,height:100});p.html(_ct,"上传视频")}}break;case"videoEdit":if(no=="0"){Common.tip("video_edit_tip","修改保存成功！",1);if(document.URL.match(/([0-9]{4}|baidu\.com|tieba|post|club)\/[^\/]+\/shipin\/play/)){setTimeout(function(){location.reload()},1000)}else{Common.setRefresh(p,true);Common.closePopup(p)}}else{if(no.match(/3174412|3174413|3174414/g)){Common.tip("video_edit_name_tip",tipInfo,0)}else{if(no.match(/3174415|3174416/g)){Common.tip("video_edit_des_tip",tipInfo,0)}else{if(no.match(/3174418|3174419|3174421|3174425/)){Common.tip("inputbox2_tip",tipInfo,0)}else{Common.tip("video_edit_tip",tipInfo,0)}}}}break;case"videoDel":if(no=="0"){Common.tip("video_del_tip","删除成功",1);if(!G("vInfo")){Common.setRefresh(p,true);Common.closePopup(p)}else{setTimeout(function(){location.href="/{0}/shipin/all/".format(forumNameUrl)},1000)}}else{Common.tip("video_del_tip",tipInfo,0);Common.closePopup(p)}break;case"vAlbEdit":if(no=="0"){Common.tip("vAlbum_edit_tip","修改保存成功！",1);if(document.URL.match(/([0-9]{4}|baidu\.com|tieba|post|club)\/[^\/]+\/shipin\/plays/)){setTimeout(function(){location.href="/"+forumNameUrl+"/shipin/plays/"+encodeURIComponent(G("vAlbum_edit_name").value.Alltrim().rOneBk())},500)}else{if(document.URL.match(/([0-9]{4}|baidu\.com|tieba|post|club)\/[^\/]+\/shipin\/list/)){setTimeout(function(){location.href="/"+forumNameUrl+"/shipin/list/"+encodeURIComponent(G("vAlbum_edit_name").value.Alltrim().rOneBk())},500)}else{Common.setRefresh(p,true);Common.closePopup(p)}}}else{if(no.match(/3174404|3174405|3174406|3174410|3174424/)){Common.tip("vAlbum_edit_name_tip",tipInfo,0)}else{if(no.match(/3174407|3174408/)){Common.tip("vAlbum_edit_des_tip",tipInfo,0)}else{Common.tip("vAlbum_edit_tip",tipInfo,0)}}}break;case"vAlbDel":if(no=="0"){Common.tip("vAlbum_del_tip","删除成功",1);if(document.URL.match(/([0-9]{4}|baidu\.com|tieba|post|club)\/[^\/]+\/shipin\/plays/)){setTimeout(function(){location.href="/"+forumNameUrl+"/shipin/alist/"},500)}else{if(callback){eval(callback+"()")}else{Common.setRefresh(p,true);Common.closePopup(p)}}}else{Common.tip("vAlbum_del_tip",tipInfo,0)}break;case"videoMove":if(no=="0"){Common.tip("videoMove_tip","移动成功",1);Common.setRefresh(p,true);Common.closePopup(p)}else{Common.tip("videoMove_tip",tipInfo,0)}break;case"vAlbAdd":if(no=="0"){if(_tip=="uploadPage"){var _aName=G("album_name").value.Alltrim().rOneBk();var sl=new Sel("vAlbum");sl.addSel(_aName);sl.selOption(_aName,"value");Video.chgState("hide")}else{location.href="/{0}/shipin/album/{1}/".format(forumNameUrl,encodeURIComponent(G("album_add_name").value.Alltrim().rOneBk()))}}else{if(_tip=="uploadPage"){if(no.match(/3174411/)){Video.chgState("hide")}Common.tip("vAlbum_tip",tipInfo,0)}else{if(no.match(/3174404|3174405|3174406|3174410|3174411|3174424/)){Common.tip("album_add_name_tip",tipInfo,0)}else{Common.tip("album_add_des_tip",tipInfo,0)}}}break}},onFailure:function(xmlHttp){alert("出现异常错误！")}})},initPopUp:function(type,i){if(type.match(/^links$/)){var url=Url.linksG.format(forumName);new Ajax.Request(url,{method:"get",onComplete:function(xmlHttp){var JData="("+xmlHttp.responseText+")";var rst=eval(JData).linksUrl;var linksList=G("linksList");var str="<table width='100%' border='0' cellspacing='0' cellpadding='0' id='tb3'><tr class='tr1'><td width='35%'>链接名称</td><td>链接地址</td><td width='50'>编辑</td><td width='40'>删除</td></tr>";for(var i=0,len=rst.length;i<len;i++){var link=rst[i];str+="<tr class='tr2'><td><span>{0}</span><input type='hidden' value='{1}'/><br><span id='linkEdit_tip'></span></td><td><span>{2}</span><input type='hidden' value='{3}' /></td><td><a href='' onclick='Frs.chgState(\"{4}\",\"linkEdit\",\"{5}\");return false;'><img src='http://static.tieba.baidu.com/static/tb/img/edit.gif' width='15' height='16' border='0'></a></td><td><a href='' onclick='Frs.delLink(\"{5}\");return false;'><img src='http://static.tieba.baidu.com/static/tb/img/del.gif' width='15' height='16' border='0'></a></td></tr><tr class='tr3'><td colspan='4'></td></tr>".format(link.linkNameS.escapeHTML(),link.linkName.escapeJS(),link.linkUrlS.escapeHTML(),link.linkUrl.escapeJS(),i,link.linkId)}str+="<tr class='tr2'><td colspan='4'>&nbsp;</td></tr></table>";linksList.innerHTML=str},onFailure:function(xmlHttp){alert("出现异常错误！")}})}else{if(type.match(/^videoEdit$/)){var url="/{0}/shipin/modvideo/{1}/".format(forumName_u,i);new Ajax.Request(url,{method:"get",onComplete:function(xmlHttp){var JData="("+xmlHttp.responseText+")";var _vObj=eval(JData).videoData;G("video_edit_name").value=_vObj.vName;G("video_edit_des").value=_vObj.vDesc;G("inputbox2").value=Video.oldVClass=_vObj.vTags;Common.regSug("inputbox2","sug2")},onFailure:function(xmlHttp){alert("出现异常错误！")}})}else{if(type.match(/^vAlbEdit$/)){var url="/{0}/shipin/modalbum/{1}/".format(forumName_u,encode(albums[i].albumName));new Ajax.Request(url,{method:"get",onComplete:function(xmlHttp){var JData="("+xmlHttp.responseText+")";var _vObj=eval(JData);G("vAlbum_edit_name").value=_vObj.aName;G("vAlbum_edit_des").value=_vObj.aDesc},onFailure:function(xmlHttp){alert("出现异常错误！")}})}else{if(type.match(/^moveAlbums$/)){var url="/{0}/shipin/getallalbums".format(forumName_u);new Ajax.Request(url,{method:"get",onComplete:function(xmlHttp){var JData="("+xmlHttp.responseText+")";var _vObj=eval(JData);var _allAlbums=_vObj.allAlbumName;if(_allAlbums.length>0){var sel=new Sel("vAlbum",_allAlbums);sel.addSels();if(oldVAlbum.Alltrim()!=""){sel.selOption(oldVAlbum,"value")}}}})}else{if(type.match(/^albumFrs$/)){Common.initAllAlbum("allAlbums",null,"album_set")}}}}}},regSug:function(inputbox,sug){var url="/{0}/shipin/getalltags/".format(forumName_u);new Ajax.Request(url,{method:"get",onComplete:function(xmlHttp){var JData="("+xmlHttp.responseText+")";var _data=eval(JData).allTags;new Suggest(inputbox,sug,{data:_data,type:0,if2D:false,ifMulti:true,sg_h:5,sg_num:10})},onFailure:function(xmlHttp){alert("出现异常错误！")}})},initAllAlbum:function(id,dAlbum,type){var url=Url.albumGAll.format(encode(forumName));new Ajax.Request(url,{method:"get",onComplete:function(xmlHttp){var jData="("+xmlHttp.responseText+")";var sel;var rst=eval(jData);var alls=rst.albums;if(alls.length>0){if(type=="remove"){alls.remove(dAlbum)}if(alls.length>0){sel=new Sel(id,alls);sel.addSels();if(alls.length==1&&G(id).options[0].value==""){G(id).options[0]=null}}else{var _obj=document.getElementsByName("album_delete_radio");_obj[1].checked=true;_obj[0].disabled=true;G("allAlbums").disabled=true}}else{G("allAlbums_ct").innerHTML="<span id='nullAlbums'>"+Results["6"]+"</span>"}if(type&&type.match(/^album_set$/)){var _radio=document.getElementsByName("album_set_radio");if(rst.defaultAlbumName==""){_radio[0].checked=true}else{_radio[1].checked=true;type="value"}}sel.selOption(dAlbum||rst.defaultAlbumName,type?type:"value")}})}};