var btn = sys.findWidget("titleBar").findChild("close_button");
btn.clicked.connect(
function(checked)
{
	d.closeIt();
}
);

var btn2 = sys.findWidget("titleBar").findChild("max_button");
btn2.clicked.connect(
function(checked)
{
	d.showMaxRestore();
}
);


var btn3 = sys.findWidget("titleBar").findChild("min_button");
btn3.clicked.connect(
function(checked)
{
	d.showMinRestore();
}
);