function getPath() { return "/dbmhc/mhcmain.nsf/"; } //=================================================================================================== browserName = navigator.appName; browserVer = parseInt( navigator.appVersion ); if ( browserVer >=3 ) version = "3"; else version = "2"; if ( version == "3" ) { rollon = new Image(); rollon.src = getPath() + "MainFindAHome_on.gif"; rolloff = new Image(); rolloff.src = getPath() + "MainFindAHome_off.gif"; roll2on = new Image(); roll2on.src = getPath() + "MainRentAHome_on.gif"; roll2off = new Image(); roll2off.src = getPath() + "MainRentAHome_off.gif"; roll3on = new Image(); roll3on.src = getPath() + "MainFindACommunity_on.gif"; roll3off = new Image(); roll3off.src = getPath() + "MainFindACommunity_off.gif"; roll4on = new Image(); roll4on.src = getPath() + "MainRVReservations_on.gif"; roll4off = new Image(); roll4off.src = getPath() + "MainRVReservations_off.gif"; roll5on = new Image(); roll5on.src = getPath() + "MainAboutELS_on.gif"; roll5off = new Image(); roll5off.src = getPath() + "MainAboutELS_off.gif"; } //=================================================================================================== function rollIn(imgName) { if (version=="3") { document[imgName].src=eval(imgName + "on.src"); } } //=================================================================================================== function rollOut(imgName) { if (version=="3") { document[imgName].src=eval(imgName + "off.src"); } } //=================================================================================================== function jumper(newloc) // Function to direct user to the selected URL on the left navigator - JMinata 9/22/00 // 10.19.2000 - Steven L Rieger : Added + to the page location variable values. E.G. MHC Lifestyles s/b // MHC+Lifestyles { newPage=newloc.options[newloc.selectedIndex].value if (newPage!="") { window.location.href=newPage } } //=================================================================================================== function doSearch () // Get all the selected value(s) from search criteria on the right navigator and construct a search URL string // - JMinata 10/4/00 // // Added a check for Arizona, California, and Florida. If user selects one of them, we should direct them to a page // of that particular state and pass the search criteria in the query string - JMinata 10/15/00 // // 10.17.2000 - Steven L Rieger : Removed Arizona from second layer of maps. As per Margaurite. { var docForm; var docFormField; var baseURL; var URL; var firstTime; var viewToUse; var stateSearchFormName; var pageLoc; URL = ""; stateSearchFormName = ""; firstTime = true; docForm = document.forms[0]; // Get view to use if ( docForm.PageLocation.value.toLowerCase() == "buy a home" ) { viewToUse = "vwBuyAHomeResult"; pageLoc = "Buy+a+Home"; } else if ( docForm.PageLocation.value.toLowerCase() == "rent a home" ) { viewToUse = "vwRentAHomeResult"; pageLoc = "Rent+a+Home"; } else if ( docForm.PageLocation.value.toLowerCase() == "mhc lifestyle" ) { viewToUse = "vwMHCLifestyleResult"; pageLoc = "MHC+Lifestyle"; } else { viewToUse = docForm.PageLocation.value; pageLoc = ""; } // Retrieve list of field names and field types (DropDownBox or CheckBox) that were populated by // webqueryopen agent arrayOfFieldNames = docForm.listOfFieldName.value.split("==="); arrayOfFieldTypes = docForm.listOfFieldType.value.split("==="); // Loop through each field name for ( i = 0; i < arrayOfFieldNames.length; i++ ) { // Loop through each element on the form to find the field for ( num = 0; num < docForm.elements.length; num++ ) { // The field we are looking for docFormField = document.forms[0].elements[num]; // If the current element is the field we are looking for, get its selected value if ( docFormField.name == arrayOfFieldNames[i] ) { if ( arrayOfFieldTypes[i].toLowerCase() == "dropdownbox" ) { if ( docFormField.options[docFormField.selectedIndex].value != "" ) { // Construct a search string if ( firstTime ) { // Direct user to a different page, if the state is az, ca, or fl - JMinata 10/15/00 if ( docFormField.options[docFormField.selectedIndex].value.toLowerCase() == "ca" && docForm.PageLocation.value.toLowerCase() != "rent a home" ) { stateSearchFormName = "frmSearchCA"; } else if ( docFormField.options[docFormField.selectedIndex].value.toLowerCase() == "fl" && docForm.PageLocation.value.toLowerCase() != "rent a home" ) { stateSearchFormName = "frmSearchFL"; } URL += "FIELD+" + arrayOfFieldNames[i] + "=\"" + docFormField.options[docFormField.selectedIndex].value + "\""; firstTime = false; } // End If ( firstTime ) else { URL += "+AND+FIELD+" + arrayOfFieldNames[i] + "=\"" + docFormField.options[docFormField.selectedIndex].value + "\""; } // End If ( firstTime ) } // End if ( selectedIndex.value != "" ) } // End if ( dropdownbox ) else if ( arrayOfFieldTypes[i].toLowerCase() == "checkbox" ) { if ( docFormField.checked ) { if ( firstTime ) { // Direct user to a different page, if the state is az, ca, or fl - JMinata 10/15/00 if ( docFormField.value.toLowerCase() == "ca" ) { stateSearchFormName = "frmSearchCA"; } else if ( docFormField.value.toLowerCase() == "fl" ) { stateSearchFormName = "frmSearchFL"; } URL += "FIELD+" + arrayOfFieldNames[i] + "=\"" + docFormField.value + "\""; firstTime = false; } // End if ( FirstTime ) else { URL += "+AND+FIELD+" + arrayOfFieldNames[i] + "=\"" + docFormField.value + "\""; } // End if ( FirstTime ) } // End if ( checked ) } // End if ( checkbox ) else { // Field type is empty, do nothing } } // End if ( fieldName = array ) } // End for loop } // End for loop if ( URL == "" ) { alert ("Please select a search criteria"); } else { if ( stateSearchFormName != "" ) { baseURL = getPath() + stateSearchFormName + "?OpenForm&" + pageLoc+ "&" + docForm.CommunityDbPath.value + "/" + viewToUse + "&"; location.href = baseURL + URL; } else { if( docForm.PageLocation.value.toLowerCase() == "buy a home" && URL.indexOf( "SearchState" ) == -1 ) { alert( "Please select a state to search" ); } else if ( docForm.PageLocation.value.toLowerCase() == "buy a home" ) { baseURL = docForm.CommunityDbPath.value + "/" + "(BuyAHomeSearch)" + "?OpenAgent&Query="; location.href = baseURL + URL; } else { baseURL = docForm.CommunityDbPath.value + "/" + viewToUse + "?SearchView&SearchOrder=4&Query="; location.href = baseURL + URL; } } } } //=================================================================================================== function doSearchBuyAHome () { var docForm; var sep; var selectedValues; var firstTime; var baseURL; docForm = document.forms[0]; sep = "@"; selectedValues = ""; if ( docForm.SearchState.options[docForm.SearchState.selectedIndex].value == "" ) { alert ( "Please select a state to search" ) } else { selectedValues = docForm.SearchState.options[docForm.SearchState.selectedIndex].value.replace(" ", "+"); selectedValues += sep + docForm.HomePriceRange.options[docForm.HomePriceRange.selectedIndex].value.replace(" ", "+"); selectedValues += sep + docForm.SearchNumberBedrooms.options[docForm.SearchNumberBedrooms.selectedIndex].value.replace(" ", "+"); selectedValues += sep + docForm.SearchNumberBathrooms.options[docForm.SearchNumberBathrooms.selectedIndex].value.replace(" ", "+"); selectedValues += sep + docForm.SearchCommunityType.options[docForm.SearchCommunityType.selectedIndex].value.replace(" ", "+"); firstTime = true; for ( i = 0; i < docForm.SearchAmenities.length; i++ ) { if ( docForm.SearchAmenities[i].checked ) { if ( firstTime ) { selectedValues += "&" + docForm.SearchAmenities[i].value.replace(" ", "+"); firstTime = false; } else { selectedValues += sep + docForm.SearchAmenities[i].value.replace(" ", "+"); } } } baseURL = docForm.CommunityDbPath.value + "/(BuyAHomeSearch)?OpenAgent&"; location.href = baseURL + selectedValues; } } // Function GetCookie // This function will take a passed in name of a cookie and return its value // // Inputs: Cookie Name // // Outputs: The value of the cookie if found else null // // History // 01.30.2001 Steven Rieger - Created Function function GetCookie( name ) { var currentCookie = document.cookie; // Get the cookie by name + = var index = currentCookie.indexOf( name + "=" ); // If the cookie was not found return null if ( index == -1 ) return null; // Get the position of the = in the cookie string to help parse the value. index = currentCookie.indexOf( "=", index ) + 1; // Get the position of the end of the cookie value. ( Maybe more than one cookie. ) var endstr = currentCookie.indexOf( ";", index ); // If there is only one cooke ( no ; ) then use the entire length of the cookie to subtract from. if ( endstr == -1 ) endstr = currentCookie.length; // Return the value of the cookie return unescape( currentCookie.substring( index, endstr ) ); } // Function SetCookie // This function will take a passed in name of a cookie, its value and expiration and sets // the cookie in the current document. // // Inputs: Cookie Name, Cookie Value, Cookie Expiration Date. // // Outputs: Updates the current document with the cookie. // // History // 01.30.2001 Steven Rieger - Created Function function SetCookie( name, value, expirationDate ) { // update currentCookie document.cookie=name + "=" + escape( value ) + ( ( expirationDate ) ? ";expires=" + expirationDate.toGMTString() : "" ); } function doSearchRentAHome () { var docForm; var sep; var selectedValues; var baseURL; docForm = document.forms[0]; sep = "@"; selectedValues = ""; if ( docForm.SearchState.options[docForm.SearchState.selectedIndex].value == "" ) { alert ( "Please select a state to search" ) } else { selectedValues = docForm.SearchState.options[docForm.SearchState.selectedIndex].value.replace(" ", "+"); selectedValues += sep + docForm.SearchCommunityType.options[docForm.SearchCommunityType.selectedIndex].value.replace(" ", "+"); selectedValues += sep + docForm.SearchRentalRates.options[docForm.SearchRentalRates.selectedIndex].value.replace(" ", "+"); baseURL = docForm.CommunityDbPath.value + "/(RentAHomeSearch)?OpenAgent&"; location.href = baseURL + selectedValues; } } /*********************************************** * This is used to scroll through the mian nav images ***********************************************/ image1 = getPath() +"MainPageTitlePicture.jpg"; image2 = getPath() +"MainPageTitlePicture2.jpg"; image3= getPath() +"MainPageTitlePicture3.jpg" image4= getPath() +"MainPageTitlePicture4.jpg" image5= getPath() +"MainPageTitlePicture5.jpg" image6= getPath() +"MainPageTitlePicture6.jpg" var fadeimages=new Array() //SET IMAGE PATHS. Extend or contract array as needed fadeimages[0]= [image1, '', ''] fadeimages[1]= [image2, '', ''] fadeimages[2]= [image3, '', ''] fadeimages[3]= [image4, '', ''] fadeimages[4]= [image5, '', ''] fadeimages[5]= [image6, '', ''] var fadeimages2=new Array() //2nd array set example. Remove or add more sets as needed. //SET IMAGE PATHS. Extend or contract array as needed fadeimages2[0]=['MainPageTitlePicture.jpg', '', ''] fadeimages2[1]=['MainPageTitlePicture2.jpg', '', ''] fadeimages2[2]=['MainPageTitlePicture3.jpg', '', ''] fadeimages2[3]=['MainPageTitlePicture4.jpg', '', ''] fadeimages2[4]=['MainPageTitlePicture5.jpg', '', ''] fadeimages2[5]=['MainPageTitlePicture6.jpg', '', ''] var fadebgcolor="white" ////NO need to edit beyond here///////////// var fadearray=new Array() //array to cache fadeshow instances var fadeclear=new Array() //array to cache corresponding clearinterval pointers var dom=(document.getElementById) //modern dom browsers var iebrowser=document.all function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){ this.pausecheck=pause this.mouseovercheck=0 this.delay=delay this.degree=10 //initial opacity degree (10%) this.curimageindex=0 this.nextimageindex=1 fadearray[fadearray.length]=this this.slideshowid=fadearray.length-1 this.canvasbase="canvas"+this.slideshowid this.curcanvas=this.canvasbase+"_0" if (typeof displayorder!="undefined") theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :) this.theimages=theimages this.imageborder=parseInt(borderwidth) this.postimages=new Array() //preload images for (p=0;p
') else document.write('
') if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox this.startit() else{ this.curimageindex++ setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay) } } function fadepic(obj){ if (obj.degree<100){ obj.degree+=10 if (obj.tempobj.filters&&obj.tempobj.filters[0]){ if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+ obj.tempobj.filters[0].opacity=obj.degree else //else if IE5.5- obj.tempobj.style.filter="alpha(opacity="+obj.degree+")" } else if (obj.tempobj.style.MozOpacity) obj.tempobj.style.MozOpacity=obj.degree/101 else if (obj.tempobj.style.KhtmlOpacity) obj.tempobj.style.KhtmlOpacity=obj.degree/100 } else{ clearInterval(fadeclear[obj.slideshowid]) obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1" obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas) obj.populateslide(obj.tempobj, obj.nextimageindex) obj.nextimageindex=(obj.nextimageindex' slideHTML+='' if (this.theimages[picindex][1]!="") //if associated link exists for image slideHTML+='' picobj.innerHTML=slideHTML } fadeshow.prototype.rotateimage=function(){ if (this.pausecheck==1) //if pause onMouseover enabled, cache object var cacheobj=this if (this.mouseovercheck==1) setTimeout(function(){cacheobj.rotateimage()}, 100) else if (iebrowser&&dom||dom){ this.resetit() var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas) crossobj.style.zIndex++ fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50) this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0" } else{ var ns4imgobj=document.images['defaultslide'+this.slideshowid] ns4imgobj.src=this.postimages[this.curimageindex].src } this.curimageindex=(this.curimageindex' : ''; if (imgs.controls_top){ this.controls(); document.write(brs) } document.write('
<\/div>
<\/div><\/div><\/div>') if(this.descriptions) document.write(brs+'
'+this.dp+' <\/span>
\n'); if(this.counter&&!this.descriptions) document.write(brs); if(this.counter) this.cntrl() if (!imgs.controls_top){ document.write(this.ics? '' : brs); this.controls(); } } else document.write('
<\/div>') if (this.dom) //if modern browsers such as Firefox, IE5+ this.startit() else{ this.nextimgidx++ setInterval("iss["+this.issid+"].rotateimg()", this.delay) } } inter_slide.prototype.cntrl=function(){ this.cpad=this.imgs.length.toString().length; document.write('
Viewing Image: <\/span><\/b> of  '+this.imgs.length+'<\/b><\/div>'); } inter_slide.prototype.controls=function(){ var brs=this.addbr? '
' : '  '; if(!this.ics&&!this.no_c) document.write('
\n'+ (this.no_auto? '   ' : ' \n')+ ' '+(this.jumpto? brs+'Jump to: ' : '')+'<\/div>') else if(this.ics&&!this.no_c){ var op=document.body.filters? ' style="filter:alpha(opacity=100);"' : ' style="opacity:'+(this.man_start? 0.99 : 0.45)+';"'; document.write('
<\/td>'+(this.no_auto? ' <\/td>' : '<\/td>')+'<\/td><\/tr><\/table>\n'); } else this.no_c=1; } inter_slide.prototype.jumper=function(e){ var key; if(typeof e=='object') key=e.keyCode? e.keyCode : e.which? e.which : 1; if(key&&key!==13) return; var num=typeof e=='number'? e : parseInt(this.go('goto'+this.issid).value); if(num<=this.imgs.length&&num>0){ this.nextimgidx=num-2; this.changeimg(true, 'jump'); } } inter_slide.prototype.ibute=function(obj, i){ if(!obj.parentNode) return; if(i==1) obj.parentNode.style.backgroundColor=this.ibut_hc? this.ibut_hc : 'yellow'; else if(i==2) obj.parentNode.style.backgroundColor='transparent'; else if(i==3){ obj.parentNode.style.borderTop=obj.parentNode.style.borderLeft='1px solid gray'; obj.parentNode.style.paddingRight='1px';obj.parentNode.style.paddingBottom=0; } if (i==2||i==4){ obj.parentNode.style.borderTop=obj.parentNode.style.borderLeft='none'; obj.parentNode.style.paddingRight='2px';obj.parentNode.style.paddingBottom='1px'; } } inter_slide.prototype.fadepic=function(){ if (this.fade&&this.degree<100){ this.faded=0 this.degree+=10 if (this.tempobj.filters&&this.tempobj.filters[0]){ if (typeof this.tempobj.filters[0].opacity=="number") //if IE6+ this.tempobj.filters[0].opacity=this.degree else //else if IE5.5- this.tempobj.style.filter="alpha(opacity="+this.degree+")" } else if (this.tempobj.style.MozOpacity) this.tempobj.style.MozOpacity=this.degree/101 else if (this.tempobj.style.KhtmlOpacity) this.tempobj.style.KhtmlOpacity=this.degree/100 else if (this.tempobj.style.opacity&&!this.tempobj.filters) this.tempobj.style.opacity=this.degree/101 } else{ this.faded=1 clearInterval(this.fadeclear) this.nextcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_0" : this.canvasbase+"_1" this.tempobj=this.go(this.nextcanvas) if(this.playing) this.changeimg() } } inter_slide.prototype.populateslide=function(picobj, picidx){ if(document.getElementsByTagName){ if(picobj.getElementsByTagName('a')[0]&&picobj.getElementsByTagName('a')[0].onclick) picobj.getElementsByTagName('a')[0].onclick=null; if(picobj.getElementsByTagName('img')[0]&&picobj.getElementsByTagName('img')[0].onload) picobj.getElementsByTagName('img')[0].onload=null; } picobj.style.backgroundColor=this.imgs[picidx].fadecolor? this.imgs[picidx].fadecolor : this.fadecolor? this.fadecolor : 'white'; var slideHTML='
' if (this.imgs[picidx][2]){ //if associated link exists for img var specs=this.imgs[picidx][4]? ", '"+this.imgs[picidx][4]+"'" : this.specs? ", '"+this.specs+"'" : ''; slideHTML+='' } slideHTML+=''+(this.ualt? this.imgs[picidx][1] : 'Slide Show Image')+'' if (this.imgs[picidx][2]) //if associated link exists for img slideHTML+='<\/a>' slideHTML+='<\/td><\/tr><\/table>' picobj.innerHTML=slideHTML } inter_slide.prototype.buttons=function(bool){ if(this.no_c) return; var next=this.go('next'+this.issid), prev=this.go('prev'+this.issid); next.disabled=prev.disabled=!bool; next.title=bool? 'next' : ''; prev.title=bool? 'previous' : ''; if(this.jumpto&&!this.ics) this.go('go'+this.issid).disabled=this.go('goto'+this.issid).disabled=!bool; if(this.ics){ if(!this.no_auto){ var go=this.go('gostp'+this.issid) go.title=bool? 'Play' : 'Stop'; go.src=bool? playimg : stopimg; } if(prev.filters&&prev.parentNode) prev.parentNode.style.filter=next.parentNode.style.filter='alpha(opacity='+(bool? 100 : 45)+')'; else if(prev.style.opacity&&!prev.filters) prev.style.opacity=next.style.opacity=bool? 0.99 : 0.45; } } inter_slide.prototype.imgload=function(el){ if(!el&&!this.imgel) return; var el=el? el : this.imgel; if(el.width==0||el.height==0){ this.imgel=el; var cacheobj=this; clearTimeout(this.getdim) this.getdim=setTimeout(function(){cacheobj.imgload()}, 300) return; } var m=this.go('master'+this.issid).style, c0=this.go(this.canvasbase+'_0').style, c1=this.go(this.canvasbase+'_1').style; if(!this.width){ this.width=el.width+this.imgborder*2; m.width = c0.width = c1.width = this.width+'px'; } if(!this.height){ this.height=el.height+this.imgborder*2; m.height = c0.height = c1.height = this.height+'px'; } } inter_slide.prototype.changeimg=function(bool,nav){ if(this.playing){ this.buttons(false) this.nextimgidx=(this.keeptrack()-1)? this.nextimgidx : this.imgs.length+this.nextimgidx return; } if(this.fadeclear) clearInterval(this.fadeclear); if(bool){ var loadidx=this.nextimgidx+2 loadidx=(loadidx-1)? loadidx : this.imgs.length+loadidx; this.loadimgidx[loadidx]=new Image(); this.loadimgidx[loadidx].src=this.imgs[loadidx][0]; } else{ var loadidx=this.nextimgidx-2 loadidx=(loadidx-1)? loadidx : this.imgs.length+loadidx this.loadimgidx[loadidx]=new Image(); this.loadimgidx[loadidx].src=this.imgs[loadidx][0]; } if(nav&&nav=='jump') this.nextimgidx++; else this.nextimgidx=this.keeptrack()+(bool? 1 : -1) this.nextimgidx=(this.nextimgidx-1)? this.nextimgidx : this.imgs.length+this.nextimgidx this.populateslide(this.tempobj, this.nextimgidx) this.rotateimg() } } inter_slide.prototype.go=function(id){ return this.da? this.da[id] : document.getElementById(id); } inter_slide.prototype.rotateimg=function(){ if(this.dom){ var cimg=this.go('theimg'+this.nextimgidx+'_'+this.issid)? this.go('theimg'+this.nextimgidx+'_'+this.issid) : null; if(cimg&&typeof cimg.complete=='boolean'&&!cimg.complete){ var cacheobj=this clearTimeout(this.loading) this.loading=setTimeout(function(){cacheobj.rotateimg()}, 300) return; } if (this.mouseovercheck==1){ var cacheobj=this clearTimeout(this.mousep) this.mousep=setTimeout(function(){cacheobj.rotateimg()}, 100) return; } if(this.fade) this.resetit() var crossobj=this.tempobj=this.go(this.curcanvas) crossobj.style.zIndex++ var othercanvas=this.curcanvas==this.canvasbase+"_0"? this.go(this.canvasbase+"_1") : this.go(this.canvasbase+"_0"); othercanvas.style.zIndex=0; if(this.descriptions) this.go('imgdsc'+this.issid).innerHTML = this.imgs[this.keeptrack()][1]; if(this.counter){ var padit=''; for (var p=0; pcanvases[1].style.zIndex&&canvases[0].getElementsByTagName("img")[0]) return parseInt(canvases[0].getElementsByTagName('img')[0].id.replace(/theimg/, '')) else if(canvases[1].getElementsByTagName("img")[0]) return parseInt(canvases[1].getElementsByTagName('img')[0].id.replace(/theimg/, '')) else return this.nextimgidx; }