function ScrollInfo(){
        var obj = document.getElementById('eurocalc');
        if(obj != undefined){
            var scroll = getPageScroll();
            var size = getCalcPageSize();
            obj.style.display = 'block';
            obj.style.top = (size[1] + scroll[1] - 271) + 'px';
            //obj.style.left = '0px';
        }
        
    }
    
    function AllowScroll(){ 
        ScrollInfo();
        window.onscroll = ScrollInfo;
    }
    addLoadEvent(AllowScroll);
    
    function hideCalc() {
        var obj = document.getElementById('eurocalc');
        if(obj != undefined){
            obj.style.left = '-250px';
        }
        var obj = document.getElementById('euroclose');
        if(obj != undefined){
            obj.style.display = 'none';
        }
        var obj = document.getElementById('euroopen');
        if(obj != undefined){
            obj.style.display = 'block';
        }
    }
    function showCalc() {
        var obj = document.getElementById('eurocalc');
        if(obj != undefined){
            var scroll = getPageScroll();
            var size = getCalcPageSize();
            obj.style.display = 'block';
            obj.style.top = (size[1] + scroll[1] - 271) + 'px';
            obj.style.left = '0px';
        }
        var obj = document.getElementById('euroopen');
        if(obj != undefined){
            obj.style.display = 'none';
        }
        var obj = document.getElementById('euroclose');
        if(obj != undefined){
            obj.style.display = 'block';
        }
    }
    
    function addLoadEvent(func){	
        var oldonload = window.onload;
        if (typeof window.onload != 'function'){
            window.onload = func;
        } else {
            window.onload = function(){
                oldonload();
                func();
            }
        }
    }
    
    function getPageScroll(){
        var yScroll;
        if (self.pageYOffset) {
            yScroll = self.pageYOffset;
        } else if (document.documentElement && document.documentElement.scrollTop){
            yScroll = document.documentElement.scrollTop;
        } else if (document.body) {
            yScroll = document.body.scrollTop;
        }
        
        arrayPageScroll = new Array('',yScroll) 
        return arrayPageScroll;
    }
    
    function getCalcPageSize() {
        var myWidth = 0, myHeight = 0;
        if( typeof( window.innerWidth ) == 'number' ) {
            //Non-IE
            myWidth = window.innerWidth;
            myHeight = window.innerHeight;
        } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
            //IE 6+ in 'standards compliant mode'
            myWidth = document.documentElement.clientWidth;
            myHeight = document.documentElement.clientHeight;
        } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
            //IE 4 compatible
            myWidth = document.body.clientWidth;
            myHeight = document.body.clientHeight;
        }
        //window.alert( 'Width = ' + myWidth );
        //window.alert( 'Height = ' + myHeight );
        
        size = new Array(myWidth,myHeight);
        return size;
    }