function miniPane(url,name,w,h,opt)
{
	w = (w == null) ? 600 : w;
	h = (h == null) ? 450 : h;
	opt = (opt == null) ? ',toolbar=no,scrollbars=yes,resizable=yes,menubar=yes,location=no':opt;
	
	var width = 0;
	var height = 0;

	if (document.all || document.layers) {
		width = screen.availWidth;
		height = screen.availHeight;
	} else {
		width = screen.width;
		height = screen.height;
	}

	var leftPos = (width-w)/2, topPos = (height-h)/2;

	opt = 'width='+w+',height='+h+opt;

	var win = window.open(url,name,opt);
	if (!win)
	{
		alert('The popup window was blocked, try holding down ctrl key and click again');
	} else {
		win.moveTo(leftPos,topPos);
	}
}

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 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);

 }