﻿/*<![CDATA[*/
function showHide(subText,justShow) {
    var textBlock = document.getElementById(subText);
    var imgSign = document.getElementById('g' + subText);
    if (textBlock.style.display == 'block' && !justShow) {
        textBlock.style.display = 'none';
    }
    else {
        textBlock.style.display = 'block';
        var top = ((zxcPos(textBlock)[1] + textBlock.offsetHeight + 20));
        var wheight = zxcWWHS()[1] + zxcWWHS()[3];
        if (top > wheight) {
            window.scroll(0, zxcWWHS()[3] + top - wheight);
        }
    }
}

function zxcPos(zxcobj) {
    zxclft = zxcobj.offsetLeft;
    zxctop = zxcobj.offsetTop;
    while (zxcobj.offsetParent != null) {
        zxcpar = zxcobj.offsetParent;
        zxclft += zxcpar.offsetLeft;
        zxctop += zxcpar.offsetTop;
        zxcobj = zxcpar;
    }
    return [zxclft, zxctop];
}

function zxcWWHS() {
    if (window.innerHeight) return [window.innerWidth - 10, window.innerHeight - 10, window.pageXOffset, window.pageYOffset];
    else if (document.documentElement.clientHeight) return [document.documentElement.clientWidth - 10, document.documentElement.clientHeight - 10, document.documentElement.scrollLeft, document.documentElement.scrollTop];
    return [document.body.clientWidth, document.body.clientHeight, document.body.scrollLeft, document.body.scrollTop];
}


/*]]>*/
