
 /* 1351:minified:js/lt_utility.js */ 

if(!LibraryThing){var LibraryThing={};}
{LibraryThing.version='1.0';LibraryThing.gCookieName='LTUnifiedCookie';LibraryThing.K=function(x){return x;};LibraryThing.time=function()
{return parseInt(new Date().getTime().toString().substring(0,10))};LibraryThing.setCookie=function(c_name,c_value)
{var cookieObj=LibraryThing.getCookieObject();cookieObj[c_name]=c_value;LibraryThing.setCookieObject(cookieObj);};LibraryThing.getCookie=function(c_name)
{var cookieObj=LibraryThing.getCookieObject();return cookieObj[c_name];};LibraryThing.cookieEvalTest=function(c_name,c_val)
{var blech=new Object;blech[c_name]=c_val;alert(blech[c_name]);};LibraryThing.getCookieObject=function()
{var cookieObject;var cookieJSON='';if(document.cookie.length>0)
{c_start=document.cookie.indexOf(LibraryThing.gCookieName+"=");if(c_start!=-1)
{c_start=c_start+LibraryThing.gCookieName.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;cookieJSON=(document.cookie.substring(c_start,c_end));cookieObject=unescape(cookieJSON).evalJSON();return cookieObject;}
else
{return new Object;}}
else
{return new Object;}};LibraryThing.setCookieObject=function(cookieObject)
{var cookieVal=Object.toJSON(cookieObject);var expiredays=365;var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=LibraryThing.gCookieName+"="+escape(cookieVal)+
((expiredays==null)?"":";expires="+exdate.toGMTString())+';path=/';};LibraryThing.setCookie=function(c_name,c_value)
{var cookieObj=LibraryThing.getCookieObject();cookieObj[c_name]=c_value;LibraryThing.setCookieObject(cookieObj);};LibraryThing.ltGetCookie=function(c_name)
{return LibraryThing.getCookie(c_name);};LibraryThing.ltSetCookie=function(c_name,c_value)
{LibraryThing.setCookie(c_name,c_value);};LibraryThing.killCookie=function(c_name)
{return LibraryThing.ltKillCookie(c_name);};LibraryThing.ltKillCookie=function(c_name)
{var cookieObj=LibraryThing.getCookieObject();delete cookieObj[c_name];LibraryThing.setCookieObject(cookieObj);};LibraryThing.addValueToCookie=function(c_name,value)
{var cookieObj=LibraryThing.getCookieObject();var theCookie=cookieObj[c_name];theCookie.push(value);LibraryThing.setCookieObject(LT_array_unique(theCookie));};LibraryThing.removeValueFromCookie=function(c_name,value)
{var cookieObj=LibraryThing.getCookieObject();var theCookie=cookieObj[c_name];var theindex=LT_in_array(value,theCookie)
theCookie.splice(1,theindex);LibraryThing.setCookieObject(theCookie);};LibraryThing.setLocalTimeOffset=function()
{var ldate=new Date();var offset=ldate.getTimezoneOffset()*-1;var lstring=ldate.toLocaleString();LibraryThing.ltSetCookie('localTimeOffset',offset);};LibraryThing.returnFalse=function()
{return false;};LibraryThing.setSessionData=function(key,value,sync)
{var url='/ajax_setSessionData.php';var params={key:key,value:value};var response=function(t){};if(sync)
{basic_ajax_sync(url,params,response);}
else
{basic_ajax(url,params,response);}}
LibraryThing.getSessionData=function(key)
{var url='/ajax_getSessionData.php';var params={key:key};var response=function(t){var rt=t.responseText;};basic_ajax(url,params,response);}
LibraryThing.deferedJS=function(url)
{var scriptElem=document.createElement('script');scriptElem.src=url;document.getElementsByTagName('head')[0].appendChild(scriptElem);}}
function LT_findObj(objectId)
{if(document.getElementById&&document.getElementById(objectId))
{return document.getElementById(objectId);}
else if(document.all&&document.all(objectId))
{return document.all(objectId);}
else if(document.layers&&document.layers[objectId])
{return document.layers[objectId];}
return false;}
function cloneObject(obj)
{for(i in obj)
{this[i]=obj[i];}}
function eventTrigger(e){if(!e)
e=event;if(!e)
e=window.event;if(e.target)
return e.target;if(e.srcElement)
return e.srcElement;else
return 0;}
function validEvent(e){if(!e)
e=event;if(!e)
e=window.event;if(e==null)
return null;return e;}
function validateEvent(e){return validEvent(e);}
function nilEvent(){return;}
function LT_changeClass(object,className)
{object.className=className;}
function printfire(text){console.log(text);}
var expireDate=new Date(2050,10,23);function cookieVal(cookieName)
{thisCookie=document.cookie.split("; ")
for(i=0;i<thisCookie.length;i++)
{if(cookieName==thisCookie[i].split("=")[0])
{return thisCookie[i].split("=")[1]}}
return 0;}
function setCookie(cookieName,cookieContent,transientBoolean)
{var expireDate=new Date(2050,10,23);if(transientBoolean)
document.cookie=cookieName+"="+cookieContent;else
document.cookie=cookieName+"="+cookieContent+";expires="+expireDate.toGMTString()+";path=/";}
function getCookie(name){return cookieVal(name);}
function mouseX(evt){if(evt.pageX)return evt.pageX;else if(evt.clientX)
return evt.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);else return null;}
function getCookieAjax(name)
{var uid=LT_GetRandomID(5);var url="/ajax_getCookie.php";var params={c:name,uid:uid};var responseFunction=function(t)
{return t.responseText;};basic_ajax(url,params,responseFunction);}
function setCookieAjax(name,value)
{var uid=LT_GetRandomID(5);var url="/ajax_setCookie.php";var params={cookiename:name,value:value,uid:uid};var responseFunction=function(t)
{return t.responseText;};basic_ajax_sync(url,params,responseFunction);}
function SmartCookieHandler(){this.setCookie=function(name,value,seconds){if(typeof(seconds)!='undefined'){var date=new Date();date.setTime(date.getTime()+(seconds*1000));var expires="; expires="+date.toGMTString();}
else{var expires="";}
document.cookie=name+"="+value+expires+"; path=/";}
this.getCookie=function(name){name=name+"=";var carray=document.cookie.split(';');for(var i=0;i<carray.length;i++){var c=carray[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(name)==0)return c.substring(name.length,c.length);}
return null;}
this.deleteCookie=function(name){this.setCookie(name,"",-1);}}
function mouseY(evt){if(evt.pageY)return evt.pageY;else if(evt.clientY)
return evt.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);else return null;}
var hD="0123456789ABCDEF";function d2h(d){var h=hD.substr(d&15,1);while(d>15){d>>=4;h=hD.substr(d&15,1)+h;}
return h;}
function h2d(h){return parseInt(h,16);}
function pad(number,length){var str=''+number;while(str.length<length)
str='0'+str;return str;}
function getRandomNumber(range)
{return Math.floor(Math.random()*range);}
function getRandomChar()
{var chars="0123456789abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ";return chars.substr(getRandomNumber(62),1);}
function LT_GetRandomID(size)
{var str="";for(var i=0;i<size;i++)
{str+=getRandomChar();}
return str;}
function parseGetVars(){var getVars=location.search.substring(1).split("&");var returnVars=new Array();var i;for(i=0;i<getVars.length;i++){var newVar=getVars[i].split("=");var myvar=new Array();myvar['key']=unescape(newVar[0]);myvar['value']=unescape(newVar[1]);returnVars[i]=myvar;}
return returnVars;}
function LT_preloadImages(){var d=document;if(d.images)
{if(!d.MM_p)
d.MM_p=new Array();var i,j=d.MM_p.length;var a=LT_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0)
{d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function getElementsByClassName(oElm,strTagName,oClassNames){try{var arrElements=(strTagName=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(strTagName);var arrReturnElements=new Array();var arrRegExpClassNames=new Array();if(typeof oClassNames=="object"){for(var i=0;i<oClassNames.length;i++){arrRegExpClassNames.push(new RegExp("(^|\\s)"+oClassNames[i].replace(/\-/g,"\\-")+"(\\s|$)"));}}
else{arrRegExpClassNames.push(new RegExp("(^|\\s)"+oClassNames.replace(/\-/g,"\\-")+"(\\s|$)"));}
var oElement;var bMatchesAll;for(var j=0;j<arrElements.length;j++){oElement=arrElements[j];bMatchesAll=true;for(var k=0;k<arrRegExpClassNames.length;k++){if(!arrRegExpClassNames[k].test(oElement.className)){bMatchesAll=false;break;}}
if(bMatchesAll){arrReturnElements.push(oElement);}}
return(arrReturnElements)}
catch(e){return null;}}
function isbnCheck(input)
{regex=/^[0-9]{9,12}[0-9,x]$/i;if(regex.exec(input))
{var prod=0;var pieces=input.split('');if((pieces.length!=13)&&(pieces.length!=10))
return'badisbn';if(pieces.length==13)
{var prefix=input.substr(0,3);if((prefix=='978')||(prefix=='979'))
pieces=pieces.slice(3);else
return'badisbn';}
for(var i=0;i<pieces.length-1;i++)
{var num=parseInt(pieces[i]);prod+=(num*(i+1));}
prod=prod%11;var nm=pieces[pieces.length-1];if((nm=='x')||(nm=='X'))
nm=10;prod=prod;if(prod==nm)
return'goodisbn';else
return'badisbn';}
return'notanisbn';}
function LT_array_unique(array){var key='',tmp_arr1={},tmp_arr2={};var val='';tmp_arr1=array;var __array_search=function(needle,haystack,strict){var fkey='';var strict=!!strict;for(fkey in haystack){if((strict&&haystack[fkey]===needle)||(!strict&&haystack[fkey]==needle)){return fkey;}}
return false;}
for(key in tmp_arr1){val=tmp_arr1[key];if(false===__array_search(val,tmp_arr2)){tmp_arr2[key]=val;}
delete tmp_arr1[key];}
return tmp_arr2;}
function LT_in_array(needle,haystack,strict){var found=false,key,strict=!!strict;for(key in haystack){if((strict&&haystack[key]===needle)||(!strict&&haystack[key]==needle)){found=key;break;}}
return found;}
function initMouseOvers(parentObject,childType,targetClass,mouseOverClass,mouseOutClass,includeAllBrowsers)
{var ievc=function(){var version=999;if(navigator.appVersion.indexOf("MSIE")!=-1)
version=parseFloat(navigator.appVersion.split("MSIE")[1]);return version;};var iev=ievc();if(((Prototype.Browser.IE)&&(iev<8))||(Prototype.Browser.Opera)||(includeAllBrowsers))
{if(!document.getElementById||!document.getElementsByTagName||!document.body.style){return;}
try{var objects=getElementsByClassName(parentObject,childType,targetClass);var o,i=objects.length;while(i--)
{o=objects[i];o.onmouseover=function(){LT_changeClass(this,mouseOverClass);}
o.onmouseout=function(){LT_changeClass(this,mouseOutClass);}}}
catch(e){}}}
function getTopDocument(element)
{var childElement=element;var parentElement=childElement.parentNode;var theTop=null;if(parentElement!==null)
{return getTopDocument(parentElement);}
else
{if(window.parent===window.self)
{return window;}
else
{return window.parent;}}
return theTop.document;} 
 /* 1351:minified:js2/menuBuilder.js */ 

LibraryThing=LibraryThing||{};LibraryThing.menuBuilder={};var menuBuilder=LibraryThing.menuBuilder;menuBuilder.openMenus=[];menuBuilder.knownMenus=[];menuBuilder.problemMenus=[];var menuBuilderCSSFile='/css/menuBuilder.css';menuBuilder.initMenu=function(menuID,containerID)
{var container=$(containerID);if(container)
{if(!LibraryThing.menuBuilder.knownMenus[menuID]){LibraryThing.menuBuilder.knownMenus[menuID]=containerID;container.style.cursor='pointer';Event.observe(container,'click',function(event){LibraryThing.menuBuilder.openMenu(event,menuID,containerID);});}}
else
{this.problemMenus[menuID]=containerID;}
Event.observe(window,'load',function(){LibraryThing.menuBuilder.handleRolloversForIE(menuID,containerID);});};menuBuilder.handleRolloversForIE=function(menuID,containerID)
{var agt=navigator.userAgent.toLowerCase();var msie=agt.indexOf("msie");if((msie!=-1)&&(agt.indexOf("opera")==-1))
{var menu=$(menuID);if(menu){var ci=menu.childElements();var cnl=ci.length;for(i=0;i<cnl;i++)
{var node=$(ci[i]);if(!node.hasClassName('menuBuilderMenuItemSeparator'))
{node.onmouseover=function(){this.toggleClassName('over');};node.onmouseout=function(){this.toggleClassName('over');};}}}}};menuBuilder.openMenu=function(e,menuID,containerID)
{var agt=navigator.userAgent.toLowerCase();var msie=agt.indexOf("msie");var ie6=false;var ie7=false;var ie8=false;var ie9=false;var iev=8;if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var iev=new Number(RegExp.$1)
if(iev>=8){ie8=true;}
else if(iev>=7){ie7=true;}
else if(iev>=6){ie6=true;}}
var menu=$(menuID);var container=$(containerID);if(menu.visible())
{LibraryThing.menuBuilder.closeAllMenus(e);return;}
else
{LibraryThing.menuBuilder.closeAllMenus(e);}
if(typeof closetagbox=='function')
{closetagbox();}
Event.stop(e);var anchor;var altanchor=menu.readAttribute('altanchor');if(altanchor)
{anchor=$(altanchor);}
else
{anchor=container;}
anchor.addClassName('ltbtn-activated');var coffset;var usePositionedOffset=true;try{if(anchor.descendantOf('lt_catalog_list'))
{usePositionedOffset=false;}}
catch(e){usePositionedOffset=true;}
if(Prototype.Browser.WebKit||Prototype.Browser.IE||usePositionedOffset)
{coffset=anchor.positionedOffset();}
else
{coffset=anchor.cumulativeOffset();}
var cwidth=anchor.getWidth();var cheight=anchor.getHeight();var cright=coffset.left+cwidth;var cot=coffset.top;var vatt=menu.readAttribute('voffset');var offsetVFromConter=(vatt)?parseInt(vatt,10):0;var top=cheight+cot+offsetVFromConter;var col=coffset.left;var hatt=menu.readAttribute('hoffset');var offsetHFromContainer=(hatt)?parseInt(hatt,10):0;var left=col+offsetHFromContainer;var direction=menu.readAttribute('menuBuilderDirection');if(direction=='right')
{var cwidth=container.offsetWidth;left=left-mwidth+cwidth;}
menu.style.top=top+'px';menu.style.left=left+'px';menu.style.zIndex='501';menu.show();menuBuilder.checkPosition(menuID,containerID);if(menu.visible())
{LibraryThing.menuBuilder.openMenus.push(menuID);}
Event.observe(document,'click',function(event){LibraryThing.menuBuilder.closeAllMenus(event);});};menuBuilder.checkPosition=function(menuID,containerID)
{var ie6=false;var ie7=false;var ie8=false;var ie9=false;var iev=8;if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var iev=new Number(RegExp.$1)
if(iev>=8){ie8=true;}
else if(iev>=7){ie7=true;}
else if(iev>=6){ie6=true;}}
var menu=$(menuID);var container=$(containerID);var winWidth=0,winHeight=0;var workingLeft=0,workingTop=0;if(typeof(window.innerWidth)=='number')
{winWidth=window.innerWidth;winHeight=window.innerHeight;}
else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))
{winWidth=document.documentElement.clientWidth;winHeight=document.documentElement.clientHeight;}
else if(document.body&&(document.body.clientWidth||document.body.clientHeight))
{winWidth=document.body.clientWidth;winHeight=document.body.clientHeight;}
var hatt=parseInt(menu.readAttribute('hoffset'),10);var coffset;var moffset;if(Prototype.Browser.WebKit||Prototype.Browser.IE)
{coffset=container.positionedOffset();moffset=menu.positionedOffset();}
else
{coffset=container.cumulativeOffset();moffset=menu.cumulativeOffset();}
var cright=coffset.left+container.offsetWidth;var ctop=coffset.top;var cheight=container.getHeight();var mwidth=menu.getWidth();var mheight=menu.getHeight();var mleft=menu.offsetLeft;var mright=mleft+mwidth;var moffset=menu.cumulativeOffset();var mbottom=moffset.top+mheight;var scrollOffsets=this.getScrollXY();var currentScroll=winHeight+scrollOffsets.y;var shiftx=0;var shifty=0;if(mright>winWidth)
{shiftx=cright-(mwidth)+hatt;if(iev<7){shiftx=cright-container.getWidth()-(mwidth)+hatt;}
menu.style.left=shiftx+'px';}
var mcs=menu.childElements();var mcs0=mcs[0];shifty=ctop-mheight;if((mbottom>currentScroll)&&(shifty<0))
{menu.addClassName('menuBuilderScrollableMenu');var newheight=(currentScroll-moffset.top-container.getHeight())+'px';menu.setStyle({'height':newheight});}
else if(mbottom>currentScroll)
{menu.style.top=shifty+'px';menu.addClassName('menuBuilderUpMenu');if(mcs0)
{mcs0.addClassName('upMenuFirstChild');}}
else
{if(mcs0)
{mcs0.removeClassName('upMenuFirstChild');}
menu.removeClassName('menuBuilderUpMenu');menu.removeClassName('menuBuilderScrollableMenu');menu.setStyle({'height':'auto'});}}
menuBuilder.getScrollXY=function(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
return{x:scrOfX,y:scrOfY};}
menuBuilder.setPosition=function(menuID,containerID)
{if(typeof(window.innerWidth)=='number')
{winWidth=window.innerWidth;winHeight=window.innerHeight;}
else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))
{winWidth=document.documentElement.clientWidth;winHeight=document.documentElement.clientHeight+20;}
else if(document.body&&(document.body.clientWidth||document.body.clientHeight))
{winWidth=document.body.clientWidth;winHeight=document.body.clientHeight;}}
menuBuilder.closeAllMenus=function(e)
{var el=Event.element(e);if(el)
{if(el.hasClassName('menuBuilderMenuItemDisabled'))
{return;}
var anc=el.ancestors();var ancl=anc.length;for(var x=0;x<ancl;x++)
{var a=anc[x];if(a.hasClassName('ltmenu_view'))
{return;}}}
var blech=1;while(LibraryThing.menuBuilder.openMenus.length)
{var menuID=LibraryThing.menuBuilder.openMenus.shift();LibraryThing.menuBuilder.closeMenu(e,menuID);}};menuBuilder.closeMenu=function(e,menuID)
{var menu=$(menuID);if(menu)
{if(menu.hasClassName('ltmenu_view'))
{this.closeAjaxView(menuID);}
menu.hide();$(LibraryThing.menuBuilder.knownMenus[menuID]).removeClassName('ltbtn-activated');}};menuBuilder.goToURL=function(url,target)
{if(target=='_top')
{window.top.location=url;}
else if(target=='_parent')
{parent.location=url;}
else if(target!=null)
{window[target].location=url;}
else
{window[target].location.href=url;}};menuBuilder.loadAjaxView=function(url,containerID,params)
{var container=$(containerID);if(container)
{if(container.visible())
{var responseFunction=function(t)
{var r=t.responseText;if(r!='0')
{container.innerHTML=r;r.evalScripts();}}
container.innerHTML='<div style="padding:5px 10px;">Loading...</div>';basic_ajax(url,params,responseFunction);}
else
{container.innerHTML='';}}}
menuBuilder.closeAjaxView=function(containerID)
{var container=$(containerID);if(container)
{container.innerHTML='';}}
menuBuilder.enableButton=function(button){var b=$(button);if(b){b.removeClassName('ltbtn-disabled');}}
menuBuilder.disableButton=function(button){var b=$(button);if(b){b.addClassName('ltbtn-disabled');}}
menuBuilder.selectButton=function(button){var b=$(button);if(b){b.addClassName('ltbtn-selected');}}
menuBuilder.unselectButton=function(button){var b=$(button);if(b){b.removeClassName('ltbtn-selected');}} 
 /* 1351:minified:js2/basics1.js */ 

