/**
  * This file contains the javascript bits needed for category paging... if you intend to use category paging
  * in your theme, make sure to include this file in the header ;)
  */
function catpage(depth, pagenum, total) {
    /* show pagenum in 'depth', hide all others */
    if(pagenum == -1) return false;
    if(pagenum == total) return false;
    var currentpagediv = "menupage-"+depth+"-"+pagenum;
    var prevpagediv = "menupage-"+depth+"-"+(pagenum-1);
    var prevpagediv2 = "menupage-"+depth+"-"+(pagenum+1);
    //showPage(currentpagediv);
    showPage(currentpagediv);
    hidePage(prevpagediv);
    hidePage(prevpagediv2);
//    alert(currentpagediv);
    return true;
}

function hidePage(hideid) {
    hideobj = document.getElementById(hideid);
    if(!hideobj) return false;
    hideobj.style.display = 'none';
}

function showPage(showid) {
    showobj = document.getElementById(showid);
    if(!showobj) return false;
    showobj.style.display = '';
}

