function $(id) { return document.getElementById(id); }

window.onload = function() {
    // get window.location information, since they are no more accessible with IE once document.domain is set
    var windowLocationObject = {
        'search':window.location.search,
        'href':window.location.href,
        'protocol':window.location.protocol,
        'host':window.location.host
    };
    
    var myURL = document.location.href;
    var newHeight = myURL.substring((myURL.indexOf("height=")+7),myURL.length);
    parent.parent.changeHeight(newHeight);
    // Note - could also use "top" instead of parent.parent
}

function log(m) { if (console) console.log(m); }
function getDomain(url) {
    var isIP = false;
    var res = url.split(".");
    for (var i=0;i<res.length;i++) {
        if (!isNaN(parseInt(res[i]))) {
           isIP = true;
        }
    }
    var subDomain = (isIP)    ?   url     
                              :   res[res.length-2]+'.'+res[res.length-1];   
    return(subDomain);
}