function NewWindow(url, windowName, w, h, scroll) 
{
           var winl = (screen.width - w) / 2;
           var wint = (screen.height - h) / 2;
           winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
           win = window.open(url, windowName, winprops);
           if (parseInt(navigator.appVersion) >= 4) { 
              	win.window.focus(); 
           }
}





function changeMLSPIC(picture) 
{
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com
    document.REME_MLS_image.src = picture;
}

function change2(picture) 
{
    document.theimg2.src = picture;
}

    //<![CDATA[
    function load() {
      if (GBrowserIsCompatible()) 
      {        
        
      }
    }
    var map;
    function showAddress()   
    {
     
     var tagline='<?=$tag?>';
     if ( tagline=="" || tagline==null) return;          
     var geocoder = new GClientGeocoder();
     var address;
     var title;
     map = new GMap2(document.getElementById("map"));
     
     
          map.addControl(new GMapTypeControl());
          
     var opts = new Object();
     var mopts = new Object;
     opts.pixelOffset = new GSize(0,-10); 
     opts.maxWidth=245;
     mopts.title='<?=$tag?>';
     address='<?=$mapaddress?>';
          
      if (geocoder) 
      {
        geocoder.getLatLng(
          address,
          function(point) 
          {
            if (!point) 
            {
              //alert(address + " not found");
            } 
            else 
            {
              map.setCenter(point,15);
              var marker = new GMarker(point,mopts);              
              marker.msg=address;
              map.addOverlay(marker);              
            }
                
          }
        );
               
      }
   }
    
//
//      rectangle maps
//
function sbs_Rectangle(address,geocoder,map)
{
        var BOX;
geocoder.getLocations(address, function (result)
              { 
          var p = result.Placemark[0].Point.coordinates;
                          var lat = p[1];
                          var lng = p[0];
                          var nwLat = lat + 0.001954; 
                          var nwLng = lng - 0.002092;
                          var seLat = lat - 0.00117;
                          var seLng = lng + 0.00176;
                    
                          var box = new GPolyline([
                                        new GLatLng(nwLat, nwLng),
                                        new GLatLng(nwLat, seLng),
                                        new GLatLng(seLat, seLng),
                                        new GLatLng(seLat, nwLng),
                                        new GLatLng(nwLat, nwLng)
                                        ], "#FF0000", 8);
                                                                
                          map.addOverlay(box);
              });
        

        
 }
		
   






