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 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("available");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(y){divId=this.divID;var w=this;if(y&&y.responseXML){var t="";var D="";var u="";var H="";var l="";var x="";var A=new Date();var f="";var F=false;if(y.responseXML.getElementsByTagName("recordreference")&&y.responseXML.getElementsByTagName("recordreference").length>0&&y.responseXML.getElementsByTagName("recordreference")[0].firstChild){H=y.responseXML.getElementsByTagName("recordreference")[0].firstChild.nodeValue}if(y.responseXML.getElementsByTagName("allauthors")&&y.responseXML.getElementsByTagName("allauthors").length>0&&y.responseXML.getElementsByTagName("allauthors")[0].firstChild){l=y.responseXML.getElementsByTagName("allauthors")[0].firstChild.nodeValue}if(y.responseXML.getElementsByTagName("title")&&y.responseXML.getElementsByTagName("title").length>0){var v=y.responseXML.getElementsByTagName("title")[0];if(v.getElementsByTagName("titletext")&&v.getElementsByTagName("titletext").length>0&&v.getElementsByTagName("titletext")[0].firstChild){D=v.getElementsByTagName("titletext")[0].firstChild.nodeValue}if(v.getElementsByTagName("subtitle")&&v.getElementsByTagName("subtitle").length>0&&v.getElementsByTagName("subtitle")[0].firstChild){u=v.getElementsByTagName("subtitle")[0].firstChild.nodeValue}}if(y.responseXML.getElementsByTagName("mediafile")&&y.responseXML.getElementsByTagName("mediafile").length>0){var I=y.responseXML.getElementsByTagName("mediafile")[0];if(I.getElementsByTagName("mediafilelink")&&I.getElementsByTagName("mediafilelink").length>0&&I.getElementsByTagName("mediafilelink")[0].firstChild&&I.getElementsByTagName("mediafilelink")[0].firstChild.nodeValue&&I.getElementsByTagName("mediafilelink")[0].firstChild.nodeValue!=""){t=I.getElementsByTagName("mediafilelink")[0].firstChild.nodeValue}else{t=this.RootUrl+"files/no-cover.jpg"}}else{t=this.RootUrl+"files/no-cover.jpg"}if(y.responseXML.getElementsByTagName("othertext")&&y.responseXML.getElementsByTagName("othertext").length>0){var I=y.responseXML.getElementsByTagName("othertext")[0];if(I.getElementsByTagName("text")&&I.getElementsByTagName("text").length>0&&I.getElementsByTagName("text")[0].firstChild){x=I.getElementsByTagName("text")[0].firstChild.nodeValue}}if(y.responseXML.getElementsByTagName("publicationdate")&&y.responseXML.getElementsByTagName("publicationdate").length>0&&y.responseXML.getElementsByTagName("publicationdate")[0].firstChild){pubDateStr=y.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)}A=new Date(parseInt(pubDateStr.substr(0,4)),parseInt(month)-1,parseInt(day),0,0,0,0)}else{A=null}}else{A=null}}else{A=null}if(y.responseXML.getElementsByTagName("publisher")&&y.responseXML.getElementsByTagName("publisher").length>0){var j=y.responseXML.getElementsByTagName("publisher")[0];if(j.getElementsByTagName("publishername")&&j.getElementsByTagName("publishername").length>0&&j.getElementsByTagName("publishername")[0].firstChild){f=j.getElementsByTagName("publishername")[0].firstChild.nodeValue}}document.title=l+" - "+D;if(u&&u!=""){document.title=document.title+" ("+u+")"}if(document.getElementById(this.DivID)){var E=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 L=document.createElement("div");L.id="DivYourCommentArea";yourCommentTitle=document.createElement("h1");yourCommentTitle.id="YourCommentTitle";yourCommentTitle.appendChild(document.createTextNode("Votre avis nous intéresse !"));divYourComment.appendChild(yourCommentTitle);divYourComment.appendChild(L);var G=false;if(GetCookie("Mail")){G=true;textArea=document.createElement("textarea");textArea.id="txtYourComment";textArea.setAttribute("rows","1");L.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(T){w.wymEditor=T;var i="<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(T._box).find(T._options.toolsSelector+T._options.toolsListSelector).append(i);jQuery(T._box).find("li.wym_tools_newbutton a").click(function(){w.SaveComment();return(false)})}})})},500)}else{L.appendChild(document.createTextNode("Veuillez vous connecter afin de saisir votre commentaire"))}var p=document.createElement("div");p.id="HeaderDetailTitle";divDetail.appendChild(p);var a=document.createElement("div");a.id="TitleBook";a.className="BookTitle";a.innerHTML=html_entity_decode(D);p.appendChild(a);var M=document.createElement("div");M.id="Actions";p.appendChild(M);aPDF=document.createElement("a");aPDF.setAttribute("href","#PDF"+H);aPDF.onclick=function(){window.open(w.RootUrl+"GeneratePDF.ashx?ean="+H)};imgPDF=document.createElement("img");imgPDF.src=this.RootUrl+"Images/BookDetail/pdf.png";imgPDF.style.border="none";aPDF.appendChild(imgPDF);M.appendChild(aPDF);aPrint=document.createElement("a");aPrint.setAttribute("href","#Print"+H);imgPrint=document.createElement("img");imgPrint.src=this.RootUrl+"Images/BookDetail/printer.png";imgPrint.style.border="none";aPrint.onclick=function(){window.print()};aPrint.appendChild(imgPrint);M.appendChild(aPrint);$.getScript("http://s7.addthis.com/js/250/addthis_widget.js#username=filigranes");var e=document.getElementsByTagName("head")[0];if(e){var n=e.getElementsByTagName("meta");var z=false;for(var N=0;N<n.length;N++){var k=n[N];if(k.name.toLowerCase()=="title"||k.name.toLowerCase()=="description"){e.removeChild(k);break}}}if(document.createElement&&(k=document.createElement("meta"))){k.name="title";k.content=document.title;document.getElementsByTagName("head").item(0).appendChild(k)}if(document.createElement&&(k=document.createElement("meta"))){k.name="description";k.content=html_entity_decode(x);document.getElementsByTagName("head").item(0).appendChild(k)}if(document.createElement&&(link=document.createElement("link"))){link.rel="image_src";link.href=t;document.getElementsByTagName("head").item(0).appendChild(link)}if(document.createElement&&(k=document.createElement("meta"))){k.name="description";k.content=html_entity_decode(x);document.getElementsByTagName("head").item(0).appendChild(k)}var d=document.createElement("div");d.id="divAddThis";var R=document.createElement("a");R.href="#AddThis";R.onmouseover=function(){return addthis_open(this,"",document.url,document.title)};R.onmouseout=function(){addthis_close()};R.onclick=function(){return addthis_sendto()};imgAddThis=document.createElement("img");imgAddThis.id="imgAddthis";imgAddThis.src="http://files.honet.be/wymstyle/sites/www-filigranes-be/partager.gif";imgAddThis.style.border="0";R.appendChild(imgAddThis);d.appendChild(R);M.appendChild(d);var c=document.createElement("div");c.id="divILike";c.innerHTML='<iframe src="http://www.facebook.com/plugins/like.php?href='+encodeURIComponent(window.location)+'&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:75px; height:21px;" allowTransparency="true"></iframe>';M.appendChild(c);divBookImage=document.createElement("div");divDetail.appendChild(divBookImage);if(t){img=document.createElement("img");img.src=t;img.className="BookImage";divBookImage.appendChild(img)}var K=document.createElement("div");divDetail.appendChild(K);K.className="BookAuthor";var h=document.createElement("span");h.appendChild(document.createTextNode("Auteur : "));K.appendChild(h);K.appendChild(document.createTextNode(l));var B=document.createElement("div");divDetail.appendChild(B);var S=document.createElement("span");S.appendChild(document.createTextNode("Editeur : "));B.appendChild(S);B.appendChild(document.createTextNode(f));var m=document.createElement("div");divDetail.appendChild(m);var Q=document.createElement("span");Q.appendChild(document.createTextNode("Paru : "));m.appendChild(Q);if(A){m.appendChild(document.createTextNode(A.format("dd/mm/yyyy")))}else{m.appendChild(document.createTextNode(""))}divRating=document.createElement("div");divDetail.appendChild(divRating);divRating.id="ratingDetail"+H;var J=new Rating("ratingDetail"+H,H,"Book",5,true,false);J.Init();divEan=document.createElement("div");divDetail.appendChild(divEan);var P=document.createElement("span");P.appendChild(document.createTextNode("EAN : "));divEan.appendChild(P);divEan.appendChild(document.createTextNode(H));var C=document.createElement("div");C.id="divStock";divDetail.appendChild(C);var q=document.createElement("span");q.appendChild(document.createTextNode("En stock : "));C.appendChild(q);C.style.display="none";var s=document.createElement("div");s.id="divStockAlert";divDetail.appendChild(s);s.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.";s.style.display="none";var o=document.createElement("div");o.id="divPrice";divDetail.appendChild(o);var O=document.createElement("div");O.id="divImageList";divDetail.appendChild(O);divBuy=document.createElement("div");divBuy.id="divBuy";divBuy.style.display="none";O.appendChild(divBuy);if(this.ListID&&this.ListID!=""){aList=document.createElement("a");aList.setAttribute("target","_self");aList.setAttribute("href",w.LinkWishlist+"?orderid="+w.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);O.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(x);E.appendChild(divDetail);E.appendChild(divMedia);E.appendChild(divFiligranautesComment);E.appendChild(divYourComment);w=this;GetBookMedia(w);GetBookFiligranautesComment(w);if(w.ListItemID&&w.ListID){GetBookFromList(w)}else{GetBookStock(w)}addBookmarkObj.convert("BookMark");if(G==false){var r=document.createElement("div");r.id="login_bookdetail";document.getElementById("DivYourCommentArea").appendChild(r);var g=new Login("login_bookdetail");g.Init();g.OnLoginSucceedEvent=OnLoginSucceedBook;g.LoginParentModule=w}}}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}})};
