//page elements
var infoListPreheader;

function createListPreheader(){
	//reset header
	try{
		infoListPreheader.removeChild(getById("info_list_preheader_contents"));
	}catch(e){}
	var ic = document.createElement("div");
	ic.id = "info_list_preheader_contents";
	
	var lbl = htmlTag("span","<span class='text'>HOME LISTINGS</span><span class='text'> </span><span class='text'><img class='qmi' src='/images/qmiicon.jpg' />Quick Move-In Home (price includes homesite)</span><span class='text'>(\"to be built\" home prices do not include lot cost)</span>");
	lbl.className = "label";
	ic.appendChild(lbl);	
	infoListPreheader.appendChild(ic);
}

function handleListMouseOver(row,index){
	row.oldClass = row.className;
	row.className = row.className+"over";
}

function handleListMouseOut(row,index){
	row.className = row.oldClass;
}

function handleListMouseDown(row,index){
	window.location.href = floorplanList[index][1];
}

function init(){
	// init list script
	initList();
	//get elements ========================================
	infoListPreheader = getById("infolistpreheader");
	
	//create headers ==============================	
	if (floorplanList.length > 0){
		createListPreheader();
	}
	//fill divs =================================
	var tn,a,br,img,div,li;

	//create list =================================
	if (floorplanList.length > 0){
		createFloorplanList();
	}
	else{
		//window.location.href = "locations.jsp";
	}
	
}


