function getElementsByClassName(objparent,classna) {
3 var classElements = [],allElements = objparent.getElementsByTagName("div");
4 for (var i=0; i< allElements.length; i++ )
5 {
6 if (allElements[i].className == classna ) {
7 classElements[classElements.length] = allElements[i];
8 }
9 }
10 return classElements;
11 }
12 function showDiv(ID){
13
14 var onlines = document.getElementById("online");
15 var childelements = getElementsByClassName(onlines,"online");
16 for (var i = 0; i < childelements.length; i++) {
17 var e = childelements[i];
18 e.style.display = "none";
19 }
20 document.getElementById("online" + ID).style.display = "block";
21 }
22