window.onload = function() {}

function changeHeight(newHeight) {
    $("baseiframe").style.height = newHeight + "px";
    newHeight = parseInt((parseInt(newHeight)+parseInt(10)));
    gadgets.window.adjustHeight(newHeight);
}

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);
}