// Simple banner rotator
// (c) spyka Web Group 2008
// version info: 1.1.2
// Download & support: http://www.spyka.net
// Forums: http://www.spyka.net/forums
// Please keep this notice in place

function banner(name, url, image, date)
{
	this.name	= name;
	this.url	= url;
	this.image	= image;
	this.date	= date;
}

var banners = new Array();
///////////////////////////////////////////////////////////////////////////////////
//
//         						START EDITS HERE
//
///////////////////////////////////////////////////////////////////////////////////

// Full documentation & support: http://www.spyka.net/forums 

// if 1, all images will be resized to img_width and img_height, else images will display their correct size
var force_size	= 1;
// desired height and width of images, only takes affect if above is = 1
var img_width	= 300;
var img_height	= 250;

// banner list syntax: banners[x] = new banner(website_name, website_url, website_image_url, show_until_date);  DATE FORMAT: dd/mm/yyyy
banners[0] = new banner('Paradise Poker', 'http://partner.sbaffiliates.com/processing/clickthrgh.asp?btag=a_17120b_2618', 'http://partner.sbaffiliates.com/processing/impressions.asp?btag=a_17120b_2618', '10/04/2012');
banners[1] = new banner('Carbon Poker', 'http://www.carbonpoker.com/_0a13dee9deb12d0fe4b6002f06212308/1', 'http://creatives.pokercs.com/dealittwice/cp_dealittwice_250x250.gif', '30/04/2012');
banners[2] = new banner('William Hill', 'http://serve.williamhillpoker.com/promoRedirect?member=Giridara&campaign=DEFAULT&channel=giridara1&zone=222582361&lp=14186242', 'http://serve.williamhillpoker.com/promoLoadDisplay?member=Giridara&campaign=DEFAULT&channel=giridara1&zone=222582361&lp=14186242', '30/04/2012');
banners[3] = new banner('CD Poker', 'http://serve.cdpoker.com/promoRedirect?member=Giridara&campaign=DEFAULT&channel=giridara1&zone=248438100&lp=13510136', 'http://serve.cdpoker.com/promoLoadDisplay?member=Giridara&campaign=DEFAULT&channel=giridara1&zone=248438100&lp=13510136', '30/04/2012');
banners[4] = new banner('Cake Poker', 'http://cakepoker.com/?t=3963&Lang=en', 'http://cake.ckpnetwork.com/Server/Banner.ashx?i=015_300x250.gif&t=3963', '30/04/2012');
banners[5] = new banner('Walker Poker', 'http://www.walkerpoker.com/online-poker/10840', 'http://www.walkerpays.com/banners/walker_new250x250(4).gif', '30/04/2012');
banners[6] = new banner('Bet365 Poker', 'http://poker.bet365.com?affiliate=365_017658&oty=1&lng=1', 'http://images.bet365affiliates.com/Channel.aspx?CID=1524&LnkID=365_017658&oty=1&lng=1', '30/04/2012');
banners[7] = new banner('FullTilt Poker', 'http://www.fulltiltpoker.com/?key=MDAwMDgxMkYwMDAxQUZFRTIwRTA4MDgyMDAwMDAwMDE-', 'http://www.fulltiltpoker.com/images/com/en/content/affiliates/banners-sizes/mac-banners/300x250.gif', '30/04/2012');
banners[8] = new banner('Hollywood Poker', 'http://www.hollywoodpoker.com/affiliates/?affid=525218&trackerid=0&pmid=4', 'http://www.hollywoodaffiliates.com/ads/525218/0/hollywoodpoker-Default-300x250.gif', '30/04/2012');
banners[9] = new banner('Pacific Poker', 'http://www.pacificpoker.com/?sr=391836&flag=0000', 'http://marketing.888.com//PacificPoker/EN/Banners/32137-0-300x250_newbonus_pcp2_ana.gif', '30/04/2012');
banners[10] = new banner('Mansion Poker', 'http://banner.mansionpoker.com/cgi-bin/redir.cgi?Pokerallied', 'http://www.pokerallied.com/gambar/room_pic/mansion/300.gif', '30/04/2012');
banners[11] = new banner('Party Poker', 'http://www.partypoker.com/td/new_table/03983_UK_usd_PP_NewTable_LP.htm?wm=3104673', 'http://banners.partypartners.com/images/marketing-materials/partypoker/english/gif/300x250/SuperSignupBonus/300x250_gif_SuperBonus.gif', '30/04/2012');
banners[12] = new banner('RPM Poker', 'http://record.rpmpoker.com/_4Ywf16I95BiHXC9J0YwUIguoX25Ao5QE/1', 'http://banners.rpmaffiliates.com/instant_bonus/rpm_poker-instant_cash_50k_20k-300x300.gif', '30/04/2012');
banners[13] = new banner('ladbrokes Poker', 'http://www.ladbrokes.com/ast?action=go_asset&aff_id=31040&asset_id=3728', 'http://www.ladbrokes.com/ast?action=asset_req&imgonly=1&aff_id=31040&asset_id=3728', '30/04/2012');
banners[14] = new banner('sportsbook.com', 'http://affiliates.commissionaccount.com/processing/clickthrgh.asp?btag=a_8496b_111', 'http://affiliates.commissionaccount.com/processing/impressions.asp?btag=a_8496b_111', '30/04/2012');
banners[15] = new banner('playersonly', 'http://affiliates.commissionaccount.com/processing/clickthrgh.asp?btag=a_8496b_135', 'http://affiliates.commissionaccount.com/processing/impressions.asp?btag=a_8496b_135', '30/04/2012');
banners[16] = new banner('Titan Poker', 'http://banner.titanpoker.com/cgi-bin/redir.cgi?id=N&member=Giridara&profile=en250bt', 'http://banner.titanpoker.com/cgi-bin/banner.cgi?id=N&member=Giridara&profile=en250bt', '30/04/2012');
banners[17] = new banner('Aced Poker', 'http://www.aced.com/?tag=2876', 'http://www.aced.com/affiliates/banners/rakeback/300x250.gif', '30/04/2012');
///////////////////////////////////////////////////////////////////////////////////
//
//         						END EDITS HERE
//
///////////////////////////////////////////////////////////////////////////////////

function show_banners()
{
	var am		= banners.length;
	var rand	= Math.floor(Math.random()*am);	
	var bn 		= banners[rand];
	
	var image_size 	= (force_size == 1) ? ' width="' + img_width + '" height="' + img_height + '"' : '';
	var html 		= '<a href="' + bn.url + '" title="' + bn.name + '" target="_blank"><img border="0" src="' + bn.image + '"' + image_size + ' alt="' + bn.name+ '" /></a>';
	
	// get current date string
	var now		= new Date(); 
	
	var input	= bn.date;
	input		= input.split('/', 3);
	var end_date	= new Date();
	end_date		= end_date.setFullYear(parseFloat(input[2]), parseFloat(input[1]), parseFloat(input[0]));
	
	(now < end_date) ? document.write(html) : show_banners();
}
