function get(id) {
    return document.getElementById(id);
}

function ajax_object() {
    var obj = null;
    if (window.XMLHttpRequest){
	obj = new XMLHttpRequest();
    } else if (window.ActiveXObject){
	try {
	    obj = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	    try {
		obj = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch (e) {}
	}
    }

    if (!obj){
	alert("We are sorry but you are using an outdated browser.  To view this site you must update your browser.");
	return false;
    } else {
	return obj;
    }
}

function ajax_get(url, post, async) {
    var obj = ajax_object();

    if(post) {
	encoded = '';
	sep = '';
	for(k in post) {
	    encoded += sep + encodeURIComponent(k) + '=' + encodeURIComponent(post[k]);
	    sep = '&';
	}

	obj.open('POST', url, false);
	obj.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	obj.send(encoded);
    }
    else {
	obj.open('GET', url, false);
	obj.send(unll);
    }
    return obj.responseText;
}

function refresh_page() {
    var url = unescape(window.location.pathname);
    window.location.href = url;
}
