var xmlhttp;function showSelection(str){xmlhttp=GetXmlHttpObject();if (xmlhttp==null)  {  alert ("Browser does not support HTTP Request");  return;  }var url="getCoatings.php";url=url+"?coatingType="+str;url=url+"&sid="+Math.random();xmlhttp.onreadystatechange=stateChanged;xmlhttp.open("GET",url,true);xmlhttp.send(null);}function showCurrencySelection(str){document.getElementById("currencyLabel").innerHTML=str;
if(str=="USD"){	document.getElementById("currencySymbol").innerHTML="$";}else{	document.getElementById("currencySymbol").innerHTML="";}}function showUnitSelection(){
chosen = ""
len = document.form.units.length

for (i = 0; i <len; i++) {
if (document.form.units[i].checked) {
chosen = document.form.units[i].value
}
}if(chosen=="u.s."){document.getElementById("unitLabel").innerHTML="ton";}else{document.getElementById("unitLabel").innerHTML="tonne";}}function showCoats(str){xmlhttp=GetXmlHttpObject();if (xmlhttp==null)  {  alert ("Browser does not support HTTP Request");  return;  }var url="getCoatings.php";url=url+"?coatingSystem="+str;url=url+"&sid="+Math.random();xmlhttp.onreadystatechange=stateChangedCoats;xmlhttp.open("GET",url,true);xmlhttp.send(null);}function stateChanged(){if (xmlhttp.readyState==4){document.getElementById("specificCoatings").innerHTML=xmlhttp.responseText;}}function stateChangedCoats(){if (xmlhttp.readyState==4){document.getElementById("applications").innerHTML=xmlhttp.responseText;}}function stateChangedCurrency(newCurrency, unit){if (xmlhttp.readyState==4){document.getElementById("currencyLabel").innerHTML="("+newCurrency+"/"+unit+")";}}function GetXmlHttpObject(){if (window.XMLHttpRequest)  {  // code for IE7+, Firefox, Chrome, Opera, Safari  return new XMLHttpRequest();  }if (window.ActiveXObject)  {  // code for IE6, IE5  return new ActiveXObject("Microsoft.XMLHTTP");  }return null;}
