/*
	concealment.js
	Conceals initial div and reveals followup
	
	Typically used for forms that submit changes to a different frame.
	Upon submit the initial form is hidden and followup content is revealed,
	clarifying that the form's action has occured and that it does not
	require further interaction.
	
	The followup div should have its style="display:none;" property set.
	
	On browsers without CSS support, both the initial and followup divs
	will be visible from the outset. Thus, a CSS-concealed block should be included
	within the followup div that instructs the user to submit the initial
	form before addressing the followup div. Followup content should be phrased 
	in a manner that is not too confusing when viewed along with the initial block.
	
	In browsers with CSS support but without Javascript support, the followup
	div will simply remain hidden.
	
	+CSS +Javascript: normal operation
	+CSS -Javascript: no followup
	-CSS +Javascript: both visible; use display:none paragraph to explain
	-CSS -Javascript: both visible; use display:none paragraph to explain
	
	If there is not CSS support, it doesn't matter whether there is Javascript
	because all the Javascript does is alter CSS properties.
	
	The implementation of this code is derived from examples at
	http://www.webmasterworld.com/forum91/441.htm
	The different conditional blocks in alter() offer support
	for different browsers' Javascript/CSS implementations.
*/

function alter()
{
	if (document.getElementById)
	{
		document.getElementById('initial').style.display = 'none'; 
		document.getElementById('followup').style.display = 'block';
	} 
	else
	{
		if (document.layers)
		{
			document.initial.display = 'none'; 
			document.followup.display = 'block';
		} 
		else
		{
			document.all.initial.style.display = 'none'; 
			document.all.followup.style.display = 'block';
		}
	} 

	return true;
}

/* Uses the same principle as alter() to reveal or conceal upload file fields
	for custom projection parameters. */
function showHideParams( dsid )
{
	var en = 'customrates' + dsid.toString();
	
	if (document.getElementById)
	{
		if( document.getElementById(en).style.display == 'none' )
		{document.getElementById(en).style.display = 'inline';}
		else
		{document.getElementById(en).style.display = 'none';} 
	} 
	else
	{
		if (document.layers)
		{
			if( document.en.display == 'none' )
			{ document.en.display = 'inline'; }
			else
			{ document.en.display = 'none'; }
		} 
		else
		{
			if( document.all.en.style.display == 'none' )
			{ document.all.en.style.display = 'inline'; }
			else
			{ document.all.en.style.display = 'none'; }
		}
	}

}

/* shows or hides help of specified number */
function showHideHelp( dsid )
{
	var en = 'help' + dsid.toString();
	
	if (document.getElementById)
	{
		if( document.getElementById(en).style.display == 'none' )
		{document.getElementById(en).style.display = 'block';}
		else
		{document.getElementById(en).style.display = 'none';} 
	} 
	else
	{
		if (document.layers)
		{
			if( document.en.display == 'none' )
			{ document.en.display = 'block'; }
			else
			{ document.en.display = 'none'; }
		} 
		else
		{
			if( document.all.en.style.display == 'none' )
			{ document.all.en.style.display = 'block'; }
			else
			{ document.all.en.style.display = 'none'; }
		}
	}

}