 /* 1563: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();if(LibraryThing.lightbox.params.scriptwhendone)
{eval(LibraryThing.lightbox.params.scriptwhendone);}}};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;}}; 
 /* 1563: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 fancy_ajax_updater(url,params,elt_to_update)
{$(elt_to_update).className+=' simpleajaxloading';basic_ajax(url,params,function(r)
{$(elt_to_update).innerHTML=r.responseText;$(elt_to_update).className=$(elt_to_update).className.replace(' simpleajaxloading','');});}
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;}
function showLess(element)
{var el=$(element);var className=el.className;className=className.replace("showmore_show","showmore");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)
{};}
function dovote(type,id,vote)
{var theid='vote_'+type+'_'+id;var url="/ajax_voter.php?type="+encodeURIComponent(type)+"&id="+encodeURIComponent(id)+"&vote="+encodeURIComponent(vote);$(theid).innerHTML="<span class='main'>Saving...</span>";basic_ajax_updater(url,null,$(theid));}
function confirmAction(action)
{return confirm(action+"?");} 
 /* 1563:minified:js/response.js */ 

var currentshown=-1;var tagEdit='';var commentEdit='';var findvisible=new Array(0,0);var powervisible=new Array(0,0);function showhideCatalog(id,card_or_edit)
{if(navigator.appName=="Netscape"&&parseFloat(navigator.appVersion)<5.0)
{alert("Sorry. LibaryThing does not work on older browsers.")
return;}
if(currentshown!=-1)
{}
if(currentshown==id)
{x=document.getElementById("p"+id);x.style.display="none";currentshown=-1;}
else
{if(currentshown>=0)
{}
for(i=0;eval(x=document.getElementById("p"+i));i++)
{x.style.display="none";}
eval(x=document.getElementById("p"+id));x.style.display="table-row";currentshown=id;pElement=document.getElementById("a"+id);frameURL='/card.php?book='+id+'&mode='+card_or_edit;frames["cf"+id].location.href=frameURL;window.scrollTo(0,pElement.offsetTop+38);}}
function showhide(id)
{if(navigator.appName=="Netscape"&&parseFloat(navigator.appVersion)<5.0)
{alert("Sorry. Your browser doesn't support this feature.")
return;}
if(currentshown==id)
{document.getElementById("d"+id).src="pics/divet.gif";eval(x=document.getElementById("p"+id));x.style.display="none";currentshown=-1;}
else
{if(currentshown>=0)
{document.getElementById("d"+currentshown).src="pics/divet.gif";}
document.getElementById("d"+id).src="pics/divet-on.gif";for(i=0;eval(x=document.getElementById("p"+i));i++)
{x.style.display="none";}
eval(x=document.getElementById("p"+id));x.style.display="table-row";currentshown=id;}}
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)
{if(transientBoolean)
{document.cookie=cookieName+"="+cookieContent;}
else
{document.cookie=cookieName+"="+cookieContent+";expires="+expireDate.toGMTString();}}
function setSort(sortvalue)
{if((sortvalue==cookieVal("cookie_sort"))&&(!cookieVal("cookie_desc")))
{setCookie("cookie_desc",'desc',true);}
else
{setCookie("cookie_desc",'',true);}
setCookie("cookie_sort",sortvalue,true);}
function washValues()
{parent.document.books.form_find.value="";parent.document.books.form_tags.value="";parent.document.books.form_find.focus();}
function selectCardOption(selection)
{document.getElementById("body").className=selection;}
function showhide_find(num)
{x=document.getElementById("finddiv"+num);form=document.getElementById("searchform"+num);if(findvisible[num])
{x.style.display="none";findvisible[num]=0;}
else
{x.style.display="block";findvisible[num]=1;form.searchbox.focus();}}
function showhide_power(num)
{x=document.getElementById("powerdiv"+num);if(powervisible[num])
{x.style.display="none";powervisible[num]=0;}
else
{x.style.display="block";powervisible[num]=1;}}
function addbook(haveit)
{if(haveit)
{return confirm("You have this book. Add ANOTHER copy to your library?");}
else
{return confirm("Add this book to your library?");}}
function deletebook()
{return confirm("Delete this book from all collections?");}
function makewindow(whereto,width,height)
{if(!width){width=350};if(!height){height=200};var left=(screen.width/2)-(width/2);var top=(screen.height/2)-(height/2);var boilerplate=" channelmode = no, directories = no, fullscreen = no, location = no, menubar = no, resizable = no, scrollbars = yes, status = no, titlebar = no, toolbar = no";window.open(whereto,'tip','width='+width+', height='+height+' top='+top+' left='+left+boilerplate);} 
 /* 1563:minified:js/arbitrarypics.js */ 

function uploadDone()
{alert("done");}
function uploadImage(type,image,item)
{var url='/ajax_lb_uploadImage.php?type='+type;if(typeof item!=='undefined')
{url=url+'&item='+item;}
if(image>0)
{url=url+'&image='+image;}
var params={v:1.0,width:602,height:380,modal:true}
LibraryThing.lightbox.ajax(url,params);Event.observe('uploadiframe','load',function(event){var url='/upload_arbitrarypic.php?newest=1';window.location=url;});}
function vote_pics(image,vote)
{var id='chrome'+image;$(id).style.backgroundColor='#EEEEEE';var url='/ajax_vote_pics.php?pic='+image+'&vote='+vote;basic_ajax(url,null,function(r)
{$(id).innerHTML=r.responseText;$(id).style.backgroundColor='';});}
function uploadhide()
{$('uploadshow').className='uploadhide';return null;}
function loadsnaggable()
{$('snagnotice').style.display='block';var width=$("gallery2").getWidth();var url=snagurl+'&width='+width;basic_ajax_updater(url,null,"gallery2");}
