avail
is an xml node, what you want is the text inside the node to test against
avail = response.getElementsByTagName("avail")[0];
if(avail.childNodes[0].nodeValue == "yes"){
document.getElementById("dstat").innerHTML = "AVAIL";
}else{
document.getElementById("dstat").innerHTML = "NOT AVAIL";
}