﻿/*
	Featured Property Scripts
	-----------------------
*/

/* Swap Featured */
var cfeatured = 1;
var ct = null;
var cmax = null;
function swapfeatured(num) {
    if (cmax == null) {
        cmax = document.getElementById("featured").childNodes.length;
    }
    if (!num) {
        if (cfeatured == cmax) {
            num = 1
        }
        else {
            num = cfeatured + 1;
        }
    }
    else {
        window.clearTimeout(ct);
    }
    if (cfeatured != num) {
        document.getElementById("featured" + cfeatured).className = "hidden";
        document.getElementById("featured" + num).className = "propertyhighlightinner featured";
        cfeatured = num
    }
    ct = window.setTimeout(function() { swapfeatured() }, 5000);
}

ct = window.setTimeout(function() { swapfeatured() }, 5000);
