/* getPathName Required due to Opera bug where location.pathname returns location.search as well. */ function getPathName(){ var pth = location.pathname.split('?'); return pth[0]; } /* NavigateView cycles through a view using the start and count paramaters of the ?OpenView method. Required as @Commands do not work with single category views on the web !! Arguments: d = direction, either "prev" or "next" n = incremental count number */ function navigateView (d, n) { var c = 0; var args = location.search.split('&'); var news = new Array(); var ii = 0; for (var i = 0; i < args.length; i ++) { if ( args[i].toLowerCase().indexOf('start=') != -1){ c = parseInt(args[i].split('=')[1]); } else { news[ii] = args[i]; ii ++; } } var strt = getPathName(); if (args[0] == ''){ location.href = strt + '?OpenForm&start=' + n; } else if (c == 0 && d == 'next'){ location.href += '&start=' + n; } else if (c == 0 && d == 'prev'){ return alert('Er zijn niet meer documenten in deze richting.'); } else if (c <= n && d == 'prev'){ location.href = strt + news.join('&'); } else if (d == 'next'){ location.href = strt + news.join('&') + '&start=' + ( c + n ); } else if (d == 'prev'){ location.href = strt + news.join('&') + '&start=' + ( c - n); } }