function RenderMatchup(MatchupID) {
  $('matchup'+MatchupID).addClassName('matchup');
  var url = 'http://www.1037thebuzz.com/matchups/ajax/matchups.asp?mode=matchup&MatchupID='+MatchupID;

  new Ajax.Request(url, {
    method: 'get',    
    onSuccess: function(transport) {
      var el = transport.responseText;
      $('matchup'+MatchupID).update(el);
    }
  });
}

function RenderMatchupResults(MatchupID) {
  $('matchup'+MatchupID).addClassName('matchup');
  var url = 'http://www.1037thebuzz.com/matchups/ajax/matchups.asp?mode=results&MatchupID='+MatchupID;

  new Ajax.Request(url, {
    method: 'get',    
    onSuccess: function(transport) {
      var el = transport.responseText;
      $('matchup'+MatchupID).update(el);
    }
  });
}

function ProcessMatchupVote(MatchupID, ContestantID) {
  $('matchup'+MatchupID).addClassName('matchup');
  var url = 'http://www.1037thebuzz.com/matchups/ajax/matchups.asp?mode=vote&MatchupID='+MatchupID+'&ContestantID='+ContestantID;

  new Ajax.Request(url, {
    method: 'get',
    asynchronous: false,    
    onSuccess: function(transport) {
      var el = transport.responseText;
      $('matchup'+MatchupID).update(el);
    }
  });
}

function getCheckedValue(radioObj) {

	if(!radioObj)

		return "";

	var radioLength = radioObj.length;

	if(radioLength == undefined)

		if(radioObj.checked)

			return radioObj.value;

		else

			return "";

	for(var i = 0; i < radioLength; i++) {

		if(radioObj[i].checked) {

			return radioObj[i].value;

		}

	}

	return "";

}
