﻿function ShowTopic(strTopic) {
    var thisTopic;
    for (i = 0; i <= 5; i++) {
        thisTopic = "topic_" + i;
        document.getElementById(thisTopic).style.display = 'none';
    }
    document.getElementById(strTopic).style.display = 'block';
}

function ShowPage(strPage, lstPages) {
    var arrPages = lstPages.split(",");
    var thisPage;
    
    for (i = 0; i < arrPages.length; i++) {
        thisPage = "area_" + arrPages[i];
		//alert(thisPage);
        document.getElementById(thisPage).style.display = 'none';
        //thisPage = "page_" + arrPages[i] + "_t";
		//alert(thisPage);
        //document.getElementById(thisPage).style.fontWeight = 'normal';
        //document.getElementById(thisPage).style.textDecoration = 'underline';
		thisPage = "page_" + arrPages[i] + "_b";
		//alert(thisPage);
        document.getElementById(thisPage).style.fontWeight = 'normal';
        document.getElementById(thisPage).style.textDecoration = 'underline';
    }
    thisPage = "area_" + strPage;
    document.getElementById(thisPage).style.display = 'block';
    //thisPage = "page_" + strPage + "_t";
    //document.getElementById(thisPage).style.fontWeight = 'bold';
    //document.getElementById(thisPage).style.textDecoration = 'none';
	thisPage = "page_" + strPage + "_b";
    document.getElementById(thisPage).style.fontWeight = 'bold';
    document.getElementById(thisPage).style.textDecoration = 'none';
}


function HFPopUpWin(url) {
    var iMyWidth;
    var iMyHeight;
    var iSWidth;
    var iSHeight;
    var iSWidth2;
    var iSHeight2;

    iSWidth = window.screen.width * 0.90
    iSHeight = window.screen.height * 0.50

    iSWidth2 = iSWidth / 2
    iSHeight2 = iSHeight / 2

    //half the screen width minus half the new window width (plus 5 pixel borders).

    iMyWidth = (window.screen.width/2) - (iSWidth2 + 10);
    //half the screen height minus half the new window height (plus title and status bars).
    iMyHeight = (window.screen.height/2) - (iSHeight2 + 50);
    //Open the window.
    var win2 = window.open(url,"Window2","status=no,height=" + iSHeight + ",width=" + iSWidth + ",resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",toolbar=no,menubar=yes,scrollbars=yes,location=yes,directories=no");
    //win2.focus();
}

