        function mtoOpenWindow(url, w, h, args)	{
            xc = Math.round((document.body.clientWidth/2)-(w/2));
            yc = Math.round((document.body.clientHeight/2)-(h/2));
            if (args == "") args == "scrollbars=yes";
	        window.open(url,'MTOWindow'+Math.floor(Math.random()*1001),args + ',width='+w+',height='+h+',left='+xc+',top='+yc)
        }

        function mtoToggleDisplay(id) {
            if (document.getElementById){
                var layer = document.getElementById(id);
                layer.style.display = (layer.style.display == 'none') ? 'inline' : 'none';
            }
        }

        function mtoDarkenPage() {
            if (document.getElementById){
                var layer = document.getElementById('blockUI');
                layer.style.height = document.body.clientHeight + 'px';
                layer.style.display = 'inline';
            }
        }

        function mtoLightenPage() {
            if (document.getElementById){
                var layer = document.getElementById('blockUI');
                layer.style.display = 'none';
            }
        }
        
        function mtoShowPanel(id, s, w,h){
            var xc, posx = 0;
            var yc, posy = 0;
            if (document.all || document.layers) {
               var aw = document.body.clientWidth + document.body.scrollLeft + document.documentElement.scrollLeft;
               var ah = document.body.clientHeight + document.body.scrollTop + document.documentElement.scrollTop;	
            }
            
	        xc = ((aw-w)/2);
	        yc = ((ah-h)/2) - window.screenTop;

            var panel = document.getElementById(id);
            panel.style.left = xc + "px";
            panel.style.top = yc + "px";
            panel.src = s;
            mtoDarkenPage();            
            panel.style.display = 'block';
        }
        
        function mtoHidePanel(id){
            var panel = document.getElementById(id);
            panel.style.display = 'none';
            mtoLightenPage();            
        }
