function openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}
function buildWebmasterEmailAddress(link) {
	var output = 'mailto:';
	output += 'webmaster';
	output += '@';
	output += 'responsiblesports';
	output += '.';
	output += 'com';
	link.href = output;
}
var timeoutElement;
function defaultText(element, defaultText) {
    if (element.value == defaultText) {
        element.value = "http://";
        if (element.createTextRange) { // IE
            var range = element.createTextRange();
            range.move("textedit");
            range.select();
        }
        else if (element.setSelectionRange) { // FF
            timeoutElement = element;
            setTimeout("ffMoveCaret()", 50);
        }
    }
    else if (element.value == "" || element.value == "http://") {
        element.value = defaultText;
    }
}
function ffMoveCaret() {
    timeoutElement.setSelectionRange(timeoutElement.value.length, timeoutElement.value.length);
}

function bookmark(title,url){
    if (window.sidebar) // firefox
    window.sidebar.addPanel(title, url, "http:www.yourwebsiteurl.com");
    else if(window.opera && window.print){ // opera
    var elem = document.createElement('a');
    elem.setAttribute('href',url);
    elem.setAttribute('title',title);
    elem.setAttribute('rel','sidebar');
    elem.click();
    }
    else if(document.all)// ie
    window.external.AddFavorite(url, title);
}

Date.prototype.setISO8601 = function(dString) {

    var regexp = /(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/;

    if (dString.toString().match(new RegExp(regexp))) {
        var d = dString.match(new RegExp(regexp));
        var offset = 0;

        this.setUTCDate(1);
        this.setUTCFullYear(parseInt(d[1], 10));
        this.setUTCMonth(parseInt(d[3], 10) - 1);
        this.setUTCDate(parseInt(d[5], 10));
        this.setUTCHours(parseInt(d[7], 10));
        this.setUTCMinutes(parseInt(d[9], 10));
        this.setUTCSeconds(parseInt(d[11], 10));
        if (d[12])
            this.setUTCMilliseconds(parseFloat(d[12]) * 1000);
        else
            this.setUTCMilliseconds(0);
        if (d[13] != 'Z') {
            offset = (d[15] * 60) + parseInt(d[17], 10);
            offset *= ((d[14] == '-') ? -1 : 1);
            this.setTime(this.getTime() - offset * 60 * 1000);
        }
    }
    else {
        this.setTime(Date.parse(dString));
    }
    return this;
};

if ($.browser.msie && $.browser.version == "6.0") {
//expand panels
}
else {
    $(function() {
        $(".expando").each(function() {

            var ctx = this;

            if ($(".expando-target", ctx).is(":visible")) {
                $(".expando-toggle", ctx)
                .attr("src", "/common/images/panel_collapse.jpg");
            }
            else {
                $(".expando-toggle", ctx)
                .attr("src", "/common/images/panel_expand.jpg");
            }

            $(".expando-toggle", ctx).click(function() {

                if ($(".expando-target", ctx).is(":visible")) {
                    $(".expando-toggle", ctx)
                    .attr("src", "/common/images/panel_expand.jpg");
                }
                else {
                    $(".expando-toggle", ctx)
                    .attr("src", "/common/images/panel_collapse.jpg");
                }

                $(".expando-target", ctx)
                .slideToggle("normal");
            });
        });
    });
}

function trackEvent(category, action, label) {
    if (typeof (pageTracker1) !== 'undefined') {
        pageTracker1._trackEvent(category, action, label);
    }
    if (typeof (pageTracker2) !== 'undefined') {
        pageTracker2._trackEvent(category, action, label);
    }
}