function setCooky(n,v){var yr=new Date(today.getTime()+365*24*60*60*1000); document.cookie=n+'='+escape(v)+';expires='+yr.toGMTString()+'; path=/'} function getCooky(n){var k=n+'=';var c=document.cookie;var i=c.indexOf(k); if(i<0) return ''; var j=c.indexOf(';',i+k.length); if(j<0) j=c.length; return unescape(c.substring(i+k.length,j))} function saveCmtfields(f){setCooky('ntuser',f.name.value);setCooky('ntemail',f.email.value);setCooky('nturl',f.url.value)} function makeRss(f){ clearSubj='Comment:'+f.subject.value.replace(/<\/?[^>]*>/ig,"") rssbody=f.body.value.replace(/<\/?[^>]*>/ig,"") rhost='http://'+location.host; ruri=rhost+'/contentbypermalink/'+_permalink; rcnt=rssbody.replace(/\n/ig,"
") v='\n'+ '<![CDATA['+clearSubj+']]>\n'+ ''+ruri+'#commentArea\n'+ ''+ruri+'#'+(new Date().getTime())+'\n'+ '‹full story›]]>\n'+ ''+f.name.value+'\n'+ ''+timemode(new Date(),'gmt','r')+'\n'+ ''; f.rssbody.value=v } function postComment(f,v){ makeRss(f) if(v){var a=new Array(); a[a.length]=[f.name,'您的姓名'];a[a.length]=[f.email,'您的電郵',['email']];a[a.length]=[f.body,'您的回應內容']; if(validateRequiredFields(f,a)){return true}else{return false}}else{return true}} function textCounter(f,l){if(f.value.length>l) f.value=f.value.substring(0,l)} function chkURL(f){chk=f.value.split('://').length; if(chk==1){f.value='http://'+f.value} else if(chk>2){f.value='http://'+f.value.split('://')[chk-1]}else{ return true}} function extEditor(){var f='_commenteditor';df='document.forms[\''+f+'\']'; var ed='
' ed+='
<' ed+='script src=include_valid.php>' ed+='
'+profilestr['postcommenttitle']+'

'+profilestr['postcommentname']+' 
'+profilestr['postcommentemail']+' 
'+profilestr['postcommenturl']+' 
'+profilestr['postcommentbody']+'  | '+profilestr['postcommentbodyalert']+'

' ed+='' ed+='' ed+='' ed+=(!isie)?'':'' ed+='
'; dw(ed)} extEditor()