<!-- Begin

/***********************************************************************
  Constants. The 4 Suits
***********************************************************************/
var  S = 0;
var  H = 1;
var  D = 2;
var  C = 3;

/*************************************************************************
   This array contains all the info regarding a given card.
*************************************************************************/
var  deck = new Array (	new card( C, "A"),
						new card( C, "K"),
						new card( C, "Q"),
						new card( C, "J"),

						new card( D, "A"),
						new card( D, "K"),
						new card( D, "Q"),
						new card( D, "J"),

						new card( H, "A"),
						new card( H, "K"),
						new card( H, "Q"),
						new card( H, "J"),

						new card( S, "A"),
						new card( S, "K"),
						new card( S, "Q"),
						new card( S, "J"),

						new card( C, "T"),
						new card( C, "9"),
						new card( C, "8"),
						new card( C, "7"),
						new card( C, "6"),
						new card( C, "5"),
						new card( C, "4"),
						new card( C, "3"),
						new card( C, "2"),

						new card( D, "T"),
						new card( D, "9"),
						new card( D, "8"),
						new card( D, "7"),
						new card( D, "6"),
						new card( D, "5"),
						new card( D, "4"),
						new card( D, "3"),
						new card( D, "2"),

						new card( H, "T"),
						new card( H, "9"),
						new card( H, "8"),
						new card( H, "7"),
						new card( H, "6"),
						new card( H, "5"),
						new card( H, "4"),
						new card( H, "3"),
						new card( H, "2"),

						new card( S, "T"),
						new card( S, "9"),
						new card( S, "8"),
						new card( S, "7"),
						new card( S, "6"),
						new card( S, "5"),
						new card( S, "4"),
						new card( S, "3"),
						new card( S, "2")
					 );


/*************************************************************************
 Following is the "constructor" for the card array. It creates a structure
 for each hand consisting of:
 	suit = The passed value (0->3)
	face = The ascii representation of the card.
	num  = The number of the card (0->12)
	hcp  = The high card points of the card (0->4)
	hand = The hand to which the card was dealt. Initially set to -1;
*************************************************************************/
function card( Xsuit, Xface)
	{
	this.suit = Xsuit;
	this.face = Xface;
	this.hand = -1;

	if (Xface == "A")
		{
		this.num = 0;
		this.hcp = 4;
		}
	else if (Xface == "K")
		{
		this.num = 1;
		this.hcp = 3;
		}
	else if (Xface == "Q")
		{
		this.num = 2;
		this.hcp = 2;
		}
	else if (Xface == "J")
		{
		this.num = 3;
		this.hcp = 1;
		}
	else if (Xface == "T")
		{
		this.num = 4;
		this.hcp = 0;
		}
	else
		{
		this.num = 14 - Xface;
		this.hcp = 0;
		}
	}
-->
