self.name = "mainframe";

nn4 = (document.layers) ? true : false;
ie4 = (document.all) ? true : false;
dom = (document.createTextNode)? true : false;

function pop(fileUrl, winW, winH, winN, scrollB) {
    var winWidth = (winW)? winW : 740;
    var winHeight = (winH)? winH : 520;
    var winName = (winN)? winN : 'popupWin'
    var scrollBars = "yes";
    if (nn4 || ie4 || dom) {
        if (screen.width < winWidth + 50) { winWidth = screen.width - 50; scrollbars = 'yes' }
        if (screen.height < winHeight + 100) { winHeight = screen.height - 100; scrollbars = 'yes' }
        posX = Math.round((screen.width - winWidth)/2);
        posY = Math.round((screen.height - winHeight)/2);
        posCode = (nn4)? "screenX="+posX+",screenY="+posY : "left="+posX+",top="+posY;
    } else {
        posCode = "";
    }
    var popupWin = window.open(fileUrl, winName,"menubar=no,toolbar=no,scrollbars=" + scrollBars + ",status=yes,resizable=yes,width=" + winWidth + ",height=" + winHeight + "," + posCode);
    if (popupWin) popupWin.focus();
}


var logo1 = new Image(); logo1.src = '/i/logo1.gif';
var comp1 = new Image(); comp1.src = '/i/butt_company_h.gif';
var blog1 = new Image(); blog1.src = '/i/portfolio_a.gif';

function over(o) {
    o.src = logo1.src;
}

function out(o) {
    o.src = '/i/logo.gif'
}

function over1(o) {
    o.src = comp1.src;
}

function out1(o) {
    o.src = '/i/butt_company.gif'
}

function over2(o) {
    o.src = blog1.src;
}

function out2(o) {
    o.src = '/i/portfolio.gif'
}

function toggle(obj) {
    var o = document.getElementById(obj);
    if (o) {
        if (o.style.display == 'block') o.style.display = 'none';
        else o.style.display = 'block';
    }
}

document.onkeydown = NavigateThrough;

function NavigateThrough (event) {
    if (!document.getElementById) return;
    if (window.event) event = window.event;

    if (event.ctrlKey) {
        var link = null;
        var href = null;
        switch (event.keyCode ? event.keyCode : event.which ? event.which : null) {
            case 0x25:
                link = document.getElementById ('PrevLink');
                break;
            case 0x27:
                link = document.getElementById ('NextLink');
                break;
        }
        if (link && link.href) document.location = link.href;
    }           
    
}
