﻿
function resizeContentArea(editor)
{
   if (editor.InitialHeight == -1)
   {
       editor.InitialHeight = editor._document.body.clientHeight;
   }
   var targetHeight = editor._document.body.scrollHeight;
   if (targetHeight > editor.InitialHeight)
   {
       var theIFrame = document.getElementById(editor.ID + "_contentIframe");
       
       document.getElementById(editor._uniqueID);
       
       theIFrame.style.height = parseInt(targetHeight) + "px";
   }
}

function attachResizeEvents(editor)
{
   //editor.InitialHeight = -1;
   //editor._contentArea.style.overflow = "hidden";
   editor._contentArea.scrolling="auto";//.style.overflow = "hidden";
   //editor._document.body.scroll = "no";
   //var resizeFnRef = function anon(){resizeContentArea(editor)};
   //editor.attachEventHandler("RADEVENT_SEL_CHANGED", resizeFnRef)
  // editor.attachEventHandler("keydown", resizeFnRef)
}

function logExternalLink() {
    var a = document.activeElement;
    if (a.nodeName == "A") {
        var link = a.href;
        if (a.protocol == "http:" & link.indexOf("sqlbits.com") < 0) {
            try {
                var page = a.nameProp;
                if (page == undefined)
                    page = "";
                pageTracker._trackPageview('/external/' + a.hostname + '/' + page);
            }
            catch (Error) {
            }
        }
            
    }
}
document.onclick = logExternalLink;
