home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Audio / Office2010 / ProPlus.WW / ProPsWW2.cab / PPCORE.DLL / RCDATA / 5903 < prev    next >
Text File  |  2010-03-09  |  6KB  |  222 lines

  1. function ImgBtn( oId,bId,w,action )
  2. {
  3.     var t=this
  4.     t.Perform    = _IBP
  5.     t.SetActive  = _IBSetA
  6.     t.SetInactive= _IBSetI
  7.     t.SetPressed = _IBSetP
  8.     t.SetDisabled= _IBSetD
  9.     t.Enabled    = _IBSetE
  10.     t.ChangeIcon = null
  11.     t.UserAction = action
  12.     t.ChgState   = _IBUI
  13.     t.mObjId   = oId
  14.     t.mBorderId= bId
  15.     t.mWidth   = w
  16.     t.mIsOn    = t.mCurState = 0
  17. }
  18. function _IBSetA()
  19. {
  20.     if( this.mIsOn ) {
  21.         obj=this.ChgState( gHiliteClr,gShadowClr,2 )
  22.         obj.style.posTop=0
  23.     }
  24. }
  25. function _IBSetI()
  26. {
  27.     if( this.mIsOn ) {
  28.         obj=this.ChgState( gFaceClr,gFaceClr,1 )
  29.         obj.style.posTop=0
  30.     }
  31. }
  32. function _IBSetP()
  33. {
  34.     if( this.mIsOn ) {
  35.         obj=this.ChgState( gShadowClr,gHiliteClr,2 )
  36.         obj.style.posLeft+=1; obj.style.posTop+=1
  37.     }
  38. }
  39. function _IBSetD()
  40. {
  41.     obj=this.ChgState( gFaceClr,gFaceClr,0 )
  42.     obj.style.posTop=0
  43. }
  44. function _IBSetE( state )
  45. {
  46.     var t=this
  47.     GetObj( t.mBorderId ).style.visibility="visible"
  48.     if( state != t.mIsOn ) {
  49.         t.mIsOn=state
  50.         if( state )
  51.             t.SetInactive()
  52.         else
  53.             t.SetDisabled()
  54.     }
  55. }
  56. function _IBP()
  57. {
  58.     var t=this
  59.     if( t.mIsOn ) {
  60.         if( t.UserAction != null )
  61.             t.UserAction()
  62.         if( t.ChangeIcon ) {
  63.             obj=GetObj(t.mObjId)
  64.             if( t.ChangeIcon() )
  65.                 obj.style.posLeft=obj.style.posLeft+(t.mCurState-4)*t.mWidth
  66.             else
  67.                 obj.style.posLeft=obj.style.posLeft+(t.mCurState-0)*t.mWidth
  68.         }
  69.         t.SetActive()
  70.     }
  71. }
  72. function _IBUI( clr1,clr2,nextState )
  73. {
  74.     var t=this
  75.     SetBorder( GetObj( t.mBorderId ),clr1,clr2 )
  76.     obj=GetObj( t.mObjId )
  77.     obj.style.posLeft=obj.style.posLeft+(t.mCurState-nextState)*t.mWidth-obj.style.posTop
  78.     t.mCurState=nextState
  79.     return obj
  80. }
  81. function TxtBtn( oId,oeId,action,chkState )
  82. {
  83.     var t=this
  84.     t.Perform    = _TBP
  85.     t.SetActive  = _TBSetA
  86.     t.SetInactive= _TBSetI
  87.     t.SetPressed = _TBSetP
  88.     t.SetDisabled= _TBSetD
  89.     t.SetEnabled = _TBSetE
  90.     t.GetState   = chkState
  91.     t.UserAction = action
  92.     t.ChgState   = _TBUI
  93.     t.mObjId      = oId
  94.     t.m_elementsId= oeId
  95.     t.mIsOn       = 1
  96. }
  97. function _TBSetA()
  98. {
  99.     var t=this
  100.     if( t.mIsOn && !t.GetState() )
  101.         t.ChgState( gHiliteClr,gShadowClr,0,0 )
  102. }
  103. function _TBSetI()
  104. {
  105.     var t=this
  106.     if( t.mIsOn && !t.GetState() )
  107.         t.ChgState( gFaceClr,gFaceClr,0,0 )
  108. }
  109. function _TBSetP()
  110. {
  111.     if( this.mIsOn )
  112.         this.ChgState( gShadowClr,gHiliteClr,1,1 )
  113. }
  114. function _TBSetD()
  115. {
  116.     this.ChgState( gFaceClr,gFaceClr,0,0 )
  117.     this.mIsOn = 0
  118. }
  119. function _TBSetE()
  120. {
  121.     var t=this
  122.     if( !t.GetState() )
  123.         t.ChgState( gFaceClr,gFaceClr,0,0 )
  124.     else
  125.         t.ChgState( gShadowClr,gHiliteClr,1,1 )
  126.     t.mIsOn = 1
  127. }
  128. function _TBP()
  129. {
  130.     var t=this
  131.     if( t.mIsOn ) {
  132.         if( t.UserAction != null )
  133.             t.UserAction()
  134.         if( !t.GetState )
  135.             return
  136.         if( t.GetState() )
  137.             t.SetPressed()
  138.         else
  139.             t.SetActive()
  140.     }
  141. }
  142. function _TBUI( clr1,clr2,lOffset,tOffset )
  143. {
  144.     SetBorder( GetObj( this.mObjId ),clr1,clr2 )
  145.     Offset( GetObj( this.m_elementsId ),lOffset,tOffset )
  146. }
  147. function Offset( obj, top, left ){ obj.style.top=top; obj.style.left=left }
  148. function SetBorder( obj, upperLeft, lowerRight )
  149. {
  150.     s=obj.style;
  151.     s.borderStyle      = "solid"
  152.     s.borderWidth      = 1
  153.     s.borderLeftColor  = s.borderTopColor = upperLeft
  154.     s.borderBottomColor= s.borderRightColor = lowerRight
  155. }
  156. function GetBtnObj(){ return gBtnArr[window.event.srcElement.id] }
  157. function BtnOnOver(){ b=GetBtnObj(); if( b != null ) b.SetActive() }
  158. function BtnOnDown(){ b=GetBtnObj(); if( b != null ) b.SetPressed() }
  159. function BtnOnOut(){ b=GetBtnObj(); if( b != null ) b.SetInactive() }
  160. function BtnOnUp()
  161. {
  162.     b=GetBtnObj()
  163.     if( b != null )
  164.         b.Perform()
  165.     else
  166.         Upd()
  167. }
  168. function GetNtsState(){ return parent.gNtsOpen }
  169. function GetOtlState(){ return parent.gOtlOpen }
  170. function GetOtlTxtState(){ return parent.gOtlTxtExp }
  171. function NtsBtnSetFlag( fVal )
  172. {
  173.     s=document.all.item( this.m_flagId ).style
  174.     s.display="none"
  175.     if( fVal )
  176.         s.display=""
  177.     else
  178.         s.display="none"
  179. }
  180. function _BSetA_Border(){ b = gBtnArr[this.mObjId]; if( b != null ) b.SetActive() }
  181. function _BSetI_Border(){ b = gBtnArr[this.mObjId]; if( b != null ) b.SetInactive() }
  182. function _BSetP_Border(){ b = gBtnArr[this.mObjId]; if( b != null ) b.SetPressed() }
  183. function _BSetA_BorderImg()
  184. {
  185.     b = gBtnArr[this.mBorderId]
  186.     if( b != null && this.mIsOn && !b.GetState() ) {
  187.         obj=this.ChgState( gHiliteClr,gShadowClr,2 )
  188.         obj.style.posTop=0
  189.     }
  190. }
  191. function _BSetI_BorderImg()
  192. {
  193.     b = gBtnArr[this.mBorderId]
  194.     if( b != null && this.mIsOn && !b.GetState() ) {
  195.         obj=this.ChgState( gFaceClr,gFaceClr,1 )
  196.         obj.style.posTop=0
  197.     }
  198. }
  199. var gHiliteClr="THREEDHIGHLIGHT",gShadowClr="THREEDSHADOW",gFaceClr="THREEDFACE"
  200. var gBtnArr = new Array()
  201. gBtnArr["nb_otl"] = new TxtBtn( "nb_otl","nb_otlElem",parent.ToggleOtlPane,GetOtlState )
  202. gBtnArr["nb_otlElem"] = new TxtBtn( "nb_otl","nb_otlElem",parent.ToggleOtlPane,GetOtlState )
  203. gBtnArr["nb_nts"] = new ImgBtn( "nb_nts","nb_ntsBorder",10,parent.ToggleNtsPane )
  204. gBtnArr["nb_nts"].SetActive = _BSetA_BorderImg;
  205. gBtnArr["nb_nts"].SetInactive = _BSetI_BorderImg;
  206. gBtnArr["nb_ntsBorder"] = new TxtBtn( "nb_ntsBorder","nb_ntsElem",parent.ToggleNtsPane,GetNtsState )
  207. gBtnArr["nb_ntsElem"] = new TxtBtn( "nb_ntsBorder","nb_ntsElem",parent.ToggleNtsPane,GetNtsState )
  208. gBtnArr["nb_prevBorder"] = gBtnArr["nb_prev"]= new ImgBtn( "nb_prev","nb_prevBorder",30,parent.GoToPrevSld )
  209. gBtnArr["nb_nextBorder"] = gBtnArr["nb_next"]= new ImgBtn( "nb_next","nb_nextBorder",30,parent.GoToNextSld )
  210. gBtnArr["nb_sldshw"]= new ImgBtn( "nb_sldshw","nb_sldshwBorder",18,parent.FullScreen )
  211. gBtnArr["nb_sldshwBorder"] = new TxtBtn( "nb_sldshw","nb_sldshwBorder",parent.FullScreen,null )
  212. gBtnArr["nb_sldshwBorder"].SetActive = _BSetA_Border;
  213. gBtnArr["nb_sldshwBorder"].SetInactive = _BSetI_Border;
  214. gBtnArr["nb_sldshwText"] = new TxtBtn( "nb_sldshw","nb_sldshwText",parent.FullScreen,null )
  215. gBtnArr["nb_sldshwText"].SetActive = _BSetA_Border;
  216. gBtnArr["nb_sldshwText"].SetInactive = _BSetI_Border;
  217. gBtnArr["nb_voice"] = gBtnArr["nb_voiceBorder"] = new ImgBtn( "nb_voice","nb_voiceBorder",18,parent.ToggleVNarration )
  218. gBtnArr["nb_otlTxtBorder"] = gBtnArr["nb_otlTxt"]= new ImgBtn( "nb_otlTxt","nb_otlTxtBorder",23,parent.ToggleOtlText )
  219. gBtnArr["nb_ntsBorder"].m_flagId= "nb_nts"
  220. gBtnArr["nb_ntsBorder"].SetFlag = NtsBtnSetFlag
  221. gBtnArr["nb_otlTxt"].ChangeIcon= GetOtlTxtState
  222.