<!--

function SimpleSubmit(f)
{
	// This function is really only used with submitting forms with the "sliding-windows" buttons from
	// http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html
	f.submit();
	this.blur();
}
	
function ConfirmEmailDelete(id)
{
	if (confirm("Are you sure want to delete this email address?"))
	{
		window.location = "/emails/delete/" + id;
		return true;
	} else {
		return false;
	}
}

function ClearTextArea(ta) 
{
	if (ta.value == " ") {
		ta.value = "";
	}
}

function valRadioButton(btn) {
    var cnt = -1;
    for (var i=btn.length-1; i > -1; i=i-1) {
        if (btn[i].checked) {cnt = i; i = -1;}
    }
    if (cnt > -1) return btn[cnt].value;
    else return null;
}

function Redirect(url) {
	window.location = url;
}

function FilterSwimmer() {

	age = document.getElementById("age").value;
	stroke = document.getElementById("stroke").value;
	
	window.location = window.location + "&age="+age+"&stroke="+stroke;
}

function showAlert()
{
	document.getElementById("alertlink").className = 'current';
	document.getElementById("cornerlink").className = '';
	document.getElementById("alert").style.display = 'block';
	document.getElementById("corner").style.display = 'none';
}

function showCorner()
{
	document.getElementById("alertlink").className = '';
	document.getElementById("cornerlink").className = 'current';
	document.getElementById("alert").style.display = 'none';
	document.getElementById("corner").style.display = 'block';
}

//-->
