function copyPrototype(D,C){var E=C.toString();var B=E.match(/\s*function (.*)\s*\(/);var E=C.toString();var B=E.match(/\s*function (.*)\(/);if(B!=null){D.prototype[B[1].replace(/^\s*|\s*$/g,"")]=C}D.prototype[B[1]]=C;for(var A in C.prototype){D.prototype[A]=C.prototype[A]}}function CreateMapObject(A){switch(parseInt(A[0])){case 0:return new KeyMarker(A);case 1:return new _ZM(A);case 5:return new _BM(A);case 4:return new _SFM(A);default:return""}}_BMO.prototype.GetIcon=function(){switch(parseInt(this.FullArray[0])){case 0:case 1:return IconDefault;case 5:return IconBlueDot;case 4:return IconDefault;default:return 0}};
function _BMO(A)
{
this.FullArray=A;this.FieldDisplayNames=new Array()}_BMO.prototype.MapObjectType=function(){return this.FullArray[0]};_BMO.prototype.IsMarker=function(){switch(parseInt(this.FullArray[0])){case 0:case 1:case 5:case 4:return 1;default:return 0}};_BMO.prototype.IsAddress=function(){switch(parseInt(this.FullArray[0])){case 5:case 4:return 1;default:return 0}};_BMO.prototype.PlaceObjectOnMap=function(A){};_BMO.prototype.ToLinkHTML=function(){return"_BMO LinkHTML"};_BMO.prototype.ToTableRowHTML=function(){return"<tr><td>"+this.ToLinkHTML()+"</td><td></td></tr>"};_BMO.prototype.PictureBase=function(){return"0"};_BMO.prototype.FavoriteLabel=function(){return"FavoriteLabel"};_BMO.prototype.ToStaticDetail=function(A,D,G){var C="";C+="<table width='100%' border=1 cellspacing=0 cellpadding=1 style='border:1px solid #CCC; border-collapse: collapse;'><tr><td width='30%' valign='top'>";C+="<h2>"+A+"</h2>";C+="<table border=0 cellspacing=0 cellpadding=1 width='100%'>";C+=GetFieldInNCellsRow(D,"2");for(var E=0;E<this.FieldDisplayNames.length;E++){if(this.FieldDisplayNames[E]==""){continue}if(this.FieldDisplayNames[E]=="List Price"){C+=GetFieldAndFieldRow(this.FieldDisplayNames[E],formatCurrency(this.FullArray[E]))}else{if(this.FieldDisplayNames[E]=="*"){C+=GetFieldInNCellsRow(this.FullArray[E],"2")}else{if(this.FieldDisplayNames[E]=="MLS#"){var B="";if(G){B="<A target='_blank' HREF=\"http://www.alohamapper.com?mls="+this.FullArray[E]+'">[View]</a>'}else{B='<A HREF="javascript:StartMls('+this.FullArray[E]+');">[Slideshow]</a>'}C+=GetFieldAndFieldRow(this.FieldDisplayNames[E],this.FullArray[E]+B)}else{if(this.FieldDisplayNames[E]=="Zipcode"){C+=GetFieldAndFieldRow(this.FieldDisplayNames[E],"<a target='_blank' href='http://www.city-data.com/zips/"+this.Zipcode()+".html'>"+this.Zipcode()+"</a>")}else{if(this.FieldDisplayNames[E]=="TMK"){C+=GetTmkRows(this.FullArray[E])}else{C+=GetFieldAndFieldRow(this.FieldDisplayNames[E],this.FullArray[E])}}}}}}C+=GetFieldInNCellsRow(GetZipcodeStats(this.Zipcode()),"2");if(this.IsAddress()==1){C+=GetFieldInNCellsRow(GetAddressStats(this.streetnum(),this.streetdir(),this.streetname(),this.City(),this.Zipcode(),this.Point.lat(),this.Point.lng()),"2")}C+="</table>";C+="</td><td valign='top' align='left' ";if(!G&&parseInt(this.FullArray[0])==5){C+="  ondragenter='window.event.returnValue=false;' ondragover='window.event.returnValue=false;' ondrop='FinishDrag("+this.BID()+")' "}C+=" >";C+="<div id='dashb"+this.MarkerId()+"'>";if(parseInt(this.FullArray[0])==5){C+=this.GetDashboardImagesHtml()}else{if(parseInt(this.FullArray[0])==4){if(this.PicturesLoaded||G){C+=GetImageTable4MLS(this.MlsNumber(),this.MapObjectType())}else{var F="<div id='mls"+this.MlsNumber()+"'>Loading pictures...</div>";C+=F;this.PicturesLoaded=true;LoadMLSPictures(this.MlsNumber(),this.MapObjectType())}}}C+="</div>";if(parseInt(this.FullArray[0])==4){C+=GetEmailForm(this.MlsNumber(),G)}C+="</td></tr></table>";return C};_BMO.prototype.GetDashboardImagesHtml=function(){return"Sorry, images are not available at this time"};function LoadMLSPictures(B,D){switch(parseInt(D)){case 8:var G=document.getElementById("mls"+B);var F=document.getElementById("mlsAptForm"+B);var A=G.innerHTML!="";if(A){G.innerHTML="";F.innerHTML="";return }G.innerHTML="Please wait, loading pictures...";F.innerHTML=GetEmailForm(B,false);break}var E=GetLastDigit(B);var C="L.aspx?subfolder="+E+"&mls="+B+"&ot="+D;GDownloadUrl(C,pics_loaded)}function OpenAllMlsImages(B,C){var A=GetImageTable4MLS(B,C);var D=document.getElementById("mls"+B);if(D==undefined){return }D.innerHTML="<fieldset><legend>Pictures for MLS#"+B+":</legend>"+A+"</fieldset>"}pics_loaded=function(C){lines=C.split("|");var B=lines[0];var A=lines[1];if(B==undefined||A==undefined){return }OpenAllMlsImages(A,B)};function GetEmailForm(B,C){var A="";if(!C){A="<input type='checkbox' onclick='javascript:SwitchFrame(this.checked, \"email"+B+'", 330, "E1.aspx?mls='+B+"\")'><b>Click the checkbox to ask a question about MLS#"+B+" or make an appointment to see the property<iframe id='email"+B+"'  marginheight='3' marginwidth='3' height='0'  style='background-color:Transparent'   frameborder='0'  width='100%'></iframe>"}else{A="<iframe id='email"+B+"' src=\"http://www.alohamapper.com/E1.aspx?mls="+B+"\" marginheight='3' marginwidth='3' height='330'  style='background-color:Transparent'   frameborder='0'  width='100%'></iframe>"}return A};