// JavaScript Document
function email()
{
	var e1 = 'artist';
	var e2 = '@';
	var e3 = 'molliekellogg';
	var e4 = 'com';
	var em = e1+e2+e3+'.'+e4;
	document.location.href = 'mailto'+':'+em;
}

function alt_email(em)
{
	document.location.href = 'mailto'+':'+em;
}

function check_contact()
{
	var err_str = '';
	var ret = true;
	var cf = document.getElementById('contact_form');
	if(cf)
	{
		if(cf.first_name.value.length == 0)
		{
			err_str += '- First Name is required.\n\n';	
		}
		if(cf.email_address.value.length == 0)
		{
			err_str += '- Email Address is required.\n\n';	
		}
	}
	if(err_str.length > 0)
	{
		alert('The following error(s) occurred:\n\n'+err_str);
		ret = false;
	}
	return ret;
}

//many thanks to the author (http://www.java2s.com/Code/JavaScript/Form-Control/AllowingOnlyNumbersintoaTextBox.htm)
function only_numbers(evt) {
    evt = (evt) ? evt : window.event;
    var charCode = (evt.which) ? evt.which : evt.keyCode;
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        return false;
    }
    return true;
}
