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