basePathForIcons = 'styles/green/' 
basePathForCommonIcons = 'images/common/'

DFrameAPI.preLoadImagesForButtonImage('CloseDFrame', basePathForCommonIcons,'close-off.gif', 'close-on.gif', 'close-off.gif', 'close-on.gif')

darkColor = '#b0b0b0'
baseColor = '#A5C373' // green
darkGreen = '#949E7B'
//===============================================================================
//									ButtonStyle									|
//===============================================================================
buttonStyle = new ButtonStyle ()
buttonStyle.setActivateOn ('DOWN');

buttonStyle.setTextNormal ('#ffffff')
buttonStyle.setBgNormal (null)
buttonStyle.setBordersNormal (true)

buttonStyle.copyStyle('Normal', 'Roll')
buttonStyle.setBordersRoll ('ThreeD')

buttonStyle.copyStyle('Roll', 'Down')
buttonStyle.setBordersDown ('ThreeDInv')

buttonStyle.copyStyle('Down', 'Selected')

buttonStyle.copyStyle('Roll', 'RollSelected')

buttonStyle.copyStyle('Normal', 'Inactive')
buttonStyle.setTextInactive('#ffffff')

buttonStyle.setImageInactive(basePathForCommonIcons + 'trame.gif')
//===============================================================================
//									menuStyle									|
//===============================================================================
menuStyle = new MenuStyle ()
menuStyle.setBordersWidth(0)
menuStyle.setItemsSpacing ([0,2])
menuStyle.setIsTree(true)
menuStyle.setMenuIndent(10)
//-------------------------------------------------------
//							defaultButtonStyle			!
//-------------------------------------------------------
var x = new ButtonStyle(buttonStyle)
x.setActivateOn('OVER')
menuStyle.setDefaultButtonStyle(x)
//-------------------------------------------------------
//									itemsStyle			!
//-------------------------------------------------------
var x = new ButtonStyle(buttonStyle)
x.setBordersWidth (0)
x.setBordersColor ('black')
x.setFontFamily ('Arial,MS Sans Serif,Helvetica,sans-serif')
x.setFontSize ([2,2])
x.setActivateOn ('Down');

x.setTextNormal ('#000000')
x.setBordersNormal(true)

x.copyStyle('Normal', 'Roll')
x.setTextRoll ('yellow')

x.copyStyle('Roll', 'Down')
x.copyStyle('Roll', 'Selected')
x.copyStyle('Roll', 'RollSelected')

menuStyle.setItemsStyle(x)
//===============================================================================
//									barStyle									|
//===============================================================================
barStyle = new BarStyle ()
barStyle.setPos ('LEFT')
barStyle.setBackgroundColor(darkGreen)
barStyle.setStartFrom('TOP')
barStyle.setItemsHAlign('LEFT')
barStyle.setWidth (180);
barStyle.setBordersWidth(0)
barStyle.setBackgroundColor (baseColor)
//-------------------------------------------------------
//							defaultButton/Menu Styles	!
//-------------------------------------------------------
barStyle.setDefaultButtonStyle(buttonStyle)
barStyle.setDefaultMenuStyle(menuStyle)
//===============================================================================
//									dFrameStyle									|
//===============================================================================
dFrameStyle = new DFrameStyle ()
dFrameStyle.setBackgroundColor (baseColor)
dFrameStyle.setContentBgColor (baseColor)
dFrameStyle.setBordersWidth(0)
//-------------------------------------------------------
//							defaultBarStyle				!
//-------------------------------------------------------
x = new ButtonStyle(buttonStyle)
x.setTextNormal ('#000000')
x.setBordersRoll ('ThreeD')
x.setBordersDown ('ThreeDInv')

y = new BarStyle()
y.setDefaultButtonStyle(x)
y.setPos('Bottom')
y.setBackgroundColor(darkGreen)

dFrameStyle.setDefaultBarStyle(y)
//-------------------------------------------------------
//							defaultTaskBarStyle			!
//-------------------------------------------------------
x = new ButtonStyle(buttonStyle)
x.setBordersNormal (false)
x.setImageNormal(basePathForIcons+'taskBarButton.gif')//transparent image
x.setBordersRoll (false)
x.setBordersSelected (false)

x.copyStyle('Normal', 'Roll')

x.copyStyle('Roll', 'Down')

x.copyStyle('Down', 'Selected')
x.setBgSelected('A5C373')
x.copyStyle('Selected', 'RollSelected')

x.setAutoWidth('IMAGE')

//taskBar will have a (taskBar)menu
z = new MenuStyle(menuStyle)
z.setBackgroundColor('#9CC352')

z.setBordersWidth(1)

y = new BarStyle()
y.setDefaultButtonStyle(x)
y.setDefaultMenuStyle(z)
y.setBackgroundColor(darkGreen)
y.setPos('TOP')
y.setStartFrom('LEFT')
y.setItemsVAlign('BOTTOM')
y.setBordersHMargin(-4)
y.setItemsHSpacing(1)

dFrameStyle.setDefaultTaskBarStyle(y)
//-------------------------------------------------------
//							defaultTitleBarStyle		!
//-------------------------------------------------------
var x = new BarStyle(barStyle)
x.setBackgroundColor(darkGreen)
x.setBordersWidth(0)
x.setBordersHMargin(5)
x.setBordersVMargin(2)
x.setHeight(1)
x.setAutoHeight('BUTTON')
x.setButtonImage('CloseDFrame', 'thisDFrame.closeFrame()')
var y = x.getDefaultButtonStyle()
y.setHeight(0)
y.setBordersWidth(0)
y.setLabelTopMargin(1)
y.setLabelBottomMargin(1)
y.setBgNormal(null)
y.setTextNormal('white')
dFrameStyle.setDefaultTitleBarStyle(x)
