var buttons = window.getElementsByClassName("ButtonUI");
for (var i = 0; i < buttons.length; i++) {
    buttons[i].OnClick = "OnClick";
}


function OnClick(obj) {
    if (obj.getName() == "closebtn") 
    {
        window.closeWnd();
    }
    else if (obj.getName() == "linkbtn") 
    {
//        var str = "http://cloud.189.cn";
//        window.shellExecute("open", str, "", "", SW_SHOWNOACTIVATE);
    }

}