var xhr;
var sizeCode; 

function getSizeData(productCode, colorCode) { 		
	sizeCode = getCheckedRadio(document.ItemForm.size).value;
	if (window.XMLHttpRequest) {
		xhr = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		xhr = new ActiveXObject("Microsoft.XMLHTTP");
	}
  
  	var url = "/sizes.jsp?pc=" + productCode + "&cc=" + colorCode;
  	
   	xhr.onreadystatechange = processSizes;
   	// if xhr is privatized then use http_request.onreadystatechange = function() { processZipData(xhr); };
   	xhr.open("GET", url);
   	xhr.send(null);
}

function processSizes(){
	if (xhr.readyState == 4) {
    	if (xhr.status == 200) { // 200=success, 404=not found
    		var data = xhr.responseText;
    		document.getElementById("sizesDiv").innerHTML = data;  	
    		setCheckedRadio(document.ItemForm.size,sizeCode);
    	} else {
			// Do Nothing			
    	}
    }
}