// Vertical MegaBanner
function vshowBanner(vselectedItemIndex) {
    vimg = document.getElementById('megaImgV_' + vselectedItemIndex);
 if(vimg!=null)
{
	if (vimg.loaded == true) {
        for (vi = 1; vi < vmaxHeaderlineCount; vi++) {
            if (vi != vselectedItemIndex) {
                document.getElementById('HeaderTableV_' + vi).style.display = 'none';
                document.getElementById('HeaderOKV_' + vi).style.display = 'none';
                document.getElementById('imgV_' + vi).style.border = '0px solid #0175dc';
            }
            else {
                document.getElementById('HeaderTableV_' + vi).style.display = 'block';
                document.getElementById('HeaderOKV_' + vi).style.display = 'none';
                document.getElementById('imgV_' + vi).style.border = '0px solid white';
            }
        }
    }
}
}

function vShowArticle(vselectedItemIndex) {

    vstopTimer();
    vshowBanner(vselectedItemIndex);
}

function vtimerStart(vconterNum) {
    if (vconterNum != -1)
        vconter = vconterNum;
    if (vconter >= vmaxHeaderlineCount) vconter = 1;
    vshowBanner(vconter);
    vconter = vconter + 1;
    vtimerCount = setTimeout('vtimerStart(-1)', 4000);
}

function vstopTimer() {
    clearTimeout(vtimerCount);
}


function vloadNextImg(va) {
    va = va + 1;
    if (va < 7) {
        vimg = document.getElementById('megaImgV_' + va);
		if(vimg!=null)
		{
        if (vimg.loaded != true) {
            vimg.src = eval('banner_' + va);
            vimg.onload = function() { vloadNextImg(va); this.loaded = true; }
            vimg.onerror = function() { vloadNextImg(va); }
        }
		}
    }
    
}

function vloadImg(va) {

    vimg = document.getElementById('megaImgV_' + va);
	if(vimg!=null)
	{
    if (vimg.loaded != true) vimg.src = eval('banner_' + va);
    vimg.onload = function() { this.loaded = true; };
    vimg.onerror = function() { alert('!'); };
	}
}
