var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  xmlhttp = new XMLHttpRequest();
}

function submitForm(sb, testval)
{
    if (testval == 1)
        sb.disabled = true;
}

function vote(taleid,good)
{
    var element = document.getElementById("vb." + taleid);
    element.innerHTML = '<span class="voterecorded">' +
	    "Thank you! Your vote has been recorded. " +
	    "(Tale scores are updated every few hours.)" +
	    '</span>';
    xmlhttp.open("GET", "/cgi-bin/registervote.cgi?t=" + 
		taleid + "&v=" + good);
    xmlhttp.send(null);
}


