function showAddress(last,first,addtxt)
{
	var add = first + '@' + last;
	if (addtxt == "")
		addtxt = add;
	document.write('<a href="mail' + 'to:' + add + '">' + addtxt + '</a>');
}

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;
	
	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;
	
	var win = window.open(url,name,'width='+w+',height='+h+opt);
	if (!win)
	{
		alert('The popup window was blocked, try holding down ctrl key and click again');
	} else {
		win.moveTo(leftPos,topPos);
	}
}

function validateSearch(form1)
{
	var theForm = document.forms['findhome'];
	var valid = true;

	if (theForm.fh_minbed.selectedIndex == 0)
	{
		alert('Please select min bedrooms');
		theForm.fh_minbed.focus();
		valid = false;
	}

	if (theForm.fh_maxbed.selectedIndex == 0 && valid)
	{
		alert('Please select max bedrooms');
		theForm.fh_maxbed.focus();
		valid = false;
	}

	if ((theForm.fh_minbed.options[theForm.fh_minbed.selectedIndex].value > theForm.fh_maxbed.options[theForm.fh_maxbed.selectedIndex].value) && valid)
	{
		alert('Min bedrooms must be less than Max bedrooms');
		theForm.fh_minbed.focus();
		valid = false;
	}

	if (theForm.fh_price.selectedIndex == 0 && valid)
	{
		alert('Please select a price range');
		theForm.fh_price.focus();
		valid = false;
	}

	return valid;
}