function closeFlashWindow(){
    document.getElementById("flashWindow").style.display = "none";
    document.getElementById("darkBackgroundLayer").style.display = "none";
}

function openFlashWindow(){
    document.getElementById("flashWindow").style.display = '';
    document.getElementById("darkBackgroundLayer").style.display = '';
}


function positionFlashWindow(){
    var myHeight = 0;
    if( typeof( window.innerWidth ) == 'number' ) {
        //Non-IE
        myHeight = window.innerHeight;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        //IE 6+ in 'standards compliant mode'
        myHeight = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
       //IE 4 compatible
        myHeight = document.body.clientHeight;
    }

    var fromTop = (myHeight - 550) / 2;
    if(fromTop < 0)fromTop = 0;
    document.getElementById("flashWindow").style.top = fromTop + "px";
}




function displayPopup(tagId,e)
{
    var posx = 0;
    var posy = 0;
    if (!e) var e = window.event;
    if (e.pageX || e.pageY) 	{
            posx = e.pageX;
            posy = e.pageY;
    }
    else if (e.clientX || e.clientY) 	{
            posx = e.clientX + document.body.scrollLeft
                    + document.documentElement.scrollLeft;
            posy = e.clientY + document.body.scrollTop
                    + document.documentElement.scrollTop;
    }
    // posx and posy contain the mouse position relative to the document
    // Do something with this information

    var tag = document.getElementById(tagId);
    tag.style.visibility="visible";
    tag.style.top=posy + 'px';
    tag.style.left=posx + 'px';
}

function hidePopup(tagId){
    var tag = document.getElementById(tagId);
    tag.style.visibility = 'hidden';
}
