function showdown() {}
showdown.prototype=new penumbra();

c=new showdown();
c.showing_comments=false;
c.showing_votes = false;

showdown.prototype.wait=function(divID) { if (isset($(divID))) { $(divID).innerHTML=translations['loading']; } }

showdown.prototype.showComments=function(projectID) {

	if (!this.showing_comments) {
		o={requestType:"returnProjectComments", trackID:"showdown/show_comments"};
		this.wait("showdown_comments")
		this.irequest(o,'c', 'returnComments');
		this.showing_comments=true;
	} else {
		this.hideComments();
	}
}

showdown.prototype.showVotes=function(projectID) {
 if (!this.showing_votes) {
 	o={requestType:"returnProjectVotes", trackID:"showdown/show_votes"};
 	this.wait("showdown_comments")
 	this.irequest(o,'c', 'returnVotes');
 	this.showing_votes=true;
 } else {
 	this.hideVotes();
 }
}

showdown.prototype.returnComments=function(obj) { 	$("showdown_comments").innerHTML=obj.responseText; }

showdown.prototype.hideComments=function() {
	this.showing_comments=false;
	$("showdown_comments").innerHTML="";
}

showdown.prototype.returnVotes=function(obj) { 	$("showdown_comments").innerHTML=obj.responseText; }

showdown.prototype.hideVotes=function() {
	this.showing_votes=false;
	$("showdown_comments").innerHTML="";

}

showdown.prototype.vote=function() {
	o={requestType:"voteForProject", trackID:"showdown/vote"};
	this.wait("showdown_votes");
	this.irequest(o,'c', 'returnVote');
}

showdown.prototype.returnVote=function(obj) { $("showdown_votes").innerHTML=obj.responseText; }

/*
showdown.prototype.set_entry_privacy=function() {
 o={requestType:"set_privacy", trackID:"showdown/set_entry_privacy"};
 this.wait("entry_privacy");
 this.irequest(o,'c', 'return_entry_privacy');
}

showdown.prototype.return_entry_privacy=function(obj) {
 $("entry_privacy").innerHTML=obj.responseText;
}*/