function parsejson(ResponseValue) {

//alert(ResponseValue);

	//if json has been returned as expected the first character of the response will be '{'
	if (ResponseValue.substr(0,1) != '{') {

		//json NOT returned so show entire message
		alert(ResponseValue);
		return null;

	} else {

		var oResults = eval("(" + ResponseValue + ")");

		if (oResults.message != '') {

			alert(oResults.message);

		}

		if (oResults.result == 0) {
			return oResults;
		} else {
			return null;
		}
	}
}
