﻿
function refreshNowShowing(movieId, newDate)
{
   
    xmlHttp = getXmlHttpObject();
    xmlHttp.onreadystatechange = refreshNowShowingCallback;
    xmlHttp.open("GET", BASE_URL + "webservices/nowshowing.asmx/GetNowShowing?count=" + newDate + "&movieId=" + movieId, true);
    xmlHttp.send(null);
   
}

function refreshNowShowingCallback()
{
   
    if (xmlHttp.readyState == 4)
    {
            
        if (xmlHttp.status == 200)
        {
            
           document.getElementById("nowShowingBody").innerHTML = (xmlHttp.responseXML.getElementsByTagName("string")[0].text == null ? xmlHttp.responseXML.childNodes[0].childNodes[0].nodeValue : xmlHttp.responseXML.getElementsByTagName("string")[0].text);
           
        }
        else
        {
           // alert("Problem retrieving XML data.")
        }
        
    }

}

