function joinA() {}
joinA.prototype.init = function() {
	$('#JoinAInError').hide();
	$('#JoinALoader').hide();
	scope = this;
	$('#joinAForm').bind("submit", function(e) {
		e.preventDefault();
		
		var id = $('#showid').val();
		if (!id) {
			return scope.error('Fill in an ID');
			return false;
		}
		
		scope.load(id);
	});
}

joinA.prototype.error = function(msg) {
	$('#JoinAInError').show().attr("innerHTML", msg ); 
}
joinA.prototype.load = function( id ) {
	$('#JoinALoader').show();
	
	scope = this;
	$.post( GetBaseURL() + 'moc/dbaseRoutines/getShowRating.php?tableID=' + id , 
		function(data){
			if(data=='-1') {
				scope.error('Not Found');
			} else {
				window.location=GetBaseURL() + regularshow + id;
			}
			$('#JoinALoader').hide();
		}
	);
}