var addthis_pub="filigranes";function BookDetail(a){this.DivID=a;this.RootUrl="http://www.filigranes.be/";this.LinkWishlist="http://www.filigranes.be/fr/listes/index.htm";var e=document.getElementsByTagName("head")[0];if(e){var b=e.getElementsByTagName("script");var j=e.getElementsByTagName("link");var c=false;var g=false;for(var d=0;d<b.length;d++){var f=b[d];if(f.src.indexOf("date.js")>0){c=true}if(f.src.indexOf("common.js")>0){g=true}if(g==true&&c==true){break}}if(c==false){var h=document.createElement("script");h.type="text/javascript";h.src=this.RootUrl+"js/methods/date.js";e.appendChild(h)}if(g==false){var h=document.createElement("script");h.type="text/javascript";h.src=this.RootUrl+"js/methods/common.js";e.appendChild(h)}}this.BookEan=GetParam("book");this.ListItemID=null;if(GetParam("oli")){this.ListItemID=GetParam("oli")}this.ListID=null;if(GetParam("li")){this.ListID=GetParam("li")}this.bookDetailModal=new DHTML_modalMessage();this.wymEditor}GetBookDetail=function(l){if(l.DivID&&document.getElementById(l.DivID)){imgLoad=document.createElement("div");imgLoad.id="loading_"+l.DivID;imgLoad.className="ImageLoading";document.getElementById(l.DivID).appendChild(imgLoad)}var f=document.getElementsByTagName("head")[0];if(f){var c=f.getElementsByTagName("script");var d=false;for(var e=0;e<c.length;e++){var h=c[e];if(h.src=="http://s7.addthis.com/js/200/addthis_widget.js"){d=true;break}}if(d==false){var j=document.createElement("script");j.type="text/javascript";j.src="http://s7.addthis.com/js/200/addthis_widget.js";f.appendChild(j)}var c=f.getElementsByTagName("script");var k=f.getElementsByTagName("link");var d=false;var a=false;for(var e=0;e<c.length;e++){var h=c[e];if(h.src.indexOf("rating.js")>0){d=true;break}}for(var e=0;e<k.length;e++){var g=k[e];if(g.href.indexOf("rating.css")>0){a=true;break}}if(d==false){var j=document.createElement("script");j.type="text/javascript";j.src=l.RootUrl+"js/rating.js";f.appendChild(j)}if(a==false){var b=document.createElement("link");b.type="text/css";b.href=l.RootUrl+"css/rating.css";b.rel="stylesheet";f.appendChild(b)}}new Ajax.Request(l.RootUrl+"BookDetail.ashx",{method:"get",onSuccess:function(i){l.OnGetBookDetailData(i)},onFailure:function(){l.OnGetBookDetailDataFailed()},parameters:{ms:new Date().getTime(),ean:l.BookEan,type:"detail"}})};GetBookMedia=function(a){new Ajax.Request(a.RootUrl+"TiteliveMediaAndComment.ashx",{method:"get",onSuccess:function(b){a.OnGetBookMediaData(b)},onFailure:function(){a.OnGetBookMediaDataFailed()},parameters:{ms:new Date().getTime(),ean:a.BookEan}})};GetBookFiligranautesComment=function(a){new Ajax.Request(a.RootUrl+"FiligranauteComment.ashx",{method:"get",onSuccess:function(b){a.OnGetBookFiligranautesComment(b)},onFailure:function(){a.OnGetBookFiligranautesCommentFailed(transport)},parameters:{ms:new Date().getTime(),Reference:a.BookEan,MediaType:"Book",Validated:"true"}})};GetBookStock=function(a){new Ajax.Request(a.RootUrl+"BookStock.ashx",{method:"get",onSuccess:function(b){a.OnGetBookStock(b)},onFailure:function(){a.OnGetBookStockFailed(transport)},parameters:{ms:new Date().getTime(),ean:a.BookEan}})};BookDetail.prototype.OnGetBookStock=function(f){if(document.getElementById("divStock")){if(f&&f.responseXML){var c=f.responseXML.getElementsByTagName("stock");if(c.length>0){var b=c[0];if(b.childNodes.length>0){if(parseInt(b.childNodes[0].nodeValue)>0){document.getElementById("divStock").appendChild(document.createTextNode("Oui"));document.getElementById("divStock").style.display="";document.getElementById("divStockAlert").style.display=""}else{document.getElementById("divStock").appendChild(document.createTextNode("Non"));document.getElementById("divStock").style.display="";document.getElementById("divStockAlert").style.display="none"}}else{document.getElementById("divStock").appendChild(document.createTextNode("Non"));document.getElementById("divStock").style.display="";document.getElementById("divStockAlert").style.display="none"}}}}if(document.getElementById("divPrice")){var a=document.createElement("span");a.appendChild(document.createTextNode("Prix : "));document.getElementById("divPrice").appendChild(a);if(f&&f.responseXML){var e=f.responseXML.getElementsByTagName("price");if(e.length>0){var d=e[0];if(d.childNodes.length>0){if(d.childNodes[0].nodeValue!="0"){document.getElementById("divPrice").appendChild(document.createTextNode(d.childNodes[0].nodeValue+" €"));document.getElementById("divPrice").style.display=""}else{document.getElementById("divPrice").style.display="none"}}else{document.getElementById("divPrice").style.display="none"}}}}};BookDetail.prototype.OnGetBookStockFailed=function(a){if(document.getElementById("divStock")){document.getElementById("divStock").appendChild(document.createTextNode("Non"));document.getElementById("divStockAlert").style.display="none"}if(document.getElementById("divPrice")){document.getElementById("divPrice").style.display="none"}};GetBookFromList=function(a){var b="<wishlistsearch>";b=b+"<id>"+a.ListID+"</id>";b=b+"<uid>"+GetCookie("UID")+"</uid>";b=b+"</wishlistsearch>";new Ajax.Request(a.RootUrl+"WishList.ashx",{method:"post",onSuccess:function(c){a.OnGetBookFromListSucceed(c)},onFailure:function(c){a.GetBookFromListError(c)},postBody:b})};BookDetail.prototype.OnGetBookFromListSucceed=function(b){if(b&&b.responseXML&&this.ListItemID){var k=this;var c=b.responseXML.getElementsByTagName("OrderListItem");if(c.length>0){var h="";var f="";var l="";var d="";var j=false;var e=false;for(var g=0;g<c.length;g++){var m=c[g];if(m.getElementsByTagName("OrderlistItemID")&&m.getElementsByTagName("OrderlistItemID").length>0&&m.getElementsByTagName("OrderlistItemID")[0].firstChild){h=m.getElementsByTagName("OrderlistItemID")[0].firstChild.nodeValue}if(m.getElementsByTagName("OrderlistItemstatus")&&m.getElementsByTagName("OrderlistItemstatus").length>0&&m.getElementsByTagName("OrderlistItemstatus")[0].firstChild){f=m.getElementsByTagName("OrderlistItemstatus")[0].firstChild.nodeValue}if(m.getElementsByTagName("OrderListREF")&&m.getElementsByTagName("OrderListREF").length>0&&m.getElementsByTagName("OrderListREF")[0].firstChild){d=m.getElementsByTagName("OrderListREF")[0].firstChild.nodeValue}if(m.getElementsByTagName("OrderListPrice")&&m.getElementsByTagName("OrderListPrice").length>0&&m.getElementsByTagName("OrderListPrice")[0].firstChild){l=m.getElementsByTagName("OrderListPrice")[0].firstChild.nodeValue}if(m.getElementsByTagName("OrderListitemPayed")&&m.getElementsByTagName("OrderListitemPayed").length>0&&m.getElementsByTagName("OrderListitemPayed")[0].firstChild){j=(m.getElementsByTagName("OrderListitemPayed")[0].firstChild.nodeValue=="1")}if(m.getElementsByTagName("OrderListRepetitive")&&m.getElementsByTagName("OrderListRepetitive").length>0&&m.getElementsByTagName("OrderListRepetitive")[0].firstChild){e=(m.getElementsByTagName("OrderListRepetitive")[0].firstChild.nodeValue=="1")}if(h==this.ListItemID){break}}if(h==this.ListItemID){if(document.getElementById("divPrice")){var a=document.createElement("span");a.appendChild(document.createTextNode("Prix : "));document.getElementById("divPrice").appendChild(a);if(l!="0"){document.getElementById("divPrice").appendChild(document.createTextNode(l+" €"));if(document.getElementById("divBuy")){if(f=="10"&&j==false){aBuy=document.createElement("a");aBuy.setAttribute("href","#Buy");imgBuy=document.createElement("img");imgBuy.src=this.RootUrl+"Images/BookDetail/shopping_cart.png";imgBuy.id="img_"+h+"_"+d+"_"+e+"_"+l+"_"+this.ListID;imgBuy.style.border="none";imgBuy.alt="Ajouter au panier";imgBuy.title="Ajouter au panier";aBuy.appendChild(imgBuy);aBuy.id="link_"+h+"_"+d+"_"+e+"_"+l+"_"+this.ListID;aBuy.onclick=function(i){k.AddToCart(i)};document.getElementById("divBuy").appendChild(aBuy);document.getElementById("divBuy").style.display=""}else{document.getElementById("divBuy").style.display="none"}}}else{document.getElementById("divPrice").style.display="none"}}}else{document.getElementById("divPrice").style.display="none"}}}};BookDetail.prototype.GetBookFromListError=function(a){if(document.getElementById("divStock")){document.getElementById("divStock").appendChild(document.createTextNode("Non"));document.getElementById("divStockAlert").style.display="none"}if(document.getElementById("divPrice")){document.getElementById("divPrice").style.display="none"}if(document.getElementById("divBuy")){document.getElementById("divBuy").style.display="none"}};BookDetail.prototype.OnGetBookMediaDataFailed=function(){if(document.getElementById("loading_"+this.DivID+"_Media")){document.getElementById("loading_"+this.DivID+"_Media").style.display="none"}if(document.getElementById("loading_"+this.DivID+"_Comment")){document.getElementById("loading_"+this.DivID+"_Comment").style.display="none"}};BookDetail.prototype.OnGetBookMediaData=function(x){var m=false;if(x&&x.responseXML){var D=false;if(document.getElementById("DivMedia")){var u=document.getElementById("DivMedia");var e=x.responseXML.getElementsByTagName("Videos");if(e.length>0){if(D==false){mediaTitle=document.createElement("h3");mediaTitle.appendChild(document.createTextNode("Les plus de Filigranes :"));u.appendChild(mediaTitle);D=true}var B;var g;for(var J=0;J<e.length;J++){var L=e[J];var s=L.getElementsByTagName("Publication");if(s.length>0){for(var I=0;I<s.length;I++){var r=s[I];var y="";var f="";var E="";var h="";var p="";var b="";if(r.getElementsByTagName("Title")&&r.getElementsByTagName("Title").length>0&&r.getElementsByTagName("Title")[0]&&r.getElementsByTagName("Title")[0].firstChild&&r.getElementsByTagName("Title")[0].firstChild.nodeValue){y=r.getElementsByTagName("Title")[0].firstChild.nodeValue}if(r.getElementsByTagName("URL")&&r.getElementsByTagName("URL").length>0&&r.getElementsByTagName("URL")[0]&&r.getElementsByTagName("URL")[0].firstChild&&r.getElementsByTagName("URL")[0].firstChild.nodeValue){f=r.getElementsByTagName("URL")[0].firstChild.nodeValue}if(r.getElementsByTagName("Thumb")&&r.getElementsByTagName("Thumb").length>0&&r.getElementsByTagName("Thumb")[0]&&r.getElementsByTagName("Thumb")[0].firstChild&&r.getElementsByTagName("Thumb")[0].firstChild.nodeValue){E=r.getElementsByTagName("Thumb")[0].firstChild.nodeValue}if(r.getElementsByTagName("ID")&&r.getElementsByTagName("ID").length>0&&r.getElementsByTagName("ID")[0]&&r.getElementsByTagName("ID")[0].firstChild&&r.getElementsByTagName("ID")[0].firstChild.nodeValue){h=r.getElementsByTagName("ID")[0].firstChild.nodeValue}if(r.getElementsByTagName("Width")&&r.getElementsByTagName("Width").length>0&&r.getElementsByTagName("Width")[0]&&r.getElementsByTagName("Width")[0].firstChild&&r.getElementsByTagName("Width")[0].firstChild.nodeValue){p=r.getElementsByTagName("Width")[0].firstChild.nodeValue}if(r.getElementsByTagName("Oembed")&&r.getElementsByTagName("Width").length>0&&r.getElementsByTagName("Oembed")[0]&&r.getElementsByTagName("Width")[0].firstChild&&r.getElementsByTagName("Oembed")[0].firstChild.nodeValue){b=r.getElementsByTagName("Oembed")[0].firstChild.nodeValue}if(!E||E==""){var a=document.createElement("div");a.className="BookVideo";var C=document.createElement("a");C.href=f;C.target="_blank";C.appendChild(document.createTextNode(y));a.appendChild(C);if(!g){g=document.createElement("div");g.id="OtherVideo"}g.appendChild(a)}else{var a=document.createElement("div");a.id="clip_"+h;if(b.indexOf("</object>")>0){b=b.substr(0,b.indexOf("</object>"))+'<param name="wmode" value="transparent" />'+b.substr(b.indexOf("</object>"))}a.innerHTML=b;if(!B){B=document.createElement("div");B.id="VimeoVideo"}B.appendChild(a)}}}}if(B){u.appendChild(B)}if(g){u.appendChild(g)}}var G=x.responseXML.getElementsByTagName("Audios");if(G.length>0){if(D==false){mediaTitle=document.createElement("h3");mediaTitle.appendChild(document.createTextNode("Les plus de Filigranes :"));u.appendChild(mediaTitle);D=true}for(var J=0;J<G.length;J++){var d=G[J];var s=d.getElementsByTagName("Publication");if(s.length>0){for(var I=0;I<s.length;I++){var r=s[I];var y="";var f="";if(r.getElementsByTagName("Title")&&r.getElementsByTagName("Title").length>0&&r.getElementsByTagName("Title")[0]&&r.getElementsByTagName("Title")[0].firstChild&&r.getElementsByTagName("Title")[0].firstChild.nodeValue){y=r.getElementsByTagName("Title")[0].firstChild.nodeValue}if(r.getElementsByTagName("URL")&&r.getElementsByTagName("URL").length>0&&r.getElementsByTagName("URL")[0]&&r.getElementsByTagName("URL")[0].firstChild&&r.getElementsByTagName("URL")[0].firstChild.nodeValue){f=r.getElementsByTagName("URL")[0].firstChild.nodeValue}var a=document.createElement("div");a.className="BookAudio";a.innerHTML="<span class='SoundTitle'>"+y+'</span><object type="application/x-shockwave-flash" data="'+this.RootUrl+'js/Mp3Player/player_mp3_maxi.swf" width="200" height="20"><param name="wmode" value="transparent" /><param name="movie" value="'+this.RootUrl+'js/Mp3Player/player_mp3_maxi.swf" /><param name="FlashVars" value="mp3='+encodeURI(y)+'&amp;bgcolor1=ffffff&amp;bgcolor2=cccccc&amp;buttoncolor=999999&amp;buttonovercolor=0&amp;slidercolor1=cccccc&amp;slidercolor2=999999&amp;sliderovercolor=666666&amp;textcolor=0&amp;showvolume=1" /><p>'+y+"</p>";u.appendChild(a)}}}}var A=x.responseXML.getElementsByTagName("Images");if(A.length>0){if(D==false){mediaTitle=document.createElement("h3");mediaTitle.appendChild(document.createTextNode("Les plus de Filigranes :"));u.appendChild(mediaTitle);D=true}for(var J=0;J<A.length;J++){var t=A[J];var s=t.getElementsByTagName("Publication");if(s.length>0){for(var I=0;I<s.length;I++){var r=s[I];var y="";var f="";if(r.getElementsByTagName("Title")&&r.getElementsByTagName("Title").length>0&&r.getElementsByTagName("Title")[0]&&r.getElementsByTagName("Title")[0].firstChild&&r.getElementsByTagName("Title")[0].firstChild.nodeValue){y=r.getElementsByTagName("Title")[0].firstChild.nodeValue}if(r.getElementsByTagName("URL")&&r.getElementsByTagName("URL").length>0&&r.getElementsByTagName("URL")[0]&&r.getElementsByTagName("URL")[0].firstChild&&r.getElementsByTagName("URL")[0].firstChild.nodeValue){f=r.getElementsByTagName("URL")[0].firstChild.nodeValue}var c=document.createElement("li");var C=document.createElement("a");C.href=f;C.target="_blank";aImg=document.createElement("img");aImg.src=f;aImg.style.border=0;aImg.style.width="auto";aImg.style.height="72px";C.appendChild(aImg);c.appendChild(C);var K=document.createElement("ul");K.className="BookImage";u.appendChild(K);K.appendChild(c)}}}}var k=x.responseXML.getElementsByTagName("Links");if(k.length>0){if(D==false){mediaTitle=document.createElement("h3");mediaTitle.appendChild(document.createTextNode("Les plus de Filigranes :"));u.appendChild(mediaTitle);D=true}for(var J=0;J<k.length;J++){var z=k[J];var s=z.getElementsByTagName("Publication");if(s.length>0){for(var I=0;I<s.length;I++){var r=s[I];var y="";var f="";if(r.getElementsByTagName("Title")&&r.getElementsByTagName("Title").length>0&&r.getElementsByTagName("Title")[0]&&r.getElementsByTagName("Title")[0].firstChild&&r.getElementsByTagName("Title")[0].firstChild.nodeValue){y=r.getElementsByTagName("Title")[0].firstChild.nodeValue}if(r.getElementsByTagName("URL")&&r.getElementsByTagName("URL").length>0&&r.getElementsByTagName("URL")[0]&&r.getElementsByTagName("URL")[0].firstChild&&r.getElementsByTagName("URL")[0].firstChild.nodeValue){f=r.getElementsByTagName("URL")[0].firstChild.nodeValue}var a=document.createElement("div");a.className="BookUrl";var C=document.createElement("a");C.href=f;C.target="_blank";C.appendChild(document.createTextNode(y));a.appendChild(C);u.appendChild(a)}}}}}if(document.getElementById("DivComment")){var l=document.getElementById("DivComment");var H=x.responseXML.getElementsByTagName("Coeur");if(H.length>0){if(document.getElementById("DetailTitle")){document.getElementById("DetailTitle").className="NoteWithSuggest"}if(m==false){commentTitle=document.createElement("h1");commentTitle.innerHTML="Coup de c&oelig;ur";l.appendChild(commentTitle);m=true}for(var J=0;J<H.length;J++){var F=H[J];var s=F.getElementsByTagName("Publication");if(s.length>0){for(var I=0;I<s.length;I++){var r=s[I];var y="";var v="";if(r.getElementsByTagName("Title")&&r.getElementsByTagName("Title").length>0&&r.getElementsByTagName("Title")[0]&&r.getElementsByTagName("Title")[0].firstChild&&r.getElementsByTagName("Title")[0].firstChild.nodeValue){y=r.getElementsByTagName("Title")[0].firstChild.nodeValue}if(r.getElementsByTagName("Text")&&r.getElementsByTagName("Text").length>0&&r.getElementsByTagName("Text")[0]&&r.getElementsByTagName("Text")[0].firstChild&&r.getElementsByTagName("Text")[0].firstChild.nodeValue){v=r.getElementsByTagName("Text")[0].firstChild.nodeValue}var n=document.createElement("div");n.className="CoupDeCoeur";var o=document.createElement("div");o.id="divCoupCoeurTitle";o.innerHTML=y;var w=document.createElement("div");w.id="divCoupCoeur";w.innerHTML=v;n.appendChild(o);n.appendChild(w);l.appendChild(n)}}}}var q=x.responseXML.getElementsByTagName("Comment");if(q.length>0){if(m==false){commentTitle=document.createElement("h1");commentTitle.appendChild(document.createTextNode("Notre avis de libraire"));l.appendChild(commentTitle);m=true}for(var J=0;J<q.length;J++){if(document.getElementById("DetailTitle")){document.getElementById("DetailTitle").className="NoteWithSuggest"}var M=q[J];var s=M.getElementsByTagName("Publication");if(s.length>0){for(var I=0;I<s.length;I++){var r=s[I];var y="";var v="";if(r.getElementsByTagName("Title")&&r.getElementsByTagName("Title").length>0&&r.getElementsByTagName("Title")[0]&&r.getElementsByTagName("Title")[0].firstChild&&r.getElementsByTagName("Title")[0].firstChild.nodeValue){y=r.getElementsByTagName("Title")[0].firstChild.nodeValue}if(r.getElementsByTagName("Text")&&r.getElementsByTagName("Text").length>0&&r.getElementsByTagName("Text")[0]&&r.getElementsByTagName("Text")[0].firstChild&&r.getElementsByTagName("Text")[0].firstChild.nodeValue){v=r.getElementsByTagName("Text")[0].firstChild.nodeValue}var n=document.createElement("div");var o=document.createElement("div");o.innerHTML=y;var w=document.createElement("div");w.innerHTML=v;n.appendChild(o);n.appendChild(w);l.appendChild(n)}}}}}}if(document.getElementById("loading_"+this.DivID+"_Media")){document.getElementById("loading_"+this.DivID+"_Media").style.display="none"}if(document.getElementById("loading_"+this.DivID+"_Comment")){document.getElementById("loading_"+this.DivID+"_Comment").style.display="none"}};BookDetail.prototype.OnGetBookFiligranautesComment=function(d){if(document.getElementById("DivFiligranaute")){var j=document.getElementById("DivFiligranaute");if(d&&d.responseXML){var g=d.responseXML;var k=g.getElementsByTagName("Comment");if(k.length>0){filigranautesCommentTitle=document.createElement("h1");filigranautesCommentTitle.appendChild(document.createTextNode("Les avis des filigranautes"));j.appendChild(filigranautesCommentTitle);for(var f=0;f<k.length;f++){var a=k[f];var h="";var c=new Date();var e="";var m="";if(a.attributes.getNamedItem("Date")){var b=a.attributes.getNamedItem("Date").nodeValue;year=b.substr(0,4);month=b.substr(5,2);if(month.indexOf("0")=="0"){month=month.substr(1,1)}day=b.substr(8,2);if(day.indexOf("0")=="0"){day=day.substr(1,1)}hour=b.substr(11,2);if(hour.indexOf("0")=="0"){hour=hour.substr(1,1)}minute=b.substr(14,2);if(minute.indexOf("0")=="0"){minute=minute.substr(1,1)}c=new Date(parseInt(year),parseInt(month)-1,parseInt(day),parseInt(hour),parseInt(minute),0,0)}if(a.attributes.getNamedItem("Comment")){h=a.attributes.getNamedItem("Comment").nodeValue}var l=a.getElementsByTagName("User");if(l.length>0){if(l[0].attributes.getNamedItem("Avatar")){m=l[0].attributes.getNamedItem("Avatar").nodeValue}if(l[0].attributes.getNamedItem("Pseudo")){e=l[0].attributes.getNamedItem("Pseudo").nodeValue}}if(e!=""){divCommentContent=document.createElement("div");divCommentContent.className="CommentContainer";divUser=document.createElement("div");divComment=document.createElement("div");if(m!=""){imgAvatar=document.createElement("img");imgAvatar.src=m;divUser.appendChild(imgAvatar)}c.format("");divUser.appendChild(document.createTextNode("Posté par "+htmlToAccent(e)+", le "+c.format("dd/mm/yyyy")+" à "+c.format("HH:MM")));divComment.innerHTML=h;divCommentContent.appendChild(divUser);divCommentContent.appendChild(divComment);j.appendChild(divCommentContent)}}}else{if(document.getElementById("YourCommentTitle")){document.getElementById("YourCommentTitle").innerHTML="Soyez le premier &agrave donner votre avis !"}}}else{if(document.getElementById("YourCommentTitle")){document.getElementById("YourCommentTitle").innerHTML="Soyez le premier &agrave donner votre avis !"}}}if(document.getElementById("loading_"+this.DivID+"_Filigranaute")){document.getElementById("loading_"+this.DivID+"_Filigranaute").style.display="none"}};BookDetail.prototype.OnGetBookFiligranautesCommentFailed=function(a){if(document.getElementById("loading_"+this.DivID+"_Filigranaute")){document.getElementById("loading_"+this.DivID+"_Filigranaute").style.display="none";if(document.getElementById("YourCommentTitle")){document.getElementById("YourCommentTitle").innerHTML="Soyez le premier &agrave donner votre avis !"}}};BookDetail.prototype.OnGetBookDetailDataFailed=function(){if(this.DivID){document.getElementById("loading_"+this.DivID).style.display="none"}};BookDetail.prototype.OnGetBookDetailData=function(s){divId=this.divID;var q=this;if(s&&s.responseXML){var n="";var v="";var o="";var A="";var g="";var r="";var t=new Date();var c="";var y=false;if(s.responseXML.getElementsByTagName("recordreference")&&s.responseXML.getElementsByTagName("recordreference").length>0&&s.responseXML.getElementsByTagName("recordreference")[0].firstChild){A=s.responseXML.getElementsByTagName("recordreference")[0].firstChild.nodeValue}if(s.responseXML.getElementsByTagName("allauthors")&&s.responseXML.getElementsByTagName("allauthors").length>0&&s.responseXML.getElementsByTagName("allauthors")[0].firstChild){g=s.responseXML.getElementsByTagName("allauthors")[0].firstChild.nodeValue}if(s.responseXML.getElementsByTagName("title")&&s.responseXML.getElementsByTagName("title").length>0){var p=s.responseXML.getElementsByTagName("title")[0];if(p.getElementsByTagName("titletext")&&p.getElementsByTagName("titletext").length>0&&p.getElementsByTagName("titletext")[0].firstChild){v=p.getElementsByTagName("titletext")[0].firstChild.nodeValue}if(p.getElementsByTagName("subtitle")&&p.getElementsByTagName("subtitle").length>0&&p.getElementsByTagName("subtitle")[0].firstChild){o=p.getElementsByTagName("subtitle")[0].firstChild.nodeValue}}if(s.responseXML.getElementsByTagName("mediafile")&&s.responseXML.getElementsByTagName("mediafile").length>0){var B=s.responseXML.getElementsByTagName("mediafile")[0];if(B.getElementsByTagName("mediafilelink")&&B.getElementsByTagName("mediafilelink").length>0&&B.getElementsByTagName("mediafilelink")[0].firstChild&&B.getElementsByTagName("mediafilelink")[0].firstChild.nodeValue&&B.getElementsByTagName("mediafilelink")[0].firstChild.nodeValue!=""){n=B.getElementsByTagName("mediafilelink")[0].firstChild.nodeValue}else{n=this.RootUrl+"files/no-cover.jpg"}}else{n=this.RootUrl+"files/no-cover.jpg"}if(s.responseXML.getElementsByTagName("othertext")&&s.responseXML.getElementsByTagName("othertext").length>0){var B=s.responseXML.getElementsByTagName("othertext")[0];if(B.getElementsByTagName("text")&&B.getElementsByTagName("text").length>0&&B.getElementsByTagName("text")[0].firstChild){r=B.getElementsByTagName("text")[0].firstChild.nodeValue}}if(s.responseXML.getElementsByTagName("publicationdate")&&s.responseXML.getElementsByTagName("publicationdate").length>0&&s.responseXML.getElementsByTagName("publicationdate")[0].firstChild){pubDateStr=s.responseXML.getElementsByTagName("publicationdate")[0].firstChild.nodeValue;var b=/^([0-9]{8})+$/;if(pubDateStr.search(b)!=-1){if(pubDateStr!=""){year=pubDateStr.substr(0,4);month=pubDateStr.substr(4,2);if(month.indexOf("0")=="0"){month=month.substr(1,1)}day=pubDateStr.substr(6,2);if(day.indexOf("0")=="0"){day=day.substr(1,1)}t=new Date(parseInt(pubDateStr.substr(0,4)),parseInt(month)-1,parseInt(day),0,0,0,0)}else{t=null}}else{t=null}}else{t=null}if(s.responseXML.getElementsByTagName("publisher")&&s.responseXML.getElementsByTagName("publisher").length>0){var f=s.responseXML.getElementsByTagName("publisher")[0];if(f.getElementsByTagName("publishername")&&f.getElementsByTagName("publishername").length>0&&f.getElementsByTagName("publishername")[0].firstChild){c=f.getElementsByTagName("publishername")[0].firstChild.nodeValue}}document.title=g+" - "+v;if(o&&o!=""){document.title=document.title+" ("+o+")"}if(document.getElementById(this.DivID)){var x=document.getElementById(this.DivID);divDetail=document.createElement("div");divComment=document.createElement("div");divComment.id="DivComment";imgLoadComment=document.createElement("div");imgLoadComment.id="loading_"+bookDetail.DivID+"_Comment";imgLoadComment.className="ImageLoading";divComment.appendChild(imgLoadComment);divMedia=document.createElement("div");divMedia.id="DivMedia";imgLoadMedia=document.createElement("div");imgLoadMedia.id="loading_"+bookDetail.DivID+"_Media";imgLoadMedia.className="ImageLoading";divMedia.appendChild(imgLoadMedia);divFiligranautesComment=document.createElement("div");divFiligranautesComment.id="DivFiligranaute";imgLoadFiligranaute=document.createElement("div");imgLoadFiligranaute.id="loading_"+bookDetail.DivID+"_Filigranaute";imgLoadFiligranaute.className="ImageLoading";divFiligranautesComment.appendChild(imgLoadFiligranaute);divYourComment=document.createElement("div");divYourComment.id="DivYourComment";var E=document.createElement("div");E.id="DivYourCommentArea";yourCommentTitle=document.createElement("h1");yourCommentTitle.id="YourCommentTitle";yourCommentTitle.appendChild(document.createTextNode("Votre avis nous intéresse !"));divYourComment.appendChild(yourCommentTitle);divYourComment.appendChild(E);var z=false;if(GetCookie("Mail")){z=true;textArea=document.createElement("textarea");textArea.id="txtYourComment";textArea.setAttribute("rows","1");E.appendChild(textArea);setTimeout(function(){jQuery(function(){jQuery("#txtYourComment").wymeditor({toolsItems:[{name:"Bold",title:"Strong",css:"wym_tools_strong"},{name:"Italic",title:"Emphasis",css:"wym_tools_emphasis"},{name:"InsertOrderedList",title:"Ordered_List",css:"wym_tools_ordered_list"},{name:"InsertUnorderedList",title:"Unordered_List",css:"wym_tools_unordered_list"},{name:"Indent",title:"Indent",css:"wym_tools_indent"},{name:"Outdent",title:"Outdent",css:"wym_tools_outdent"},{name:"CreateLink",title:"Link",css:"wym_tools_link"},{name:"Unlink",title:"Unlink",css:"wym_tools_unlink"}],boxHtml:"<div class='wym_box'><div class='wym_area_top'>"+WYMeditor.TOOLS+"</div><div class='wym_area_left'></div><div class='wym_area_right'></div><div class='wym_area_main'>"+WYMeditor.HTML+WYMeditor.IFRAME+WYMeditor.STATUS+"</div><div class='wym_area_bottom'></div></div>",postInit:function(M){q.wymEditor=M;var L="<li class='wym_tools_newbutton'><a name='Save' href='#' alt='Envoyer' style='background-image: url(http://www.filigranes.be/Images/WymEditor/envoyer.gif);width:78px'>Sauvegarder votre commentaire</a></li>";jQuery(M._box).find(M._options.toolsSelector+M._options.toolsListSelector).append(L);jQuery(M._box).find("li.wym_tools_newbutton a").click(function(){q.SaveComment();return(false)})}})})},500)}else{E.appendChild(document.createTextNode("Veuillez vous connecter afin de saisir votre commentaire"))}var i=document.createElement("div");i.id="HeaderDetailTitle";divDetail.appendChild(i);var a=document.createElement("div");a.id="TitleBook";a.className="BookTitle";a.innerHTML=html_entity_decode(v);i.appendChild(a);var F=document.createElement("div");F.id="Actions";i.appendChild(F);aPDF=document.createElement("a");aPDF.setAttribute("href","#PDF"+A);aPDF.onclick=function(){window.open(q.RootUrl+"GeneratePDF.ashx?ean="+A)};imgPDF=document.createElement("img");imgPDF.src=this.RootUrl+"Images/BookDetail/pdf.png";imgPDF.style.border="none";aPDF.appendChild(imgPDF);F.appendChild(aPDF);aPrint=document.createElement("a");aPrint.setAttribute("href","#Print"+A);imgPrint=document.createElement("img");imgPrint.src=this.RootUrl+"Images/BookDetail/printer.png";imgPrint.style.border="none";aPrint.onclick=function(){window.print()};aPrint.appendChild(imgPrint);F.appendChild(aPrint);var J=document.createElement("a");J.href="#AddThis";J.onmouseover=function(){return addthis_open(this,"",document.url,document.title)};J.onmouseout=function(){addthis_close()};J.onclick=function(){return addthis_sendto()};imgAddThis=document.createElement("img");imgAddThis.src="http://s7.addthis.com/static/btn/sm-plus.gif";imgAddThis.style.border="0";imgAddThis.style.width="16";imgAddThis.style.heigth="16";J.appendChild(imgAddThis);F.appendChild(J);divBookImage=document.createElement("div");divDetail.appendChild(divBookImage);if(n){img=document.createElement("img");img.src=n;img.className="BookImage";divBookImage.appendChild(img)}var D=document.createElement("div");divDetail.appendChild(D);D.className="BookAuthor";var e=document.createElement("span");e.appendChild(document.createTextNode("Auteur : "));D.appendChild(e);D.appendChild(document.createTextNode(g));var u=document.createElement("div");divDetail.appendChild(u);var K=document.createElement("span");K.appendChild(document.createTextNode("Editeur : "));u.appendChild(K);u.appendChild(document.createTextNode(c));var h=document.createElement("div");divDetail.appendChild(h);var I=document.createElement("span");I.appendChild(document.createTextNode("Paru : "));h.appendChild(I);if(t){h.appendChild(document.createTextNode(t.format("dd/mm/yyyy")))}else{h.appendChild(document.createTextNode(""))}divRating=document.createElement("div");divDetail.appendChild(divRating);divRating.id="ratingDetail"+A;var C=new Rating("ratingDetail"+A,A,"Book",5,true,false);C.Init();divEan=document.createElement("div");divDetail.appendChild(divEan);var H=document.createElement("span");H.appendChild(document.createTextNode("EAN : "));divEan.appendChild(H);divEan.appendChild(document.createTextNode(A));var w=document.createElement("div");w.id="divStock";divDetail.appendChild(w);var k=document.createElement("span");k.appendChild(document.createTextNode("En stock : "));w.appendChild(k);w.style.display="none";var m=document.createElement("div");m.id="divStockAlert";divDetail.appendChild(m);m.innerHTML="Avertissement : la mention du stock est indicative et ne garantit pas syst&eacute;matiquement la pr&eacute;sence de l'ouvrage dans nos rayons lors de votre passage ult&eacute;rieur en magasin.";m.style.display="none";var j=document.createElement("div");j.id="divPrice";divDetail.appendChild(j);var G=document.createElement("div");G.id="divImageList";divDetail.appendChild(G);divBuy=document.createElement("div");divBuy.id="divBuy";divBuy.style.display="none";G.appendChild(divBuy);if(this.ListID&&this.ListID!=""){aList=document.createElement("a");aList.setAttribute("target","_self");aList.setAttribute("href",q.LinkWishlist+"?orderid="+q.ListID);imgList=document.createElement("img");aList.id="WishList";imgList.src=this.RootUrl+"Images/BookDetail/wishlist.png";imgList.style.border="none";imgList.alt="Retour vers la liste";imgList.title="Retour vers la liste";aList.appendChild(imgList);G.appendChild(aList)}divDetail.appendChild(divComment);detailTitle=document.createElement("h1");detailTitle.id="DetailTitle";detailTitle.className="NoteWithoutSuggest";detailTitle.innerHTML="Note de l'&eacute;diteur";divDetail.appendChild(detailTitle);divDesc=document.createElement("div");divDetail.appendChild(divDesc);divDesc.innerHTML=html_entity_decode(r);x.appendChild(divDetail);x.appendChild(divMedia);x.appendChild(divFiligranautesComment);x.appendChild(divYourComment);q=this;GetBookMedia(q);GetBookFiligranautesComment(q);if(q.ListItemID&&q.ListID){GetBookFromList(q)}else{GetBookStock(q)}addBookmarkObj.convert("BookMark");if(z==false){var l=document.createElement("div");l.id="login_bookdetail";document.getElementById("DivYourCommentArea").appendChild(l);var d=new Login("login_bookdetail");d.Init();d.OnLoginSucceedEvent=OnLoginSucceedBook;d.LoginParentModule=q}}}if(this.DivID){document.getElementById("loading_"+this.DivID).style.display="none"}};OnLoginSucceedBook=function(a){if(document.getElementById("DivYourCommentArea")){var b=document.getElementById("DivYourCommentArea");if(GetCookie("Mail")){while(b.childNodes.length>=1){b.removeChild(b.firstChild)}isLogged=true;textArea=document.createElement("textarea");textArea.id="txtYourComment";textArea.setAttribute("rows","1");b.appendChild(textArea);setTimeout(function(){jQuery(function(){jQuery("#txtYourComment").wymeditor({toolsItems:[{name:"Bold",title:"Strong",css:"wym_tools_strong"},{name:"Italic",title:"Emphasis",css:"wym_tools_emphasis"},{name:"InsertOrderedList",title:"Ordered_List",css:"wym_tools_ordered_list"},{name:"InsertUnorderedList",title:"Unordered_List",css:"wym_tools_unordered_list"},{name:"Indent",title:"Indent",css:"wym_tools_indent"},{name:"Outdent",title:"Outdent",css:"wym_tools_outdent"},{name:"CreateLink",title:"Link",css:"wym_tools_link"},{name:"Unlink",title:"Unlink",css:"wym_tools_unlink"}],boxHtml:"<div class='wym_box'><div class='wym_area_top'>"+WYMeditor.TOOLS+"</div><div class='wym_area_left'></div><div class='wym_area_right'></div><div class='wym_area_main'>"+WYMeditor.HTML+WYMeditor.IFRAME+WYMeditor.STATUS+"</div><div class='wym_area_bottom'></div></div>",postInit:function(d){a.wymEditor=d;var c="<li class='wym_tools_newbutton'><a name='Save' href='#' alt='Envoyer' style='background-image: url(http://www.filigranes.be/Images/WymEditor/envoyer.gif);width:78px'>Sauvegarder votre commentaire</a></li>";jQuery(d._box).find(d._options.toolsSelector+d._options.toolsListSelector).append(c);jQuery(d._box).find("li.wym_tools_newbutton a").click(function(){a.SaveComment();return(false)})}})})},500)}}};BookDetail.prototype.SaveComment=function(){bookDetailTmp=this;if(GetCookie("Mail")){var e=removeHTMLTags(this.wymEditor.html());e=e.split(" ").join("").split("&nbsp;").join("").split("\r\n").join("");if(e.length>0){var d="<CommentParam>";d+="<Reference>"+this.BookEan+"</Reference>";d+="<MediaType>Book</MediaType>";d+="<Mail>"+GetCookie("Mail")+"</Mail>";d+="<Comment>"+Base64.encode(accentToHTML(this.wymEditor.html()))+"</Comment>";d+="</CommentParam>";d=Base64.encode(d);new Ajax.Request(this.RootUrl+"SaveComment.ashx",{method:"POST",onSuccess:function(f){bookDetailTmp.OnSaveCommentSucceed(f)},onFailure:function(f){bookDetailTmp.OnSaveCommentError(f)},postBody:d})}else{this.wymEditor.status("Veuillez saisir votre commentaire !")}}else{var b=document.getElementById("DivYourCommentArea");if(b.hasChildNodes()){while(b.childNodes.length>=1){b.removeChild(b.firstChild)}}var c=document.createElement("div");c.id="login_bookdetail";document.getElementById("DivYourCommentArea").appendChild(c);var a=new Login("login_bookdetail");a.Init();a.OnLoginSucceedEvent=bookDetailTmp.OnLoginSucceed}};BookDetail.prototype.OnSaveCommentSucceed=function(a){this.wymEditor.html("");this.wymEditor.status("Votre commentaire a été enregistré et doit être validé par un modérateur")};BookDetail.prototype.OnSaveCommentError=function(a){this.wymEditor.status(a.responseText)};BookDetail.prototype.AddToCart=function(j){if(!j){j=window.event}var d=undefined;if(j&&j.srcElement){d=j.srcElement}else{d=j.target}if(d.id&&d.id!=""){var a=d.id.split("_");var b=a[1];var g=a[2];var l=a[3];var h=a[4];var f=a[5];var k=this;if(l=="true"){if(k.bookDetailModal){k.bookDetailModal=new DHTML_modalMessage();k.bookDetailModal.setHtmlContent("");k.bookDetailModal.setSize(300,150);var i="<div class='PriceTitle' style='width:95%;'><span style='float:left;'>Montant souhaité</span><a href='#' id='closeBtn' style='float:right;'><img src='"+k.RootUrl+"Images/ImageGallery/close.gif'></img></a></div>";i+="<div id='PrixContainer'>Indiquer le montant souhaité pour le bon d'achat ( en €)<BR />";i+='<div id="form-price"><p>Montant</p>';i+='<input id="txtPrice" type="text"/> € ';i+='<img src="/Images/Registration/attention.gif" id="ImgPrice" alt="Non valide" title="Non valide" class="Invalid" />';i+="</div>";i+='<div id="form-valid"><input type="button" id="btnSubmit" value="Valider" disabled="disabled" />';i+="</div>";i+="</div>";k.bookDetailModal.setHtmlContent(i);k.bookDetailModal.setSource(false);k.bookDetailModal.setShadowDivVisible(false);k.bookDetailModal.display();if(document.getElementById("closeBtn")){k.bookDetailModal.addEvent(document.getElementById("closeBtn"),"click",function(m){k.CloseModal()})}if(document.getElementById("txtPrice")){k.bookDetailModal.addEvent(document.getElementById("txtPrice"),"keyup",function(m){k.OnPriceChange(m,"txtPrice","ImgPrice")});k.bookDetailModal.addEvent(document.getElementById("txtPrice"),"keypress",function(m){k.OnValidPriceEnter(m,"txtPrice",g,b,f)});document.getElementById("txtPrice").focus()}if(document.getElementById("btnSubmit")){k.bookDetailModal.addEvent(document.getElementById("btnSubmit"),"click",function(m){k.OnValidPrice(m,"txtPrice",g,b,f)})}}}else{var c=new ShoppingCart(true,k,null,true);c.AddArticleToCart(g,null,null,null,null,h,b,f,"false")}}};BookDetail.prototype.CloseModal=function(){if(this.bookDetailModal){this.bookDetailModal.close()}};BookDetail.prototype.OnPriceChange=function(d,c,b){if(document.getElementById(c)&&document.getElementById(b)){if(document.getElementById(c).value.length>=1&&CurrencyValidation(document.getElementById(c).value)){var a=document.getElementById(b);a.className="Valide";a.src=this.ImageValide;a.alt="Valide";a.title="Valide";if(document.getElementById("btnSubmit")){document.getElementById("btnSubmit").disabled=""}}else{var a=document.getElementById(b);a.className="Invalid";a.src=this.ImageInvalid;a.alt="Non Valide";a.title="Non Valide";if(document.getElementById("btnSubmit")){document.getElementById("btnSubmit").disabled="disabled"}}}};BookDetail.prototype.OnValidPriceEnter=function(g,f,b,i,a){var c;if(g&&g.which){g=g;c=g.which}else{g=event;c=g.keyCode}if(c==13){if(document.getElementById(f)){price=document.getElementById(f).value;this.CloseModal();var d=this;var h=new ShoppingCart(true,d,null,true);h.AddArticleToCart(b,null,null,null,null,price,i,a,"false")}return false}else{return true}};BookDetail.prototype.OnValidPrice=function(f,d,b,h,a){if(document.getElementById(d)){price=document.getElementById(d).value;this.CloseModal();var c=this;var g=new ShoppingCart(true,c,null,true);g.AddArticleToCart(b,null,null,null,null,price,h,a,"false")}};BookDetail.prototype.RefreshContent=function(){if(this.DivID&&document.getElementById(this.DivID)){if(document.getElementById(this.DivID).hasChildNodes()){while(document.getElementById(this.DivID).childNodes.length>=1){document.getElementById(this.DivID).removeChild(document.getElementById(this.DivID).firstChild)}}}var a=this;GetBookDetail(a)};BookDetail.prototype.OnGetVideoDataError=function(a){if(document.getElementById("loading_"+a+"_clip")){document.getElementById("loading_"+a+"_clip").style.display="none"}};BookDetail.prototype.OnGetVideoData=function(i,h){var c=this;if(i&&i.responseXML){var g=i.responseXML;var b=i.responseXML.getElementsByTagName("oembed");if(b&&b.length>0){var d=b[0].getElementsByTagName("html");if(d&&d.length>0){try{if(document.getElementById("clip_"+h)){var a=d[0].firstChild.nodeValue;document.getElementById("clip_"+h).innerHTML=a}}catch(f){}}}}else{}};BookDetail.prototype.GetVideoData=function(c,b){var a=this;new Ajax.Request(this.RootUrl+"VimeoWidget.ashx",{method:"get",onSuccess:function(d){a.OnGetVideoData(d,c)},onFailure:function(){a.OnGetVideoDataError(c)},parameters:{ms:new Date().getTime(),id:c,width:b}})};