/*
The contents of this file are (C) Paul Stephens 2005. All Rights reserved. 
You may use this software free of charge on non profit-making websites, provided that this
copyright notice is left intact.

This software must not be used on revenue-generating websites, or distributed with a commerical
package, except by agreement with the copyright holder.

For details contact paul@paulspages.co.uk.
*/

function bg_config() {
// This function contains the dimension settings for the board object

this.boardWidth = 336
this.boardHeight = 220
this.points = new Array()
// This array contains the x-coordinates of the points on the board. 
// Point 0 is the off tray, point 25 is the bar.
// On-board points (second element onwards) start from lower left and work anti-clockwise
// Default layout is top-left
this.pointx = new Array(9, 37, 55, 75, 93, 112, 130, 188, 206, 225, 244, 262, 280,
				280, 262, 244, 225, 206, 188, 130, 112, 93, 75, 55, 37, 159)
this.rightSideOff = 309 // Off tray x coord for top-right play
this.leftSideOff = 9 // Off tray x coord for top-left (default) play

						   
this.yupper = 7 // starting y coord for upper-table points (upper edge of playing area)

// NOTE - SUBTRACT this.pieceheight from the true lower-table edge to get this.ylower


this.ylower = 194 // starting y coord for lower-table points (lower edge of playing area)

this.pieceheight = 18
this.sideheight = 6

this.uppertrayYpos = 9 // Y coord of upper off side tray
this.lowertrayYpos = 120  // Y coord of lower off side tray

this.dicesize = 24
this.dicey = 99 // dice y coord
this.dice1x = 65
this.dice2x = 215
this.lowerlabelOffset = 17 // LOWER LABELS VERTICAL OFFSET 
this.upperlabelOffset = 9 // UPPER LABELS VERTICAL OFFSET
this.labelFont = "color:white;font-size:6pt"
this.labelWidth = 18

this.pointstackthreshold = 5 // Max pieces per layer on a point
this.barstackthreshold = 4 // Max pieces per layer on the bar

this.cubeSize = 24
this.cubeX = 157 // X coord of cube (all positions)
this.cubeY = new Array()
//alert(Math.round(this.boardHeight / 2) - (this.cubeSize / 2))
this.cubeY[0] = Math.round((this.boardHeight / 2) - (this.cubeSize / 2))
this.cubeY[1] = this.yupper - 9 
this.cubeY[2] = this.ylower +0
this.cubeFont = "color:black;font-size:10pt;font-family:Verdana, Arial, Sans-serif;font-weight:bold;padding-top:5"

this.bar1ypos = this.cubeSize + 8 
this.bar2ypos = this.boardHeight - (this.cubeSize) - (this.pieceheight * 4) - 10

}
