/**
 * onArcade 2.2.0
 * Copyright © 2006-2009 Hans Mäesalu & Eveterm OÜ, All Rights Reserved
 **/
function show(id){if(doc_id(id).style.display=="none")doc_id(id).style.display="block";else doc_id(id).style.display="none";}function field_number(field_id){return parseInt(field_id.replace(/[a-z_]/g,""));}function submit_value(url,form,field,value){doc_id(form.id+"_submit").disabled=true;id=field_number(form.id);function back_function(server_r){form.innerHTML=server_r.value;form.onclick=form.save_action;}makeHttpRequest("ajax.php?a="+url,back_function, true,"id="+id+"&field="+field+"&value="+value);}function edit_comment(comment){var comment_id=parseInt(comment.id.substr(8,comment.id.length));comment.save_action=comment.onclick;comment.onclick="";var width=comment.offsetWidth;var height=comment.offsetHeight;comment.innerHTML=loader;function back_function(server_r){comment.innerHTML='<textarea id="'+comment.id+'_field" style="width: '+width+'px; height: '+height+'px;">'+server_r.comment+'</textarea> <button id="'+comment.id+'_submit">'+submit_button+'</button>';doc_id(comment.id+"_submit").onclick=function(){submit_comment_value(comment_id,comment,doc_id(comment.id+"_field").value);return false;};comment.firstChild.focus();}makeHttpRequest("ajax.php?a=comment_text&c="+comment_id,back_function, true);}function submit_comment_value(comment_id,form,value){doc_id(form.id+"_submit").disabled=true;function back_function(server_r){form.innerHTML=nl2br(server_r.comment);form.onclick=form.save_action;}makeHttpRequest("ajax.php?a=submit_comment",back_function, true,"id="+comment_id+"&comment="+value);}
