function RFLayoutManager(){this.menuSectionId="ReapFieldMenu";this.subMenuSectionId="ReapFieldSubMenu";this.contentSectionId="ReapFieldContent";this.subContentSectionId="ReapFieldSubContent";this.footerSectionId="ReapFieldFooter";this.quickSearchId="quickSearch";this.middleSectionId="middleSection";this.advanceSearchid="advanceSearchid";this.quickSearchDivId="quickSearchDivId";this.quickSearchPriceFrom="quickSearchPriceFrom";this.quickSearchPriceto="quickSearchPriceto";this.quickSearchkeyword="quickSearchkeyword";this.propertyTypeDivList="propertyTypeDivList";this.searchtypeOptionBuy="searchtypeOptionBuy";this.searchtypeOptionRent="searchtypeOptionRent";this.menuSection;this.subMenuSection;this.contentSection;this.subContentSection;this.footerSection;this.activeLayout;this.hoverMenuContainer;this.hoverMenuId="rfExtHoverMenu"}RFLayoutManager.prototype.Load=function(){this.createLayout()};RFLayoutManager.prototype.createLayout=function(){var a='<div id="ReapFieldHeader" class="ReapFieldHeader centerSections">							<div class="ReapFieldLogo">								<a href="#home"><img id="reapfieldLogo" src="images/reapfield_logo_new.png" width="231" height="70" alt=""></a>							</div>							<div id="'+this.menuSectionId+'"></div>						</div>						<div id="'+this.middleSectionId+'" class="middleSection centerSections inlineSections">						</div>						<div id="'+this.footerSectionId+'" class="reapFieldFooter centerSections inlineSections">						</div>						<div class="centerSections leeDiv">Site by 							<a href="http://www.leewayhertz.com/" target="_blank">LeewayHertz</a></div>						<div class="hoverMenuDiv" id="'+this.hoverMenuId+'"></div>';reapfield.G_ViewMgr.parentDOM.innerHTML=a;this.menuSection=document.getElementById(this.menuSectionId);this.footerSection=document.getElementById(this.footerSectionId);this.hoverMenuContainer=document.getElementById(this.hoverMenuId)};RFLayoutManager.prototype.createInnerPageLayout=function(){var a='<div class="topSaperatorBar centerSections"></div><div id="ReapFieldLeftPanel" class="ReapFieldSubMenu" style="width:180px;">								<div id="'+this.subMenuSectionId+'"></div>								<div id="'+this.quickSearchId+'"></div>							</div>							<div id="reapfieldMainViewPanel" class="content inlineSections">								<div id="'+this.contentSectionId+'"  class="ReapFieldContent" style="width:622px;"></div>								<div id="'+this.subContentSectionId+'" class="ReapFieldSubContent" style="width:180px;"></div>							</div>';document.getElementById(this.middleSectionId).innerHTML=a;this.subMenuSection=document.getElementById(this.subMenuSectionId);this.quickSearchSection=document.getElementById(this.quickSearchId);this.contentSection=document.getElementById(this.contentSectionId);this.subContentSection=document.getElementById(this.subContentSectionId);this.activeLayout="inner"};RFLayoutManager.prototype.clearInnerLayout=function(){this.contentSection.innerHTML="";this.subContentSection.innerHTML=""};RFLayoutManager.prototype.createLandingPageLayout=function(){var a='<div class="content inlineSections" style="width:100%;">								<div id="'+this.contentSectionId+'"   style="width:100%;">Up</div>								<div id="'+this.subContentSectionId+'"  style="display:none;width:100%;">Down</div>					   </div>';var b=document.getElementById(this.middleSectionId);b.innerHTML=a;b.style.height="";this.contentSection=document.getElementById(this.contentSectionId);this.subContentSection=document.getElementById(this.subContentSectionId);this.activeLayout="landing"};RFLayoutManager.prototype.setModuleInfoText=function(a){document.getElementById(this.infoSectionId).innerHTML=a};RFLayoutManager.prototype.createQuickSearch=function(e){var b='<div class="quickSearchTop"></div>						<div class="quickSearchContent">						<form name="'+this.quickSearchDivId+'" id="'+this.quickSearchDivId+'">							<div class="quickSearchTitle">New Search</div>							<div class="quickSearchOptBtn">								<input type="radio" id="'+this.searchtypeOptionBuy+'" name="searchtypeOption"  value="buy" /><span class="searchTypeLabel">Buy</span>								<input type="radio" id="'+this.searchtypeOptionRent+'" name="searchtypeOption"  value="rent" /><span class="searchTypeLabel">Rent</span>							</div>							<input type="text" id="'+this.quickSearchkeyword+'" name="'+this.quickSearchkeyword+'" value="Location Keyword" class="quickSearchTextFields" /><br />							<div class="quickSearchFields">								<div id="'+this.propertyTypeDivList+'" class="reapFieldAgentSearch" style="vertical-align:middle;">									<select name="propertyTypeDivId" id="propertyTypeDivId" >										<option value="">-- Please Select --</option>									</select>								</div>							</div>							<input type="text" id="'+this.quickSearchPriceFrom+'" class="quickSearchFields" value="Price From"><br/>							<input type="text" id="'+this.quickSearchPriceto+'" class="quickSearchFields" value="Price To"><br />							<input type="submit" value="Search" class="quickSearchBtn reapFieldCommonBtn" />						</form></div>						<div class="quickSearchBottom">													</div>';e.innerHTML=b;var d=document.getElementById(this.quickSearchPriceFrom);this.watermarkEventHandler(d,d.value);var a=document.getElementById(this.quickSearchPriceto);this.watermarkEventHandler(a,a.value);var c=document.getElementById(this.quickSearchkeyword);this.watermarkEventHandler(c,c.value);this.eventHandler(document.getElementById(this.quickSearchDivId),"submit",this.callbackHandlerFn,this.owner)};RFLayoutManager.prototype.callbackHandlerFn=function(d,c,a){if(d=="AdvanceSearchEventSubmit"){var b={moduleId:"17",detailId:c};reapfield.G_EventMgr.fireEvent("loadModuleEvent",b)}else{if(d=="quickSearchDivSubmit"){var b={moduleId:"17",detailId:c};reapfield.G_EventMgr.fireEvent("loadModuleEvent",b)}}};RFLayoutManager.prototype.eventHandler=function(d,b,f,a){var e=this;function c(m){if(!m){m=window.event}if(d.id==e.advanceSearchid){f("AdvanceSearchEventSubmit",d,a)}else{if(d.id==e.quickSearchDivId){try{var j="";if(document.getElementById(e.searchtypeOptionBuy).checked){j=document.getElementById(e.searchtypeOptionBuy).value}else{if(document.getElementById(e.searchtypeOptionRent).checked){j=document.getElementById(e.searchtypeOptionRent).value}}var n=document.getElementById(e.quickSearchPriceFrom).value;var h=document.getElementById(e.quickSearchPriceto).value;var g=document.getElementById(e.quickSearchkeyword).value;var l=document.getElementById("propertyTypeDivId").selectedIndex;var k=new Object();k.searchOption=j;k.searchPriceFrom=n;k.searchPriceTo=h;k.searchKeyWord=g;k.searchItemList=l;f("quickSearchDivSubmit",k,a);if(m.preventDefault){m.preventDefault()}m.returnValue=false;return false}catch(i){alert(i)}}}}reapfield.AttachEvent(d,b,c,false)};RFLayoutManager.prototype.watermarkEventHandler=function(d,b){var e=this;function a(h){var f=b;var g=d;g.style.color="#222";g.value=(d.value==f)?"":d.value}function c(f){e.blurAssignText(d,b)}reapfield.AttachEvent(d,"focus",a,false);reapfield.AttachEvent(d,"blur",c,false)};RFLayoutManager.prototype.blurAssignText=function(c,b){var a=b;if(c.value==""){c.value=a;c.style.color="#999"}else{if(c.value==a){c.style.color="#999"}else{c.style.color="#222"}}};RFLayoutManager.prototype.getPropertyTypeListSetData=function(a){var b=reapfield.G_API.propertyTypeList;document.getElementById(this.propertyTypeDivList).innerHTML=this.createDropDownList(b,"propertytype_propertytypeid","propertytype_propertytype",this.propertyTypeDivList,"Search By Property")};RFLayoutManager.prototype.createDropDownList=function(g,d,b,c,f){var a='<select name="'+c+'" id="'+c+'" class="quickSearchFields"><option value="" selected>'+f+"</option>";for(var e=0;e<g.length;e++){var h=g[e];a+='<option  value="'+h[d]+'">'+(h[b]||"")+"</option>"}a+="</select> ";return a};