basePathForCommonIcons = '/dFrame/images/common/'
DFrameAPI.preLoadImagesForButtonImage('CloseDFrame', basePathForCommonIcons,'close-off-02.gif', 'close-on-02.gif', 'close-off-02.gif', 'close-on-02.gif')

//darkColor = '#b0b0b0'
grayColor = '#B5B2B5'
blueColor = '#3965A5'//'#52799C'
contentBlueBgCol = '#637D9C'//'#52799C'//'#6B696B'
greenColor = '#64A539'
contentGreenBgCol = '#7D9C63'

var buttonStyle = new ButtonStyle ()
buttonStyle.setBordersWidth (1)
buttonStyle.setBordersColor ('#5A8CC2')
buttonStyle.setWidth (80)
buttonStyle.setAutoWidth('LABEL')
buttonStyle.setHeight (22)
buttonStyle.setFontFamily ('MS Sans Serif,Arial,Helvetica,sans-serif')
buttonStyle.setFontSize (2)
buttonStyle.setActivateOn ('UP');//OK

buttonStyle.setTextNormal ('#AFCDEF')
buttonStyle.setBgNormal (contentBlueBgCol)
buttonStyle.setBosNormal (false)
buttonStyle.setIosNormal (false)
buttonStyle.setBordersNormal (true)


buttonStyle.copyStyle('Normal', 'Roll')
buttonStyle.setTextRoll ('#fffff')
buttonStyle.setBgRoll ('#000084')

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

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

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

//==============================================================menuStyleTree==============================
var menuStyle = new MenuStyle ()
menuStyle.setBordersWidth(0)
//menuStyle.setBordersColor(['#31309C', '#9C3030'])
//menuStyle.setBackgroundColor(['#5958C2', '#C25958'])
menuStyle.setItemsHSpacing ([10,5])
menuStyle.setItemsVSpacing ([4,2])
menuStyle.setMenuIndent ([0,15])

menuStyle.setItemsFontFamily ('MS Sans Serif,Arial,Helvetica,sans-serif')
menuStyle.setItemsFontSize ('2')
menuStyle.setIsTree (true)
menuStyle.setItemsBordersWidth(1)
menuStyle.setItemsBordersColor(['#5A8CC2','#C25A8C'])

menuStyle.setItemsLabelHAlign('LEFT')
menuStyle.setItemsLabelHAlignDelta(1)

menuStyle.setItemsTextNormal ('#AFCDEF')
menuStyle.setItemsBgNormal (['#617D9C','#9C3165'])
menuStyle.setItemsBosNormal (false) //
menuStyle.setItemsBordersNormal (true)

menuStyle.copyItemStyle ('Normal', 'Roll')
menuStyle.setItemsTextRoll ('#ffffff')
menuStyle.setItemsBgRoll	(['#000084','#830000'])
menuStyle.setItemsBgSelected	('')

menuStyle.copyItemStyle ('Roll', 'RollSelected')
menuStyle.copyItemStyle ('Normal', 'Selected')

menuStyle.setImageArrowOff	(basePathForCommonIcons + 'menuArrow-Close.gif')
menuStyle.setImageArrowOn	(basePathForCommonIcons + 'menuArrow-Open.gif')

//===============defaultButtonStyle
var x = new ButtonStyle(buttonStyle)
menuStyle.setDefaultButtonStyle(x)
//===================================================================== Bar ==============================
var barStyle = new BarStyle ()
barStyle.setPos('TOP')
barStyle.setBordersWidth(1)
barStyle.setBordersColor('#31309C')
barStyle.setBackgroundColor(blueColor)
barStyle.setHeight(32)
barStyle.setItemsMargin(5)

barStyle.setDefaultButtonStyle(buttonStyle)
barStyle.setDefaultMenuStyle(menuStyle)
//===================================================================== DFrame ============================
var dFrameStyle = new DFrameStyle ()
dFrameStyle.setPos ([0,0,100,100])
// true one: 
//dFrameStyle.setBackgroundColor ('#31659C')
//dFrameStyle.setContentBgColor ('#D6D3CE')
//for Tagnet look like:
dFrameStyle.setBackgroundColor (blueColor)
dFrameStyle.setContentBgColor (contentBlueBgCol)

dFrameStyle.setBordersWidth(2)
dFrameStyle.setBordersColor (grayColor)
dFrameStyle.setMBordersWidth(0)
dFrameStyle.setScrollType ('scroll')
	
//Default bars
dFrameStyle.setDefaultBarStyle(barStyle)

//Default RightClickMenu --------------------------------
x = new MenuStyle(menuStyle)
x.setBackgroundColor(null)//('yellow')//(['#31659C','#9C3165'])
x.setWidth(300)
dFrameStyle.setDefaultRightClickMenuStyle(x)
//Default task bar -----------------------------------
y = new BarStyle(barStyle)
dFrameStyle.setDefaultTaskBarStyle(y)
//----------------title bar -----------------------------------
var x = new BarStyle(barStyle)
x.setBackgroundColor(grayColor)
x.setBordersWidth(0)
x.setBordersHMargin(5)
x.setBordersVMargin(0)
x.setHeight(1)
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')
y.setBosNormal(true)
dFrameStyle.setDefaultTitleBarStyle(x)
