




				/*
				string = new BigDecimal(this.team.getPerformanceStrength(this.weekNumber))
					.round(new MathContext(2)).toPlainString();

				returnValue.append(Methods.ensureCharacterCount(string, 5, " ", false));
				*/


61 02 1BP49B
			36

91730738691298

1 x 36^5			60466176
11 x 36^4			18475776
25 x 36^3			1166400
4 x 36^2			5184
9 x 36				324
11 x 1				11

1216456


2379


2 x 10^3
+ 3 x 10^2
+ 7 x 10^1
+ 9 x 10^0

Patriots		6/8		6
Dolphins		5/8		11
Jets			3/8		14
Bills			4/7		18
Ravens			6/8		24
Bengals			4/8		28
Steelers		5/8		33
Browns			4/8		37
Texans			6/8		43
Colts			7/8		50
Titans			4/8		54
Jaguars			1/8		55
Broncos			7/8		62
Chargers		3/8		65
Raiders			3/8		68
Chiefs			1/8		69
Redskins		5/8		74
Giants			6/8		80
Cowboys			4/8		84
Eagles			2/8		86
Packers			7/8		93
Vikings			7/8		100
Bears			5/8		105
Lions			2/8		107
Falcons			7/8		114
Panthers		3/8		117
Saints			4/8		121
Bucs			3/8		124
49ers			6/8		130
Seahawks		8/8		138
Rams			5/8		143
Cards			4/8		147/255

1. Do better formatting of the Tips.txt
2. Auto generate Tips.txt when the Tips node is selected.





		for(Game game : games) {

			if(game.isFinal()) {

				string = game.getWinnerSymbol(this.team.getName()) + "    "
					+ game.getTeamOne().getTeam().getName() + "-v-" + game.getTeamTwo().getTeam().getName()
					+ "    " + game.getTeamOne().getScore()
					+ "-" + game.getTeamTwo().getScore();

				this.gameLabels.add(ComponentFactory.getLabel(string));
			}
		}




	public void setSeasonStats(Season season) {

		Game game = null;
		GameTeam gameTeam = null;

		for(Week week : season.getWeeks()) {

			game = week.getGame(this.name);

			if(game != null) {

				gameTeam = game.getGameTeam(this.name);

				this.pointsFor += gameTeam.getScore();
				this.pointsAgainst += game.getOtherTeam(this.name).getScore();

				if(gameTeam.equals(game.getWinner())) ++this.numberOfWins;
				else
				if(gameTeam.equals(game.getLoser())) ++this.numberOfLosses;
				else {
					++this.numberOfDraws;
				}
			}
		}

		return;
	}

	public int getPointsFor() {
		return this.pointsFor;
	}

	public int getPointsAgainst() {
		return this.pointsAgainst;
	}

	public int getPointsDifference() {
		return this.pointsFor - this.pointsAgainst;
	}

	public int getNumberOfWins() {
		return this.numberOfWins;
	}

	public int getNumberOfLosses() {
		return this.numberOfLosses;
	}




		returnValue = new BigDecimal((double)tally / count).round(new MathContext(4)).toPlainString();




	public float getPerformanceStrength(int weekNumber) {

		float returnValue = 0;
		float opponentStrength = 0;
		int numberOfLosses = 0;
		int numberOfSuccesses = 0;
		int numberOfGames = 0;
		float ratio = 0;
		boolean isNegative = false;
		int numberOfHalves = 0;
		float leftOver = 0;

		opponentStrength = getOpponentStrength(weekNumber);

		numberOfLosses = getNumberOfLosses(weekNumber);
		numberOfSuccesses = getNumberOfWins(weekNumber) + getNumberOfDraws(weekNumber);
		numberOfGames = numberOfLosses + numberOfSuccesses;

		if(numberOfSuccesses >= numberOfLosses) {
			ratio = (float)numberOfSuccesses / numberOfGames;
		}
		else {
			isNegative = true;
			ratio = (float)numberOfLosses / numberOfGames;
		}

		ratio = ratio - 0.5f;

		numberOfHalves = (int)(ratio / 0.25);
		leftOver = ratio % 0.25f;

		if(isNegative) {

			for(int i = 1; i <= numberOfHalves; ++i) {
				opponentStrength += (33 - opponentStrength) * 0.5;
			}

			if(leftOver > 0) opponentStrength += (33 - opponentStrength) * (leftOver / 0.25) * 0.5;
		}
		else {
			for(int i = 1; i <= numberOfHalves; ++i) {
				opponentStrength *= 0.5;
			}

			if(leftOver > 0) opponentStrength *= ((leftOver / 0.25) * 0.5);
		}

		returnValue = opponentStrength;

		return returnValue;
	}




    	public float getPerformanceStrength(int weekNumber) {

    		float returnValue = 0;
    		float opponentStrength = 0;
    		int numberOfLosses = 0;
    		int numberOfSuccesses = 0;
    		int numberOfGames = 0;
    		float breakEvenNumberOfSuccesses = 0;
    		float deviationFromBreakEven = 0;
    		float ratio = 0;
    		boolean isNegative = false;

    		opponentStrength = getOpponentStrength(weekNumber);

    		numberOfLosses = getNumberOfLosses(weekNumber);
    		/* getNumberOfDraws(...) should be getNumberOfAwayDraws(...) */
    		numberOfSuccesses = getNumberOfWins(weekNumber) + getNumberOfDraws(weekNumber);
    		numberOfGames = numberOfLosses + numberOfSuccesses;

    		if(numberOfSuccesses == numberOfLosses) {
    			returnValue = opponentStrength;
    		}
    		else
    		if(numberOfSuccesses == numberOfGames) {
    			returnValue = 1 + opponentStrength / 100;
    		}
    		else
    		if(numberOfLosses == numberOfGames) {
    			returnValue = 32 + opponentStrength / 100;
    		}
    		else {
    			isNegative = numberOfSuccesses < numberOfLosses;

    			breakEvenNumberOfSuccesses = (float)numberOfGames / 2;
    			deviationFromBreakEven = Math.abs(numberOfSuccesses - breakEvenNumberOfSuccesses);

    			ratio = (float)(0.5 + (0.5 / breakEvenNumberOfSuccesses) * deviationFromBreakEven);

    			if(isNegative) {
    				returnValue = opponentStrength + (32 - opponentStrength) * ratio;
    			}
    			else {
    				returnValue = opponentStrength - (opponentStrength - 1) * ratio;
    			}
    		}

    		return returnValue;
    	}

