Tizen 2.0 Release
[samples/web/MemoryMatch.git] / js / help.js
1 /*
2  * Copyright (c) 2012, Intel Corporation.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9
10 function help_init(btnid, prefix)
11 {
12     var btn = document.getElementById(btnid);
13     var dialog = document.getElementById(prefix+"dialog");
14     var close = document.getElementById(prefix+"close");
15     var title = document.getElementById(prefix+"title");
16     var contents = document.getElementById(prefix+"contents");
17
18     btn.addEventListener('click', function() {
19         dialog.className = "helpdialog shown";
20     });
21
22     close.addEventListener('click', function() {
23         dialog.className = "helpdialog";
24     });
25 }
26