function resizeIframe(frame) { if (frame == null) { return true; } var docEl = null; var isFirefox = navigator.userAgent.search("Firefox") >= 0; if (isFirefox && frame.contentDocument != null) { docEl = frame.contentDocument.documentElement; } else if (frame.contentWindow != null) { docEl = frame.contentWindow.document.body; } if (docEl == null) { return; } frame.style.height="0px"; var maxWidth = docEl.scrollWidth; var maxHeight = (isFirefox ? (docEl.offsetHeight) : (docEl.scrollHeight)); frame.width = maxWidth; frame.height = maxHeight; frame.style.width = frame.width + "px"; frame.style.height = frame.height + "px"; if (maxHeight > 20) { frame.height = maxHeight; frame.style.height = frame.height + "px"; } else { frame.style.height = "100%"; } if (maxWidth > 0) { frame.width = maxWidth; frame.style.width = frame.width + "px"; } else { frame.style.width = "100%"; } } (function () { var id = "e6d2302ee7639321fa8f62aa37ad29ae3568c075", wHTML = '', baseURL = 'https://www.psicologi-italia.it/', imgsPath = 'images/legacy_js_widget', canonical = 'https://www.psicologi-italia.it/psicologo/lara-sciscio.html'; maxWidth = '200'; widgetVd = '1'; skinType = 'light'; wD = {"value":"91","label":"Dott.ssa Lara Sciscio","text":"Dott.ssa Lara Sciscio","linkTo":"profile","image":"logo.png","extra":{"type":null,"data":{"title":null,"image":null,"url":null}},"starsvalue":5,"starscount":10,"stars":5,"profile_image":{"style":"position: absolute; left: 50%; margin-left: -40px; top: 50%; margin-top: -40px;","src":"https:\/\/cdn.psicologi-italia.it\/uploads\/2022\/04\/21\/thumb\/s_w80_h80\/sciscio-4273.jpeg","bigsrc":null,"width":50,"height":50,"didascalia":null,"ori":null}}; wTarget = "_blank"; var init = function () { var wHTML = '
', item = document.getElementById("iw_widget_e6d2302ee7639321fa8f62aa37ad29ae3568c075"), //targetUrl = (wD.linkTo == "profile") ? canonical : baseURL; targetUrl = canonical; var headText = wD.text; if (wD.image !== null) { headText = ''+wD.text+''; } if (wD.value == "91") { headText = ''+wD.text+'
'+wD.text+''+wD.text+'
'; } if (wD.starsvalue > 0) { headText += '

'; for(i = 1; i <= 5; i++){ if(wD.starsvalue >= i || wD.starsvalue > i+0.5){ headText += ''; } else if(wD.stars >= i-0.5) { headText += ''; } else { headText += ''; } } headText += ' ('+wD.starscount+')

'; } wHTML+= '
'+headText+'
'; /*if (wD.value == "91") { wHTML+= '
'; if (widgetVd == 1) { wHTML+= 'Psicologo iscritto all\'albo e verificato da'; } wHTML+= 'Psicologi Italia
'; }*/ wHTML+='
'; let isWidget = document.getElementById("WidgetFrameId_" + id); var widget = (isWidget)?isWidget:document.createElement("iframe"); widget.id = "WidgetFrameId_" + id; widget.style = "border: none;margin: 0 auto; display: block; width: 100%; width:"+maxWidth+"px;"; widget.setAttribute("scrolling","no"); widget.setAttribute("onload","javascript:resizeIframe(this);"); item.prepend(widget); var psiCssElement = document.createElement("link"); psiCssElement.type = "text/css"; psiCssElement.rel = "stylesheet"; psiCssElement.id = "WidgetCSS_" + id; psiCssElement.href = baseURL + "css/legacy_widget_style.css?v=1743724520"; var doc = document.getElementById("WidgetFrameId_" + id).contentWindow.document; doc.open(); doc.write('' + wHTML + ''); doc.head.appendChild(psiCssElement); doc.close(); }; init(); })();