var php = new Array();
php["lib"] = 'php/support.php';

function question_put(){
	tmp_res = JsHttpRequest.query(
		php["lib"],
		{
			action : 'putQuestion',
			type : getId('tip').value,
			nick : getId('nick').value,
			email : getId('email').value,
			question : getId('question').value
		},
		function(result,errors){
			if (errors == '1')getId('checkAjaxQuest').innerHTML = '<strong>Your question was added</strong>';
			else getId('checkAjaxQuest').innerHTML = '<strong>Repeat your question please</strong>';
			getId('tip').value = 0;
			getId('nick').value = 'Name';
			getId('email').value = 'E-mail';
			getId('question').value = 'Question';
		},
		true
	);
};

function getQuestionType(){
	var tmpDiv = getId('Qtype');
	var tmpIns = '<select class="cont" id="tip" style="width: 313px;">';
	for (var i=0; QAType[i]; i++)
		tmpIns+= '<option value="'+i+'">'+QAType[i];
	tmpIns+= '</select>';
	tmpDiv.innerHTML = tmpIns;
};