 /* 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/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;} 
 /* 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:js2/profile.js */ 

function gofrompop(link)
{window.location=link;}
function morecontacts()
{document.getElementById('morecontactslink').style.display='none';document.getElementById('morecontacts').style.display='inline';}
function flipper(whichflipper,on,inline)
{if(inline){var ondisplay='inline';}else{var ondisplay='block';}
if(on)
{document.getElementById("hide"+whichflipper).style.display=ondisplay;document.getElementById("open"+whichflipper).style.display="none";document.getElementById("close"+whichflipper).style.display=ondisplay;}
else
{document.getElementById("hide"+whichflipper).style.display="none";document.getElementById("open"+whichflipper).style.display=ondisplay;document.getElementById("close"+whichflipper).style.display="none";}}
function showinvite()
{document.getElementById("invitediv").style.display="block";}
function showhowtoadd()
{$('howtoadd_q').style.display="none";$('howtoadd_a').style.display="inline";}
function loadSTA(username,type,showloader)
{if(showloader){$('loader').show();}
var url="/ajax_userswithyourbooks.php";url=url+"?"+"view="+username+"&type="+type;var params=null;basic_ajax(url,params,function(r){$('connections').innerHTML=r.responseText;$('loader').hide();});}
if(!LibraryThing){var LibraryThing={};}
LibraryThing.profile={};ltp=LibraryThing.profile;ltp.crToggleShowMore=function(id,extraid)
{var container=$(id);var extralink=$(extraid);var extramore=extralink.readAttribute('extramore');var extraless=extralink.readAttribute('extraless');if(container)
{if(container.visible())
{container.hide();extralink.innerHTML=extramore;}
else
{container.appear({duration:0.75});extralink.innerHTML=extraless;}}}
function cog_booksyoushare(user)
{var url='/ajax_lb_booksyoushare.php?user='+user;var params={v:1.0,width:350,height:220,modal:false}
LibraryThing.lightbox.ajax(url,params);}
function cog_booksyoushare_submit()
{var theform=$('cog_booksyoushare');basic_ajax_updater('/ajaxinc_booksyoushare.php',theform.serialize(true),'booksyoushare');LibraryThing.lightbox.off();return false;} 
 /* 1563:minified:js/contacts.js */ 

var isloading=false;function onchangeothercontactselection(numothercontacttypes)
{if(isloading)
{return;}
var othercontactselectorvalue=$F('othercontactselector');if(numothercontacttypes<1&&(othercontactselectorvalue!=0))
{var othercontactselector=$('othercontactselector');var newothercontactoption=$('newothercontactoption');othercontactselector.selectedIndex=1;return;}
var newothercontact=$('newothercontact');var othercontact=$('othercontact');if(othercontactselectorvalue==0)
{newothercontact.show();othercontact.hide();}
else
{newothercontact.hide();othercontact.show();}}
var othercontactsvisible=false;function showhideothercontacts()
{if(isloading)
{return;}
var newothercontactname=$('newothercontactname');var othercontacts=$('othercontacts');if(othercontactsvisible)
{othercontacts.hide();othercontactsvisible=false;}
else
{othercontacts.show();newothercontactname.activate();othercontactsvisible=true;}}
var groupinvitevisible=false;function showhidegroupinvite()
{if(isloading)
{return;}
var groupinvite=$('groupinvite');if(groupinvitevisible)
{groupinvite.hide();groupinvitevisible=false;}
else
{groupinvite.show();groupinvitevisible=true;}}
function resetflags()
{isloading=false;othercontactsvisible=false;groupinvitevisible=false;}
function addothercontact(errormsg,tousernum)
{if(isloading)
{return;}
isloading=true;var type=$F('othercontactselector');if(type<=5)
{alert(errormsg);isloading=false;return;}
var actions=$('profileactions');actions.addClassName('actionloading');var params={tousernum:tousernum,type:type};var url='/ajax_contacts_addother.php';new Ajax.Request(url,{parameters:params,onSuccess:function(response){actions.update(response.responseText);actions.removeClassName('actionloading');resetflags();}});}
function addnewothercontact(errormsg,tousernum)
{if(isloading)
{return;}
isloading=true;var newothercontactprivatevalue=$F('newothercontactprivate');var private=0;if(newothercontactprivatevalue!==null)
{private=1;}
var newothercontactnamevalue=$F('newothercontactname').strip();if(newothercontactnamevalue===''){alert(errormsg);isloading=false;return;}
var actions=$('profileactions');actions.addClassName('actionloading');var params={tousernum:tousernum,name:newothercontactnamevalue,private:private};var url='/ajax_contacts_addother.php';new Ajax.Request(url,{parameters:params,onSuccess:function(response){actions.update(response.responseText);actions.removeClassName('actionloading');resetflags();}});}
function invitegroup(tousernum)
{if(isloading)
{return;}
isloading=true;var groupid=$F('groupid');var invitemsg=$F('invitemsg').escapeHTML();var actions=$('profilegroupactions');actions.addClassName('actionloading');var params={tousernum:tousernum,invitemsg:invitemsg,groupid:groupid};var url='/ajax_contacts_invitegroup.php';new Ajax.Request(url,{parameters:params,onSuccess:function(response){actions.update(response.responseText);actions.removeClassName('actionloading');resetflags();}});}
function contactaction(action,type,tousernum)
{if(isloading)
{return;}
isloading=true;if(action!=='add'&&action!=='remove')
{return;isloading=false;}
var actions=$('profileactions');actions.addClassName('actionloading');var params={tousernum:tousernum,type:type};var url='/ajax_contacts_'+action+'.php';new Ajax.Request(url,{parameters:params,onSuccess:function(response){actions.update(response.responseText);actions.removeClassName('actionloading');resetflags();}});}
function blockcontact(tousernum)
{if(isloading)
{return;}
isloading=true;var actions=$('profileactions');var otheractions=$('profileotheractions');otheractions.addClassName('actionloading');var params={tousernum:tousernum,type:4};var url='/ajax_contacts_add.php';new Ajax.Request(url,{parameters:params,onSuccess:function(response){otheractions.update(response.responseText);otheractions.removeClassName('actionloading');actions.hide();resetflags();}});}
function unblockcontact(tousernum)
{if(isloading)
{return;}
isloading=true;var otheractions=$('profileotheractions');var actions=$('profileactions');otheractions.addClassName('actionloading');var params={tousernum:tousernum,type:4};var url='/ajax_contacts_remove.php';new Ajax.Request(url,{parameters:params,onSuccess:function(response){otheractions.update(response.responseText);otheractions.removeClassName('actionloading');actions.show();resetflags();}});}
function confirmcontact(type,fromusernum,confirmed,returnto)
{if(typeof returnto==='undefined')
{returnto='profile'}
if(isloading)
{return;}
isloading=true;var actions=$('profileactions');actions.addClassName('actionloading');var params={type:type,fromusernum:fromusernum,confirmed:confirmed,returnto:returnto};var url='/ajax_contacts_confirm.php';new Ajax.Request(url,{parameters:params,onSuccess:function(response){actions.update(response.responseText);actions.removeClassName('actionloading');resetflags();}});}
