<!--/* the get elements by class name function *//* getElementsByClassName from: http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname */function getElementsByClassName(oElm, strTagName, oClassNames){    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);    var arrReturnElements = new Array();    var arrRegExpClassNames = new Array();    if(typeof oClassNames == "object"){        for(var i=0; i<oClassNames.length; i++){            arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));        }    }    else{        arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));    }    var oElement;    var bMatchesAll;    for(var j=0; j<arrElements.length; j++){        oElement = arrElements[j];        bMatchesAll = true;        for(var k=0; k<arrRegExpClassNames.length; k++){            if(!arrRegExpClassNames[k].test(oElement.className)){                bMatchesAll = false;                break;                                  }        }        if(bMatchesAll){            arrReturnElements.push(oElement);        }    }    return (arrReturnElements)}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// featured object array //var featuredObjects = new Array();// featured object constructor //function Featured(featuredContainer) {	this.container = featuredContainer;	this.id = null;	this.current = 0;	this.next = 1;	this.cOpacity = 1;	this.nOpacity = 0;	this.previous = null;	this.playState = true;	this.slideIncrement = null;	this.fadeIncrement = null;	this.links = new Array();	this.slides = new Array();	this.extras = new Array();	this.playButton = null;	this.previousButton = null;	this.nextButton = null;}//fade function for fading each elementFeatured.prototype.xFade = function() {	var thisFeatured = this;	this.cOpacity = this.slides[this.current].xOpacity;													this.nOpacity = this.slides[this.next].xOpacity;		this.cOpacity-=.05;	this.nOpacity+=.05;		this.slides[this.next].style.display = "block";	this.slides[this.current].xOpacity = this.cOpacity;	this.slides[this.next].xOpacity = this.nOpacity;		this.setOpacity(this.current);	this.setOpacity(this.next);		if(this.cOpacity<=0) {		this.cOpacity = 0;		this.nOpacity = 1;		this.slides[this.current].style.display = "none";		this.tabID = this.slides[this.current].getAttribute("id");		if (this.links.length) {		for (var n=0; n < this.links.length; n++) {			this.tabTitle = this.links[n].getAttribute("name");			if (this.tabID == this.tabTitle) {				this.clearTab(this.links[n]);			}		}		}		this.current = this.next;		this.previous = this.slides[this.current-1]?this.current-1:this.slides.length-1;		this.next = this.slides[this.current+1]?this.current+1:0;		this.tabID = this.slides[this.current].getAttribute("id");		if (this.links.length) {		for (var n=0; n < this.links.length; n++) {			this.tabTitle = this.links[n].getAttribute("name");			if (this.tabID == this.tabTitle) {				this.showTab(this.links[n]);				this.nextTab = this.links[n+1];			}		}		}		this.slideIncrement = window.setTimeout( function(){ thisFeatured.xFade() }, 5000);															} else {		this.slideIncrement = window.setTimeout( function(){ thisFeatured.xFade() }, 50);		}}// clears menutitems //Featured.prototype.clearTab = function (tab) {	tab.className = "unselected";}// shows current menuitem //Featured.prototype.showTab = function (tab) {	tab.className = "selected";}// clears timeouts from window object //Featured.prototype.clearFade = function () {	if (this.slideIncrement) {		var thisSlideIncrement = this.slideIncrement;		window.clearTimeout(thisSlideIncrement);		}	if (this.fadeIncrement) {		var thisFadeIncrement = this.fadeIncrement;		window.clearTimeout(thisfadeIncrement);	}}// shows content when a menu item, previous, or next buttons are clicked //Featured.prototype.showContent = function(id) {	this.clearFade();	this.playState = false;	for (var i=0;i<this.slides.length;i++){		this.slides[i].style.display = "none";		this.slides[i].style.opacity = 0;		this.slides[i].style.MozOpacity = 0;		this.slides[i].style.filter = "alpha(opacity=0)";		if (this.links.length) {		this.links[i].className = "unselected";		}		this.slides[i].xOpacity = 0;	}		this.slides[id].style.display = "block";			this.slides[id].style.opacity = 1;		this.slides[id].style.MozOpacity = 1;		this.slides[id].style.filter = "alpha(opacity=100)";		if (this.links.length) {		this.links[id].className = "selected";		}		this.current = id;		this.previous = this.slides[this.current-1]?this.current-1:this.slides.length-1;		this.next = this.slides[this.current+1]?this.current+1:0;		this.slides[id].xOpacity = 1;}// counter to determine what the id of each menuitem is //Featured.prototype.linkItem = function(obj) {	for (var i=0;i<this.links.length;i++){		if (obj === this.links[i]) {		return i;		}	}}// set the opacity of slides //Featured.prototype.setOpacity = function (id) {		if (this.slides[id].xOpacity > .99) {			this.slides[id].xOpacity = 1;			return;		}		this.slides[id].style.opacity = this.slides[id].xOpacity;		this.slides[id].style.MozOpacity = this.slides[id].xOpacity;		this.slides[id].style.filter = "alpha(opacity=" + (this.slides[id].xOpacity*100) + ")";}// initialize new featured listing //Featured.prototype.initialize = function() {	hide('featured_loading');	var thisFeatured = this;	this.slides = getElementsByClassName(this.container, "div", "large_image");	for(var i=0;i<this.slides.length;i++){		this.slides[i].xOpacity = 0;		}	this.menu = getElementsByClassName(this.container, "*", "featured_menu");		if (this.menu.length){	this.links = this.menu[0].getElementsByTagName("a");	for(var i=0;i<this.links.length;i++){		this.links[i].on = false;		}	}	for (var m=0; m < this.links.length; m++) {		this.links[m].onclick = function() {			thisFeatured.showContent(thisFeatured.linkItem(this));			return false;		}	}	this.showContent(0);	this.playState = true;	this.slides[this.current].xOpacity = 1;	this.slideIncrement = window.setTimeout( function(){ thisFeatured.xFade() }, 5000);	}// get featured listings //function getFeatured() {	featured = getElementsByClassName(document, "div", "featured_container");	for (var i=0;i<featured.length;i++){		featuredObjects[i] = new Featured(featured[i]);		featuredObjects[i].id = i;		featuredObjects[i].initialize();		}}//-->
