/*

  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 startXMLHTTP(){if(window.XMLHttpRequest){var req=new XMLHttpRequest()}else if(window.ActiveXObject){var req=new ActiveXObject("Microsoft.XMLHTTP")}else{var req=false}return req};function getSelected(which){return document.getElementById(which).options[document.getElementById(which).selectedIndex].value};function getSID(){return window.top.sName+"="+window.top.sID};function popup(mypage,myname,w,h,scroll){LeftPosition=(screen.width)?(screen.width-w)/2:0;TopPosition=(screen.height)?((screen.height-h)/2)-20:0;var settings="height="+h+",width="+w+",top="+TopPosition+",left="+LeftPosition+",scrollbars="+scroll+",resizable=1,toolbar=0,location=0,statusbar=0,menubar=0";window.open(mypage,myname,settings)};function nfo(profileID){popup("/popup/profile/?ID="+profileID,"popup",600,480,"no")};function moveresize(w,h){LeftPosition=(screen.width)?(screen.width-w)/2:0;TopPosition=(screen.height)?(screen.height-h)/2:0;top.moveTo(LeftPosition,TopPosition);top.resizeTo(w,h)};function reloadFrameset(){top.document.location.reload()};function bookmark(url,description){if(navigator.appName=="Microsoft Internet Explorer"){window.external.AddFavorite(url,description)}else if(navigator.appName=="Netscape"){netscape="First push OK and then hit CTRL+D to add a bookmark to this site.";alert(netscape)}};function loadinarticleframe(URL){if(window.top.document.frames["readerFrame"].document.frames["articleFrame"]){if(window.top.document.frames["readerFrame"].document.frames["articleFrame"].document.frames["article"]){window.top.document.frames["readerFrame"].document.frames["articleFrame"].document.frames["article"].document.location=URL}else{window.top.document.frames["readerFrame"].document.frames["articleFrame"].document.location="/frame_article.php?URL="+escape(URL)}}else{window.top.document.frames["readerFrame"].document.location="frame_reader.php?URL="+escape(URL)}};function rateArticle(groupID,articleID,rating){var xmlhttp=startXMLHTTP();if(xmlhttp){xmlhttp.open("GET","/function.php?gID="+groupID+"&ID="+articleID+"&f=rate&rating="+rating,true);xmlhttp.send(null)}else{window.top.frames["loader"].document.location="/function.php?gID="+groupID+"&ID="+articleID+"&f=rate&rating="+rating}};function spamArticle(groupID,articleID,spam){var xmlhttp=startXMLHTTP();if(xmlhttp){xmlhttp.open("GET","/function.php?gID="+groupID+"&ID="+articleID+"&f=spam&rating="+spam,true);xmlhttp.send(null)}else{window.top.frames["loader"].document.location="/function.php?gID="+groupID+"&ID="+articleID+"&f=spam&rating="+spam}};function markThreadRead(groupID,threadID){var xmlhttp=startXMLHTTP();if(xmlhttp){xmlhttp.open("GET","/function.php?gID="+groupID+"&tID="+threadID+"&f=markread",true);xmlhttp.send(null)}else{window.top.frames["loader"].document.location="/function.php?gID="+groupID+"&tID="+threadID+"&f=markread"}};function markAllRead(groupID){if(confirm("Are you SURE you want to mark EVERY article in this group as read?\n\nNote: You will not be able to undo this function!")){var xmlhttp=startXMLHTTP();if(xmlhttp){xmlhttp.open("GET","/function.php?gID="+groupID+"&f=markallread",true);xmlhttp.send(null)}else{window.top.frames["loader"].document.location="/function.php?gID="+groupID+"&f=markallread"}return true}else{return false}};function groupFav(groupID,groupname){if(document.getElementById("gf"+groupID).className=="fav"){document.getElementById("gf"+groupID).className="blank";document.getElementById("gf"+groupID).src="/b.gif";var fav=0}else{document.getElementById("gf"+groupID).className="fav";document.getElementById("gf"+groupID).src="/f.gif";var fav=1}var xmlhttp=startXMLHTTP();if(xmlhttp){xmlhttp.open("GET","/function.php?gID="+groupID+"&f=gfav&fav="+fav,true);xmlhttp.send(null)}else{window.top.frames["loader"].document.location="/function.php?gID="+groupID+"&f=gfav&fav="+fav}alert(groupname+" has been "+(fav==1?"added to":"removed from")+" your group list.\n\nNote: you will need to refresh the grouplist to view the updated list.")};function showQuotes(){var spans=window.document.getElementsByTagName("span");for(i=0;i<spans.length;i++){if(spans[i].className.substring(0,3)=="lvl"){spans[i].style.display="block"}}var hrefs=window.document.getElementsByTagName("a");for(i=0;i<hrefs.length;i++){if(hrefs[i].className.substring(0,3)=="lvl"){hrefs[i].style.display="none"}}};function PMcount(count){if(window.top.document.getElementById("pm")){if(count==0){if(window.top.document.getElementById("pm").className=="pmnew"){window.top.document.getElementById("pm").className="pm"}}else{if(window.top.document.getElementById("pm").className=="pm"){window.top.document.getElementById("pm").className="pmnew"}}}};function showSearch(){if(window.top.frames["readerFrame"].frames["threadFrame"]){window.top.frames["readerFrame"].frames["threadFrame"].document.getElementById("searchRow").style.display="";window.top.frames["readerFrame"].frames["threadFrame"].document.getElementById("subject").focus()}else{alert("Please select a group first before searching.")}};function checkKey(e){if((window.top.keySet)&&(window.top.keyEnabled)){var key=(window.Event)?e.which:event.keyCode;var shiftdown=(window.Event)?e.shiftKey:event.shiftKey;if(key==16)return false;if(!shiftdown){var key=String.fromCharCode(key);key=key.toLowerCase();key=key.charCodeAt(0)}switch(key){case 0:return true;break;case window.top.keySet[0]:window.top.frames["readerFrame"].document.location="/f/grouplist/group+list/";break;case window.top.keySet[1]:window.top.frames["readerFrame"].document.location="/0/?fav=1";break;case window.top.keySet[2]:window.top.keyFirstMsg();break;case window.top.keySet[3]:window.top.keyPrevMsg();break;case window.top.keySet[4]:window.top.keyNextMsg();break;case window.top.keySet[5]:window.top.keyNextUnreadMsg();break;case window.top.keySet[6]:window.top.keyPrevThread();break;case window.top.keySet[7]:window.top.keyNextThread();break;case window.top.keySet[8]:window.top.keyMarkRead();break;case window.top.keySet[9]:window.top.keyPrevPage();break;case window.top.keySet[10]:window.top.keyNextPage();break;case window.top.keySet[11]:window.top.showSearch();return false;break;case window.top.keySet[12]:window.top.keyPost();break;case window.top.keySet[13]:window.top.keyReply();break;case window.top.keySet[14]:window.top.keyToggleThreads();break;case window.top.keySet[15]:window.top.keyRefresh();break;case window.top.keySet[16]:window.top.keyMarkAllRead();break;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:if(window.top.keyGroups){if(window.top.keyGroups.length>(key-49)){window.top.frames["readerFrame"].document.location="/"+(window.top.keyGroups[key-49])+"/"}}break}}return true};if(navigator.userAgent.indexOf("Safari")==-1){if(window.Event)document.captureEvents(Event.KEYPRESS);document.onkeypress=checkKey}else{window.top.document.onkeyup=checkKey}window.top.keyEnabled=true;
