function createAJAXobject() {
	var xmlHttp;
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	} catch (e) {
		// Internet Explorer 6.0+
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    	} catch (e) {
			// Internet Explorer 5.5+
			try {
      			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      		} catch (e) {
				return false;
			}
		}
	}
	return xmlHttp;
}

function getCheckedValue (radioObj) {
	if (!radioObj) {
		return "";
	}
	var radioLength = radioObj.length;
	if (radioLength == undefined) {
		if (radioObj.checked) {
			return radioObj.value;
		} else {
			return "";
		}
	}

	for (var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}

	return "";
}

function displayFlashMessage(msg) {
	$('#flashMessage').html(msg);
	
	$('#flashMessage').slideDown();
	setTimeout(function(){
		$('#flashMessage').slideUp();
	}, 5000);
}