﻿
function SetCurrentDomain(a)
{
    if (!a.href.endsWith('?r=' + document.domain))
        a.href = a.href + '?r=' + document.domain;
}