
function hssSteps()
{
	this.step = 1;
	this.arSteps    = new Array();
	this.arNotFound = new Array();
	
	this.ShowStep = function()
	{
		n = this.arSteps.length;
		for( i = 0; i < n; i++)
		{
			ar = this.arSteps[i];
			
			if( this.step == ar[0] )
				sDisplay = "inline";
			else
				sDisplay = "none";
			
			if( ar[1] != '' )
			{
				if( this._ShowObject( document.getElementById( ar[1] ), sDisplay ) == false )
					this._AddError( ar );
			}
			else 
			{
				if( ar[3] != "-1" )
					if( this._ShowObject( document.getElementsByName( ar[2] )[ ar[3] ], sDisplay ) == false )
						this._AddError( ar );
				else
				{
					objs = document.getElementsByName( ar[2] );
					for( j = 0; j < objs.length; j++ )
						if( this._ShowObject( objs[j], sDisplay ) == false )
							this._AddError( ar );
				}
			}
		}
	}
	
	this.AddField = function(step, sid, snam, nr)
	{
		this.arSteps.push( new Array( step, sid, snam, nr ) );
	}
	
	this._ShowObject = function ( obj, sDisplay ) 
	{
		if( obj )
		{
			obj.style.display = sDisplay;
			return true;
		}
		else
			return false;
	}
	
	this._AddError = function(ar)
	{
		this.arNotFound.push( ar );
	}
	this.AlertErrors = function()
	{
		sMsg = "";
		n = this.arNotFound.length;
		for( i = 0; i < n; i++)
		{
			ar = this.arNotFound[i];
			sMsg = sMsg + "\r\nstep:" + ar[0] + " id:" + ar[1] + " name:" + ar[2] + "/" + ar[3];
		}
		if( sMsg != "" ) alert( sMsg );
	}
}