function getcounts(start, expand, path){
var XMLHttpRequestObject = false;
//check browser
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
}
if(XMLHttpRequestObject) {
if (expand) {
XMLHttpRequestObject.open("GET", path+"?readviewentries&Start=1&Count=9999&Expand=" + expand);
}else{
XMLHttpRequestObject.open("GET", path+"?readviewentries&Start=1&Count=9999");
}
XMLHttpRequestObject.onreadystatechange = function() {
if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) {
var XMLEntriesDoc = XMLHttpRequestObject.responseXML;
var entries = XMLEntriesDoc.getElementsByTagName("viewentry");
//total entries at this point
var entrycount = entries.length + 1;
//loop and find the count where we're starting
var counter = 0;
for (i = 0; i < entries.length; i++){
counter = counter + 1
if (entries[i].getAttribute("position")==start) {
var startentrynum = counter ;
}
}
alert('Starting at ' + startentrynum + ' of ' + entrycount);
}
}
XMLHttpRequestObject.send(null);
}
}