/**

* @name PGN viewer

* @copyright 2006 Karsten Nymann Pedersen

* @version 2.00

* @author Karsten Nymann Pedersen

* @license Buyware

* @mail pgnreader@rapax.dk

*/



var pgn_setings = function()

{

	// felter

	this.fieldWidth =40;

	this.bgColorWhite = "#EBD792";

	this.bgColorBlack = "#B47A3B";

	

	// brikker

	this.imageMap = "images/";

	this.pieceMap = "merida/";

	this.imageType = "gif";

	

// Bræt delen

	this.outerBorderColorArray = new Array();

	this.innerBorderColorArray = new Array();

	this.bgColorWhiteArray = new Array();

	this.bgColorBlackArray = new Array();

	this.mainBorderColorArray = new Array();

	this.panelBottomsColorsArray = new Array();

	

	this.outerBorderColorArray[0] = new Array("#3C1609","#5D1703","#6C1B03","#942505","#7B3A1E");

	this.innerBorderColorArray[0] = new Array("#3C1609","#7B3A1E");

	this.bgColorWhiteArray[0] = "#EBD792";

	this.bgColorBlackArray[0] = "#B47A3B";

	this.mainBorderColorArray[0] = "#E4C565";

	this.panelBottomsColorsArray[0] = new Array("#000","#EBD792","#E4C565");



	this.outerBorderColorArray[1] = new Array("#000","#4AABD6","#6FC5E8","#80D1EF","#88D4F4");

	this.innerBorderColorArray[1] = new Array("#369FCE","#88D4F4");

	this.bgColorWhiteArray[1] = "#C3E8F7";

	this.bgColorBlackArray[1] = "#145A7B";

	this.mainBorderColorArray[1] = "#145A7B";

	this.panelBottomsColorsArray[1] = new Array("#000","#369FCE","#88D4F4");



	this.outerBorderColorArray[2] = new Array("#000","#487322","#629C2E","#84C947","#A5D778");

	this.innerBorderColorArray[2] = new Array("#487322","#A5D778");

	this.bgColorWhiteArray[2] = "#D3ECBD";

	this.bgColorBlackArray[2] = "#629C2E";

	this.mainBorderColorArray[2] = "#487322";

	this.panelBottomsColorsArray[2] = new Array("#000","#487322","#A5D778");



	this.outerBorderColorArray[3] = new Array("#000","#BBB","#CCC","#DDD","#EEE");

	this.innerBorderColorArray[3] = new Array("#BBB","#DDD");

	this.bgColorWhiteArray[3] = "#FFF";

	this.bgColorBlackArray[3] = "#BBB";

	this.mainBorderColorArray[3] = "#BBB";

	this.panelBottomsColorsArray[3] = new Array("#000","#BBB","#EEE");



	this.outerBorderColorArray[4] = new Array("#700071","#A100A2","#C900CA","#FC00FD","#000");

	this.innerBorderColorArray[4] = new Array("#FE60FF","#830084");

	this.bgColorWhiteArray[4] = "#D7FFB0";

	this.bgColorBlackArray[4] = "#830084";

	this.mainBorderColorArray[4] = "#A300A4";

	this.panelBottomsColorsArray[4] = new Array("#000","#FE60FF","#FE44FF");



	this.outerBorderColorArray[5] = new Array("#000","#EF8667","#EC6D48","#EA5C33","#DB4317");

	this.innerBorderColorArray[5] = new Array("#F6BAA8","#DB4317");

	this.bgColorWhiteArray[5] = "#F4E6C8";

	this.bgColorBlackArray[5] = "#DB4317";

	this.mainBorderColorArray[5] = "#B53813";

	this.panelBottomsColorsArray[5] = new Array("#000","#F6BAA8","#EF8667");



	this.outerBorderColorArray[6] = new Array("#000","#222","#444","#666","#888");

	this.innerBorderColorArray[6] = new Array("#111","#888");

	this.bgColorWhiteArray[6] = "#ccc";

	this.bgColorBlackArray[6] = "#666";

	this.mainBorderColorArray[6] = "#000";

	this.panelBottomsColorsArray[6] = new Array("#000","#999","#bbb");



	this.outerBorderColorArray[7] = new Array("#FF5555","#FF2424","#F20000","#BB0000","#8C0000");

	this.innerBorderColorArray[7] = new Array("#111","#888");

	this.bgColorWhiteArray[7] = "#FFC8C8";

	this.bgColorBlackArray[7] = "#BB0000";

	this.mainBorderColorArray[7] = "#FF5555";

	this.panelBottomsColorsArray[7] = new Array("#000","#F20000","#900000");



	this.outerBorderColorArray[8] = new Array("#000","#AE823E","#C9A369","#E0C9A7","#F8E1B8");

	this.innerBorderColorArray[8] = new Array("#D5D5D5","#F8E1B8");

	this.bgColorWhiteArray[8] = "#F8E1B8";

	this.bgColorBlackArray[8] = "#AE823E";

	this.mainBorderColorArray[8] = "#D5D5D5";

	this.panelBottomsColorsArray[8] = new Array("#000","#F8E1B8","#D5D5D5");





	this.measure="px";

	this.outerBorderType = "solid";

	this.outerBorderWidth = 1;



	this.innerBorderType = "solid";

	this.innerBorderWidth = 1;



	this.boardContainer = "frame";

	this.borderLetterColor ="#FFFFFF"

	this.frameFontsize = "18px";

	this.boardReverse = false;

	

// Søge delen

	this.maxUploadGames = 500;

// panel

	this.controlMap = "control/";

	this.panelBottoms = new Array("start","left","step_left","step_right","right","end","reverse");

//	this.panelBottomText = new Array("Start","left","step_left","step_right","right","end","reverse");

	this.panelBottomsColors = new Array("#3C1609","#EAD390","#E9CF80","#E7CB75","#E4C565");

	

// Gennemspil parti del

	this.moveNr = 0;

	this.variation = 0;

// Parti delen

  this.gameNumber=1;

  this.ls = "TSLDK".split("");

  this.notationsElm = "notationCont";

  this.notationsElmGame = "notationCont";

  this.settingsBox = "settingsBox";

  this.notationsBackgroundColor = "#FFFFFF"

  this.newStart = 0;

//  this.

  // pgn out delen

  this.startBoard = new Array;

  this.startColor = new Array;

  this.castling = new Array;

  this.enpassant = new Array;

  this.lastPawn = new Array;

  this.fullmove = new Array;

  this.realMoveNumber = new Array;

  this.boardArray = new Array;

  this.oldMoveNr = new Array;

  this.oldVariantNr = new Array;



  // pgn input delen

  this.gameId = new Array;

  this.Event = new Array;

  this.EventType = new Array;

  this.Date = new Array;

  this.EventRounds = new Array;

  this.EventCountry = new Array;

  this.Site = new Array;

  this.EventDate = new Array;

  this.Round = new Array;

  this.White = new Array;

  this.Black = new Array;

  this.Result = new Array;

  this.Eco = new Array;

  this.Whiteelo = new Array;

  this.Blackelo = new Array;

  this.Anotator = new Array;

  this.Source = new Array;

  this.Sourcedate = new Array;

  this.Plycount = new Array;

  this.SetUp = new Array;

  this.Fen = new Array;

  this.pgn = new Array;

  this.gameExstraCont = new Array;

  // pgn mellem regnings del

  this.pgnArrayGame = new Array;

  this.variantStart = new Array;

  this.pgnArrayText = new Array;

  this.pgnArrayComment = new Array;

  

}

pgn_setings.prototype.init = function()

{

	this.boardWidth = this.fieldWidth*9 + 2 * this.outerBorderColor.length + 2 * this.innerBorderColor.length + 2;

	this.moveNr = this.realMoveNumber[this.gameNumber];

	if (!settings.boardArray[settings.gameNumber][settings.variation][settings.moveNr]) {

		settings.boardArray[settings.gameNumber][settings.variation][settings.moveNr]=settings.boardArray[settings.gameNumber][settings.variation][0];

		settings.boardArray[settings.gameNumber][settings.variation][0]=null; 

	}

}