function init ()
{
	var h = document.getElementsByTagName ( 'h2' );
	var l = document.getElementById ( 'main_links' );
	var t;
	var i;

	// Add names to headers
	// DISABLED
	for ( i = 0; i < h.length && 1 == 0; i++ )
	{
		if ( h[i].getElementsByTagName ( 'a' ).length == 0 )
		{
			t = h[i].firstChild.nodeValue;
			l.innerHTML += '<a href="#' + t + '">' + t + '</a>';
			h[i].innerHTML += '<a name="' + t + '"></a><div class="top_link"><a href="#top" title="Return to the top of the page">&uarr; Top</a></div>';
		}
		else
		{
			t = h[i].getElementsByTagName ( 'a' )[0].innerHTML;
			l.innerHTML += '<a href="#' + t + '">' + t + '</a>';
			h[i].innerHTML += '<a name="' + t + '"></a><div class="top_link"><a href="#top" title="Return to the top of the page">&uarr; Top</a></div>';
		}
	}

	// Check first input
	var inputs = document.getElementsByTagName ( 'input' );
	var textareas = document.getElementsByTagName ( 'textarea' );
	var f = false;

	if ( inputs.length > 0 )
	{
		for ( i = 0; i < inputs.length; i++ )
		{
			if ( inputs[i].className == 'invalid' )
			{
				inputs[i].select ();
				inputs[i].focus ();
				f = true;
				break;
			}
		}

		// Select the last input if none are selected
		if ( f == false )
		{
			for ( i = 0; i < textareas.length; i++ )
			{
				if ( textareas[i].className == 'invalid' )
				{
					textareas[i].select ();
					textareas[i].focus ();
					f = true;
					break;
				}
			}
		}

		// If still nothing is selected
		if ( f == false )
		{
			inputs[0].select ();
			inputs[0].focus ();
		}
	}
}

window.onload = init;
