function createRequestObject() {
	var ro; //declare the variable to hold the object.
	var browser = navigator.appName; //find the browser name
	if(browser == "Microsoft Internet Explorer"){
		/* Create the object using MSIE's method */
		ro = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		/* Create the object using other browser's method */
		ro = new XMLHttpRequest();
	}
	return ro; //
	
}


var http = createRequestObject();

function sndReqState(catid) {
//	var catid ;	
//	catid = document.getElementById('part_id').value ;
    http.open('get', 'parts.php?id='+catid);
    http.onreadystatechange = handleResponse;
    http.send(null);
}
function handleResponse() 
{
    if(http.readyState == 4)
	{
        var response = http.responseText;
//		http.setRequestHeader('Accept','message/x-jl-formresult');
        document.getElementById('prodpart_id').innerHTML = response;
    }
}

function sndReqState1(catid) {
//	var catid ;	
//	catid = document.getElementById('part_id').value ;
    http.open('get', 'originalparts.php?id='+catid);
    http.onreadystatechange = handleResponse;
    http.send(null);
}

