function fold(id)
{
	var button = document.getElementById('button_'+id);
	var group = document.getElementById('group_'+id);
	if (group.style.display == 'none')
	{
		button.style.backgroundImage = 'url(\'layout/site_admin_fold_up.gif\')';
		button.title = 'Click here to fold this group.';
		group.style.display = 'block';
	}
	else
	{
		button.style.backgroundImage = 'url(\'layout/site_admin_fold_down.gif\')';
		button.title = 'Click here to unfold this group.';
		group.style.display = 'none';
	}
}

function hover(button)
{
	button.style.backgroundImage = 'url(\'layout/site_admin_button_hover.gif\')';
}

function unHover(button)
{
	button.style.backgroundImage = 'url(\'layout/site_admin_button.gif\')';
}

function popUp(url,title,width,height)
{
	var popup = window.open('', '', 'width='+width+',height='+height);
	popup.moveTo(0,0);
	popup.document.open();
	popup.document.write('<body><head><title>'+title+'<\/title><\/head><body><layer left="0" top="0" id="myID"><img onclick="window.close()" style="position:absolute;left:0px;top:0px;display:block;width:'+width+'px;height:'+height+';" src="'+url+'"\/><\/layer><\/body><\/html>');
	popup.document.close();
}

function submitstep(step)
{
	var nextstep = document.getElementById('form_step');
	nextstep.value = step;
	var stepform = document.getElementById('stepform');
	stepform.submit();
}