﻿
var PNG_TRANS = "../images/transparent.gif";
function fixPng() {
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])

    if ((version < 7) && (document.body.filters)) {
        for (i = 0; i < document.images.length; i++) {
            var img = document.images[i];
            if (img.src.substring(img.src.length - 3, img.src.length) == "png") {
                img.style.height = img.height + "px";
                img.style.width = img.width + "px";
                img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + img.src + ",sizingMethod='scale')";
                img.src = PNG_TRANS;
            }
        }
    }
}

function OnMouseOver(td) {
    td.className = "nav_bar_link_over";
}

function OnMouseOut(td) {
    td.className = "nav_bar_link";
}

function OnButtonClick(td) {
    td.className = "nav_bar_link_clic";
    document.location = td.childNodes[0].href;
}

function fixIE6Content() {
    if (Sys.Browser.agent == Sys.Browser.InternetExplorer && (Sys.Browser.version < 7)) {
        var footer = Sys.UI.DomElement.getBounds($get("footer")).height;
        var header = Sys.UI.DomElement.getBounds($get("header")).height + Sys.UI.DomElement.getBounds($get("nav_bar")).height;
        var b = Sys.UI.DomElement.getBounds(document.body);
        var c = $get("content");

        //$get("rightcontent").style.marginRight = "-" + ((c.style.width / 2) + 57) + "px";
        c.style.height = b.height - footer - header;
        document.body.onresize = fixIE6Content;
    }
}