function submit(FormName)
{
	submitRedirect("", FormName);
//	document.forms.StepsData.redirect.value = "";
//	document.StepsData.submit();
}

// Sets the text in the status bar
function SetStatusText(Text)
{
	window.status = Text;
	return true;
}

// Enables the specified element if the selected value
function EnableIfEqual(val1, val2, id)
{
	var element = document.getElementById(id);
	if (val1 == val2)
	{
		element.disabled = false;
	}
	else
	{
		element.disabled = true;
	}
}

// Hides an element
function hide( id ) 
{
   var element = document.getElementById( id );
   element.style.display = 'none';
}

function hideNav()
{
	hide('progress');

	var content = document.getElementById('content');
	content.style.marginLeft = '0px';

	return true;
}

function resizeElement(obj)
{ 
	docHeight = document.body.scrollHeight;
	obj.style.height = docHeight + 'px';
} 

function writeSelectVal(formName, obj) 
{
	var formElement = document.forms[formName][obj];
	
	var index = formElement.selectedIndex;
	var option = formElement.options[index];
	$(document).ready(function() { 
		if (document.forms[formName]["FormDataLoaded"] == 0) 
		{ 
			updateform(); 
		} 
		$("#_" + obj).html($("select[name=\'" + obj +"'\] option:selected").text());
	});

	var html = '<span id="_' + obj + '">' + option.innerHTML + '</span>';
	document.write(html);

//	var html = '<span id="_' + obj + '">' + option.innerHTML + '</span><script type="text/javascript">$(document).ready(function() { if (document.forms["' + formName + '"]["FormDataLoaded"] == 0) { updateform(); } $("#_' + obj + '").html($("select[name=\'' + obj +'\'] option:selected").text()); });</script>';
//	document.write(html);

//	document.write('<span id="_' + obj + '">[loading...]</span>');
//	document.write('<span id="_' + obj + '">' + option.innerHTML + '[loading...]</span><script type="text/javascript">$("select[name=\'' + obj + '\']").change(function() {$("#_' + obj + '").text("' + option.innerHTML + '");});</script>');
//	document.write('<span id="_' + obj + '">[loading...]</span><script type="text/javascript">$(document).ready(function() {$("#_' + obj + '").html("' + option.innerHTML + '");});</script>');
//	document.write(option.innerHTML);
}

function writeCheckbox(formName, obj, valYes, valNo)
{
	var formElement = document.forms[formName][obj];
	if (formElement.checked)
	{
		document.write(valYes);
	}
	else if (valNo != null)
	{
		document.write(valNo);
	}
}