function getScrollY() {
    scrollY = 0;    
    if (typeof window.pageYOffset == "number") {
        scrollY = window.pageYOffset;
    } else if (document.documentElement && document.documentElement.scrollTop) {
        scrollY = document.documentElement.scrollTop;
    }  else if (document.body && document.body.scrollTop) {
        scrollY = document.body.scrollTop; 
    } else if (window.scrollY) {
        scrollY = window.scrollY;
    }
    return scrollY;
}
  
function getInnerHeight() {
    height = 0;
    if (window.innerHeight) {
        height = window.innerHeight - 18;
    } else if (document.documentElement && document.documentElement.clientHeight) {
        height = document.documentElement.clientHeight;
    } else if (document.body && document.body.clientHeight) {
        height = document.body.clientHeight;
    }
    return height;
}

function showPopUp(id){
    h = getInnerHeight();
    scrollY =  getScrollY();

    elm = document.getElementById(id);
    elm.style.display='';
    elm.style.top = ''+((h-elm.style.height)/2+scrollY) + 'px';
        
    
}

function addFavourite(){
        if (window.sidebar) { // firefox
              window.sidebar.addPanel(document.title, document.location.href,"");
        } else if( document.all ) { //MSIE
                window.external.AddFavorite(document.location.href , document.title);
        } else {
               alert("Sorry, your browser doesn't support this");
        }

}