// Buzzword manager

var gBuzzwords =
{
	specialties: "core competencies",
	love:        "am enthused by",
	writing:     "engineering",
	software:    "software-based technologies"
};

function showBuzzwords()
{
	for ( var i in gBuzzwords )
	{
		document.getElementById( i ).firstChild.data = gBuzzwords[ i ];
	}
	
	return false;
}

function hideBuzzwords()
{
	for ( var i in gBuzzwords )
	{
		document.getElementById( i ).firstChild.data = i;
	}
	
	return false;
}

function init()
{
	hideBuzzwords();
	
	var checkbox = document.createElement( 'input' );
	
	checkbox.setAttribute( 'type', 'checkbox' );
	
	var label = document.createElement( 'label' );
	
	label.appendChild( checkbox );
	label.appendChild( document.createTextNode( 'Use Buzzwords' ) );
	
	checkbox.onchange = function()
	{
		this.checked ? showBuzzwords() : hideBuzzwords();
		
		return false;
	}
	
	document.getElementById( "buzzword-manager" ).appendChild( label );
}

window.onload = init;


