function setpage(page) {document.getElementById('page').value = page;}
function getpage() {return document.getElementById('page').value;}
function getchapid() {return document.getElementById('chapid').value;}
function getpid() {return document.getElementById('pid').value;}
function getpname() {return document.getElementById('pname').value;}
function getsecimgid() {return document.getElementById('secimgid').value;}
function getsecimgtext() {return document.getElementById('secimgtext').value;}
function gettext() {return document.getElementById('comment_text').value;}
function settext(txt) {document.getElementById('comment_text').value = txt;}
function getvote() {
	$ret = -1;
	if (document.getElementById("comment_vote")) {
		if (document.comForm.comment_vote[0].checked) $ret = 10;
		if (document.comForm.comment_vote[1].checked) $ret = 5;
		if (document.comForm.comment_vote[2].checked) $ret = 0;	
	}
	return $ret;
}
function addComment() { writediv('comstatus', '<img src="/images/loading_16.gif" border="0" alt="Chargement..." title="Chargement..." />&nbsp;Chargement...' );	ajx_add_comment(getpid(), getpname(), getchapid(), getsecimgid(), getsecimgtext(), gettext(), getvote());}
function delComment(comid) { writediv('comstatus', '<img src="/images/loading_16.gif" border="0" alt="Chargement..." title="Chargement..." />&nbsp;Chargement...' );	ajx_del_comment(comid,0); }
function delCommentP(comid) { writediv('comstatus', '<img src="/images/loading_16.gif" border="0" alt="Chargement..." title="Chargement..." />&nbsp;Chargement...' );	ajx_del_comment(comid,1); }
function refreshComments() { writediv('commentsdiv', '<img src="/images/loading_16.gif" border="0" alt="Chargement..." title="Chargement..." />&nbsp;Chargement...' ); ajx_get_comments(getpid(), getchapid(), getpage()); }
function refreshSecimg() { writediv('secImgArea', '<img src="/images/loading_16.gif" border="0" alt="Chargement..." title="Chargement..." />&nbsp;Chargement...' ); ajx_refresh_sec_image(); }
function modComment(pn, cid, st, hid) {ajx_mod_comment(pn, cid, st); }
