<!--
    // *** COMMON CROSS-BROWSER COMPATIBILITY CODE ***
    var isDOM=document.getElementById?1:0;
    var isIE=document.all?1:0;
    var isNS4=navigator.appName=='Netscape'&&!isDOM?1:0;
    var isOp=window.opera?1:0;
    var isWin=navigator.platform.indexOf('Win')!=-1?1:0;
    var isDyn=isDOM||isIE||isNS4;
    function getRef(id, par)
    {
     par=!par?document:(par.navigator?par.document:par);
     return isIE ? par.all[id] :
      (isDOM ? (par.getElementById?par:par.ownerDocument).getElementById(id) :
      (isNS4 ? par.layers[id] : null));
    }
    function getSty(id, par)
    {
     var r=getRef(id, par);
     return r?(isNS4?r:r.style):null;
    }
    if (!window.LayerObj) var LayerObj = new Function('id', 'par',
     'this.ref=getRef(id, par); this.sty=getSty(id, par); return this');
    function getLyr(id, par) { return new LayerObj(id, par) }

    function LyrFn(fn, fc)
    {
     LayerObj.prototype[fn] = new Function('var a=arguments,p=a[0],px=isNS4||isOp?0:"px"; ' +
      'with (this) { '+fc+' }');
    }
    LyrFn('x','if (!isNaN(p)) sty.left=p+px; else return parseInt(sty.left)');
    LyrFn('y','if (!isNaN(p)) sty.top=p+px; else return parseInt(sty.top)');
    LyrFn('w','if (p) (isNS4?sty.clip:sty).width=p+px; ' +
     'else return (isNS4?ref.document.width:ref.offsetWidth)');
    LyrFn('h','if (p) (isNS4?sty.clip:sty).height=p+px; ' +
     'else return (isNS4?ref.document.height:ref.offsetHeight)');
    LyrFn('vis','sty.visibility=p');
    LyrFn('write','if (isNS4) with (ref.document){write(p);close()} else ref.innerHTML=p');
    LyrFn('alpha','var f=ref.filters,d=(p==null); if (f) {' +
     'if (!d&&sty.filter.indexOf("alpha")==-1) sty.filter+=" alpha(opacity="+p+")"; ' +
     'else if (f.length&&f.alpha) with(f.alpha){if(d)enabled=false;else{opacity=p;enabled=true}} }' +
     'else if (isDOM) sty.MozOpacity=d?"":p+"%"');

    var CSSmode=document.compatMode;
    CSSmode=(CSSmode&&CSSmode.indexOf('CSS')!=-1)||isDOM&&!isIE||isOp?1:0;

    if (!window.page) var page = { win: window, minW: 0, minH: 0, MS: isIE&&!isOp,
     db: CSSmode?'documentElement':'body' }

    page.winW=function()
     { with (this) return Math.max(minW, MS?win.document[db].clientWidth:win.innerWidth) }
    page.winH=function()
     { with (this) return Math.max(minH, MS?win.document[db].clientHeight:win.innerHeight) }

    page.scrollY=function()
     { with (this) return MS?win.document[db].scrollTop:win.pageYOffset }
    page.scrollX=function()
     { with (this) return MS?win.document[db].scrollLeft:win.pageXOffset }

    // *** Misc Usefule functions ***
    function isEmpty(s) {return ((s == null) || (s.length == 0))}
    function isWhitespace (s)
    {   var i;
        // Is s empty?
        if (isEmpty(s)) return true;
        // Search through string's characters one by one
        // until we find a non-whitespace character.
        for (i = 0; i < s.length; i++) {   
            // Check that current character isn't whitespace.
            if (s.charAt(i) != ' ')
                return false;
        }openCallMeWin()
        // All characters are whitespace.
        return true;
    }
    function verify(msg, url){if(confirm(msg)) location.href = url; } 

    function outputComma(number) {
        number = '' + number;
        if (number.length > 3) {
            var mod = number.length%3;
            var output = (mod > 0 ? (number.substring(0,mod)) : '');
            for (i=0 ; i < Math.floor(number.length/3) ; i++) {
                if ((mod ==0) && (i ==0))
                    output+= number.substring(mod+3*i,mod+3*i+3);
                else
                    output+= ',' + number.substring(mod+3*i,mod+3*i+3);
            }
            return (output);
        }
        else return number;
    }
    function calculateBuyerCashBack(price, showings) {
          if ( price < 75000 )
              return 0;
          if ( price >= 75000 && price < 150000) {
             if ( showings <= 10 )
                 return Math.round(price * 0.01);
             else if ( showings <= 20 )
                 return Math.round(price * 0.005);
             else if ( showings <= 30 )
                 return Math.round(price * 0.0025);
             else
                 return 0;
          }
          if ( price >= 150000) {
             if ( showings <= 10 )
                 return Math.round(price * 0.02);
             else if ( showings <= 20 )
                 return Math.round(price * 0.01);
             else if ( showings <= 30 )
                 return Math.round(price * 0.005);
             else
                 return 0;
          }
          return 0;
    }
    function openPopUpWin(theURL, winName, features)
    {
	var win = window.open(theURL, winName, features);
	win.focus();
     }
// -->                       

