//---------------------------------------------------------------------------------------
//	Defining the Casino object
//	Populating Casino Object
//	This file centralizes the casino information
//
//	Script by Ernesto Ramirez
//---------------------------------------------------------------------------------------


//Show a random banner from pre-defined objects
//functions separated by banner size

function ShowRandomBanner125x125() {
	var randomindex = Math.floor(Math.random() * casinoindex);
	myCasino[randomindex].BannerAndText("small");
}

function ShowRandomBanner468x60() {
	var randomindex = Math.floor(Math.random() * casinoindex);
	myCasino[randomindex].BannerAndText("large");
}

//Show a text link and the promo text below it for a given casino
function HeaderAndText(objCasino){
	var mylink = "http://www.texasholdem-poker.org/cgi-bin/out.pl?" + objCasino.casinocode;
	line1 = "<p><a target=_blank href=\'" + mylink + "\'>" + objCasino.name + "</a>";
	line2 = "<br>" + objCasino.promotext + "</p>";
	document.write(line1, line2);
}





//********** Defining the Casino object ***********

function Casino(name,casinocode,promotext,affiliategroup,software, banners125x125,banners468x60){
	this.name = name;
	this.casinocode = casinocode;
	this.promotext = promotext;
	this.software = software;
	this.affiliategroup = affiliategroup;
	this.banners125x125 = banners125x125;
	this.banners468x60 = banners468x60;
	this.BannerAndText = BannerAndText;
}
// ***********************************************

// *********** Defining the BannerAndText() method ***********
function BannerAndText(bannersize){
if (bannersize == "small") {
	var randombannerindex = Math.floor(Math.random() * this.banners125x125.length);
	var mydimensions = " width=125 height=125 border=0";
	var mybanner = "http://www.texasholdem-poker.org/banners/125x125/" + this.banners125x125[randombannerindex];
	
} else {
	var randombannerindex = Math.floor(Math.random() * this.banners468x60.length);
	var mydimensions = " width=468 height=60 border=0";
	var mybanner = "http://www.texasholdem-poker.org/banners/468x60/" + this.banners468x60[randombannerindex];

}

var mylink = "http://www.texasholdem-poker.org/cgi-bin/out.pl?" + this.casinocode;

line1 = "<br><a target=_blank href=\'" + mylink + "\'>" + this.name + "</a>";
line2 = "<br><a target=_blank href=\'" + mylink + "\'><img src=\'" + mybanner + "\'" + mydimensions + " align=top vspace=6></a>";
line3 = "<p>" + this.promotext + "</p>"

document.write(line1,line2,line3);
}
// ***********************************************




//---------------------------------------------------------------------
//	Here we populate the "casino object"
//	Banners of different sizes are assigned as properties
//	NOTE: These are global variables to used by some functions in other scripts
//	DO NOT override their value (avoid these variable names in other scripts on this site)
//---------------------------------------------------------------------


myCasino = new Array();
var casinoindex = 0;  


//Poker Stars *************************************************************
myCasino[casinoindex]= new Casino();
myCasino[casinoindex].name = "Poker Stars";
myCasino[casinoindex].casinocode = "pokerstars";
myCasino[casinoindex].software = "Diamond";
myCasino[casinoindex].promotext = "100% First-Time Deposit Bonus.From now until the end of 2007, if you make your first-ever real money deposit, PokerStars will give you a 100% bonus up to $50. Use the bonus code 'First2007' to begin earning your extra cash.";
myCasino[casinoindex].banners125x125 = new Array("pokerstars125x125_01.gif","pokerstars125x125_02.gif");
myCasino[casinoindex].banners468x60 = new Array("pokerstars468x60_01.gif", "pokerstars468x60_06.gif", "pokerstars468x60_02.gif", "pokerstars468x60_03.gif", "pokerstars468x60_04.gif", "pokerstars468x60_05.gif");
myCasino[casinoindex++].affiliategroup = "";


//Absolute Poker *************************************************************
myCasino[casinoindex]= new Casino();
myCasino[casinoindex].name = "Absolute Poker";
myCasino[casinoindex].casinocode = "absolutepoker";
myCasino[casinoindex].software = "Proprietary";
myCasino[casinoindex].promotext = "Get up to $500 free by becoming a real money player and take part in the weekly $400,000 poker tournament!";
myCasino[casinoindex].banners125x125 = new Array("absolutepoker1.gif","absolutepoker2.gif","absolutepoker3.gif","absolutepoker1.gif","absolutepoker1.gif");
myCasino[casinoindex].banners468x60 = new Array("absolutepoker1.gif","absolutepoker2.gif","absolutepoker3.gif","absolutepoker4.gif","absolutepoker5.gif","absolutepoker1.gif");
myCasino[casinoindex++].affiliategroup = "";

//Full Tilt Poker *************************************************************
myCasino[casinoindex]= new Casino();
myCasino[casinoindex].name = "Full Tilt Poker";
myCasino[casinoindex].casinocode = "fulltiltpoker";
myCasino[casinoindex].software = "Proprietary";
myCasino[casinoindex].promotext = "Full Tilt Poker is now one of the largest online poker rooms, featuring professional players online at the tables and a huge 100% match up to $600.";
myCasino[casinoindex].banners125x125 = new Array("fulltilt1.gif","fulltilt1.gif","fulltilt1.gif");
myCasino[casinoindex].banners468x60 = new Array("fulltilt1.gif","fulltilt1.gif","fulltilt1.gif","fulltilt1.gif");
myCasino[casinoindex++].affiliategroup = "";



//-----------------------------------------------------------------------------------



