function EBubble(map,image,size,insize,inset,anchor,noCloseOnClick) { var that=this; this.map = map; this.image=image; this.size=size; this.insize=insize; this.inset=inset; this.anchor=anchor; this.noCloseOnClick=noCloseOnClick; this.visible = false; this.ie = false; var agent = navigator.userAgent.toLowerCase(); if ((agent.indexOf("msie") > -1) && (agent.indexOf("opera") < 1)){ this.ie = true} else {this.ie = false}
this.div1 = document.createElement("div"); this.div1.style.position = "absolute"; this.div1.style.display="none"; document.body.appendChild(this.div1); this.div1.innerHTML = '<div style="z-index: 1"><img src="' + this.image + '" width="' + this.size.width +'" height="' + this.size.height +'"></div>'; this.div1.innerHTML += '<div style="z-index: 99; position: absolute; top: 10px; left: 175px; float: right;"><a href="javascript: bubble.hide();"><img src="/images/X.png" style="border: none;" /></a></div>'; GEvent.addListener(map, "dragstart", function() { that.hide();} ); GEvent.addListener(map, "moveend", function() { that.hide();} ); GEvent.addDomListener(this.div1,"click", function() { if (!that.noCloseOnClick) that.hide(); GEvent.trigger(that,"click");}); GEvent.addDomListener(this.div1,"mousedown", function() { if (!that.noCloseOnClick) that.hide(); GEvent.trigger(that,"click");}); this.div2 = document.createElement("div"); this.div1.appendChild(this.div2); this.div2.style.position = "absolute"; this.div2.style.left = this.inset.x + "px"; this.div2.style.top = this.inset.y + "px"; this.div2.style.width = this.insize.width + "px"; this.div2.style.height = this.insize.height + "px";}
EBubble.prototype.openOnMap = function(point, html, offset) { this.offset = offset||new GPoint(0,0); this.point = point; this.div2.innerHTML = html; var p = this.map.fromLatLngToDivPixel(point); var dragObject = this.map.getPane(G_MAP_MAP_PANE).parentNode; var x = p.x + parseInt(dragObject.style.left); var y = p.y + parseInt(dragObject.style.top); y += this.map.getContainer().offsetTop; x += this.map.getContainer().offsetLeft; y -= this.anchor.y; x -= this.anchor.x; y -= this.offset.y; x -= this.offset.x; this.div1.style.left = x+"px"; this.div1.style.top = y+"px"; this.visible = true; this.show();}
EBubble.prototype.openOnMarker = function(marker,html) { var vx = marker.getIcon().iconAnchor.x - marker.getIcon().infoWindowAnchor.x; var vy = marker.getIcon().iconAnchor.y - marker.getIcon().infoWindowAnchor.y; this.openOnMap(marker.getPoint(), html, new GPoint(vx,vy));}
EBubble.prototype.show = function() { this.div1.style.display=""; this.div2.style.display=""; this.visible = true;}
EBubble.prototype.hide = function() { this.div1.style.display="none"; this.visible = false;}
EBubble.prototype.isHidden = function() { return !this.visible;}
EBubble.prototype.supportsHide = function() { return true;}
function stateAbbreviation(st)
{ return stateAbbrev;}
function switchMaps(st)
{ var stateName = st.toUpperCase(); var stateAbbrev; switch(stateName){ case "ALASKA" : stateAbbrev = "AK"; break; case "ALABAMA" : stateAbbrev = "AL"; break; case "ARKANSAS" : stateAbbrev = "AR"; break; case "ARIZONA" : stateAbbrev = "AZ"; break; case "CALIFORNIA" : stateAbbrev = "CA"; break; case "COLORADO" : stateAbbrev = "CO"; break; case "CONNECTICUT" : stateAbbrev = "CT"; break; case "DISTRICT OF COLUMBIA" : stateAbbrev = "DC"; break; case "DELAWARE" : stateAbbrev = "DE"; break; case "FLORIDA" : stateAbbrev = "FL"; break; case "GEORGIA" : stateAbbrev = "GA"; break; case "HAWAII" : stateAbbrev = "HI"; break; case "IOWA" : stateAbbrev = "IA"; break; case "IDAHO" : stateAbbrev = "ID"; break; case "ILLINOIS" : stateAbbrev = "IL"; break; case "INDIANA" : stateAbbrev = "IN"; break; case "KANSAS" : stateAbbrev = "KS"; break; case "KENTUCKY" : stateAbbrev = "KY"; break; case "LOUISIANA" : stateAbbrev = "LA"; break; case "MASSACHUSETTS" : stateAbbrev = "MA"; break; case "MARYLAND" : stateAbbrev = "MD"; break; case "MAINE" : stateAbbrev = "ME"; break; case "MICHIGAN" : stateAbbrev = "MI"; break; case "MINNESOTA" : stateAbbrev = "MN"; break; case "MISSOURI" : stateAbbrev = "MO"; break; case "MISSISSIPPI" : stateAbbrev = "MS"; break; case "MONTANA" : stateAbbrev = "MT"; break; case "NORTH CAROLINA" : stateAbbrev = "NC"; break; case "NORTH DAKOTA" : stateAbbrev = "ND"; break; case "NEBRASKA" : stateAbbrev = "NE"; break; case "NEW HAMPSHIRE" : stateAbbrev = "NH"; break; case "NEW JERSEY" : stateAbbrev = "NJ"; break; case "NEW MEXICO" : stateAbbrev = "NM"; break; case "NEVADA" : stateAbbrev = "NV"; break; case "NEW YORK" : stateAbbrev = "NY"; break; case "OHIO" : stateAbbrev = "OH"; break; case "OKLAHOMA" : stateAbbrev = "OK"; break; case "OREGON" : stateAbbrev = "OR"; break; case "PENNSYLVANIA" : stateAbbrev = "PA"; break; case "PUERTO RICO" : stateAbbrev = "PR"; break; case "RHODE ISLAND" : stateAbbrev = "RI"; break; case "SOUTH CAROLINA" : stateAbbrev = "SC"; break; case "SOUTH DAKOTA" : stateAbbrev = "SD"; break; case "TENNESSEE" : stateAbbrev = "TN"; break; case "TEXAS" : stateAbbrev = "TX"; break; case "UTAH" : stateAbbrev = "UT"; break; case "VIRGIN ISLAND" : stateAbbrev = "VI"; break; case "VIRGINIA" : stateAbbrev = "VA"; break; case "VERMONT" : stateAbbrev = "VT"; break; case "WASHINGTON" : stateAbbrev = "WA"; break; case "WISCONSIN" : stateAbbrev = "WI"; break; case "WEST VIRGINIA" : stateAbbrev = "WV"; break; case "WYOMING" : stateAbbrev = "WY"; break;}
var addy = '/Search/searchresults.aspx?State=' + stateAbbrev; addy += '&StateName=' + stateName; addy += '&Status=active&StatusID=1&SellLocType=all&Sort=City'; document.location.replace(addy);}
