function addLoadEvent(A){var B=window.onload;if(typeof window.onload!="function"){window.onload=A;}else{window.onload=function(){B();A();};}}socialSharingComponent=function(){var savedDatas=null;var socialSharingHeader="";var product="";var socialSharingPopupUrl="";
var linksIds=["socialsharingbottom","socialsharingleft"];function init(header,prod,url){if(header!=""&&socialSharingHeader==""){socialSharingHeader=header;}if(product==""){product=prod;}socialSharingPopupUrl=url;}function checkEnabled(){var separator="?";if(socialSharingPopupUrl.indexOf("?")!=-1){separator="&";
}loadSocialData(showLinks,socialSharingPopupUrl+separator+"template=isAvailableView");}function showLinks(result){if(result=="true"){for(var i=0;i<linksIds.length;i++){showBlock(linksIds[i]);}}else{for(var i=0;i<linksIds.length;i++){removeBlock(linksIds[i]);
}}}function showBlock(id){if(document.getElementById(id)){document.getElementById(id).style.display="block";}}function removeBlock(id){if(document.getElementById(id)){var el=document.getElementById(id);el.parentNode.removeChild(el);}}function show(){try{if(!isFunction(popup.openLayer)){loadResource("script","text/javascript",contextRoot+"/js/popupLayerFunctions.js","tmpJsIncl",document.getElementById("pagecontent"),"socialSharingComponent.show()");
return ;}if(savedDatas==null){loadSocialData(processData,socialSharingPopupUrl);}else{popup.openLayer("socialSharingItem","","socialsharing",422,350,product,"SocialSharing",savedDatas,true);}}catch(e){console.log(e);}}function loadSocialData(callback,url){if(window.XMLHttpRequest&&!(window.ActiveXObject)){try{req=new XMLHttpRequest();
}catch(e){}}else{if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{req=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}}req.onreadystatechange=function(){if(req.readyState==4){if(req.status==200){var jsScript=req.responseText;
try{callback(jsScript);}catch(e){if(window.console){window.console.log("Error eval "+e);}}}else{if(document.ajax){document.ajax.dyn="Error code "+req.status;}}}};if(req){req.open("GET",url,true);req.send(null);}}function processData(result){eval(result);savedDatas=datas;
if(socialSharingHeader!=""){savedDatas.header=socialSharingHeader;}popup.openLayer("socialSharingItem","","socialsharing",422,350,product,"SocialSharing",savedDatas,true);}return{init:init,show:show,checkEnabled:checkEnabled};}();function showSocialSharingLayer(){setTimeout("socialSharingComponent.show()","500");
}