/*
 * @package Component jVoteSystem for Joomla! 1.5
 * @projectsite www.joomess.de/projekte/18
 * @author Johannes Meßmer
 * @copyright (C) 2010- Johannes Meßmer
 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
function jVoteSystemAlertError(msg, box) {
	document.getElementById('jVoteSystemAlert' + box).style.display='block';
	document.getElementById('jVoteSystemAlert' + box).className = 'alert_Error';
	document.getElementById('jVoteSystemAlert' + box + 'Error').style.display='block';
	document.getElementById('jVoteSystemAlert' + box + 'Success').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'Question').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'ButtonOK').style.display='block';
	document.getElementById('jVoteSystemAlert' + box + 'ButtonYES').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'ButtonNO').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'Message').innerHTML = msg;
}

function jVoteSystemAlertSuccess(msg, box) {
	document.getElementById('jVoteSystemAlert' + box).style.display='block';
	document.getElementById('jVoteSystemAlert' + box).className = 'alert_Success';
	document.getElementById('jVoteSystemAlert' + box + 'Error').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'Success').style.display='block';
	document.getElementById('jVoteSystemAlert' + box + 'Question').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'ButtonOK').style.display='block';
	document.getElementById('jVoteSystemAlert' + box + 'ButtonYES').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'ButtonNO').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'Message').innerHTML = msg;
}

var jVoteSystemAlertQuestionFunction;
function jVoteSystemAlertQuestion(msg, box, f) {
	jVoteSystemAlertQuestionFunction = f;
	document.getElementById('jVoteSystemAlert' + box).style.display='block';
	document.getElementById('jVoteSystemAlert' + box + 'ButtonYES').onclick = new Function("jVoteSystemAlertQuestionAnsweredYes('" + box + "')");
	document.getElementById('jVoteSystemAlert' + box).className = 'alert_Question';
	document.getElementById('jVoteSystemAlert' + box + 'Error').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'Success').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'Question').style.display='block';
	document.getElementById('jVoteSystemAlert' + box + 'ButtonOK').style.display='none';
	document.getElementById('jVoteSystemAlert' + box + 'ButtonYES').style.display='block';
	document.getElementById('jVoteSystemAlert' + box + 'ButtonNO').style.display='block';
	document.getElementById('jVoteSystemAlert' + box + 'Message').innerHTML = msg;
}

function jVoteSystemAlertQuestionAnsweredYes(box) {
   document.getElementById('jVoteSystemAlert' + box).style.display='none';
   var strFun = jVoteSystemAlertQuestionFunction;
   var ret = eval(strFun);
}


