Ajax problem with IE

Im writing a code to get data from mysql using php and ajax. Code works fine with firefox , but doesn,t work in IE 8. Is it a problem with the ActiveXObject.

function getXMLHttpRequestObject()
{
var ajax = false;
if (window.XMLHttpRequest)
{
ajax = new XMLHttpRequest();
}else if (window.ActiveXObject)
{
try
{
ajax = new ActiveXObject(“Msxml2.XMLHTTP”);
}catch(e)
{
try
{
ajax = new ActiveXObject(“Microsoft.XMLHTTP”);
} catch(e){ }
}
}
return ajax;
}

window.onclick = init;

function init()
{
var ajax = getXMLHttpRequestObject();

if (ajax) {

	document.getElementById('year').onchange = function()
	{
		var year = document.getElementById('year').value;
        
		ajax.open('get', '../../ajax/ajaxuser/year_select.php?year=' + encodeURIComponent(year));
		ajax.onreadystatechange = function() 
		{
			handleResponseyear(ajax);
		}

	ajax.send(null);
	return false;
	}//year

}

function handleResponseyear(ajax)
{
if (ajax.readyState == 4)
{
if ((ajax.status == 200) || (ajax.status == 304) )
{
var results = document.getElementById(‘results’);
results.innerHTML = ajax.responseText;
results.style.display = ‘block’;
}else
{
document.getElementById(‘form_year’).submit();
}
}
}