var posRight = ReadIni('posRight')?ReadIni('posRight'):800;
var posTop = ReadIni('posTop')?ReadIni('posTop'):360;
var isSideBarTop= ReadIniEx( xdeskshowPath+'Settings.ini','sidebar','sidebarStyle');
var enableSideBar= ReadIniEx( xdeskshowPath+'Settings.ini','sidebar','EnableSidebar');
function bgOnMouseDown(sender)
{
  OpenFile( xdeskshowPath+'widgets\\µçÄÔÉÌÇé±¨\\XWidget.xds'); closeWidget(); 
}

function widgetOnInit()
{
  if(isSideBarTop==1){
    var ww= WorkAreaWidth+145;
  }else{
    var ww= WorkAreaWidth;
  } 
  try{
    if(myNewTheme!=''){
      widget.Left=ww- widgetWidth-posRight;
      widget.Top=posTop;    
    }else{
      if(enableSideBar!=1){
        widget.Left=posX;
        widget.Top=posY;  
      }    
    }
  }catch(e){
    if(enableSideBar!=1){
      widget.Left=posX;
      widget.Top=posY;  
    }  
  }
}