10		14, 15, 16
9		12, 13
8		11
7		10
6		9
5		8
4		7
3		6
2		5
1		4, 3
0		2, 1, 0


Roosters		10
Rabbitohs		9
Storm			8
Sea Eagles		8
Sharks			7
Knights			6
Bulldogs		5
Warriors		4
Cowboys			5
Titans			3
Panthers		3
Broncos			3
Raiders			3
Dragons			2
Tigers			1
Eels			0



	//this.element.css('background-color', 'blue');
	//this.element = $('<div class="palette"></div>');


	HTML Document
		Body											1..1
			ApplicationRootElement						1..n
				DisplayContainer						1..n
					Palette								1..n


	HTML Document
		Application										1..n
			RootElement									1..1
				DisplayContainer						1..n
					Palette								1..n




Url.Content('file.js') for including js/images/css


        function animateDiv() {

            $('.animationDiv').animate({left: '20px', top: '20px'}, 500);

            return;
        }

        <div class="animationDiv" onclick="animateDiv();"></div>

            .animationDiv {
                position: absolute;
                width: 20px;
                height: 20px;
                background-color: #f2ed83;
            }




/**
 * @public
 * @param {!Object} struct
 * @param {!string} struct.name The name of the display container.
 * @param {!string} struct.effect One of the following values: instant, fade, left, right, top, bottom
 * @param {!Function} [struct.complete]
 * @return {!pcf.RootElement} A reference to the current instance.
 */
pcf.RootElement.prototype.showDisplayContainer = function(struct) {

	/* @type {pcf.DisplayContainer} */
	var displayContainer = null;

	this.hideAll(struct.name);

	displayContainer = this.getDisplayContainer(struct.name);

	if(displayContainer != null && parseInt(displayContainer.getContainer().getZIndex()) < 2) {

		if(struct.effect.toLowerCase() == 'left') {
			new jronimo.gui.show.Left(this.rootElement, displayContainer.getContainer()).show(struct);
		}
		else
		if(struct.effect.toLowerCase() == 'right') {
			new jronimo.gui.show.Right(this.rootElement, displayContainer.getContainer()).show(struct);
		}
		else
		if(struct.effect.toLowerCase() == 'top') {
			new jronimo.gui.show.Top(this.rootElement, displayContainer.getContainer()).show(struct);
		}
		else
		if(struct.effect.toLowerCase() == 'bottom') {
			new jronimo.gui.show.Bottom(this.rootElement, displayContainer.getContainer()).show(struct);
		}
		else
		if(struct.effect.toLowerCase() == 'fade') {
			new jronimo.gui.show.Fade(this.rootElement, displayContainer.getContainer()).show(struct);
		}
		else {
			new jronimo.gui.show.Instant(this.rootElement, displayContainer.getContainer()).show(struct);
		}

		this.lastShown = displayContainer;
	}

	return this.instance;
}

