OK, so I am using the following Ajax script:

Code:
function switch_cat(cat)
{
	var xmlhttp=false;
	
	try
	{
		xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
	}
	
	catch(e)
	{
		try
		{
			xmlhttp = new
			ActiveXObject('Microsoft.XMLHTTP'); 
		}
		
		catch(E)
		{
			xmlhttp = false;
		}
	}
	
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
	{
		xmlhttp = new XMLHttpRequest();
	}
	
	var file = 'cats.php?cat='; 
	xmlhttp.open('GET', file + cat, true);
	//document.getElementById('content').innerHTML = "Loading..."; 
	
	xmlhttp.onreadystatechange = function()
	{
		if (xmlhttp.readyState >0 && xmlhttp.readyState <4)
		{ 
			document.getElementById('content').innerHTML = "";
		}
		
		else if (xmlhttp.readyState == 4)
		{ 
			var content = xmlhttp.responseText; 
			if (content)
			{ 
				document.getElementById('content').innerHTML = content; 
			}
		}
	}
	
	xmlhttp.send(null);
	return;
}
As you can see, what is happening is that it loading data from an external PHP script, for example, cats.php?cat=1.

I'm noticed some problems with this in IE 6, where instead of putting only the raw text generated from the external file, it puts in ALL the content from the main page which is calling this script.

Is there any better way for me to go about this? Or any changes I could make to this script?

Thanks in advance.