﻿// JScript File
//if (!GBrowserIsCompatible()) 
//{
//  alert('Sorry. Your browser is not Google Maps compatible.');
//}

//-- $() replaces document.getElementById()
if (typeof($) == 'undefined')
{
    function $(elementId)
    {
        var origElementId = elementId;
        
        //alert('$' + elementId);
        var element = document.getElementById(elementId);
        
        if (element) {
            //alert('$ function found it');
            return element
        }
        else {
            //alert('trying ctl00_ContentPlaceHolder1_' + elementId);
            element = document.getElementById('ctl00_ContentPlaceHolder1_' + elementId);
            
            if (element) {
                return element;
            }
            else {
                //alert("element Id " + origElementId + " doesn't exist");
                return element;
            }
        }
    }
}

String.prototype.startsWith = function(str) { return (this.match("^" + str) == str) }

String.prototype.endsWith = function(str) { return (this.match(str + "$") == str) }

String.prototype.trim = function() { return (this.replace(/^[\s\xA0]+/, "").replace(/[\s\xA0]+$/, "")) }


