/*

  Hi there!  Thanks for taking an interest in my sourcecode.  If you have
  any questions about the inner-workings of recgroups, you can email me at
  talisto [at] gmail.com.  But, please, don't steal my hard work.


                      Here's the obligatory legal-ese:

  This website is Copyright (c) 2004 recgroups.com.  All Rights Reserved.

  Except as required for client functionality, no part of this site may be
  downloaded, reproduced, modified, used to create derivative works, or
  transmitted in any form or by any means, except as permitted under Section
  107 of the 1976 U.S. Copyright Act. Visitors will not attempt to reverse
  engineer, disassemble, decompose, amend or modify or similarly manipulate
  all or any portion of recgroups.com.
































*/

function getThreadFrame(){if(window.top.frames["readerFrame"].frames["threadFrame"]){return window.top.frames["readerFrame"].frames["threadFrame"]}else{return false}};function getThreadList(){var threadFrame=getThreadFrame();if(!threadFrame)return false;if(threadFrame.frames["threadList"]){return threadFrame.frames["threadList"]}else{return false}};function keyRefresh(){var threadFrame=getThreadFrame();if(!threadFrame)return false;threadFrame.document.location.reload()};function keyToggleThreads(){var threadFrame=getThreadFrame();if(!threadFrame)return false;threadFrame.toggleThreads()};function keyPrevMsg(){var threadList=getThreadList();if(!threadList)return false;if(threadList.cmsgID!=0){if(threadList.cmsgID.previousSibling){var lastRow=threadList.cmsgID.previousSibling;while((lastRow.className!="vis")&&(lastRow.className!="non")&&(lastRow.previousSibling)){lastRow=lastRow.previousSibling}if(!lastRow.previousSibling)return false;if(lastRow){if(lastRow.getAttribute("t"))threadList.t(threadList.document.getElementById("t"+lastRow.getAttribute("t")),"vis");threadList.a(lastRow,1);threadList.scrollBy(0,-16)}}}else{keyFirstMsg()}return false};function keyNextMsg(){var threadList=getThreadList();if(!threadList)return false;if(threadList.cmsgID!=0){if(threadList.cmsgID.nextSibling){var nextRow=threadList.cmsgID.nextSibling;while((nextRow.className!="vis")&&(nextRow.className!="non")&&(nextRow.nextSibling)){nextRow=nextRow.nextSibling}if(nextRow){threadList.t(nextRow);threadList.a(nextRow,1);threadList.scrollBy(0,16)}}}else{keyFirstMsg()}};function keyNextUnreadMsg(){var counter=1;var threadList=getThreadList();if(!threadList)return false;if(threadList.cmsgID==0){var nextRow=threadList.find_first_msg();nextRow=nextRow.previousSibling;threadList.scrollTo(0,0)}else var nextRow=threadList.cmsgID;while(nextRow.nextSibling){nextRow=nextRow.nextSibling;if((!nextRow.getAttribute)&&(nextRow.nextSibling))nextRow=nextRow.nextSibling;if(!nextRow.getAttribute){alert("there are no more unread messages on this page.");return false}if((nextRow.getAttribute("p"))&&(nextRow.getAttribute("r")!="1")){if(nextRow.getAttribute("t"))threadList.t(threadList.document.getElementById("t"+nextRow.getAttribute("t")),"vis",1);threadList.a(nextRow,1);var rowCount=(threadList.count_rows(nextRow,"vis")*16)-80;if(rowCount<0)rowCount=0;threadList.scrollTo(0,rowCount);return false}}alert("there are no more unread messages on this page.");return true};function keyPrevThread(){var counter=1;var threadList=getThreadList();if(!threadList)return false;if(threadList.cmsgID==0){var prevRow=threadList.find_first_msg();threadList.scrollTo(0,0)}else var prevRow=threadList.cmsgID;while(prevRow.previousSibling){prevRow=prevRow.previousSibling;if((!prevRow.getAttribute)&&(prevRow.previousSibling))prevRow=prevRow.previousSibling;if(prevRow.className=="header-row")return false;if((prevRow.getAttribute("t"))&&(prevRow.getAttribute("p")=="t0")){threadList.t(threadList.document.getElementById("t"+prevRow.getAttribute("t")),"vis",1);threadList.a(prevRow,1);threadList.scrollBy(0,-(16*counter));return false}if(prevRow.className=="vis")counter=counter+1}return true};function keyNextThread(){var counter=1;var threadList=getThreadList();if(!threadList)return false;if(threadList.cmsgID==0){var nextRow=threadList.find_first_msg();threadList.scrollTo(0,0)}else var nextRow=threadList.cmsgID;while(nextRow.nextSibling){nextRow=nextRow.nextSibling;if((!nextRow.getAttribute)&&(nextRow.nextSibling))nextRow=nextRow.nextSibling;if(!nextRow.getAttribute)return false;if((nextRow.getAttribute("t"))&&(nextRow.getAttribute("p")=="t0")){threadList.t(threadList.document.getElementById("t"+nextRow.getAttribute("t")),"vis",1);threadList.a(nextRow,1);threadList.scrollBy(0,(16*counter));return false}if(nextRow.className=="vis")counter=counter+1}return true};function keyFirstMsg(){var threadList=getThreadList();if(!threadList)return false;firstRow=threadList.find_first_msg();if(firstRow){threadList.t(firstRow);threadList.a(firstRow,1);threadList.scrollTo(0,0)}};function keyPrevPage(){var threadFrame=getThreadFrame();if(!threadFrame)return false;if(threadFrame.curPage==1)return false;threadFrame.reloadThreads(window.top.gID,threadFrame.curPage-1)};function keyNextPage(){var threadFrame=getThreadFrame();if(!threadFrame)return false;if(threadFrame.curPage==threadFrame.totalPages)return false;threadFrame.reloadThreads(window.top.gID,threadFrame.curPage+1)};function keyMarkRead(){var threadList=getThreadList();if(!threadList)return false;if(threadList.cmsgID==0)return false;if(window.top.gID==0)var groupID=threadList.cmsgID.getAttribute("g");else var groupID=window.top.gID;var articleID=threadList.cmsgID.getAttribute("id").substring(1,threadList.cmsgID.getAttribute("id").length);threadList.markThreadRead(groupID,articleID);threadList.set_all_read(threadList.cmsgID.getAttribute("t"))};function keyMarkAllRead(){var threadList=getThreadList();if(!threadList)return false;if(window.top.gID==0)var groupID=threadList.cmsgID.getAttribute("g");else var groupID=window.top.gID;if(threadList.markAllRead(groupID)){setTimeout("var threadFrame = getThreadFrame();threadFrame.document.location.reload()",250)}};function keyPost(){window.top.popup("/popup/post?gID="+window.top.gID+"&"+window.top.getSID(),"popup",770,555,"yes")};function keyReply(){var threadList=getThreadList();if(!threadList)return false;if(threadList.cmsgID==0)return false;var aID=threadList.cmsgID.getAttribute("id").substring(1,threadList.cmsgID.getAttribute("id").length);window.top.popup("/popup/post?gID="+window.top.gID+"&ID="+aID+"&"+window.top.getSID(),"popup",770,565,"yes")};