/**
 * @public
 * @param {!Object} struct
 * @param {!string} struct.name The name of the display container.
 * @param {!string} struct.effect One of the following values: instant, fade, left, right, top, bottom
 * @param {!Function} [struct.complete]
 * @return {!pcf.RootElement} A reference to the current instance.
 */
pcf.RootElement.prototype.hideDisplayContainer = function(struct) {

	/* @type {pcf.DisplayContainer} */
	var displayContainer = null;

	displayContainer = this.getDisplayContainer(struct.name);

	if(displayContainer != null && parseInt(displayContainer.getContainer().getZIndex()) > 2) {

		if(struct.effect.toLowerCase() == 'left') {
			new jronimo.gui.show.Left(this.rootElement, displayContainer.getContainer()).hide(struct);
		}
		else
		if(struct.effect.toLowerCase() == 'right') {
			new jronimo.gui.show.Right(this.rootElement, displayContainer.getContainer()).hide(struct);
		}
		else
		if(struct.effect.toLowerCase() == 'top') {
			new jronimo.gui.show.Top(this.rootElement, displayContainer.getContainer()).hide(struct);
		}
		else
		if(struct.effect.toLowerCase() == 'bottom') {
			new jronimo.gui.show.Bottom(this.rootElement, displayContainer.getContainer()).hide(struct);
		}
		else
		if(struct.effect.toLowerCase() == 'fade') {
			new jronimo.gui.show.Fade(this.rootElement, displayContainer.getContainer()).hide(struct);
		}
		else {
			new jronimo.gui.show.Instant(this.rootElement, displayContainer.getContainer()).hide(struct);
		}
	}

	return this.instance;
}




        function a() {

            /* @type {Object} */
            var struct = null;

            struct = new Object();
            struct.from = 'Right';
            struct.fade = true;
            struct.complete = b1;

            window.app.showCoreMessagesDisplayContainer(struct);

            return;
        }

        function b1() {

            setTimeout(b2, 1000);

            return;
        }

        function b2() {

            /* @type {Object} */
            var struct = null;

            struct = new Object();
            struct.from = 'Right';
            struct.fade = true;
            struct.complete = c;

            window.app.hideCoreMessagesDisplayContainer(struct);

            return;
        }

        function c() {

            /* @type {Object} */
            var struct = null;

            struct = new Object();
            struct.from = 'Right';
            struct.fade = true;
            struct.complete = d1;

            window.app.showApplicationDisplayContainer(struct);

            return;
        }

        function d1() {

            setTimeout(d2, 1000);

            return;
        }

        function d2() {

            /* @type {Object} */
            var struct = null;

            struct = new Object();
            struct.from = 'Right';
            struct.fade = true;
            struct.complete = a;

            window.app.hideApplicationDisplayContainer(struct);

            return;
        }

        /* @type {pcf.DisplayContainer} */
        var splashDisplayContainer = null;
        /* @type {pcf.Palette} */
        var palette = null;
        splashDisplayContainer = window.app.getSplashDisplayContainer();

        palette = splashDisplayContainer.addPalette(2);
        palette.addCard(new pcf.Card('<div class="splash">1</div>'), 0);
        palette.addCard(new pcf.Card('<div class="splash">2</div>'), 0);
        palette.addCard(new pcf.Card('<div class="splash">3</div>'), 0);
        palette.addCard(new pcf.Card('<div class="splash">4</div>'), 1);
        palette.addCard(new pcf.Card('<div class="splash">5</div>'), 1);
        palette.addCard(new pcf.Card('<div class="splash">6</div>'), 1);

        var count = 0;

        function showCard() {

            ++count;

            if(count > 6) count = 1;

            window.app.getSplashDisplayContainer().getCurrentPalette().showCard(count, shown);

            setTimeout(showCard, 2000);

            return;
        }

        function shown(palette, card) {

            log(card.getCardRootElement().getDimensions(palette.getElement()));

            return;
        }



        /*

        .stretchPageHeader .left,
        .stretchPageHeader .center,
        .stretchPageHeader .right {
            position: absolute;
            overflow: hidden;
            top: 7px;
            bottom: 7px;
            height: 32px;
        }

        .stretchPageHeader .left,
        .stretchPageHeader .right {
            width: 32px;
        }

        .stretchPageHeader .left {
            left: 2px;
        }

        .stretchPageHeader .right {
            right: 2px;
        }

        .stretchPageHeader .center {
            left: 38px;
            right: 38px;
            font-size: 18px;
        }
        */

		<!--
        <div class="left">
			<div class="backButton">
				<span class="buttonText">Back</span><span></span>
			</div>
        </div>
        <div class="center">
            <table cellpadding="0" cellspacing="0" width="100%" height="100%">
                <tr><td align="center" width="100%"><div>Chores In An App</div></td></tr>
            </table>
        </div>
        <div class="right"></div>
        -->


	<div class="stretchPageHeader">
		<table cellpadding="0" cellspacing="0" width="100%" height="100%">
			<tr height="100%">
				<td width="1%">
					<a href="javascript:void(back());">
					<div class="left">
						<div class="backButton">
							<span class="buttonText">Back</span><span></span>
						</div>
					</div>
					</a>
				</td>
				<td align="center" width="98%"><div>Chores In An App</div></td>
				<td width="1%">
					<div class="right" onclick="forward();">
						<div class="forwardButton">
							<span class="buttonText">Next</span><span></span>
						</div>
					</div>
				</td>
			</tr>
		</table>
	</div>



