function heroAskQuestion() {
	var argsObj = new Object();
	argsObj["operation"]  = "askQuestion";
	makeCall('Hero/showHero', argsObj);
}

function initAskQuestionForm() {
	$('askQuestion').style.display = "none";
	$('heroArchive').style.display = "block";
	new ResizingTextArea($('questionText'));
}

function heroQuestionSend() {
	var err = false;
	View.clearErrors('questionTextEmpty');
	View.clearErrors('questionTextToLong');

	if(View.getValue('questionText') == '') {
		err = true;
		View.showErrors('questionTextEmpty');
	} else if(View.getValue('questionText').length > 500) {
		View.setValue('questionText', View.getValue('questionText').substr(0, 500));
		View.showErrors('questionTextTooLong');
		err = true;  
	}
	if (err == false) {
		$('addQuestionForm').style.display = "none";
		var argsObj = new Object();
		argsObj["operation"]     = "sendQuestion";
		argsObj["questionText"]  = escape(View.getValue('questionText'));
		makeCall('Hero/showHero', argsObj);
	}
}

function heroAnotherQuestion() {
	View.clearErrors('questionTextEmpty');
	View.clearErrors('questionTextToLong');
	$('finalQuestion').style.display = "none";
	$('addQuestionForm').style.display = "block";
	View.setValue('questionText', '');
}