  
  function mystuffpagination(responseXML,wwwroot,div_id,callback){
    var pagination = responseXML.getElementsByTagName('ResponsePaginationStatus')[0].firstChild.nodeValue;
    if('NONE' != pagination){
      var paginationContainer = document.createElement('ul');
      paginationContainer.className = 'pageNavigationOnMyStuff';
      var DivId = responseXML.getElementsByTagName('ResponseDivId')[0].firstChild.nodeValue;
      var first = responseXML.getElementsByTagName('ResponseFirstPage')[0].firstChild.nodeValue;
      if('NONE' == first){
        var pgfirstli = document.createElement('li');
        pgfirstli.className = 'first';
        pgfirstli.appendChild(document.createTextNode('\u00a0'));
        paginationContainer.appendChild(pgfirstli);
      }else{
        var pgfirstli = document.createElement('li');
        pgfirstli.className = 'first';
        var pgfirst_ahref = document.createElement('a');
        pgfirst_ahref.href = '#nogo';
        if (pgfirst_ahref.addEventListener) {
          pgfirst_ahref.addEventListener('click',function(){xg_pageXML(getNodeValue(responseXML,'ResponseUrl')+'&page='+first,getNodeValue(responseXML,'ResponseDivId'), callback,wwwroot)},false);
        }else if (pgfirst_ahref.attachEvent) {
            pgfirst_ahref.attachEvent("onclick",function(){xg_pageXML(getNodeValue(responseXML,'ResponseUrl')+'&page='+first,getNodeValue(responseXML,'ResponseDivId'), callback,wwwroot)});
        }
        pgfirstli.appendChild(pgfirst_ahref);
        pgfirstli.appendChild(document.createTextNode('\u00a0'));
        paginationContainer.appendChild(pgfirstli);
      }
      var previous = responseXML.getElementsByTagName('ResponsePrevPage')[0].firstChild.nodeValue;
      if('NONE' == previous){
        var pgprevli = document.createElement('li');
        pgprevli.className = 'previous';
        pgprevli.appendChild(document.createTextNode('\u00a0'));
        paginationContainer.appendChild(pgprevli);
      }else{
        var pgprevli = document.createElement('li');
        pgprevli.className = 'previous';
        var pgprev_ahref = document.createElement('a');
        pgprev_ahref.href = '#nogo';
        if (pgprev_ahref.addEventListener) {
          pgprev_ahref.addEventListener('click',function(){xg_pageXML(getNodeValue(responseXML,'ResponseUrl')+'&page='+previous,getNodeValue(responseXML,'ResponseDivId'), callback,wwwroot)},false);
        }else if (pgprev_ahref.attachEvent) {
          pgprev_ahref.attachEvent("onclick",function(){xg_pageXML(getNodeValue(responseXML,'ResponseUrl')+'&page='+previous,getNodeValue(responseXML,'ResponseDivId'), callback,wwwroot)});
        }
        pgprevli.appendChild(pgprev_ahref);
        pgprevli.appendChild(document.createTextNode('\u00a0'));
        paginationContainer.appendChild(pgprevli);
      }
      //get the navigation node
      var navigation = responseXML.getElementsByTagName('ResponsePages')[0];
        
      //get the page nos array
      var pageNos = navigation.getElementsByTagName('PageNo');
      for(i=0;i<pageNos.length;i++){
        var pageNo = pageNos[i].firstChild.nodeValue;
		var navigationli = document.createElement('li');
		navigationli.id = pageNo;
		var divId = getNodeValue(responseXML,'ResponseDivId');
		if(pageNos[i].attributes.getNamedItem('selected') && pageNos[i].attributes.getNamedItem('selected').value == "true"){
		  navigationli.className = 'selectedPage';
		  navigationli.appendChild(document.createTextNode(pageNo));
		}else{
          var pgnav_ahref = document.createElement('a');
          pageResponseUrl = getNodeValue(responseXML,'ResponseUrl') + '&page='+pageNo;
          pgnav_ahref.href = '#nogo';
          if (pgnav_ahref.addEventListener) {
              //mozilla
              //var  f is included inside the eval function to make firefox compatible
              eval("var f = function(){ xg_pageXML( '" + pageResponseUrl + "','" + divId + "'"
                      + ", callback,wwwroot);}");
              pgnav_ahref.addEventListener('click',f,false);
          }else if (pgnav_ahref.attachEvent) {
              var f = eval("false||function(){ xg_pageXML( '" + pageResponseUrl + "','" + divId + "'"
                      + ", callback,wwwroot)};");
              pgnav_ahref.attachEvent('onclick',f);
          }
          pgnav_ahref.appendChild(document.createTextNode(pageNo));
          navigationli.appendChild(pgnav_ahref);
        }
          paginationContainer.appendChild(navigationli);
		}
//		alert(responseUrl + " : " + responseDivid + " : " + responseFunction + " : " + responseCB + ";");
        var next = responseXML.getElementsByTagName('ResponseNextPage')[0].firstChild.nodeValue;
        if('NONE' == next){
          var pgnextli = document.createElement('li');
          pgnextli.className = 'next';
          pgnextli.appendChild(document.createTextNode('\u00a0'));
          paginationContainer.appendChild(pgnextli);
        }else{
          var pgnextli = document.createElement('li');
          pgnextli.className = 'next';
          var pgnext_ahref = document.createElement('a');
          pgnext_ahref.href = '#nogo';
          if (pgnext_ahref.addEventListener) {
            pgnext_ahref.addEventListener('click',function(){xg_pageXML(getNodeValue(responseXML,'ResponseUrl')+'&page='+next,getNodeValue(responseXML,'ResponseDivId'), callback,wwwroot)},false);
          }else if (pgnext_ahref.attachEvent) {
            pgnext_ahref.attachEvent("onclick",function(){xg_pageXML(getNodeValue(responseXML,'ResponseUrl')+'&page='+next,getNodeValue(responseXML,'ResponseDivId'), callback,wwwroot)});
          }
          pgnextli.appendChild(pgnext_ahref);
          pgnextli.appendChild(document.createTextNode('\u00a0'));
          paginationContainer.appendChild(pgnextli);
        }
        var last = responseXML.getElementsByTagName('ResponseLastPage')[0].firstChild.nodeValue;
        if('NONE' == last){
          var pglastli = document.createElement('li');
          pglastli.className = 'last';
          pglastli.appendChild(document.createTextNode('\u00a0'));
          paginationContainer.appendChild(pglastli);
        }else{
          var pglastli = document.createElement('li');
          pglastli.className = 'last';
          var pglast_ahref = document.createElement('a');
          pglast_ahref.href = '#nogo';
          if (pglast_ahref.addEventListener) {
            pglast_ahref.addEventListener('click',function(){xg_pageXML(getNodeValue(responseXML,'ResponseUrl')+'&page='+last,getNodeValue(responseXML,'ResponseDivId'), callback,wwwroot)},false);
          }else if (pglast_ahref.attachEvent) {
            pglast_ahref.attachEvent("onclick",function(){xg_pageXML(getNodeValue(responseXML,'ResponseUrl')+'&page='+last,getNodeValue(responseXML,'ResponseDivId'), callback,wwwroot)});
          }
          pglastli.appendChild(pglast_ahref);
          pglastli.appendChild(document.createTextNode('\u00a0'));
          paginationContainer.appendChild(pglastli);
        }
        document.getElementById(div_id).appendChild(paginationContainer);
     }
  }//End of mystuffpagination function.