set style in tables only
[plewww.git] / planetlab / js / plc_functions.js
1
2 function addLoadEvent(func) {
3   if (!document.getElementById | !document.getElementsByTagName) return;
4   var oldonload=window.onload
5     if (typeof window.onload != 'function') { 
6       window.onload=func 
7     } else {
8       window.onload=function() { oldonload(); func() }
9     }
10 }
11
12 // ----------------------------------------------------------------------------- //
13
14 function show (id) {
15   if (!document.getElementsByTagName) return;
16   if (document.getElementById(id).style.display=='block') {
17     document.getElementById(id).style.display='none';
18   } else{
19     document.getElementById(id).style.display='block';
20   }
21   //  focus is moved by the href of the link to the start of the help
22 }
23
24 function hide(id) {
25   if (document.getElementById) {
26     document.getElementById(id).style.display='none';
27   }
28 }
29
30 function copyValue (id1,id2) {
31   if (document.getElementById) {
32     document.getElementById(id2).value=document.getElementById(id1).value;
33   }
34 }
35
36 // ----------------------------------------------------------------------------- //
37