
window.curView = "A";
function setupConvLinks() {
	var i = 0;
	var uls = getElement( "conversion" ).getElementsByTagName( "ul" );
	for ( i = 0; i < uls.length; i++ ) {
		if ( hasElementClass( uls[i], "boxlinks" ) ) {
			var as = uls[i].getElementsByTagName( "a" );
			for ( var j = 0; j < as.length; j++ ) {
				as[j].rel = String.fromCharCode( 65 + j );
				as[j].onclick = function() {
					return showView( this.rel );
				}
			}
		}
	}
}

function showView( which ) {
	var elem = getElement( "view_" + curView );
	if ( elem != null )
		setVisible( elem, false );

	curView = which;

	elem = getElement( "view_" + curView );
	if ( elem != null )
		setVisible( elem, true );
	return false;
}
window.initFuncs.push( setupConvLinks );