function openPopup(url, windowName, width, height)
{
    stopPlayer();

    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "'width=" + width + ",height=" + height + ",status=yes,resizable=yes,scrollbars=yes,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top + "'";
    var myWindow = window.open(url, windowName, windowFeatures);
    myWindow.focus();
}

function toggleMoreInfoDiv(strDivId)
{
    var objDiv = eval(strDivId + 'Div');
    var imgExpand = strBaseHref + 'assets/' + strLanguage + '/images/icon-expand.gif';
    var imgCollapse = strBaseHref + 'assets/' + strLanguage + '/images/icon-collapse.gif';
    var elImg = $(strDivId + 'Icon').src;
    if (elImg == imgExpand) {
        $(strDivId + 'Icon').src = imgCollapse;
    } else {
        $(strDivId + 'Icon').src = imgExpand;
    }
    objDiv.toggle();
}

function openFlashStatement()
{
    stopPlayer();

    return openPopup(strBaseHref + strLanguage + '/myaccount/mystatement/', 'popupMyStatement', 815, 620);
}

function openCalculator()
{
    stopPlayer();

    var day = new Date();
    return openPopup(strBaseHref + strLanguage + '/calculate/?' + day.getTime(), 'popupCalculator', 965, 655);
}
