﻿
this.moviearchive = new moviearchive();

function moviearchive()
{

    function refreshMovieArchiveFunction(sort, author)
    {
       
        xmlHttp = getXmlHttpObject();
        xmlHttp.onreadystatechange = refreshMovieArchiveCallback;
        xmlHttp.open("GET", BASE_URL + "webservices/moviearchive.asmx/GetReviews?sort=" + sort + "&author=" + author, true);
        xmlHttp.send(null);
       
    }

    function refreshMovieArchiveCallback()
    {
       
        if (xmlHttp.readyState == 4)
        {
                
            if (xmlHttp.status == 200)
            {
                
               document.getElementById("movieArchiveBody").parentNode.innerHTML = getReturnValue("string");
           
            }
            else
            {
              //  alert("Problem retrieving XML data.")
            }
            
        }

    }
    
    this.refreshMovieArchive = refreshMovieArchiveFunction;

}

