function showAddress(ext,domain,name,_class,addtxt)
{
	var add = name + '@' + domain + '.' + ext;
	if (addtxt == "")
		addtxt = add;
	document.write('<a href="mail' + 'to:' + add + '" class="' + _class + '">' + addtxt + '</a>');
}

function showImg(img,w,h,alt)
{
	var elem = document.getElementById('bigimg');
	elem.src = '/images/paintings/'+img;
	elem.width = w;
	elem.height = h;
	elem.alt = alt;
	var h3 = document.getElementById('imgtitle');
	h3.innerHTML = alt;
}

function checkContactForm(form1)

{

	var valid = true;



	if (form1.email.value == "" && valid)

	{

		alert('Please enter your email address');

		form1.email.focus();

		valid = false;

	} else {

		if (!isValidEmail(form1.email.value))

		{

			alert('The email address ' + form1.email.value + ' is not valid');

			form1.email.focus();

			valid = false;

		}

	}



	if (form1.message.value == "" && valid)

	{

		alert('Please enter your message');

		form1.message.focus();

		valid = false;

	}



	if (valid)

	{

		form1.submit();

	}

}



function isValidEmail(str) {

   return (str.indexOf("@") > 0);

 }