function GkWizzard () {}

GkWizzard.prototype.updateOkBtn = function (text, action) {
	Event.stopObserving($('GkAlertOkBtn'), 'click', GkWizzard.onSubmit);
	$('GkAlertOkBtn').update(text);
	Event.observe($('GkAlertOkBtn'), 'click', action);
}

GkWizzard.prototype.destroy = function (e) {
	if (e) Event.stop(e);
	$('GkAlert').remove();
}

GkWizzard.prototype.build = function (o) {
	var alertHtml = '<div id="GkAlert">';
	alertHtml += '<div id="GkAlertBg"></div>';
	alertHtml += '<div id="GkAlertBox">';
	alertHtml += '<a href="#" id="GkAlertCloseBtn">X</a>';
	
	alertHtml += '<div id="GkAlertText">';
	alertHtml += o.content;
	alertHtml += '</div>';
	alertHtml += '<div id="GkAlertButtons">';
	alertHtml += '<a href="#" id="GkAlertOkBtn" /><span>OK<span></a>';
	alertHtml += '</div>';
	alertHtml += '</div>';
	alertHtml += '</div>';
	this.onSubmit = o.onSubmit;
	new Insertion.Bottom(document.body, alertHtml);
	Event.observe($('GkAlertOkBtn'), 'click', this.onSubmit);
	Event.observe($('GkAlertCloseBtn'), 'click', this.destroy);
	$('GkAlertOkBtn').focus();
	
}

GkWizzard.prototype.init = function (o) {
	this.build(o);
}

GkWizzard = new GkWizzard();