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