YAHOO.namespace("container");

function init() {
	var handleSubmit = function() {
		YAHOO.log("Okno dialogowe zostało przesłane","warn");
		this.hide();
	}
	var handleCancel = function() {
		YAHOO.log("Anulowano okno dialogowe","warn");
		this.hide();
	}

	YAHOO.container.dialog1 = new YAHOO.widget.Dialog("dlg", 
		{ width: "250px",
			fixedcenter: true,
			visible: false, 
			constraintoviewport : true,
			buttons:[ 
				{text:"OK", handler:handleSubmit, isDefault:true}, 
				{text:"Anuluj", handler:handleCancel}
			], 
			effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25}
		}
	);

	YAHOO.container.dialog1.render();

	document.getElementById("loadDialog").onclick = function() {
		YAHOO.log("Uruchomienie animacji");
		YAHOO.container.dialog1.show();
	}

	var myLogReader = new YAHOO.widget.LogReader("logArea");
}

YAHOO.util.Event.onDOMReady(init); 
