var dialog = {
show : function(text) {
//тут что-то делается
},
hide : function() {
//и тут тоже
}
}dialog.show("текст") все работает.dialog.hide() получается вот такая ерунда: TypeError: dialog.hide is not a function