I have a javascript code and want to extend this code now. how can I write a makeAMessenger function in global scope so that it triggers when user clicks document and alert

Code:
THIS. IS. SPART.
currently I have following code.

Code:
function initiateMadness() {	
	var sparta = {
        name : "Sparta"
    };

    function madness() {
    	alert("THIS. IS. " + this.name.toUpperCase() + ".");
	}

	document.onclick = makeAMessenger(madness, sparta);
}

initiateMadness();