  var ie=(document.all);
  var o6=(navigator.appName.indexOf("Opera") != -1);
  var n4=(document.layers);
  var n6=(document.getElementById&&!document.all);
  var safari=(navigator.userAgent.indexOf("Safari") != -1);
  if(window.GBrowserIsCompatible){
    var nullGPoint = new GPoint(0,0);
  }

  function GPMarker(a,b,number) {
    this.inheritFrom = GMarker;
    this.inheritFrom(a,b);
    this.number = number;
    this.tooltipObj = document.getElementById("show_hint");
    this.tooltipStatus = false;
  }

  if(window.GBrowserIsCompatible){
    GPMarker.prototype = new GMarker(nullGPoint);
  }

  GPMarker.prototype.initialize = function(a){
    GMarker.prototype.initialize.call(this,a);
    /*
    this.c = this.getIcon();
    if ( n6 && this.c.imageMap && !safari){
      this.c = this.c.imageMap;
    }
    else if ( this.transparentIcon && typeof this.transparentIcon != "undefined" ) {
      this.c = this.transparentIcon;
    }
    */
    if(this.tooltipObj){
      GEvent.bindDom(this, "mouseover", this, this.onMouseOver);
      GEvent.bindDom(this, "mouseout",  this, this.onMouseOut);
      GEvent.bindDom(this, "mousemove",  this, this.onMouseMove);
      GEvent.bindDom(this, "click", this, this.onMouseClick);
    }
  }

  GPMarker.prototype.onMouseOver = function(){
    this.makeToolTip(this.number);
    this.moveTooltip();
    this.tooltipStatus = true;
    this.tooltipObj.style.display = "block";
    this.tooltipObj.style.visibility = "visible";
  };

  GPMarker.prototype.onMouseOut = function(){
    this.tooltipStatus = false;
    this.tooltipObj.style.display = "none";
    this.tooltipObj.style.visibility = "hidden";
  };

  GPMarker.prototype.onMouseMove = function(){
    if(this.tooltipStatus){
      this.moveTooltip();
    }
  };

  GPMarker.prototype.onMouseClick = function(){
    if(listings_array[this.number].fullData==false){
      if(listings_array[this.number].hook!=""){
        var url = url_get_details+"&xml=1&ndd=1&hook="+listings_array[this.number].hook;
      } else if(listings_array[this.number].mls!="" && listings_array[this.number].pid!=""){
        var url = url_get_details+"&xml=1&ndd=1&mls_id="+listings_array[this.number].mls+"&mls_number="+listings_array[this.number].pid;
      } else {
        var url = "";
      }
      if(url!=""){
        loadListingData(url,this.number);
      }
    } else {
      mapInfoBlock("details",this.number);
    }
  };

  GPMarker.prototype.moveTooltip = function(){
    this.tooltipObj.style.left = posX + 20;
    this.tooltipObj.style.top = posY + 10;
  };

  GPMarker.prototype.makeToolTip = function(number){
    var s = "<table cellpadding='0' cellspacing='0'>";
    if(listings_array[number].lclass!=""){
      s = s + "<tr><td colspan='3' class='d'><b>"+listings_array[number].lclass+"</b></td></tr>";
    }
    var preparedStatus = "";
    if(listings_array[number].status=="Sold" && (listings_array[number].lclass=="Residential Lease" || listings_array[number].lclass=="RLS") && listings_array[number].mls=="MRIS"){
      preparedStatus = "Rented";
    }else{
      preparedStatus=listings_array[number].status;
    } 

    if(listings_array[number].status!=""){
      s = s + "<tr><td colspan='3' class='d' style='color:#ff0000'>"+preparedStatus+"</td></tr>";
    }
    s = s + "<tr><td class='d'>";
    if(checkNull(listings_array[number].bedrooms) || checkNull(listings_array[number].bathrooms)){
      s = s + "Bd/Bth:<br>";
    }
    if(checkNull(listings_array[number].square_feet) || checkNull(listings_array[number].lot_size)){
      s = s + "SqFt/Lot:<br>";
    }
    if(listings_array[number].price!=""){
      s = s + "Price:<br>";
    }
    s = s + "</td>"+
          "<td class='d'>&#160;</td>"+
          "<td class='d'>";
    if(checkNull(listings_array[number].bedrooms) || checkNull(listings_array[number].bathrooms)){
      if(checkNull(listings_array[number].bedrooms)){
        s += listings_array[number].bedrooms;
      } else {
        s += "";
      }
      s += "/";
      if(checkNull(listings_array[number].bathrooms)){
        s += listings_array[number].bathrooms;
      } else {
        s += "";        
      }
      s += "<br>";
    }

    if(checkNull(listings_array[number].square_feet) || checkNull(listings_array[number].lot_size)){
      if(checkNull(listings_array[number].square_feet)){
        s += listings_array[number].square_feet;
      } else {
        s += "";
      }
      s += "/";
      if(checkNull(listings_array[number].lot_size)){
        s += listings_array[number].lot_size;
      } else {
        s += "";        
      }
      s += "<br>";
    }
    if(listings_array[number].price!=""){
      s = s + listings_array[number].price + "<br>";
    }
    s = s + "</td>"+
          "</tr>"+
          "</table>";
    this.tooltipObj.innerHTML = "";
    this.tooltipObj.innerHTML = s;
  };

  function checkNull(src_obj){
    if(src_obj!="" && src_obj!="null" && Number(src_obj)!=0){
      return true;
    } else {
      return false;
    }
  }

