function itemSubmit(op,id,nParentId,jid){
	form = document.getElementById("commentForm"+id);
	form.elements["op"].value=op;
	form.elements["id"].value=id;
	if(!(nParentId>0)) nParentId=0;
	form.action = itp_url+"/modules/clubs/item.php?parentId="+nParentId;
	form.submit();
}
function mainSubmit($op,$jid){
	$form = document.getElementById("jitemForm"+$jid);
	$form.elements["op"].value=$op;
	$form.action = itp_url+"/modules/clubs/journal.php?jid="+$jid;
	$form.submit();
}
function jFixFloatPar(s){
	if(s.parentNode.clientHeight < s.height){
		s.parentNode.style.height = s.height+"px";
	}
	if(s.width>s.heigth){ s.width=100; }else{ s.heigth=100; }
}

function commentsOrderToggle(jid,nParentId){
	var action=(nParentId==0)?('/jpost.'+jid+'.html'):('/jcomment.'+nParentId+'.html');
	var form=
		Builder.node('form',{'action':itp_url+action+'#jheader','method':'post'},[
			Builder.node('input',{'type':'hidden','name':'op','value':'cordertoggle'}),
			Builder.node('input',{'type':'hidden','name':'jid','value':jid}),
			Builder.node('input',{'type':'hidden','name':'parentId','value':nParentId})
	]);
	document.body.appendChild(form);
	form.submit();
}