var defaulttextareawidth="98%";
var defaulttextareaheight="30px";
var e6d22ba8earr=[];
var currentoptionval=0;
var configarr_flip=[];
function ebb3f01e2(e){newli=$("div.newinputboxdiv2:visible li.newinputli:first").clone(true);
$("input.singlenewpostbutt",newli).attr("class","singleeditpostbutt");
$("input:last",newli).after('<input type="hidden" name="cid" value="'+e.aid+'"/>');
var a=[];
var c=[];
var b=0;
for(var d in e){b++;
a=e[d];
if(a){$("textarea",newli).each(function(){ctrlkeyarr=$(this).attr("name").split("_");
$(this).get(0).value="";
if((ctrlkeyarr[0] in configarr_flip)&&a[configarr_flip[ctrlkeyarr[0]]]){$(this).get(0).value=a[configarr_flip[ctrlkeyarr[0]]];
}c[d]=newli.clone(true);
});
}}for(var d in c){$("ul#editinputul").append(c[d]);
}}$(function(){$("#newpostallreset").click(function(){var a=0;
$("div#newinputbox form").each(function(){if($(this).find(":checkbox.newinputcheck").attr("checked")){this.reset();
a++;
}});
if(a==0){alert("请至少选中一个表单");
}});
$("#editpostallreset").click(function(){var a=0;
$("div#editinputbox form").each(function(){if($(this).find(":checkbox.newinputcheck").attr("checked")){this.reset();
a++;
}});
if(a==0){alert("请至少选中一个表单");
}});
$("#editpostall").click(function(){var a=0;
$("div#editinputbox form").each(function(){if($(this).find(":checkbox.newinputcheck").attr("checked")){publishrecord(this);
a++;
}});
if(a==0){alert("请至少选中一个表单");
}});
$("#newallcheck").click(function(){$("div#newinputbox :checkbox.newinputcheck").attr("checked",this.checked);
});
$("#editallcheck").click(function(){$("div#editinputbox :checkbox.newinputcheck").attr("checked",this.checked);
});
});
function savedrag(){var b=$("textarea",this).attr("name").split("_");
var c=parseInt($(this).css("width"));
var a=parseInt($(this).css("height"));
e6d22ba8earr[currentoptionval][b[0]][1]=c;
e6d22ba8earr[currentoptionval][b[0]][2]=a;
}function autoadjustsize(){var c=document.getElementById("editright").clientHeight;
var b=parseInt(c*0.4);
var a=document.getElementById("newinputbox").offsetHeight;
if(a>b){$("#newinputbox").css("height",b+"px");
$("#editinputbox").css("height",(c-100-b)+"px");
}else{$("#editinputbox").css("height",(c-100-a)+"px");
}}function handleadjustheight(){var c=document.getElementById("editright").clientHeight;
var b=parseInt(c*0.4);
var a=document.getElementById("newinputbox").offsetHeight;
if(a>b){$("#newinputbox").css("height",b+"px");
$("#editinputbox").css("height",(c-100-b)+"px");
}else{$("#editinputbox").css("height",(c-100-a)+"px");
}}