flashImgs = new Array();
flashTitles = new Array();
flashLinks = new Array();
flashVariables = new Array();
function init() {
    repairImgProductMenu();
    switchPicRelated();

}
function switchPicRelated() {

    if (document.getElementById('relWrap')) {
        var relWrapImg = document.getElementById('relWrap').getElementsByTagName('SPAN');

        for (var i = 0; i < relWrapImg.length; i++) {
            if (relWrapImg[i].className == "buyBtnRel") {
                if (relWrapImg[i].firstChild) {
                    relWrapImg[i].firstChild.src = "/images/design/source/buy_dkbtn.gif";
                }
            }
        }
    }
}




function repairImgProductMenu() {
    var imgs = {};
    if (document.getElementById("ProductMenu_Table")) {
        var productMenu = document.getElementById("ProductMenu_Table");
        var img = productMenu.getElementsByTagName("IMG");
        for (var i = 0; i < img.length; i++) {
            var parent = img[i].parentNode;
            flashImgs.push(img[i].src);
            flashTitles.push(parent.title);
            flashLinks.push(parent.href);
            flashVariables.push(img[i].src);
            flashVariables.push(parent.title);
            flashVariables.push(parent.href);
        }
        for (var i = 0; i < img.length; i++) {
            var theLink = document.createTextNode(flashTitles[i]);
            img[i].parentNode.appendChild(theLink);
        }
    }
}

function communicateFlashTitle() {
    return (flashTitles);
}

function communicateFlashImg() {
    return (flashImgs);
}

function communicateFlashHref() {
    return (flashLinks);
}
