var weatherSpanId = 'weather_single'; var _ROOT_URL = 'http://www.meteovremea.com'; var _TRAVEL_RO_URL = 'http://www.travelro.ro'; var widgetContent = '
Temperatura curenta: 8°C
Astazi, 16/12/2017
Min : 1°C     Max: 9°C
'; var displayLink = 2; var forceDisplay = 0; var elem = document.getElementById(weatherSpanId); var docLocation = document.location.toString(); if (elem != null) { var strText = elem.parentNode.innerHTML; var strTextParent = (elem.parentNode.parentNode != null)?elem.parentNode.parentNode.innerHTML:""; var strText = elem.parentNode.innerHTML; var bDisplay = true; if ( (strText.indexOf('href="'+_ROOT_URL) == -1) && (strTextParent.indexOf('href="'+_ROOT_URL) == -1)) bDisplay = false; if (displayLink == 2) { if ( (strText.indexOf('href="'+_TRAVEL_RO_URL+'>') == -1) && (strTextParent.indexOf('href="'+_TRAVEL_RO_URL) == -1)) bDisplay = false; } if (forceDisplay) bDisplay = true; if (!bDisplay) elem.innerHTML = '

'; else elem.innerHTML = widgetContent; }