JS part:
//Next div
function next() {
var arr = document.getElementById('tdBjzbsx').getElementsByTagName('div');
for (i = 0; i < arr.length-1; i ) {
if ((arr[i].style.display == "block"||arr[i].style.display == "") && i <= 2) {
arr[i 1].style. display = "block";
arr[i].style.display = "none";
}
}
}
//Previous div
function top() {
var arr = document.getElementById('tdBjzbsx').getElementsByTagName('div');
for (i = 0; i < arr.length; i ) {
if ((arr[i ].style.display == "block"||arr[i].style.display == "") && i <= 3) {
arr[i - 1].style.display = "block" ;
arr[i].style.display = "none";
break;
}
}
}
JSP part: