// 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 center_ad(name, url, image, date)
{
	this.name	= name;
	this.url	= url;
	this.image	= image;
	this.date	= date;
}

var center_ads = 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	= 0;
// desired height and width of images, only takes affect if above is = 1
var img_width	= 728;
var img_height	= 90;

// banner list syntax: banners[x] = new banner(website_name, website_url, website_image_url, show_until_date);  DATE FORMAT: dd/mm/yyyy
center_ads[0] = new center_ad('GameServers', 'http://www.gameservers.com/?ref=1634946', 'http://images.gameservers.com/image_1.gif?ref=1634946', '12/21/2012');
center_ads[1] = new center_ad('VelocityServers', 'http://www.velocity-servers.net/idevaffiliate/idevaffiliate.php?id=266_0_1_6', 'http://www.velocity-servers.net/idevaffiliate/banners/GameBanner.jpg', '12/21/2012');
center_ads[2] = new center_ad('1and1 Web Host', 'http://www.1and1.com/?affiliate_id=8437', 'http://www.1and1affiliate.com/uploads/pics/468x60_01.gif?aid=8437', '12/21/2012');

///////////////////////////////////////////////////////////////////////////////////
//
//         						END EDITS HERE
//
///////////////////////////////////////////////////////////////////////////////////

function show_center_ads()
{
	var am		= center_ads.length;
	var rand	= Math.floor(Math.random()*am);	
	var bn 		= center_ads[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_center_ads();
}

