testing commit, please ignore
[kcls-web.git] / opac / skin / login2 / js / tips.js
1 attachEvt('result', 'allRecordsReceived', insertTip);\r
2 \r
3 /*\r
4 var user_tips = [\r
5         'Click on a folder icon in the sidebar to access related quick searches',\r
6         "If you don't find what you want try expanding your search using the range selector at the right of the search bar"\r
7 ];\r
8 */\r
9 \r
10 function insertTip () {\r
11         var tip_div = document.getElementById('tips');\r
12         if (tip_div) {\r
13                 var tips = tip_div.getElementsByTagName('div')[0].getElementsByTagName('span');\r
14                 var index = Math.floor(Math.random() * tips.length);\r
15                 if(tips[index]) tip_div.appendChild( tips[index] );\r
16                 removeCSSClass(tip_div, 'hide_me');\r
17         }\r
18 }\r
19 \r