var globid = 0;
var xmlHttp = false;
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
  try {
    xmlHtp = new ActiveXObject("Microsoft.XMLHTTP");
  }
	catch(e2) {
	  xmlHttp = false;
	}
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
				  xmlHttp = new XMLHttpRequest();
}

if (!xmlHttp) { alert("Error creating XMLHttpRequest object!"); }


function quoteVote(id,updown) {
	var url = "./?vote=" + updown + "&id=" + id;
	xmlHttp.open("GET",url,true);
	xmlHttp.onreadystatechange = quoteVoteReturn;
	xmlHttp.send(null);
	globid = id;
}

function quoteVoteReturn() {
	if (xmlHttp.readyState == 4) {
		if (xmlHttp.status == 200) {
			var response = xmlHttp.responseText;
			if (!(isNaN(parseInt(response)))) {
				getobj("score"+globid).innerHTML = response;
			} else {
				alert(response);
			}
		}
		if (xmlHttp.status == 500) {
			alert("Houston, we've had a problem.");
		}
	}
}
