we need to use following coding for creating cfmessagebox object.
var RandCount = Math.random();
ColdFusion.MessageBox.create(obj + RandCount, 'Alert', 'Title', messageText);
ColdFusion.MessageBox.show(obj + RandCount);
function DisplayMessageAlert (obj, messageText)
window.alert = function (message)
Here is how to use after all.
All of above code will be embeded in script tag.