var availableQTY = "80"; if(availableQTY <= 0 || availableQTY == null) { document.getElementById("orderdiv").style.display = "none"; document.getElementById("outofstock").style.display = ""; document.getElementById("availdisplay").innerHTML = "Out of Stock"; document.getElementById("availdisplay").className = "outofstock"; } else { document.getElementById("orderdiv").style.display = ""; document.getElementById("outofstock").style.display = "none"; document.getElementById("availdisplay").innerHTML = "In Stock"; document.getElementById("availdisplay").className = "stock"; }