                var arrayPosition = 0;
        var http_request = false;

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
   d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function makeRequest(direction,startPosition) 
{
        if (direction == 'next') 
        {
                arrayPosition += 12;
                if (arrayPosition >= (slideShowLength-1)) 
                {
                        arrayPosition = slideShowLength+1;
                }
        }
        else if (direction == 'back') 
        {
                arrayPosition -= 12;
                if (arrayPosition < 0) 
                {
                        arrayPosition = 0;
                }
        } 
        else if (direction == 'jump') 
        {
                arrayPosition = startPosition;
        }
        
        var url = "siteadmin/upload/" + student[arrayPosition][1];
//        var pageNo = arrayPosition/12;
//        var divNo = "d" + pageNo;
        http_request = false;

        if (window.XMLHttpRequest) 
        {
                // Mozilla, Safari,...
                http_request = new XMLHttpRequest();
                if (http_request.overrideMimeType) 
                {
                                http_request.overrideMimeType('text/xml');
                }
        } 
        else if (window.ActiveXObject) 
        { 
        // IE
                try {
                      http_request = new ActiveXObject("Msxml2.XMLHTTP");
                    } catch (e) {
                         try {
                                 http_request = new ActiveXObject("Microsoft.XMLHTTP");
                             } catch (e) {}
                    }
        }

        if (!http_request) 
        {
                alert('Giving up :( Cannot create an XMLHTTP instance');
                return false;
        }
        
        
        http_request.onreadystatechange = alertContents;
        http_request.open('GET', url, false);
        http_request.send(null);
        var posi = arrayPosition;
        for (var i=0; i<12; i++) 
        {
                var y = MM_findObj('n' + i);
                y.innerHTML = student[posi][0];
                var x = MM_findObj('q' + i);
                x.href = "/gemstones.php?id=" + student[posi][2];
                var w = MM_findObj('p' + i);
                w.src = "/siteadmin/upload/" + student[posi][1];
                posi++;
        }
//        var u = MM_findObj(divNo);
//        u.className = 'pageVisited';            
}


function makeItemRequest(direction,startPosition) 
{
        if (direction == 'next') 
        {
                arrayPosition += 12;
                if (arrayPosition >= (slideShowLength-1)) 
                {
                        arrayPosition = slideShowLength+1;
                }
        }
        else if (direction == 'back') 
        {
                arrayPosition -= 12;
                if (arrayPosition < 0) 
                {
                        arrayPosition = 0;
                }
        } 
        else if (direction == 'jump') 
        {
                arrayPosition = startPosition;
        }
        
        var url = "siteadmin/upload/" + student[arrayPosition][1];
//        var pageNo = arrayPosition/12;
//        var divNo = "d" + pageNo;
        http_request = false;

        if (window.XMLHttpRequest) 
        {
                // Mozilla, Safari,...
                http_request = new XMLHttpRequest();
                if (http_request.overrideMimeType) 
                {
                                http_request.overrideMimeType('text/xml');
                }
        } 
        else if (window.ActiveXObject) 
        { 
        // IE
                try {
                      http_request = new ActiveXObject("Msxml2.XMLHTTP");
                    } catch (e) {
                         try {
                                 http_request = new ActiveXObject("Microsoft.XMLHTTP");
                             } catch (e) {}
                    }
        }

        if (!http_request) 
        {
                alert('Giving up :( Cannot create an XMLHTTP instance');
                return false;
        }
        
        
        http_request.onreadystatechange = alertContents;
        http_request.open('GET', url, false);
        http_request.send(null);
        var posi = arrayPosition;
        for (var i=0; i<12; i++) 
        {
                var x = MM_findObj('q' + i);
                x.href = "/detail.php?id=" + student[posi][1];
                var w = MM_findObj('p' + i);
                w.src = "/siteadmin/upload/" + student[posi][0];
                posi++;
        }
//        var u = MM_findObj(divNo);
//        u.className = 'pageVisited';            
}


            function alertContents() {
                if (http_request.readyState == 4) {
                    if (http_request.status == 200) {
                                                remove_loading();                                               
                    }                   
                                        else {
                        alert('There was a problem with the request.');
                    }
                }

            }