﻿var HMComment={listLayer:null,formLayer:null,loading:"Loading..",getList:function(p0,p1){this.listLayer=p1;HMgetElement(p1).innerHTML=this.loading;HMrequestText(this.getUrl("&action=list&page="+p0),null,p1,0)},getForm:function(p0){this.formLayer=p0;HMgetElement(p0).innerHTML=this.loading;HMrequestText(this.getUrl("&action=put"),null,p0,0)},submit:function(p0,p1){var f=new HMForm(p0,true),obj=HMgetElement(p1),gv=f.getValue,d="code="+gv("CommentCode")+"&title="+gv("CommentTitle")+"&content="+gv("CommentContent")+"&mark="+gv("CommentMark");f.getForm().onsubmit=function(){return false};obj.innerHTML=this.loading;HMrequestText(this.getUrl("&action=put&do=dispose"),d,function(t){if(HMisNone(t)){HMrequestText(HMComment.getUrl("&action=greeting"),null,HMComment.formLayer,0);if(HMComment.listLayer)HMComment.getList(1,HMComment.listLayer)}else{obj.innerHTML=t;HMLoadCode()}},1)},getUrl:function(p0){return HMSITEROOT+"core/HMComment.asp?channel="+HMChannelId+"&data="+HMDataId+p0+"&"+Math.random()}}