// wait until dom is loaded
document.observe("dom:loaded", function() {
	// Random Greetings
	var greetings = new Array('Hi There!', 'What\'s Up!', 'Hello!', 'Hola!', 'Howdy!');
	var random_num = Math.floor(Math.random()*greetings.length);
	if ($('greeting') != null) {
		$('greeting').innerHTML = greetings[random_num];
	};
	
});

// Show/hide Bio
var isBioOpen = 0;
function show_short_bio () {
	if (!isBioOpen) {
		isBioOpen = 1;
		new Effect.Appear('short_bio', {duration:0.5});
	} else {
		return;
	};
}
function hide_short_bio () {
	isBioOpen = 0;
	new Effect.Fade('short_bio', {duration:0.5});
}	
function clear_text_field(txtFld, defaultVal){
	if(txtFld.value == defaultVal){
		txtFld.value = "";
	}
	return;

}

function populate_text_field(txtFld, defaultVal){
	if(txtFld.value == ""){
		txtFld.value = defaultVal;
	}
	return;
}
