var vinLoopCount = 0; var vinInterval = setInterval(function(){ vinLoopCount++; var elements = []; for (i = 0; i < 1; i++) { if(document.getElementById("dvs_vin_btn_1N4AL3AP3DN523617_"+i) != null){ elements.push(document.getElementById("dvs_vin_btn_1N4AL3AP3DN523617_"+i)); } } if(elements != null && elements.length > 0) { for(var k = 0; k < elements.length; k++) { if(elements[k] != null) { clearInterval(vinInterval); for(var i=0; i < elements[k].childNodes.length; i++) { if(elements[k].childNodes[i].tagName == "DIV") { var loadingElement = elements[k].childNodes[i]; } if(elements[k].childNodes[i].tagName == "A") { var urlElement = elements[k].childNodes[i]; } } if(('1N4AL3AP3DN523617' == elements[k].getAttribute("vin")) || ('1N4AL3AP3DN523617' == elements[k].getAttribute("edstyleid"))) { } loadingElement.style.display = 'none'; } } } if(vinLoopCount >= 10) { clearInterval(vinInterval); } }, 2000);