function checkfields()
{
    if (document.getElementById('saleMethod').value == '-')
    {
        alert('Please specify the search type.');
        document.getElementById('saleMethod').focus();
        return false;
    }
    if (document.getElementById('propertySuburb').value == '-')
    {
        alert('Please specify the suburbs of interest.');
        document.getElementById('propertySuburb').focus();
        return false;
    }
    if (document.getElementById('propertyType').value == '-')
    {
        alert('Please specify the property type.');
        document.getElementById('propertyType').focus();
        return false;
    }
    return true;
}

function refreshProperties()
{
	myAjax = new Ajax('fp_properties.php', {method: 'get', onSuccess: fadeProperties}).request();	
}

function fadeProperties(xc)
{
	$('hotproperty2').innerHTML = xc;
	fx = new Fx.Styles($('hotproperty1'), {duration:1800, wait:false, onComplete: showProperties});
	fx.start.delay(2000, fx, {'opacity':0});
}

function showProperties()
{	
	$('hotproperty1').innerHTML = $('hotproperty2').innerHTML;
	fx.set({'opacity':1});
}

window.onload = function() { setInterval(refreshProperties, 7000); }
