this.window.name='main';
function openSender(x,y,action,position,fileid) {
        if(document.getElementById('uploaddiv').style.visibility == 'visible') {
                document.getElementById('uploaddiv').style.visibility = 'hidden';
                document.getElementById('modal').style.visibility = 'hidden';
				
				document.getElementById('div_fla').style.visibility = 'visible';
				document.getElementById('but_fla').style.visibility = 'visible';
                //document.getElementById('uploaddiv').style.top = x;
                //document.getElementById('uploaddiv').style.left = y;
				//document.location.reload();
        }
        else {
                if(position == 'top') {
                        //alert(x+'...'+y);
                        var posTop = x+20;
                        var posLeft = y-10;
                }
                else if(position == 'right') {
                        //alert(x+'...'+y);
                        var posTop = x+2;
                        var posLeft = y-100;
                }
				else if(position == 'center') {
                        //alert(document.getElementById('uploaddiv').style.height.slice(0,-2));
                        //var posTop = 77 ;
                        var posTop = 40 ;
                        var posLeft = (document.body.clientWidth - document.getElementById('uploaddiv').style.width.slice(0,-2)) / 2 ;
                }

                var maxHeight = document.getElementById('chkHeight').offsetTop + 100;   //document.body.clientHeight;

                if (document.getElementById){
                      document.getElementById('uploaddiv').style.left = posLeft+'px';
                      document.getElementById('uploaddiv').style.top = posTop+'px';
                      document.getElementById('modal').style.width = '105%';
                      document.getElementById('modal').style.height = maxHeight+'px';
                }
                if (document.all && !document.getElementById){
                      document.all.style.left = posLeft+'px';
                      document.all.style.top = posTop+'px';
                      document.all.style.width = '105%';
                      document.all.style.height = maxHeight+'px';
                }
                if (document.layers){
                      document.layers.left = posLeft+'px';
                      document.layers.top = posTop+'px';
                      document.layers.width = '105%';
                      document.layers.height = maxHeight+'px';
                }

				document.getElementById('div_fla').style.visibility = 'hidden';
				document.getElementById('but_fla').style.visibility = 'hidden';
				
                document.getElementById('modal').style.visibility = 'visible';
                document.getElementById('uploaddiv').style.visibility = 'visible';
       }
}