.titleBar .left {
    padding-top: 2px;
    padding-left: 10px;
}

.titleBar .right {
    padding-top: 2px;
    padding-right: 10px;
}

.titleBar .center {
    position: relative;
    overflow: hidden;
    width: 90%;
    max-width: 300px;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-shadow: 0px 1px 0px #e4ccb3;
    font-size: 28px;
    font-family: Cooper Black;
    font-style: italic;
}

.titleBar {
    top: 0px;
    background-color: #877a6c;
    /*
    background-image: -webkit-linear-gradient(#877a6c, #ccb8a3);
    background-image: -moz-linear-gradient(#877a6c, #ccb8a3);
    background-image: -ms-linear-gradient(#877a6c, #ccb8a3);
    background-image: -o-linear-gradient(#877a6c, #ccb8a3);
    background-image: linear-gradient(#877a6c, #ccb8a3);
    */
}


	<div class="titleBar">
		<table cellpadding="0" cellspacing="0" width="100%" height="100%">
			<tr height="100%">
				<td width="1%"><div class="left"></div></td>
				<td align="center" width="98%"><div class="center">Chores</div></td>
				<td width="1%"><div class="right"></div></td>
			</tr>
		</table>
	</div>

    .shadowText {
        position: absolute;
        left: 150px;
        top: 10px;
        width: 300px;
        font-family: Cooper Black;
        font-size: 30px;
        font-style: italic;
        color: #ccb8a3;
        opacity: 0.5;
    }


    .pageHeading {
        position: relative;
        margin: 0px 10px 10px 10px;
        height: 36px;
        border: 1px solid #4D3F2F;
        -webkit-border-radius: 20px;
        -moz-border-radius: 20px;
        -ms-border-radius: 20px;
        -o-border-radius: 20px;
        border-radius: 20px;
        background: #877a6c;
        background-image: -webkit-gradient(linear,left top,left bottom,from(#ccb8a3),to(#877a6c));
        background-image: -webkit-linear-gradient(#ccb8a3,#877a6c);
        background-image: -moz-linear-gradient(#ccb8a3,#877a6c);
        background-image: -ms-linear-gradient(#ccb8a3,#877a6c);
        background-image: -o-linear-gradient(#ccb8a3,#877a6c);
        background-image: linear-gradient(#ccb8a3,#877a6c);
        font-size: 18px;
        font-weight: bold;
        text-align: center;
    }

    .pageHeading div {
        position: relative;
        top: 7px;
    }



    &ndash;		minusButton
    &#x2716;	cross
    &#x2714;	tick


	Households			+

	6 Winking St


	Main Menu

	My Chores
	All Chores
	People
	Invite

	Incremental List Of Tasks

		* Create a page that loads with its own css and jQuery.

		* Put an appropriately configured root element on the page.

		* Create an Application class.

		* Create a RootElement class.

		* Implement the palette-card concept.

			* Create a DisplayContainer class.

				* Ensure that DisplayContainers can be interchanged with attractive showing and hiding.

			* Implement the Palette concept.

				* Support any number of rows and columns.

				* Ensure proper palette and card sizing.

				* Implement the ability to select a card to show. Use attractive 'scroll to card'.

				* Support the ability to drag palettes. Support 'snap to card' when dragging stops.

		* Create the TreePage class.

			* Implement an XML format for trees.

			* Get jronimo.xml.Element up and running.

			Chores In An App (in-an-app.com/chores)





			System.out.println("x: " + x);
