function subNavOpen(divName) {
        targetDiv = document.getElementById(divName);
        targetDiv.style.visibility = "visible";
        targetDiv.style.height = "auto";
}

function subNavClose(divName) {
        targetDiv = document.getElementById(divName);
        targetDiv.style.visibility = "hidden";
        targetDiv.style.height = "1px";
}

function subNavChange(divName) {
        targetDiv = document.getElementById(divName);
        if(targetDiv.style.visibility == "hidden") {
                targetDiv.style.visibility = "visible";
                targetDiv.style.height = "auto";
        } else {
                targetDiv.style.visibility = "hidden";
                targetDiv.style.height = "1px";
        }
}

imgWidth = new Array("225", "270", "206", "305", "131", "139", "102", "175", "165", "175", "127", "111");
imgTotal = imgWidth.length

function loadImg1() {
        intRandom = Math.floor((Math.random()*imgTotal));
        if(intRandom < 9) {
                document.img1.src = ("../images/fuxi0" + (intRandom+1) + ".gif");
        } else {
                document.img1.src = ("../images/fuxi" + (intRandom+1) + ".gif");
        }
        document.img1.width=imgWidth[intRandom];
        document.img1.alt="Various Figures of Chinese Culture-Ancestor Fu Xi, on bronzes and jade and stone objects unearthed from ancient sites located at various regions of China";
}

function loadImg2() {
        intRandom = Math.floor((Math.random()*imgTotal));
        if(intRandom < 9) {
                document.img2.src = ("../images/fuxi0" + (intRandom+1) + ".gif");
        } else {
                document.img2.src = ("../images/fuxi" + (intRandom+1) + ".gif");
        }
        document.img2.width=imgWidth[intRandom];
        document.img2.alt="Various Figures of Chinese Culture-Ancestor Fu Xi, on bronzes and jade and stone objects unearthed from ancient sites located at various regions of China";
}

function antiSpam(idName,domainName) {
        location.href = "mailto:" + idName + "@" + domainName;
}
