//<![CDATA[
var xmlHttp;

function createXMLHttpRequest() {
    if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    } 
    else if (window.XMLHttpRequest) {
        xmlHttp = new XMLHttpRequest();
    }
}
    
function startRequest(div,thefile,theitemid,v2) {
    createXMLHttpRequest();
	 thediv = div
	 v2 = v2
	 thisitem = document.getElementById(theitemid).value
	 document.getElementById(thediv).innerHTML = "<img src=/assets/loader.gif />";
	 xmlHttp.onreadystatechange = handleStateChange;
    xmlHttp.open("GET", thefile + "?v1=" + thisitem +"&v2=" + v2, true);
    xmlHttp.send(null);
}

function handleStateChange() {
    if(xmlHttp.readyState == 4) {
      if(xmlHttp.status == 200) {
			document.getElementById(thediv).innerHTML = xmlHttp.responseText;
        }
    }
}
//]]>