var uid="";var progress="";var nBooks="";var recent="";var coverSize="";var removeNoCover="";var curPath="";function innerContent(A,B){document.getElementById(A).innerHTML=B}function XMLtoString(A){if(A.xml){return A.xml}else{return(new XMLSerializer()).serializeToString(A)}}function stringToXML(B){if(window.ActiveXObject){var A=new ActiveXObject("Microsoft.XMLDOM");A.async=false;A.loadXML(A);return A}else{if(window.XMLHttpRequest){var C=new DOMParser();return C.parseFromString(B,"text/xml")}else{alert("stringToXML: impossibile trasformare la stringa in un documento XML");return null}}}function getDomAdapter(){var A="";if("undefined"!=typeof ActiveXObject){A="MS"}else{if("undefined"!=typeof document&&document.implementation&&document.implementation.createDocument&&"undefined"!=typeof DOMParser){A="default"}}switch(A){case"MS":return new (function(){this.createDocument=function(){var D=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];for(var B in D){try{return new ActiveXObject(D[B])}catch(C){}}throw new Error("Unable to create DOMDocument")};this.serialize=function(B){return B.xml};this.parseXml=function(B){var C=this.createDocument();if(!C.loadXML(B)){throw new Error("Parse error")}return C}})();case"default":return new (function(){this.createDocument=function(){return document.implementation.createDocument("","",null)};this.serialize=function(B){return new XMLSerializer().serializeToString(B)};this.parseXml=function(B){var C=new DOMParser().parseFromString(B,"text/xml");if("parsererror"==C.documentElement.nodeName){throw new Error("Parse error")}return C}})();default:throw new Error("Unable to select the DOM adapter")}}function getElementsByClassName(A,C){var D=document.getElementsByTagName(A);var E=new Array();for(var B=0;B?>/g,function(C,E,D){return C.replace(/\s(\w+=)([#\w,;]+)/g,function(F,H,G){return" "+H.toLowerCase()+'"'+G+'"'})});A=A.replace(/<(\/?\w+)([^>]*>)/g,function(C,E,D){return"<"+E.toLowerCase()+D});A=A.replace(/<(meta|base|basefont|param|link|img|br|hr|area|input)([^>]*)>/g,function(C,E,D){return C.indexOf(" />")==-1?"<"+E+D+" />":C});A=A.replace(/<(img)([^>]*)\/>/g,function(C,E,D){return C.indexOf("alt=")==-1?"<"+E+D+' alt="" />':C});return A}function getXMLhttp(){if(window.XMLHttpRequest){return new XMLHttpRequest()}else{if(window.ActiveXObject){if(_ms_XMLHttpRequest_ActiveX){return new ActiveXObject(_ms_XMLHttpRequest_ActiveX)}else{var A=["Msxml2.XMLHTTP.7.0","Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(var B=0;B"+b_txt+"";var xml=getDomAdapter().parseXml(b_txt);uls=xml.getElementsByTagName("ul");var content="";for(var i=0;i0)?lis[0].getElementsByTagName("img")[0].getAttribute("src"):"http://image.anobii.com/anobi/image_medium/no_image_small.gif"}else{startIndex=0}if((lis.length!=3&&!this.removeNoCover)||(lis.length==3&&lis[startIndex].getElementsByTagName("a")[0].firstChild)){anobiiUrl=lis[startIndex].getElementsByTagName("a")[0].getAttribute("href");title=lis[startIndex].getElementsByTagName("a")[0].firstChild.nodeValue;author="an unknown author";if(lis[startIndex+1].firstChild!=null){author=lis[startIndex+1].firstChild.nodeValue}content+='';content+=''+title+';content+=""}}innerContent("anobiiBooks",content)}}function anobiiReload(A){anobiiInit(this.curPath,this.uid,this.progress,this.nBooks,this.recent,this.coverSize,this.removeNoCover)}function anobiiInit(G,C,A,D,F,E,B){this.uid=C;this.progress=A;this.nBooks=D;this.recent=F;this.coverSize=E;this.removeNoCover=B;this.curPath=G;if(C==""){innerContent("anobiiBooks","You must configure the plugin");return }urlAnobii=this.curPath+"proxy.php?uid="+this.uid+"&progress="+this.progress+"&nBooks="+this.nBooks+"&recent="+this.recent+"&coverSize="+this.coverSize+"&iHateIE="+Math.random();AJAXRequest("GET",urlAnobii,null,evalRet,true,1)};