");Fai.top.$("body").append(c);c.css({border:"1px solid #ff4400",position:"absolute","z-index":"9999",top:b.offset().top,left:b.offset().left,height:b.height()+"px",width:b.width()+"px"});var a=Fai.top.$("body").find(f);if(a.length<1){a=c}c.animate({top:a.offset().top+"px",left:a.offset().left+"px",width:a.width()+"px",height:a.height()+"px"},"slow",function(){if(typeof d=="function"){d()}c.remove()})};Fai.addPopupWindowBtn=function(h,b){var f=Fai.top.$("#popupWindow"+h);f.find(".formBtns").show();var g="popup"+h+b.id;var d=f.find(".formBtns td");var c=d.find("#"+g);if(c.length>0){c.remove()}if(b.click!="help"){if(typeof b.extClass!="undefined"){var a=b.extClass;Fai.top.$("
").appendTo(d)}else{Fai.top.$("
").appendTo(d)}}c=d.find("#"+g);if(typeof c.faiButton=="function"){c.faiButton()}if(b.callback&&Object.prototype.toString.call(b.callback)==="[object Function]"){c.click(function(){b.callback();if(Fai.isNull(b.msg)){Fai.top.Fai.closePopupWindow(h)}else{Fai.top.Fai.closePopupWindow(h,undefined,b.msg)}})}if(b.click=="close"){c.click(function(){if(Fai.isNull(b.msg)){Fai.top.Fai.closePopupWindow(h)}else{Fai.top.Fai.closePopupWindow(h,undefined,b.msg)}})}else{if(b.click=="help"){if(f.find("a.formh").length==0){f.append("
")}}else{c.click(b.click)}}if(b.disable){c.attr("disabled",true);c.faiButton("disable")}$(document).keydown(function(k){if(k.keyCode==13){var j=f.find("#popup"+h+"save"),l;if(j.length>0&&!j.prop("disabled")){var l=$(":focus");if(l.is("input[type='text']")||l.is("textarea")){return}j.trigger("click")}}})};Fai.enablePopupWindowBtn=function(f,d,a){var c=Fai.top.$("#popupWindow"+f);d="popup"+f+d;var b=c.find("#"+d);if(a){b.removeAttr("disabled");b.faiButton("enable")}else{b.attr("disabled",true);b.faiButton("disable")}};Fai.popupBodyWindow=function(d){var t={title:"",width:500,height:300,bannerDisplay:true,opacity:"0.3",displayBg:true,window_extClass:"",bg_extClass:""};t=$.extend(t,d);var p=parseInt(t.width);var s=parseInt(t.height);var c=$("body").scrollTop();if(c==0){c=$("html").scrollTop()}var f=document.documentElement.clientWidth;if(!$.browser.msie){f=document.body.clientWidth}var j=document.documentElement.clientHeight;var x="";var u="";if(!t.bannerDisplay){x="display:none;";u="background:none;"}var g=20;if(t.leftMar!=null){g=t.leftMar}else{g=(f-p)/2}var n=20;if(t.topMar!=null){n=t.topMar}else{n=(j-s-80)/2}var r="";if(t.content!=null){r=t.content}var o=parseInt(Math.random()*10000);if(t.displayBg){Fai.bodyBg(o,t.opacity,{extClass:t.bg_extClass})}var q="left:"+g+"px; top:"+(n+c)+"px;";if(Fai.isIE6()||Fai.isIE7()){q+="width:"+p+"px;"}var b="position:relative;width:"+p+"px;height:"+s+"px;";var m=['"];$(m.join("")).appendTo("body");var l=$("#popupWindow"+o);if(Fai.isIE6()||Fai.isIE7()){var a=l.find(".formBL");var k=Fai.getCssInt(a,"padding-left")+Fai.getCssInt(a,"padding-right")+Fai.getCssInt(a,"border-left-width")+Fai.getCssInt(a,"border-right-width");var z=l.find(".formBR");var w=Fai.getCssInt(z,"padding-left")+Fai.getCssInt(z,"padding-right")+Fai.getCssInt(z,"border-left-width")+Fai.getCssInt(z,"border-right-width");var h=l.find(".formBC");var v=Fai.getCssInt(h,"padding-left")+Fai.getCssInt(h,"padding-right")+Fai.getCssInt(h,"border-left-width")+Fai.getCssInt(h,"border-right-width");var y=l.find(".formMSG");var A=Fai.getCssInt(y,"margin-left")+Fai.getCssInt(y,"margin-right")+Fai.getCssInt(y,"border-left-width")+Fai.getCssInt(y,"border-right-width");l.css("width",(p+k+w+v+A)+"px")}l.ready(function(){$(".formDialog").draggable({handle:".formTL"});$(".formTL").disableSelection();$(".formX").click(function(){if(t.beforeClose){t.beforeClose()}Fai.closePopupBodyWindow(o);Fai.top.$("#popupBgTitle"+o).remove()})});l.data("settings",t);return o};Fai.closePopupBodyWindow=function(c){if(c){Fai.removeBodyBg(c);var a=$("#popupWindow"+c);var b=a.data("settings");if(b&&typeof b.closeFunc=="function"){b.closeFunc()}a.remove();$("body").focus()}else{Fai.removeBodyBg();$(".formDialog").remove()}};Fai.addPopupBodyWindowBtn=function(j,c){var g=$("#popupWindow"+j);g.find(".formBtns").show();var h="popup"+j+c.id;var f=g.find(".formBtns td");var d=f.find("#"+h);if(d.length>0){d.remove()}if(g.find(".popupButtons").length!=1){$("").appendTo(f)}if(g.find(".popupCheckboxs").length===1){$(g.find(".popupButtons")[0]).css("margin-right","10px").css("float","right").css("margin-top","-3px");if(Fai.isIE6()){$(g.find(".popupButtons")[0]).css("margin-top","-20px")}}var a="";if(typeof c.extClass!="undefined"){var b=" "+c.extClass;a="
"}else{a="
"}$(a).appendTo($(f).find(".popupButtons"));d=f.find("#"+h);if(typeof d.faiButton=="function"){d.faiButton()}if(c.click=="close"){d.click(function(){Fai.closePopupBodyWindow(j)})}else{d.click(c.click)}if(c.disable){d.attr("disabled",true);d.faiButton("disable")}};Fai.addPopupBodyWindowCheckBox=function(h,b){var f=$("#popupWindow"+h);f.find(".formBtns").show();var g="popup"+h+b.id;var d=f.find(".formBtns td");var c=d.find("#"+g);if(c.length>0){c.remove()}var a="
";if(f.find(".popupCheckboxs").length!=1){d.removeAttr("align").css("line-height","22px");$(d.find(".popupButtons")[0]).css("margin-right","10px").css("float","right");$("").appendTo(d)}else{$(a).appendTo($(f.find(".popupCheckboxs")[0]))}if(b.init==="checked"){$("#"+g).attr("checked","checked")}c=d.find("#"+g);c.click(b.click);if(b.disable){c.attr("disabled",true)}};Fai.enablePopupBodyWindowBtn=function(f,d,a){var c=$("#popupWindow"+f);d="popup"+f+d;var b=c.find("#"+d);if(a){b.removeAttr("disabled");b.faiButton("enable")}else{b.attr("disabled",true);b.faiButton("disable")}};Fai.successHandle=function(f,b,g,h,d,j){Fai.top.$("#ing").find(".tips").remove();var a=jQuery.parseJSON(f);var c="";if(a.success){if(a.msg){c=a.msg}if(b!=""){c=b}if(c&&c!=""){if(j==0){Fai.top.Fai.removeIng(true);alert(c)}else{if(j==1){Fai.ing(c,true)}else{if(j==2){Fai.ing(c,false)}else{if(j==3){}else{Fai.top.Fai.removeIng(true);alert(c)}}}}}if(h!=""){if(d==1){h=h.replace(/#.*/,"");if(Fai.top.location.href==h){Fai.top.location.reload()}else{Fai.top.location.href=h}}else{if(d==2){h=h.replace(/#.*/,"");if(parent.location.href==h){parent.location.reload()}else{parent.location.href=h}}else{if(d==3){return a.success}else{if(d==4){Fai.fkEval(h)}else{if(d==5){if(Fai.top.location.href==h){Fai.top.location.reload()}else{Fai.top.location.href=h}}else{h=h.replace(/#.*/,"");if(document.location.href==h){document.location.reload()}else{document.location.href=h}}}}}}}}else{if(a.msg){c=a.msg}if(c==""){c=g}if(c==""){c="系统错误"}if(j==0){alert(c)}else{if(j==1||j==2){Fai.ing(c,false)}else{alert(c)}}}return a.success};Fai.checkEmbed=function(a,c){if(Fai.top.location.href==document.location.href){var b=document.location.href;b=b.replace(/http:\/\/[^\/]+/,"");Fai.top.location.href=Fai.addUrlParams(a,"url="+Fai.encodeUrl(b)+"&item="+Fai.encodeUrl(c))}};Fai.disable=function(b,a){if(a){$("#"+b).attr("disabled",true)}else{$("#"+b).removeAttr("disabled")}};var timeout=500;var closetimer=0;var ddmenuitem=0;Fai.dropdownForm_open=function(){Fai.dropdownForm_canceltimer();Fai.dropdownForm_close();ddmenuitem=$(this).find("ul").eq(0).css("visibility","visible")};Fai.dropdownForm_close=function(){if(ddmenuitem){ddmenuitem.css("visibility","hidden")}};Fai.dropdownForm_timer=function(){closetimer=window.setTimeout(Fai.dropdownForm_close,timeout)};Fai.dropdownForm_canceltimer=function(){if(closetimer){window.clearTimeout(closetimer);closetimer=null}};$(function(){try{$(".dropdownForm > div").bind("click",Fai.dropdownForm_open);$(".dropdownForm > div").bind("mouseover",Fai.dropdownForm_open);$(".dropdownForm > div").bind("mouseout",Fai.dropdownForm_timer);Number.prototype.toFixed=function(f){var c=(parseInt(Math.round(this*Math.pow(10,f)+Math.pow(10,-(f+2))))/Math.pow(10,f)).toString();var b=c.indexOf(".");if(b<0&&f>0){c=c+".";for(var d=0;d
=b){return false}}}});if(a>=b){setTimeout("Fai.doDelayLoadImg("+b+")",200)}};Fai.doDelayLoadMaterial=function(c){var b=0;var a=[];$("img").each(function(){var f=$(this).attr("faiSrc");if(!Fai.isNull(f)&&f!=""){if(f!=$(this).attr("src")){++b;$(this).show();$(this).attr("src",f);var d=parseInt($(this).attr("dog"));if(!isNaN(d)){a.push(d)}if(b>=c){return false}}}});if(a.length!=0){Site.logDog(200167,$.toJSON(a))}if(b>=c){setTimeout("Fai.doDelayLoadMaterial("+c+")",200)}};Fai.editableDiv=function(b){var f=$("#"+b);var d=f.width();var a=f.text();var c=$("");f.html(c);c.click(function(){return false});c.css("font-size","12px");c.css("text-align","left");c.width(d-10);c.trigger("focus").trigger("select");c.focus();c.blur(function(){var g=$(this);var h=g.val();if(h==""){f.html("默认栏目名称")}else{f.html(""+h+"")}if(h!=a){$("#saveButton").attr("disabled",false)}});c.keyup(function(j){var l=j||window.event;var g=l.keyCode;var h=$(this);switch(g){case 13:var k=h.val();if(k==""){f.html("默认栏目名称")}else{f.html(""+k+"")}if(k!=a){$("#saveButton").attr("disabled",false)}break;case 27:f.html(""+a+"");break}})};Fai.containsChinese=function(b){var a=/[\u4e00-\u9fa5]+/;return a.test(b)};Fai.refreshClass=function(a){a.children().each(function(){$(this).attr("class",$(this).attr("class"));Fai.refreshClass($(this))})};Fai.addInterval=function(d,c,a){if(Fai.isNull(Fai.intervalFunc)){Fai.intervalFunc=new Array()}for(var b=0;b ");c.appendTo($("body"));var v=$("