function breakQueryString(queryString) {
	var qsParm = new Array();
	var query = queryString.substring(1);
	var parms = query.split('&');
	for (var i=0; i<parms.length; i++) {
		var pos = parms[i].indexOf('=');
		if (pos > 0) {
			var key = parms[i].substring(0,pos);
			var val = parms[i].substring(pos+1);
			if (key != 'ALINK') {  /* including ALINK breaks events on 7.0+ */
				qsParm[key] = val;
			}
		}
	}
	return qsParm;
}

function buildFormFields(form, fields) {
	for (var name in fields) {
		var value = fields[name];
		var input = document.createElement("input");
		input.name = name;
		input.value = value;
		input.type = "hidden";
		form.appendChild(input);
	}
}

function fixSapEventForm(form) {
	var act = form.action;
	if (act.charAt(0) == '?') {
		var fields = breakQueryString(act);
		buildFormFields(form, fields);
		form.action = "dummy";
	}
}

