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

DFrameAPI.preLoadImagesForButtonImage('CloseDFrame', basePathForCommonIcons,'close-off.gif', 'close-on.gif', 'close-off.gif', 'close-on.gif')
DFrameAPI.preLoadImagesForButtonImage('HideDFrame', basePathForCommonIcons,'hide.gif', 'hideOver.gif', 'hide.gif', 'hide.gif')
DFrameAPI.preLoadImagesForButtonImage('arrows', basePathForCommonIcons,'menuArrow-Close.gif', '', 'menuArrow-Open.gif', '')

darkBlue = '#000084'
lightGray = '#D4D0C8' 
darkForBorders = '#A0A0A0'
lightForBorders = '#FFFBF0'
//===============================================================================
//									ButtonStyle									|
//===============================================================================
buttonStyle = new ButtonStyle()
buttonStyle.setWidth(80)
buttonStyle.setHeight(18)
buttonStyle.setFontSize(1)
buttonStyle.setActivateOn('UP');

buttonStyle.setCloseImage('CloseDFrame')

buttonStyle.setTextNormal('#000000')
buttonStyle.setBgNormal(lightGray)
buttonStyle.setBordersNormal(false)

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

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

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

buttonStyle.copyStyle('Roll', 'RollSelected')
//===============================================================================
//									menu Style									|
//===============================================================================
var menuStyle = new MenuStyle()
menuStyle.setBordersWidth(1)
menuStyle.setBordersType('ThreeD')
menuStyle.setBackgroundColor(lightGray)

menuStyle.setArrowImage('arrows')
//-------------------------------------------------------
//							default Button Style		|
//-------------------------------------------------------
var x = new ButtonStyle(buttonStyle)
x.setActivateOn('OVER')
menuStyle.setDefaultButtonStyle(x)
//-------------------------------------------------------
//									items Style			|
//-------------------------------------------------------
var x = new ButtonStyle(buttonStyle)
x.setBordersWidth(1)
x.setBordersColor(lightGray)
x.setWidth(10)
x.setAutoWidth('LABEL')
x.setHeight(15)
x.setActivateOn('Down');
x.setLabelLeftMargin(3);
x.setLabelHAlign('LEFT')
x.setBordersWidth(1)
x.setTextRoll('#ffffff')
x.setBgRoll('#000084')
x.copyStyle('roll', 'rollSelected')

menuStyle.setItemsStyle(x)
//===============================================================================
//									bar Style									|
//===============================================================================
barStyle = new BarStyle()
barStyle.setPos('TOP')
barStyle.setHeight(26)
barStyle.setBordersHMargin(2)
barStyle.setBordersWidth(1)
barStyle.setBordersType('ThreeD')

barStyle.setBackgroundColor(lightGray)
barStyle.setItemsHSpacing(3) 
//-------------------------------------------------------
//							default Button/Menu Styles	|
//-------------------------------------------------------
barStyle.setDefaultButtonStyle(buttonStyle)
barStyle.setDefaultMenuStyle(menuStyle)
//===============================================================================
//									dFrame Style								|
//===============================================================================
dFrameStyle = new DFrameStyle()
dFrameStyle.setPos([0,0,75,75])
dFrameStyle.setIndentX(25)
dFrameStyle.setIndentY(25)
dFrameStyle.setBackgroundColor(lightGray)

dFrameStyle.setTitleBar(true)

dFrameStyle.setBordersLightThreeD(lightForBorders)
dFrameStyle.setBordersDarkThreeD(darkForBorders)
dFrameStyle.setBordersWidth(2)
dFrameStyle.setBordersType('ThreeD')
dFrameStyle.setMBordersWidth(2)
dFrameStyle.setIBordersWidth(2)
dFrameStyle.setIBordersType('ThreeDInv')

dFrameStyle.setContentBgColor(lightGray)
dFrameStyle.setMessageBgColor(lightGray)
//-------------------------------------------------------
//							default Bar Style			|
//-------------------------------------------------------
dFrameStyle.setDefaultBarStyle(barStyle)
//-------------------------------------------------------
//							defaultTask Bar Style		|
//-------------------------------------------------------
var x = new BarStyle(barStyle)
var y = x.getDefaultButtonStyle()
y.setImageNormal(basePathForIcons + 'transparent.gif')
y.setImageRoll(basePathForIcons + 'transparent.gif')
y.setImageSelected(basePathForIcons + 'selected.gif')
y.setImageRollSelected(basePathForIcons + 'selected.gif')
y.setLabelLeftMargin(20);
dFrameStyle.setDefaultTaskBarStyle(x)
//-------------------------------------------------------
//							default Context Menu Style	!
//-------------------------------------------------------
var x = new MenuStyle(menuStyle)
dFrameStyle.setDefaultContextMenuStyle(x)
//===============================================================================
//									default Title Bar Style						|
//===============================================================================
var x = new BarStyle(barStyle)
x.setBackgroundColor('#000084')
x.setBordersWidth(0)
x.setBordersHMargin(5)
x.setBordersVMargin(2)
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)

var dFrameStyleHide = new DFrameStyle(dFrameStyle)
var x = dFrameStyleHide.getDefaultTitleBarStyle()
x.setButtonImage('HideDFrame', 'thisDFrame.show(false)')
