﻿var historyBuff = new Array();
var historyPos = 0;

function showWizzElement(id) {
	if (historyPos > 0) document.getElementById(historyBuff[historyPos]).style.display = "none";
	document.getElementById(id).style.display = "block";
	historyAdd(id);
}

function openWizzard() {
	document.getElementById('wizzMain').style.display = "block";
	showWizzElement('wizzItem1');
	document.getElementById('help_main_title_wizzard').style.display = "block";
	document.getElementById('help_main_title').style.display = "none";
	if (prevfid.length > 0) hide(prevfid);
	wizzardStatus = 1;
}

function closeWizzard() {
	if (historyPos > 0) document.getElementById(historyBuff[historyPos]).style.display = "none";
	document.getElementById('wizzMain').style.display = "none";
	historyBuff = new Array();
	historyPos = 0;
}

function historyAdd(currentPos) {
	historyPos++;
	historyBuff[historyPos] = currentPos;
}

function historyBack() {
	if (historyPos > 0) document.getElementById(historyBuff[historyPos]).style.display = "none";
	historyPos--;
	if (historyPos > 0) document.getElementById(historyBuff[historyPos]).style.display = "block";
}