function coolOpen(cid) { xmlhttpPost('/common/ajax.cool.open', function(r) { }, 'cid=' + cid); }
function commentSend(f, t, ti) {
	if (!f.comment) return; f.comment.value = f.comment.value.trim();
	if (f.comment.value == '') { f.comment.focus(); return; } //验证评论是否填写
	f.checkcode.value = f.checkcode.value.trim(); if (f.checkcode.value == '') { f.checkcode.focus(); return; } else if (!/^\d{5}$/.test(f.checkcode.value)) { alert('数字码填写有误！'); f.checkcode.value = ''; f.checkcode.focus(); return; } //验证数字码
	if (f.comment.value.length > 1000) { alert('评论内容应在1000字符内。'); return; }
	xmlhttpPost('/common/ajax.cool.cmt.post', function(r) { if (r == '') alert('评论失败，提交参数有误！'); else if (r == 'ECC') { alert('数字码填写有误！'); if (f.checkcode) { f.checkcode.value = ''; f.checkcode.focus(); } checkcodeRefresh('ccCMT'); } else if (r == 'FLD') alert('评论失败，写入数据库出现错误！'); else if (r == 'SUC') { f.comment.value = ''; if (f.checkcode) f.checkcode.value = ''; alert('您的评论已成功提交，感谢参与。'); if (typeof presentCmt == 'function') presentCmt(0); } }, 'ti=' + ti + '&d=' + Escape(f.comment.value) + '&cc=' + Escape(f.checkcode.value));
}

function votePosition(t, tid, p) { xmlhttpPost('/common/ajax.vote.position', function(r) { if (r == 'SUC') alert('您已成功完成投票，感谢您的参与！'); else if (r == 'EXT') alert('您已参与过投票，不能重复提交。'); }, 't=' + t + '&tid=' + tid + '&p=' + p.toString()); }

function favAdd(tid) { xmlhttpPost('/common/ajax.user.fav.addnew', function(r) { if (r == 'SUC') alert('已成功添加到收藏夹！'); else if (r == 'FLD') alert('通讯错误,请稍候重新尝试..！'); else alert('收藏失败，提交参数有误！') }, 'tid=' + tid); }

