
// 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	= 270;
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('Sportsbook', 'http://affiliates.commissionaccount.com/processing/clickthrgh.asp?btag=a_8496b_801', 'http://affiliates.commissionaccount.com/processing/impressions.asp?btag=a_8496b_801', '10/04/2020');
banners[1] = new banner('Pitbull Poker 20', 'http://www.pitbullpoker.com/poker/affiliate/entry2.do?referral=12626', 'http://www.pitbullpartners.com/banners/10000/%2420-250x250.gif', '30/04/2020');
banners[2] = new banner('Pitbull Poker 200', 'http://www.pitbullpoker.com/poker/affiliate/entry2.do?referral=12628', 'http://www.pitbullpartners.com/banners/10000/200porce-250x250.gif', '30/04/2020');
banners[3] = new banner('Pitbull Poker 10', 'http://www.pitbullpoker.com/poker/affiliate/entry2.do?referral=12631', 'http://www.pitbullpartners.com/banners/10000/%2410-250x250.gif', '30/04/2020');
banners[4] = new banner('Pitbull casino', 'http://www.pitbullcasino.com/entry2.do?referral=12629', 'http://www.pitbullpartners.com/banners/234638/%24500Free-250x250j.gif', '30/04/2020');
banners[5] = new banner('Pitbull casino 21', 'http://www.pitbullcasino.com/entry2.do?referral=12632', 'http://www.pitbullpartners.com/banners/234638/300porceBJB-250x250.gif', '30/04/2020');
banners[6] = new banner('Superbook', 'http://affiliates.commissionaccount.com/processing/clickthrgh.asp?btag=a_8496b_183', 'http://affiliates.commissionaccount.com/processing/impressions.asp?btag=a_8496b_183', '30/04/2020');
banners[7] = new banner('William Hill', 'http://serve.williamhillpoker.com/promoRedirect?member=Giridara&campaign=DEFAULT&channel=giridara1&zone=478017138&lp=14186242', 'http://serve.williamhillpoker.com/promoLoadDisplay?member=Giridara&campaign=DEFAULT&channel=giridara1&zone=478017138&lp=14186242', '30/04/2020');
banners[8] = new banner('William Hill 2', 'http://serve.williamhillpoker.com/promoRedirect?member=Giridara&campaign=DEFAULT&channel=giridara1&zone=222591147&lp=14186242', 'http://serve.williamhillpoker.com/promoLoadDisplay?member=Giridara&campaign=DEFAULT&channel=giridara1&zone=222591147&lp=14186242', '30/04/2020');
banners[9] = new banner('CD poker', 'http://serve.cdpoker.com/promoRedirect?member=Giridara&campaign=DEFAULT&channel=giridara1&zone=248438099&lp=13510136', 'http://serve.cdpoker.com/promoLoadDisplay?member=Giridara&campaign=DEFAULT&channel=giridara1&zone=248438099&lp=13510136', '30/04/2020');

///////////////////////////////////////////////////////////////////////////////////
//
//         						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();
}
