
pagelink = 0;
if (location.hash == '0'){//#0は外す
 location.href = location.href.split("#")[0];
}
function checkNavigation(e){
 if (!e) var e = window.event
 if (e.keyCode) code = e.keyCode;
 else if (e.which) code = e.which;
 if ((code == 104 || code == 69 || code==38)  && pagelink > 0) { pagelink--;location.hash = pagelink; return 0;}
 if ((code == 98 || code == 88 || code==40)  && pagelink < 10) { pagelink++;location.hash = pagelink; return 0;}
 if ((code == 100 || code == 83 || code==37) && !is_first) { location.href = prev_url; return false;}
 if ((code == 102 || code == 68 || code==39) && !is_last) { location.href = next_url; return false;}
 if (code == 84) { location.href = first_url;}
}
window.document.onkeydown = checkNavigation;

function invalidate_moderation(req, oid, type) {
 var target = 'mod_' + oid;
 if(document.all){
  document.all(target).innerHTML = thanks_message;
 } else if(document.getElementById){
  document.getElementById(target).innerHTML = thanks_message;
  document.getElementById(target).style.color = 'gray';
 }
 nd();
}
function moderate(oid, type) {
 AjaxRequest.post(
  {
    'url':moderation_url,
    'parameters':{ 'oid':oid, 'report':type },
    'onSuccess':function(req) { invalidate_moderation(req, oid, type); }
  }
 );
}
