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 >
Wrap
Text File
|
2010-03-09
|
6KB
|
222 lines
function ImgBtn( oId,bId,w,action )
{
var t=this
t.Perform = _IBP
t.SetActive = _IBSetA
t.SetInactive= _IBSetI
t.SetPressed = _IBSetP
t.SetDisabled= _IBSetD
t.Enabled = _IBSetE
t.ChangeIcon = null
t.UserAction = action
t.ChgState = _IBUI
t.mObjId = oId
t.mBorderId= bId
t.mWidth = w
t.mIsOn = t.mCurState = 0
}
function _IBSetA()
{
if( this.mIsOn ) {
obj=this.ChgState( gHiliteClr,gShadowClr,2 )
obj.style.posTop=0
}
}
function _IBSetI()
{
if( this.mIsOn ) {
obj=this.ChgState( gFaceClr,gFaceClr,1 )
obj.style.posTop=0
}
}
function _IBSetP()
{
if( this.mIsOn ) {
obj=this.ChgState( gShadowClr,gHiliteClr,2 )
obj.style.posLeft+=1; obj.style.posTop+=1
}
}
function _IBSetD()
{
obj=this.ChgState( gFaceClr,gFaceClr,0 )
obj.style.posTop=0
}
function _IBSetE( state )
{
var t=this
GetObj( t.mBorderId ).style.visibility="visible"
if( state != t.mIsOn ) {
t.mIsOn=state
if( state )
t.SetInactive()
else
t.SetDisabled()
}
}
function _IBP()
{
var t=this
if( t.mIsOn ) {
if( t.UserAction != null )
t.UserAction()
if( t.ChangeIcon ) {
obj=GetObj(t.mObjId)
if( t.ChangeIcon() )
obj.style.posLeft=obj.style.posLeft+(t.mCurState-4)*t.mWidth
else
obj.style.posLeft=obj.style.posLeft+(t.mCurState-0)*t.mWidth
}
t.SetActive()
}
}
function _IBUI( clr1,clr2,nextState )
{
var t=this
SetBorder( GetObj( t.mBorderId ),clr1,clr2 )
obj=GetObj( t.mObjId )
obj.style.posLeft=obj.style.posLeft+(t.mCurState-nextState)*t.mWidth-obj.style.posTop
t.mCurState=nextState
return obj
}
function TxtBtn( oId,oeId,action,chkState )
{
var t=this
t.Perform = _TBP
t.SetActive = _TBSetA
t.SetInactive= _TBSetI
t.SetPressed = _TBSetP
t.SetDisabled= _TBSetD
t.SetEnabled = _TBSetE
t.GetState = chkState
t.UserAction = action
t.ChgState = _TBUI
t.mObjId = oId
t.m_elementsId= oeId
t.mIsOn = 1
}
function _TBSetA()
{
var t=this
if( t.mIsOn && !t.GetState() )
t.ChgState( gHiliteClr,gShadowClr,0,0 )
}
function _TBSetI()
{
var t=this
if( t.mIsOn && !t.GetState() )
t.ChgState( gFaceClr,gFaceClr,0,0 )
}
function _TBSetP()
{
if( this.mIsOn )
this.ChgState( gShadowClr,gHiliteClr,1,1 )
}
function _TBSetD()
{
this.ChgState( gFaceClr,gFaceClr,0,0 )
this.mIsOn = 0
}
function _TBSetE()
{
var t=this
if( !t.GetState() )
t.ChgState( gFaceClr,gFaceClr,0,0 )
else
t.ChgState( gShadowClr,gHiliteClr,1,1 )
t.mIsOn = 1
}
function _TBP()
{
var t=this
if( t.mIsOn ) {
if( t.UserAction != null )
t.UserAction()
if( !t.GetState )
return
if( t.GetState() )
t.SetPressed()
else
t.SetActive()
}
}
function _TBUI( clr1,clr2,lOffset,tOffset )
{
SetBorder( GetObj( this.mObjId ),clr1,clr2 )
Offset( GetObj( this.m_elementsId ),lOffset,tOffset )
}
function Offset( obj, top, left ){ obj.style.top=top; obj.style.left=left }
function SetBorder( obj, upperLeft, lowerRight )
{
s=obj.style;
s.borderStyle = "solid"
s.borderWidth = 1
s.borderLeftColor = s.borderTopColor = upperLeft
s.borderBottomColor= s.borderRightColor = lowerRight
}
function GetBtnObj(){ return gBtnArr[window.event.srcElement.id] }
function BtnOnOver(){ b=GetBtnObj(); if( b != null ) b.SetActive() }
function BtnOnDown(){ b=GetBtnObj(); if( b != null ) b.SetPressed() }
function BtnOnOut(){ b=GetBtnObj(); if( b != null ) b.SetInactive() }
function BtnOnUp()
{
b=GetBtnObj()
if( b != null )
b.Perform()
else
Upd()
}
function GetNtsState(){ return parent.gNtsOpen }
function GetOtlState(){ return parent.gOtlOpen }
function GetOtlTxtState(){ return parent.gOtlTxtExp }
function NtsBtnSetFlag( fVal )
{
s=document.all.item( this.m_flagId ).style
s.display="none"
if( fVal )
s.display=""
else
s.display="none"
}
function _BSetA_Border(){ b = gBtnArr[this.mObjId]; if( b != null ) b.SetActive() }
function _BSetI_Border(){ b = gBtnArr[this.mObjId]; if( b != null ) b.SetInactive() }
function _BSetP_Border(){ b = gBtnArr[this.mObjId]; if( b != null ) b.SetPressed() }
function _BSetA_BorderImg()
{
b = gBtnArr[this.mBorderId]
if( b != null && this.mIsOn && !b.GetState() ) {
obj=this.ChgState( gHiliteClr,gShadowClr,2 )
obj.style.posTop=0
}
}
function _BSetI_BorderImg()
{
b = gBtnArr[this.mBorderId]
if( b != null && this.mIsOn && !b.GetState() ) {
obj=this.ChgState( gFaceClr,gFaceClr,1 )
obj.style.posTop=0
}
}
var gHiliteClr="THREEDHIGHLIGHT",gShadowClr="THREEDSHADOW",gFaceClr="THREEDFACE"
var gBtnArr = new Array()
gBtnArr["nb_otl"] = new TxtBtn( "nb_otl","nb_otlElem",parent.ToggleOtlPane,GetOtlState )
gBtnArr["nb_otlElem"] = new TxtBtn( "nb_otl","nb_otlElem",parent.ToggleOtlPane,GetOtlState )
gBtnArr["nb_nts"] = new ImgBtn( "nb_nts","nb_ntsBorder",10,parent.ToggleNtsPane )
gBtnArr["nb_nts"].SetActive = _BSetA_BorderImg;
gBtnArr["nb_nts"].SetInactive = _BSetI_BorderImg;
gBtnArr["nb_ntsBorder"] = new TxtBtn( "nb_ntsBorder","nb_ntsElem",parent.ToggleNtsPane,GetNtsState )
gBtnArr["nb_ntsElem"] = new TxtBtn( "nb_ntsBorder","nb_ntsElem",parent.ToggleNtsPane,GetNtsState )
gBtnArr["nb_prevBorder"] = gBtnArr["nb_prev"]= new ImgBtn( "nb_prev","nb_prevBorder",30,parent.GoToPrevSld )
gBtnArr["nb_nextBorder"] = gBtnArr["nb_next"]= new ImgBtn( "nb_next","nb_nextBorder",30,parent.GoToNextSld )
gBtnArr["nb_sldshw"]= new ImgBtn( "nb_sldshw","nb_sldshwBorder",18,parent.FullScreen )
gBtnArr["nb_sldshwBorder"] = new TxtBtn( "nb_sldshw","nb_sldshwBorder",parent.FullScreen,null )
gBtnArr["nb_sldshwBorder"].SetActive = _BSetA_Border;
gBtnArr["nb_sldshwBorder"].SetInactive = _BSetI_Border;
gBtnArr["nb_sldshwText"] = new TxtBtn( "nb_sldshw","nb_sldshwText",parent.FullScreen,null )
gBtnArr["nb_sldshwText"].SetActive = _BSetA_Border;
gBtnArr["nb_sldshwText"].SetInactive = _BSetI_Border;
gBtnArr["nb_voice"] = gBtnArr["nb_voiceBorder"] = new ImgBtn( "nb_voice","nb_voiceBorder",18,parent.ToggleVNarration )
gBtnArr["nb_otlTxtBorder"] = gBtnArr["nb_otlTxt"]= new ImgBtn( "nb_otlTxt","nb_otlTxtBorder",23,parent.ToggleOtlText )
gBtnArr["nb_ntsBorder"].m_flagId= "nb_nts"
gBtnArr["nb_ntsBorder"].SetFlag = NtsBtnSetFlag
gBtnArr["nb_otlTxt"].ChangeIcon= GetOtlTxtState