<!--
if (window != top) {

	top.location.href = location.href;
}

// changes class of Element supplied //
function changeClass(element,className) {

	var element;
	element = document.getElementById(element);
	element.attributes['class'].value = className;
}

if (document.images) {

	login = new Image();
	login_on = new Image();
	aboutus = new Image();
	aboutus_on = new Image();
	portfolio = new Image();
	portfolio_on = new Image();
	floorplans = new Image();
	floorplans_on = new Image();
	forsale = new Image();
	forsale_on = new Image();
	financing = new Image();
	financing_on = new Image();
	contactus = new Image();
	contactus_on = new Image();
	floorplan_lib = new Image();
	floorplan_lib_on = new Image();
	forsale_homes = new Image();
	forsale_homes_on = new Image();
	custLogin = new Image();
	custLogin_on = new Image();
	communities = new Image();
	communities_on = new Image();
	tips = new Image();
	tips_on = new Image();
	openhouse = new Image();
	openhouse_on = new Image();
	commercial = new Image();
	commercial_on = new Image();
	homeandbuilding = new Image();
	homeandbuilding_on = new Image();
	
	login.src = "/images/header_login.jpg";
	login_on.src = "/images/header_login_on.jpg";
	aboutus.src = "/images/button_aboutus.gif";
	aboutus_on.src = "/images/button_aboutus_on.gif";
	portfolio.src = "/images/button_portfolio.gif";
	portfolio_on.src = "/images/button_portfolio_on.gif";
	floorplans.src = "/images/button_floorplans.gif";
	floorplans_on.src = "/images/button_floorplans_on.gif";
	forsale.src = "/images/button_forsale.gif";
	forsale_on.src = "/images/button_forsale_on.gif";
	financing.src = "/images/button_financing.gif";
	financing_on.src = "/images/button_financing_on.gif";
	contactus.src = "/images/button_contactus.gif";
	contactus_on.src = "/images/button_contactus_on.gif";
	floorplan_lib.src = "/images/subtitle_floorplan_lib.jpg";
	floorplan_lib_on.src = "/images/subtitle_floorplan_lib_on.jpg";
	forsale_homes.src = "/images/subtitle_forsale.jpg";
	forsale_homes_on.src = "/images/subtitle_forsale_on.jpg";
	custLogin.src = "/images/button_cust_login.gif";
	custLogin_on.src = "/images/button_cust_login_on.gif";
	communities.src = "/images/button_communities.gif";
	communities_on.src = "/images/button_communities_on.gif";
	tips.src = "/images/button_tips.gif";
	tips_on.src = "/images/button_tips_on.gif";
	openhouse.src = "/images/button_openhouse.gif";
	openhouse_on.src = "/images/button_openhouse_on.gif";
	commercial.src = "/images/button_commercial.gif";
	commercial_on.src = "/images/button_commercial_on.gif";
	homeandbuilding.src = "/images/button_homeandbuilding.gif";
	homeandbuilding_on.src = "/images/button_homeandbuilding_on.gif";
}	

function chgImg(imgName, newImg) {
	if (document.images) {
		document[imgName].src = eval(newImg + ".src");
	}
}

function openDisplayWindow(h, w, page) {

    var winWidth = 0;
    var winHeight = 0;

	if (typeof(window.innerWidth) == 'number') {
		//Non-IE
		winWidth = window.innerWidth;
		winHeight = window.innerHeight;
	} else {
	
		if(document.documentElement && document.documentElement.clientWidth) {
		
			//IE 6+ in 'standards compliant mode'
			winWidth = document.documentElement.clientWidth;
			winHeight = document.documentElement.clientHeight;
			
		} else { 
		
			if (document.body && document.body.clientWidth) {
			
				//IE 4 compatible
				winWidth = document.body.clientWidth;
			    winHeight = document.body.clientHeight;
			}
		}
	}
	
	var LeftPosition = (winWidth - w)/2;
	var TopPosition = (winHeight - h)/2;
	var menuargs = "location=no,menubar=no,toolbar=no,directories=no,scrollbars=yes,resizable=yes,width="+w+",height="+h+",top="+TopPosition+",left="+LeftPosition;
	var win = window.open(page, 'displayWin', menuargs);
	win.focus();
}

function adjustPlacement(imageDiv, leftPixels, leftMargin) {
	var winWidth = 0;
	var thisDiv;
	thisDiv = document.getElementById(imageDiv);

	if (typeof(window.innerWidth) == 'number') {
		//Non-IE
		winWidth = window.innerWidth;
	} else {
		if(document.documentElement && document.documentElement.clientWidth) {
			//IE 6+ in 'standards compliant mode'
			winWidth = document.documentElement.clientWidth;
		} else {
			if (document.body && document.body.clientWidth) {
				//IE 4 compatible
				winWidth = document.body.clientWidth;
			}
		}
	}
	
	if (winWidth <= 760) {
		//alert( 'Width = ' + winWidth );
		thisDiv.style.left = leftPixels + "px";
		thisDiv.style.marginLeft = "0px";
	} else {
		thisDiv.style.left = "50%";
		thisDiv.style.marginLeft = leftMargin + "px";
	}
}

//-->

