function GetXHR()
{
var xmlHttp=null;
try// Firefox, Opera 8.0+, Safari
 { 
 xmlHttp = new XMLHttpRequest();
 }
catch (e)
 {
 try  // Internet Explorer 6.0 and later
  {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)	//  Internet Explorer 5.5
  {
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}

function update_spec(divId, paramStr, inputId)
{
if (document.getElementById(inputId).selectedIndex==0)
	{
	document.getElementById(divId).innerHTML = "";
	return;
	} 

paramStr += document.getElementById(inputId).value;

// load set of dimension inputs for this axle type
var xhr = GetXHR();

xhr.onreadystatechange  = function()
{ 
	 if(xhr.readyState  == 4)
	 {
		  if(xhr.status  == 200)
			{
			document.getElementById(divId).innerHTML = xhr.responseText;		
			}
		  else 
			document.getElementById(divId).innerHTML = "Error code " + xhr.status;
	 }
}; 

// loading place holder for spindle dimensions
document.getElementById(divId).innerHTML = "Loading. . .";

xhr.open('GET', "tc_select_widget.php" + paramStr,  true); 
xhr.send(null);
};