// 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	= 468;
var img_height	= 60;

// 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('AwesomeStyles', 'http://www.awesomestyles.com', 'http://www.awesomestyles.com/images/aimg/728x90-1.gif', '30/04/2009');
//banners[1] = new banner('spyka.net Webmaster', 'http://www.spyka.net', 'http://spyka.net/images/88x31.jpg', '10/04/2009');

//banners[0] = new banner('joylandcasino.com', 'http://banner.joylandcasino.com/cgi-bin/redir.cgi?member=FRSfreetorrent&lang=fr', 'http://cachewww.cpays.com/markettool/new_tools/joyland/French/bnr/euro/10free/468x60/10fr468X60_1.gif', '28/02/2009');
//banners[1] = new banner('cdpoker.com', 'http://banner.cdpoker.com/cgi-bin/redir.cgi?member=FRSfreetorrent&lang=fr', 'http://cachewww.cpays.com/markettool/new_tools/cdpoker/French/bnr/euro/468x60/cdpfr46806.gif', '28/02/2009');

//banners[0] = new banner('joylandcasino.com', 'http://banner.joylandcasino.com/cgi-bin/redir.cgi?member=freetorrent&lang=fr', 'http://cachewww.cpays.com/markettool/new_tools/joyland/French/bnr/euro/10free/468x60/10fr468X60_1.gif', '28/02/2009');
//banners[1] = new banner('cdpoker.com', 'http://banner.32vegas.com/cgi-bin/redir.cgi?member=freetorrent&lang=fr', 'http://cachewww.cpays.com/markettool/new_tools/32vegas/French/bnr/euro/468x60/32vfr46811.gif', '28/02/2009');

//banners[0] = new banner('cotedazurpalace', 'http://banner.cotedazurpalace.com/cgi-bin/redir.cgi?member=freetorrent&profile=cot800fr07&lang=fr', 'http://banner.cotedazurpalace.com/cgi-bin/banner.cgi?member=freetorrent&profile=cot800fr07', '28/02/2009');
//banners[1] = new banner('cdpoker.com', 'http://banner.cdpoker.com/cgi-bin/redir.cgi?member=freetorrent&lang=fr', 'http://cachewww.cpays.com/markettool/new_tools/cdpoker/French/bnr/euro/468x60/cdpfr46806.gif', '28/02/2009');

//banners[0] = new banner('joylandcasino', 'http://banner.prestigecasino.com/cgi-bin/redir.cgi?member=freetorrent&profile=fsfrn000d5&lang=fr', 'http://banner.prestigecasino.com/cgi-bin/banner.cgi?member=freetorrent&profile=fsfrn000d5', '28/02/2009');
//banners[1] = new banner('joylandcasino', 'http://banner.prestigecasino.com/cgi-bin/redir.cgi?member=freetorrent&profile=fsfrn000d5&lang=fr', 'http://banner.prestigecasino.com/cgi-bin/banner.cgi?member=freetorrent&profile=fsfrn000d5', '28/02/2009');

//banners[0] = new banner('Le Net en France : blackout !', 'http://www.laquadrature.net/HADOPI', 'http://media.laquadrature.net/Quadrature_black-out_HADOPI_728x90px.gif', '30/04/2009');
//banners[1] = new banner('joylandcasino', 'http://banner.prestigecasino.com/cgi-bin/redir.cgi?member=freetorrent&profile=fsfrn000d5&lang=fr', 'http://banner.prestigecasino.com/cgi-bin/banner.cgi?member=freetorrent&profile=fsfrn000d5', '28/02/2009');

banners[0] = new banner('Euro Partner - casinotropez', 'http://banner.casinotropez.com/cgi-bin/redir.cgi?id=N&member=mumbly&profile=fmfr', 'http://banner.casinotropez.com/cgi-bin/banner.cgi?id=N&member=mumbly&profile=fmfr', '15/06/2009');
banners[1] = new banner('Euro partner - Tropez mobile', 'http://banner.casinotropez.com/cgi-bin/redir.cgi?id=N&member=mumbly&profile=468ctm1fr', 'http://banner.casinotropez.com/cgi-bin/banner.cgi?id=N&member=mumbly&profile=468ctm1fr&', '15/06/2009')

banners[2] = new banner('Euro Partner - tonyG poker', 'http://banner.tonygpoker.com/cgi-bin/redir.cgi?id=N&member=mumbly&profile=468frb', 'http://banner.tonygpoker.com/cgi-bin/banner.cgi?id=N&member=mumbly&profile=468frb', '15/06/2009');
banners[3] = new banner('Euro Partner - Tropez mobile', 'http://banner.casinotropez.com/cgi-bin/redir.cgi?id=N&member=mumbly&profile=468ctm1fr', 'http://banner.casinotropez.com/cgi-bin/banner.cgi?id=N&member=mumbly&profile=468ctm1fr&', '15/06/2009')

banners[4] = new banner('Euro Partner', 'http://adv.europartners.com/fr/index.php?mumbly', 'http://banner.casinotropez.com/cgi-bin/banner.cgi?id=N&member=mumbly&profile=ep468fr&lang=fr', '15/06/2009');
//banners[1] = new banner('Euro Partner - Tropez mobile', 'http://banner.casinotropez.com/cgi-bin/redir.cgi?id=N&member=mumbly&profile=468ctm1fr', 'http://banner.casinotropez.com/cgi-bin/banner.cgi?id=N&member=mumbly&profile=468ctm1fr&', '15/06/2009')




///////////////////////////////////////////////////////////////////////////////////
//
//         						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();
}
