var vinLoopCount = 0; var vinInterval = setInterval(function(){ vinLoopCount++; var elements = []; for (i = 0; i < 1; i++) { if(document.getElementById("dvs_vin_btn_KL4CJGSB3LB070628_"+i) != null){ elements.push(document.getElementById("dvs_vin_btn_KL4CJGSB3LB070628_"+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(('KL4CJGSB3LB070628' == elements[k].getAttribute("vin")) || ('KL4CJGSB3LB070628' == elements[k].getAttribute("edstyleid"))) { } loadingElement.style.display = 'none'; } } } if(vinLoopCount >= 10) { clearInterval(vinInterval); } }, 2000);