function changeObjectVisibility(objectId, newVisibility) 
{
	// checkW3C DOM, then MSIE 4, then NN 4.
	//
	if(document.getElementById && document.getElementById(objectId))
	{
		document.getElementById(objectId).style.display = newVisibility;
	}
	else if (document.all && document.all(objectId))
	{
		document.all.objectId.style.display = newVisibility;
	}
	else if (document.layers && document.layers[objectId])
	{
		document.layers[objectId].display = newVisibility;
	}
	else
	{
		document.all.objectId.style.display = newVisibility;
	}
}

function step_clicked(stepno)
{
	for(var i = 1; i < 5; i++)
	{
		var dynId = "step" + i;
		changeObjectVisibility(dynId, "none");
		changeObjectVisibility("bottom_curve", "none");
		document.getElementById('last_step').className = "value-header2";
	}
	
	var dispId = "step" + stepno;
	changeObjectVisibility(dispId, "block");

	if(stepno == 4)
	{
		changeObjectVisibility("bottom_curve", "block");
		document.getElementById('last_step').className = "value-header";
	}
}

function validateStep1()
{
	document.getElementById('ValuationStepno').value = 1;
	document.valuation_input.submit();
}

function validateStep2()
{
	document.getElementById('ValuationStepno').value = 2;
	document.valuation_input.submit();
}

function validateStep3()
{
	document.getElementById('ValuationStepno').value = 3;
	document.valuation_input.submit();
}

function validateAll()
{
	document.getElementById('ValuationStepno').value = '';
	document.valuation_input.submit();
}