function encrypted(id) {
    var swidth = screen.width;
    var sheight = screen.height;
    var popup = null;
    var height = 300;
    var width = 400;
    var left = (swidth/2) - (width/2);
    var top = (sheight/2) - (height/2);
    var over = "Send File";

    popup=window.open("","msg","scrollbars=yes,height="+height+",width="+width+",left="+left+",top="+top);
    if (popup != null) {
        if (popup.opener == null) {
            popup.opener = self;
        }
        url = "/files/encrypted/" + id;
        popup.location.href = url;
    } 
}

function sendFile(id) {
    var swidth = screen.width;
    var sheight = screen.height;
    var popup = null;
    var height = 300;
    var width = 500;
    var left = (swidth/2) - (width/2);
    var top = (sheight/2) - (height/2);
    var over = "Send File";

    popup=window.open("","msg","scrollbars=yes,height="+height+",width="+width+",left="+left+",top="+top);
    if (popup != null) {
        if (popup.opener == null) {
            popup.opener = self;
        }
        url = "/files/email/" + id;
        popup.location.href = url;
    } 
}

preload("tooltip_off", "/images/icons/tooltip.gif");
preload("tooltip_on", "/images/icons/tooltip_on.gif");
//preload and change imate functions
function preload(imgObj,imgSrc) {
    if (document.images) {
        eval(imgObj+' = new Image()')
            eval(imgObj+'.src = "'+imgSrc+'"')
    }
}



function changeImages() {
    if (document.images) {
        for (var i=0; i<changeImages.arguments.length; i+=2) {
            document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");   
        }
    }
}

function addEvent(obj, eventType,fn, useCapture) {
    if (obj.addEventListener) {
        obj.addEventListener(eventType, fn, useCapture);
        return true;
    } else {
        if (obj.attachEvent) {
            var r = obj.attachEvent("on"+eventType, fn);
            return r;
        }
    }
}