var expireDate=new Date(2050,10,23);var g_prototypeAvailable=false;try{document.execCommand('BackgroundImageCache',false,true);}catch(e){}
if((typeof Prototype!='undefined')&&(typeof Element!='undefined')&&(typeof Element.Methods!='undefined'))
{g_prototypeAvailable=true;var g_userControls=new Hash();}
function cookieVal(cookieName)
{thisCookie=document.cookie.split("; ")
for(i=0;i<thisCookie.length;i++)
{if(cookieName==thisCookie[i].split("=")[0])
{return thisCookie[i].split("=")[1]}}
return 0;}
function setCookie(cookieName,cookieContent,transientBoolean)
{if(transientBoolean)
{document.cookie=cookieName+"="+cookieContent;}
else
{document.cookie=cookieName+"="+cookieContent+";expires="+expireDate.toGMTString();}}
function setDisplayforID(id,display)
{document.getElementById(id).style.display=display;}
function toggleShowHide(id,state)
{if(document.getElementById(id).style.display=='none')
{setDisplayforID(id,state);}
else
{setDisplayforID(id,'none');}}
function gotoaURL(url)
{window.top.location=url;}
function checkSpans(page){var x=document.getElementById('*');var postArray='';if(x){x.parentNode.removeChild(x);}
for(var x=0,y=document.getElementsByTagName('*'),oStr='';y[x];x++){if(y[x].id&&y[x].tagName.match("span","i")){var saneStr=y[x].id.replace(/&/,'&amp;').replace(/</,'&lt;').replace(/>/,'&gt;').replace(/\"/,'&quot;');if(saneStr.match("tr[0-9]{6}")&&saneStr){void(postArray+=saneStr+',');}}}
postArray=postArray.replace(/,$/g,'');var tForm=document.createElement('form');void(tForm.name='translateForm');void(tForm.action='/translate.php?page='+page);void(tForm.method='POST');void(tForm.innerHTML='<input type="hidden" name="stuff" value="'+postArray+'">');void(document.body.appendChild(tForm));tForm.submit();}
function lightSpan()
{}
function scaleTextBox(id,size)
{document.getElementById("ms_"+id).style.display="none";new Effect.Scale(id,size,{scaleX:false,scaleContent:false});}
function basic_ajax_updater(url,params,elt_to_update)
{basic_ajax(url,params,function(r)
{$(elt_to_update).innerHTML=r.responseText;});}
function basic_ajax(url,params,callback){var request=new Ajax.Request(url,{method:"post",asynchronous:true,parameters:params,onSuccess:callback});return request;}
function basic_ajax_sync(url,params,callback){var request=new Ajax.Request(url,{method:"post",asynchronous:false,parameters:params,onSuccess:callback});}
function basic_ajax_eval(url,params,callback){var request=new Ajax.Request(url,{method:"post",asynchronous:true,parameters:params,onSuccess:callback,evalJS:'force'});}
if(g_prototypeAvailable)
{Ajax.Request.prototype.abort=function()
{this.transport.onreadystatechange=Prototype.emptyFunction;this.transport.abort();{Ajax.activeRequestCount--;}};}
function disable_button(button,button_text){button_text=button_text||"loading...";button.setAttribute('disabled',true);button.value=button_text;button.form.submit();return false;}
function updateUserConnections(){var handleReturn=function(t){if(t.responseText)
{setTimeout('updateUserControls()',100);}};basic_ajax('/ajax_updateUserConnections.php',null,handleReturn);}
function updateUserControls(){var gsize=g_userControls.size();if(g_prototypeAvailable&&gsize)
{var i=0;var outString='objects=';var paramHash=new Hash();var len=g_userControls.size();g_userControls.each(function(uc){paramHash[uc.key]=uc.value.number;outString+=uc.key+':'+uc.value.number;if(i<(len-1))
outString+=',';i++;});var par=$H({objects:paramHash});var handleReturn1=function(t){var infoHash=$H(t.responseText.evalJSON(true));infoHash.each(function(pair){theUC=g_userControls[pair.key];affInfo=$H(pair.value);theUC.updateAffinityDisplay(affInfo.uc_percentile,affInfo.uc_overlap);});}
basic_ajax('/ajax_updateUserControls.php',outString,handleReturn1);}}
if(g_prototypeAvailable)
{var LTUserControl=Class.create();LTUserControl.prototype={initialize:function(el,paramList){var params=paramList.evalJSON(true);this.inputParams=params;this.element=$(el);this.controlid=params.controlid;this.controlcode=params.controlcode;this.name=params.name;this.number=params.number;this.isSelf=params.isSelf;this.element.className='userControlObject';this.originalHTML=this.element.innerHTML;this.affinity=new Object({percentile:parseInt(params.affinityPercentile),overlap:parseInt(params.affinityOverlap),control:$('ucaf_'+this.controlcode),textbox:$('ucafp_'+this.controlcode)});var afp=$('ucafp_'+this.controlcode);if((this.affinity.overlap>0)&&(!this.isSelf))
afp.innerHTML=this.affinity.percentile+'%';else
afp.innerHTML='';this.arrow=$('ucar_'+this.controlcode);this.rightside=$('ucrs_'+this.controlcode);this.mainMenu=document.createElement('div');this.mainMenu.className='ucoMenu ucoMainMenu';this.mainMenu.id='ucmm_'+this.controlcode;document.body.appendChild(this.mainMenu);this.mainMenu.style.position='absolute';this.mainMenu.style.zIndex='10';Position.absolutize(this.mainMenu);this.links=new Object();this.links.profile='/profile/'+this.name;this.links.catalog='/catalog/'+this.name;this.links.reviews='/profile_reviews.php?view='+this.name;this.links.tagcloud='/tagcloud.php?view='+this.name;this.links.authorcloud='/authorcloud.php?view='+this.name;this.registerEvents();},destroy:function(){},registerEvents:function(){Event.observe(this.arrow,"click",this.dropdown.bindAsEventListener(this));Event.observe($('ucrs_'+this.controlcode),"click",this.onclick.bindAsEventListener(this));Event.observe(document,"click",this.onmouseout.bindAsEventListener(this));},addMenuItem:function(parent,imgfile,text,link,disabled,hasSubmenu,afterElement)
{var menuItem=document.createElement('div');menuItem.className='ucoMenuItem';var base='<span class="ucoMenuIcon">';if(imgfile)
{base+='<img src="/pics/'+imgfile+'">';}
base+='</span><span class="ucoMenuItemText">'+text+'</span>';if(hasSubmenu)
{base='<div class="ucoMenuItemArrow">&#x25B6;</div>'+base;}
if(link)
{menuItem.onclick=function(){gotoaURL(link)};}
menuItem.update(base);if(disabled)
{menuItem.addClassName('ucoDisabled');}
if(parent)
{if(afterElement)
{var pels=parent.descendants();var pcount=pels.length;if(pels[pcount-1]==$(afterElement))
{parent.appendChild(menuItem);}
else
{var ae=$(afterElement);var ne=ae.next();var newel=this.mainMenu.insertBefore(menuItem,ne);}}
else
{parent.appendChild(menuItem);}}
return menuItem;},updateAffinityDisplay:function(percentile,overlap)
{if(!this.isSelf)
{this.affinity.percentile=percentile;this.affinity.overlap=overlap;if(this.menuItemsExist)
{var am1=$('ucafpm_'+this.controlcode);var am2=$('ucafom_'+this.controlcode);if(this.affinity.overlap)
{var s1=$('ucafsi_'+this.controlcode);if(!am1)
{afftext1=this.affinity.percentile+'% similar library';afftext2=this.affinity.overlap+' shared book'+plural;var am1=this.addMenuItem(this.mainMenu,'',afftext1,'',true,false,s1);am1.id='ucafpm_'+this.controlcode;var am2=this.addMenuItem(this.mainMenu,'',afftext2,'',true,false,s1);am2.id='ucafom_'+this.controlcode;this.addSeparatorItem(this.mainMenu);}
else
{var am1=$('ucafpm_'+this.controlcode);var am2=$('ucafom_'+this.controlcode);afftext1=this.affinity.percentile+'% similar library';afftext2=this.affinity.overlap+' shared book'+plural;am1.down('.ucoMenuItemText').innerHTML=afftext1;am2.down('.ucoMenuItemText').innerHTML=afftext2;}}}
if(this.affinity.overlap)
{var mainaff=$('ucafp_'+this.controlcode);mainaff.innerHTML=percentile+'%';var tt=overlap+' shared book';if(overlap!=1)
tt+='s';mainaff.title=tt;}}},addSeparatorItem:function(parent)
{var menuItem=document.createElement('div');menuItem.className='ucoMenuDivider';parent.appendChild(menuItem);return menuItem;},doNothing:function(event)
{},onclick:function(event)
{Event.stop(event);gotoaURL(this.profileURL);},onmouseout:function(event)
{this.mainMenu.hide();this.mainMenu.style.display='none';this.arrow.removeClassName('ucoArrowOn');this.element.removeClassName('userControlHover');},dropdown:function(event)
{Event.stop(event);g_userControls.each(function(o){o.value.onmouseout();});if(!this.menuItemsExist)
{var plural='';if(this.affinity.overlap>1)
plural='s';this.addMenuItem(this.mainMenu,'status_offline_tiny.png','Profile',this.links.profile,false,false,null);this.addMenuItem(this.mainMenu,'book_tiny.png','Catalog',this.links.catalog,false,false,null);var s1=this.addSeparatorItem(this.mainMenu);s1.id='ucafsi_'+this.controlcode;if(this.affinity.overlap)
{afftext1=this.affinity.percentile+'% similar library';afftext2=this.affinity.overlap+' shared book'+plural;var am1=this.addMenuItem(this.mainMenu,'',afftext1,'',true,false,null);am1.id='ucafpm_'+this.controlcode;var am2=this.addMenuItem(this.mainMenu,'',afftext2,'',true,false,null);am2.id='ucafom_'+this.controlcode;this.addSeparatorItem(this.mainMenu);}
this.addMenuItem(this.mainMenu,'reviews_tiny.png','Reviews',this.links.reviews,false,false,null);this.addMenuItem(this.mainMenu,'tag_yellow_tiny.png','Tag Cloud',this.links.tagcloud,false,false,null);this.addMenuItem(this.mainMenu,'author_cloud_tiny.png','Author Cloud',this.links.authorcloud,false,false,null);this.menuItemsExist=true;}
var elof=Position.positionedOffset(this.element);this.mainMenu.style.top=elof[1]+17+'px';this.mainMenu.style.left=elof[0]+1+'px';this.mainMenu.style.borderWidth='1px';this.mainMenu.show();this.mainMenu.style.display='block';this.arrow.addClassName('ucoArrowOn');this.element.addClassName('userControlHover');}};}
function registerUserControlObject(ucname,params){if(g_prototypeAvailable)
{var controlElement=$(ucname);var uc=new LTUserControl(controlElement,params);g_userControls[ucname]=uc;controlElement.userControlObject=uc;}}
function releaseMenu(menu)
{menu.style.display='none';}
function toggleCollectionMembership(checkbox,bookid,fullcode)
{checkbox.disabled=true;var url='/ajax_collectionsToggleMembership.php';var params={c_id:checkbox.value,newvalue:checkbox.checked,bookid:bookid,fullcode:fullcode};var responseFunction=function(t)
{if(t.responseText=='1')
{checkbox.disabled=false;}
else
{checkbox.checked=!checkbox.checked;checkbox.disabled=false;}};basic_ajax(url,params,responseFunction);}
function addCollection(name,omit,listcontainerID,bookid,fullcode)
{var url='/ajax_collectionsAddCollection.php';var params={name:name.value,omit:omit.checked,book:bookid};var responseFunction=function(t){var rArray=t.responseText.evalJSON();if(rArray.success)
{var container=$(listcontainerID);var newel=document.createElement('div');newel.className='collectionModItem';newel.id='collectionItem_'+rArray.c_id;var newlines='<input name="cList_'+rArray.c_id+'" id="cList_'+rArray.c_id+'" type="checkbox" value="'+rArray.c_id+'" ';if(rArray.inCollection)
newlines+=' checked ';newlines+='onChange="javascript:toggleCollectionMembership(this,'+bookid+','+fullcode+'); return false;">';newlines+=name.value;if(omit.checked)
newlines+=' * ';newlines+=' (<a href="#" onclick="javascript:deleteCollection('+rArray.c_id+'); return false;">delete</a>)';newel.innerHTML=newlines;container.appendChild(newel);}
else
{}};basic_ajax(url,params,responseFunction);}
function deleteCollection(c_id)
{var url='/ajax_collectionsDeleteCollection.php';var params={c_id:c_id};var responseFunction=function(t)
{if(t.responseText=='1')
{var clist=$('collectionModList');var item=$('collectionItem_'+c_id);item.style.display='none';clist.removeChild(item);}
else
{alert('failure');}};basic_ajax(url,params,responseFunction);}
function setRating(container,bookid,rating,editable,style)
{co=LT_findObj(container);var uid=LT_GetRandomID(8);var url='/ajax_setBookRating.php';var params={uid:uid,book:bookid,editable:editable,container:container,style:style,rating:rating};var rateSuccessF=function(t){if(co)
{if(t.responseText!='0')
{co.innerHTML=t.responseText;}
co.style.opacity=1;co.style.filter='alpha(opacity=100)';}};if(co)
{co.style.opacity=0.3;co.style.filter='alpha(opacity='+30+')';}
basic_ajax(url,params,rateSuccessF);}
function showuwyb()
{$('showmoreuwyb').style.display='none';$('uwybhide').style.display='inline';}
function showMore(element)
{var el=$(element);var className=el.className;className=className.replace("showmore","showmore_show");el.className=className;}
if(typeof window.console=="undefined")
{window.console={};console.log=function(o)
{};console.debug=function(o)
{};console.info=function(o)
{};console.warn=function(o)
{};console.assert=function(expr)
{};console.error=function(o)
{};console.dir=function(o)
{};console.dirxml=function(node)
{};console.trace=function()
{};console.group=function(o)
{};console.groupEnd=function()
{};console.time=function(name)
{};console.timeEnd=function(name)
{};console.profile=function(title)
{};console.profileEnd=function()
{};console.profileEnd=function()
{};console.count=function(title)
{};} 
 /* 1351:minified:js2/basicajax.js */ 

var currentid=0;var idtohide=0;var xmlHttp;function createXMLHttpRequest()
{if(window.ActiveXObject)
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
else if(window.XMLHttpRequest)
{xmlHttp=new XMLHttpRequest();}}
function startRequest()
{createXMLHttpRequest();xmlHttp.onreadystatechange=handleStateChange;xmlHttp.open("GET","innerHTML.xml",true);xmlHttp.send(null);}
function handleStateChange()
{if(xmlHttp.readyState==4)
{if(xmlHttp.status==200)
{document.getElementById(currentid).innerHTML=xmlHttp.responseText;if(idtohide){document.getElementById(idtohide).style.display='none';}
if(currentid){document.getElementById(currentid).style.display='block';}}}} 
 /* 1351:minified:js2/lt_lightbox.js */ 

var LibraryThing=LibraryThing||{};LibraryThing.lightbox=LibraryThing.lightbox||{};LibraryThing.lightbox={active:0,yPos:0,xPos:0,css_url:'/css/lt_lightbox.css',ie:(navigator.appName=="Microsoft Internet Explorer"?true:false),safari:(navigator.vendor=='Apple Computer, Inc.'?true:false),dochead:document.getElementsByTagName('head')[0],initialized:false,div_lightbox:null,div_overlay:null,div_content:null,div_loading:null,lb_width:400,lb_height:300,inline_container:null,params:null,hasiframe:false,unload:function(){this.active=false;},init:function()
{this.active=true;try
{if(!this.initialized)
{var body=document.getElementsByTagName('body')[0];this.div_overlay=document.createElement('div');this.div_overlay.id='LT_LB_overlay';this.div_lightbox=document.createElement('div');this.div_lightbox.id='LT_LB';this.div_lightbox.style.display="none";this.div_content=document.createElement('div');this.div_content.id='LT_LB_content';this.div_content.className='LT_LB_content';this.div_content.style.display="none";this.div_loading=document.createElement('div');this.div_loading.id='LT_LB_loading';this.div_loading.style.display="none";this.div_loading.innerHTML="Loading...";body.appendChild(this.div_overlay);body.appendChild(this.div_lightbox);this.div_lightbox.appendChild(this.div_loading);this.div_lightbox.appendChild(this.div_content);this.params={};this.initialized=true;}}
catch(e)
{this.initialized=false;}},setParams:function(inparams)
{if(inparams)
{this.init();this.params={};for(pp in inparams)
{this.params[pp]=inparams[pp];if(pp=='content_class')
{this.div_content.className=inparams[pp];}
else
{this.div_content.className='LT_LB_content';}
if(pp=='rounded'){this.div_lightbox.className='LT_LB_rounded';}}}},setPosition:function()
{var iw=this.params.width;var ih=this.params.height;var iwp=(iw)?iw:this.lb_width;var ihp=(ih)?ih:this.lb_width;var winWidth=0,winHeight=0;var workingLeft=0,workingTop=0;if(typeof(window.innerWidth)=='number')
{winWidth=window.innerWidth;winHeight=window.innerHeight;}
else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))
{winWidth=document.documentElement.clientWidth;winHeight=document.documentElement.clientHeight+20;}
else if(document.body&&(document.body.clientWidth||document.body.clientHeight))
{winWidth=document.body.clientWidth;winHeight=document.body.clientHeight;}
if(iwp>winWidth)
{iwp=winWidth;}
if(ihp>winHeight)
{ihp=winHeight;}
this.div_overlay.style.height=winHeight+'px';workingLeft=winWidth-iwp;workingTop=winHeight-ihp;if(workingLeft)
{workingLeft=Math.floor((winWidth-iwp)/2);}
else
{if(this.ie)
{iwp=iwp-40;}}
if(workingTop)
{workingTop=Math.floor((winHeight-ihp)/2);}
else
{if(this.ie)
{ihp=ihp-44;}}
if(this.params.absolute==true)
{this.div_lightbox.style.position='absolute';}
this.div_lightbox.style.width=iwp+'px';this.div_lightbox.style.height=ihp+'px';if(this.ie)
{this.getScroll();this.prepareIE('100%','hidden');this.setScroll(0,0);this.div_lightbox.style.position='absolute';this.div_lightbox.style.overflow='auto';}
this.div_lightbox.style.top=workingTop+'px';this.div_lightbox.style.left=workingLeft+'px';},on:function(ev)
{this.init();ev=ev||window.event;var evt=ev.target||ev.srcElement;var href=evt.href;var url=href;var rel=evt.rel;var inlined_el;var queryString=url.replace(/^[^\?]+\??/,'');if(this.params)
{this.params=this.parseQuery(queryString);this.lb_width=(this.params.width*1)+30||400;this.lb_height=(this.params.height*1)+40||300;this.div_lightbox.style.left="50%";this.div_lightbox.style.right="50%";}
if(this.ie){this.getScroll();this.prepareIE('100%','hidden');this.setScroll(0,0);this.hideSelects('hidden');}
if(this.params.inlineId)
{inlined_el=this.params.inlineId;this.inline(inlined_el);}
else if(this.params.url)
{var ajaxURL=this.params.url;if(url.indexOf("?")!==-1)
{inlined_el=url.substr(0,url.indexOf("?"));}
this.ajax(ajaxURL);}},ajax:function(contentURL,params)
{if(contentURL)
{this.init();if(params)
{this.setParams(params);}
this.setPosition();if(this.ie){this.getScroll();this.prepareIE('100%','hidden');this.setScroll(0,0);this.hideSelects('hidden');}
var wasShowing=this.isShowing('LT_LB');var uid=0;var ajaxparams={};if(params)
{if(params['ajaxparams'])
{ajaxparams=params['ajaxparams'];}}
ajaxparams.uid=uid;var lightboxResponse=function(t)
{var rt=t.responseText;if(rt==='')
{LibraryThing.lightbox.showhide('LT_LB_loading',false);LibraryThing.lightbox.showhide('LT_LB_content',true);LibraryThing.lightbox.div_content.style.display='block';LibraryThing.lightbox.div_content.innerHTML='There was a problem retrieving the data. Please try again.';}
else
{LibraryThing.lightbox.showhide('LT_LB_loading',false);LibraryThing.lightbox.showhide('LT_LB_content',true);LibraryThing.lightbox.div_content.style.display='block';LibraryThing.lightbox.div_content.innerHTML=rt;if(LibraryThing.lightbox.params.catalogCK)
{LibraryThing.lightbox.enterCKEditMode();}
rt.evalScripts();LibraryThing.lightbox.ready();}};LibraryThing.lightbox.div_content.innerHTML='';this.showhide('LT_LB_overlay',true);this.showhide('LT_LB',true);this.showhide('LT_LB_loading',true);basic_ajax(contentURL,ajaxparams,lightboxResponse);this.unload=function(){LibraryThing.lightbox.div_content.innerHTML='';};this.modalCheck();}},iframe:function(contentURL,params)
{if(contentURL)
{if(typeof(window.parent.LibraryThing.lightbox)!='undefined'&&LibraryThing.lightbox.hasiframe==false&&window.parent.LibraryThing.lightbox.hasiframe==true)
{window.parent.LibraryThing.lightbox.iframe(contentURL,params);return false;}
this.init();if(params)
{this.setParams(params);}
this.setPosition();if(this.ie){this.getScroll();this.prepareIE('100%','hidden');this.setScroll(0,0);this.hideSelects('hidden');}
var wasShowing=this.isShowing('LT_LB');var uid=0;var ajaxparams={};if(params)
{if(params['ajaxparams'])
{ajaxparams=params['ajaxparams'];}}
ajaxparams.uid=uid;LibraryThing.lightbox.div_content.innerHTML='';var currentWidth=$('LT_LB').getWidth()-4;var currentHeight=$('LT_LB').getHeight()-4;var iframeS="<iframe id='LT_iframe' src='"+contentURL;iframeS+="' frameborder='0' scrolling='auto' width='"+currentWidth;iframeS+="' height='"+currentHeight+"'></iframe>";$('LT_LB_content').innerHTML=iframeS;this.showhide('LT_LB_overlay',true);this.showhide('LT_LB',true);LibraryThing.lightbox.showhide('LT_LB_content',true);LibraryThing.lightbox.div_content.style.display='block';LibraryThing.lightbox.ready();this.unload=function(){LibraryThing.lightbox.div_content.innerHTML='';};this.modalCheck();}},enterCKEditMode:function(fieldname)
{var pencils=document.getElementsByClassName('fwikiEditPencil');if(pencils)
{for(var i=0;i<pencils.length;i++)
{var pencil=pencils[i];pencil.onclick();}}},inline:function(elt_id,params)
{var elt=document.getElementById(elt_id);this.inline_container=elt;if(elt!='undefined')
{this.init();if(params)
{this.setParams(params);}
this.setPosition();if(this.ie){this.getScroll();this.prepareIE('100%','hidden');this.setScroll(0,0);this.hideSelects('hidden');}
LibraryThing.lightbox.div_content.innerHTML='';LibraryThing.lightbox.div_content.innerHTML='';this.showhide('LT_LB_overlay',true);this.showhide('LT_LB',true);this.showhide('LT_LB_loading',true);if(1)
{var cloned=elt.cloneNode(true);this.div_content.appendChild(cloned);cloned.style.display="block";}
else
{var childs=elt.children||elt.childNodes;for(var i=0;i<childs.length;i++)
{var child=childs[i];LibraryThing.lightbox.div_content.appendChild(child);}
this.unload=function(){var childs=this.div_content.children||this.div_content.childNodes;for(var i=0;i<childs.length;i++)
{var child=childs[i];this.inline_container.appendChild(child);}};}
LibraryThing.lightbox.showhide('LT_LB_loading',false);LibraryThing.lightbox.showhide('LT_LB_content',true);this.modalCheck();}
this.ready();},off:function(success){this.unload();if(this.ie)
{this.setScroll(0,this.yPos);this.prepareIE("auto","auto");this.hideSelects("visible");}
if(this.params.absolute)
{this.prepareIE("auto","auto");this.setScroll(0,this.yPos+1);}
if(this.safari)
{this.prepareIE("auto","scroll");}
this.showhide('LT_LB_overlay',false);this.showhide('LT_LB',false);if(success)
{if(this.params&&this.params.callbackSuccess)
{LibraryThing.lightbox.cbRun(this.params.callbackSuccess,this.params.callbackParams);this.params.callbackSuccess=null;}}
else
{if(this.params&&this.params.callbackFailure)
{LibraryThing.lightbox.cbRun(this.params.callbackFailure,this.params.callbackParams);this.params.callbackFailure=null;}}},cbRun:function(f,p)
{if(typeof f==='function')
{f(p);}
else if(typeof f!=='undefined')
{var fstring=f+'(';if(p)
{fstring+='p';}
fstring+=')';if(fstring&&(fstring!==null)&&(fstring!=='undefined')){eval(fstring);}}},ready:function()
{if(this.params&&this.params.callbackReady)
{LibraryThing.lightbox.cbRun(this.params.callbackReady);}},modalCheck:function()
{if(this.params)
{if(this.params.modal==true)
{$('LT_LB_overlay').stopObserving('click');this.div_overlay.style.cursor='default';}
else
{$('LT_LB_overlay').observe('click',function(event){event.stop();LibraryThing.lightbox.off();});this.div_overlay.style.cursor='hand';}}
else
{$('LT_LB_overlay').observe('click',function(event){event.stop();LibraryThing.lightbox.off();});this.div_overlay.style.cursor='hand';}},addEvent:function(elt,evt,func)
{if(typeof elt=='string'){elt=document.getElementById(elt);}
if(elt.addEventListener){elt.addEventListener(evt,func,false);}
else{elt.attachEvent("on"+evt,func);}},removeEvent:function(elt,evt,func)
{if(typeof elt=='string'){elt=document.getElementById(elt);}
if(elt.removeEventListener){elt.removeEventListener(evt,func,false);}
else{elt.detachEvent("on"+evt,elt[evt+func]);elt[evt+func]=null;elt['e'+evt+func]=null;}},showhide:function(elt_id,bool)
{var elt=document.getElementById(elt_id);if(elt)
{elt.style.display=bool?'block':'none';}},isShowing:function(elt_id)
{var elt=document.getElementById(elt_id);if(elt.style.display=='none')
{return false;}
return true;},prepareIE:function(height,overflow)
{var htm=document.getElementsByTagName('html')[0];htm.style.height=height;htm.style.overflow=overflow;htm.style.display='block';},hideSelects:function(visibility){var selects=document.getElementsByTagName('select');for(var i=0;i<selects.length;i++){selects[i].style.visibility=visibility;}},getScroll:function(){if(self.pageYOffset){this.yPos=self.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){this.yPos=document.documentElement.scrollTop;}else if(document.body){this.yPos=document.body.scrollTop;}},setScroll:function(x,y){window.scrollTo(x,y);},addScriptURL:function(url){var script=document.createElement('script');script.type='text/javascript';script.src=url;this.dochead.appendChild(script);},load:function(response,container){container=container||"LT_LB_content";var lb=document.getElementById(container);lb.innerHTML=response;LibraryThing.showhide('LT_LB_loading',false);LibraryThing.showhide('LT_LB_content',true);},parseQuery:function(query){var Params={};if(!query){return Params;}
var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2){continue;}
var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}
return Params;}};