/*
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

	--------------------------------------------------------------------
	
	Simple banner rotator. Version: 1.2.0
	Download, support, contact: http://www.spyka.net 
	(c) Copyright 2009 spyka Web Group
*/

/* 
	For full documentation:  http://www.spyka.net/docs/simple-banner-rotator
	For support:			 http://www.spyka.net/forums
*/

//								EDIT FROM HERE
///////////////////////////////////////////////////////////////////////////////////
//         						Program options


// if 1 (one), 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 one
var img_width	= 468;
var img_height	= 60;

// time between refreshs of ad locations, to disable refreshs set to 0. In milliseconds, 1000 = 1 second
var refresh_time = 60000;
// maximum amount of refreshs, good to set if a user may be on a page for a long period of time.
var refresh_max = 10;

// if you do not want the same banners to display on the same page then set this to 0, else set it to 1.
// this option is only used if you have put the show_banners() javascript code more than once into a page
var duplicate_banners = 0;


// ignore/skip this line 
var banners = new Array();

// banner list syntax: banners[x] = new banner(website_name, website_url, banner_url, show_until_date);  DATE FORMAT: dd/mm/yyyy
// be sure to increase x by 1 for each banner added!
// to make sure a banner is always rotating, just set the date far into the future, i.e. year 3000
banners[0] = new banner('Free Sites', 'http://www.vigrxplus.com/clicks/clickthrough.html?a=gcsenadenos&b=1960', 'http://www2.sellhealth.com/2/vigrx_plus_004_468x60.jpg', '10/04/2019');
banners[1] = new banner('Free Sites', 'http://www.vigrxplus.com/clicks/clickthrough.html?a=gcsenadenos&b=1959', 'http://www2.sellhealth.com/2/vigrx_plus_003_468x60.gif', '10/04/2019');
banners[2] = new banner('Free Sites', 'http://www.VigRX.com/clicks/clickthrough.html?a=gcsenadenos&b=1307', 'http://www2.sellhealth.com/2/vigrx_101_468x60.gif', '10/04/2019');
banners[3] = new banner('Free Sites', 'http://www.VigRX.com/clicks/clickthrough.html?a=gcsenadenos&b=1297', 'http://www2.sellhealth.com/2/vigrx_091_468x60.gif', '10/04/2019');
banners[4] = new banner('Free Sites', 'http://www.VigRX.com/clicks/clickthrough.html?a=gcsenadenos&b=1291', 'http://www2.sellhealth.com/2/vigrx_085_468x60.gif', '10/04/2019');
banners[5] = new banner('Free Sites', 'http://www.VigRX.com/clicks/clickthrough.html?a=gcsenadenos&b=167', 'http://www2.sellhealth.com/2/vigpillhorizontal10.gif', '10/04/2019');
banners[6] = new banner('Free Sites', 'http://www.VigRX.com/clicks/clickthrough.html?a=gcsenadenos&b=175', 'http://www2.sellhealth.com/2/vigpillhorizontal18.gif', '10/04/2019');
banners[7] = new banner('Free Sites', 'http://www.VigRX.com/clicks/clickthrough.html?a=gcsenadenos&b=166', 'http://www2.sellhealth.com/2/vigpillhorizontal1.gif', '10/04/2019');
banners[8] = new banner('Free Sites', 'http://www.VigRX.com/clicks/clickthrough.html?a=gcsenadenos&b=1310', 'http://www2.sellhealth.com/2/vigrx_104_468x60.gif', '10/04/2019');
banners[9] = new banner('Free Sites', 'http://www.buyvprx.com/clicks/clickthrough.html?a=gcsenadenos&b=1449', 'http://www2.sellhealth.com/2/vprx_02_728x90.gif', '10/04/2019');
banners[10] = new banner('Free Sites', 'http://www.NexusPheromones.com/clicks/clickthrough.html?a=gcsenadenos&b=80', 'http://www2.sellhealth.com/2/pheromonehorizontal6.gif', '10/04/2019');
banners[11] = new banner('Free Sites', 'http://www.NexusPheromones.com/clicks/clickthrough.html?a=gcsenadenos&b=78', 'http://www2.sellhealth.com/2/pheromonehorizontal4.gif', '10/04/2019');
banners[12] = new banner('Free Sites', 'http://www.NexusPheromones.com/clicks/clickthrough.html?a=gcsenadenos&b=76', 'http://www2.sellhealth.com/2/pheromonehorizontal2.gif', '10/04/2019');
banners[13] = new banner('Free Sites', 'http://www.maxiderm.com/clicks/clickthrough.html?a=gcsenadenos&b=584', 'http://www2.sellhealth.com/2/md_horizontal08.gif', '10/04/2019');
banners[14] = new banner('Free Sites', 'http://nats.ivanafukalot.com/track/MTI0NDQ6NTo4/', 'http://www.destroyerart.net/a1teensban.JPG', '10/04/2019');
banners[15] = new banner('Free Sites', 'http://join.18onlygirls.com/track/MTI0NDQ6NToyNA/', 'http://tinycandid.com/banners/ban05.jpg', '10/04/2019');
banners[16] = new banner('Free Sites', 'http://nats.virginoff.com/track/MTI0NDQ6NToxOQ/', 'http://baners.pr-models.com/vlolitz/468x60/kamilla/22.gif', '10/04/2019');
banners[17] = new banner('Free Sites', 'http://nats.thespermlover.com/track/MTI0NDQ6NToxNQ/', 'http://teenskirts.info/ts2.jpg', '10/04/2019');
banners[18] = new banner('Free Sites', 'http://nats.sashafucksdasha.com/track/MTI0NDQ6NToxNg/', 'http://streetvoyeur.net/sban.jpg', '10/04/2019');
banners[19] = new banner('Free Sites', 'http://nats.mashaworld.com/track/MTI0NDQ6NTo1/', 'http://www.modelmania4u.com/aab4.gif', '10/04/2019');
banners[20] = new banner('Free Sites', 'http://nats.policeman.net/track/MTI0NDQ6NTo3/', 'http://www.nude-teenz.net/banner.jpg', '30/04/2019');
banners[21] = new banner('Free Sites', 'http://nats.kamilla18.com/track/MTI0NDQ6NToxNA/', 'http://pretty-portal.net/468-60.jpg', '30/04/2019');
banners[22] = new banner('Free Sites', 'http://nats.laythekat.com/track/MTI0NDQ6NToxNw/', 'http://freepornoerotica.com/rep.jpg', '30/04/2019');
banners[23] = new banner('Free Sites', 'http://join.youngporn.net/track/MTI0NDQ6NToyNQ/', 'http://www.sashamodel.net/banner.jpg', '30/04/2019');
banners[24] = new banner('Free Sites', 'http://nats.sashablonde.com/track/MTI0NDQ6NToyNg/', 'http://www.youngandfungirls.com/468.gif', '30/04/2019');
banners[25] = new banner('Free Sites', 'http://nats.natashashy.com/track/MTI0NDQ6NToyNw/', 'http://www.grandefratello.cc/grand.gif', '30/04/2019');
banners[26] = new banner('Free Sites', 'http://nats.alicewonderbang.com/track/MTI0NDQ6NToyOQ/', 'http://www.exclusive-pretens.net/ban/1.jpg', '30/04/2019');
banners[27] = new banner('Free Sites', 'http://nats.best18girls.com/track/MTI0NDQ6NToyOA/', 'http://tinycandid.com/banners/ban25.jpg', '30/04/2019');
banners[28] = new banner('Free Sites', 'http://www.FriendlyDuck.com/AF_TA/rel/index.cfm?RST=UNXCOM&TAD=405821', 'http://m.FriendlyDuck.com/AF_TA/MediaServer/Media/D4BEC3CC-BCDD-D261-0CCC2A4B906E86D3.gif', '30/04/2019');
banners[29] = new banner('Free Sites', 'http://www.FriendlyDuck.com/AF_TA/rel/index.cfm?RST=UNXCOM&TAD=406063', 'http://m.FriendlyDuck.com/AF_TA/MediaServer/Media/027811DB-BCDD-D261-0B86DD5BCE8BF857.gif', '30/04/2019');
banners[30] = new banner('Free Sites', 'http://www.FriendlyDuck.com/AF_TA/rel/index.cfm?RST=UNXCOM&TAD=406064', 'http://m.FriendlyDuck.com/AF_TA/MediaServer/Media/32D24609-BCDD-D261-08CC249C72F184D9.gif', '30/04/2019');
banners[31] = new banner('Free Sites', 'http://www.FriendlyDuck.com/AF_TA/rel/index.cfm?RST=UNXCOM&TAD=406065', 'http://m.FriendlyDuck.com/AF_TA/MediaServer/Media/1806FE94-BCDD-D261-07380C47A4EF9489.gif', '30/04/2019');
banners[32] = new banner('Argen Teens', 'http://nudes.argen-teens.com/hit.php?s=113&p=5&w=106467&t=0&c=0&cs=0', 'http://cdn.newnudecash.com/banners/113/std002.jpg','30/04/2019');
banners[33] = new banner('FM-Tees', 'http://nudes.fm-teens.com/hit.php?s=108&p=5&w=106467&t=0&c=0&cs=0', 'http://cdn.newnudecash.com/banners/108/std025.jpg', '30/04/2019');
banners[34] = new banner('FM-Teens', 'http://nudes.fm-teens.com/hit.php?s=108&p=5&w=106467&t=0&c=0&cs=0', 'http://cdn.newnudecash.com/banners/108/std014.jpg','30/04/2019');
banners[35] = new banner('Nu Dolls', 'http://nudes.nudolls.com/hit.php?s=117&p=5&w=106467&t=0&c=0&cs=0', 'http://cdn.newnudecash.com/banners/117/std003.jpg', 
'30/04/2019');
banners[36] = new banner('Nude City', 'http://nudes.newnudecity.com/hit.php?s=4&p=5&w=106467&t=0&c=0&cs=0', 'http://cdn.newnudecash.com/banners/4/std005.jpg','30/04/2019');
banners[37] = new banner('New Nude Affiliates', 'http://newnudecash.com/ref.php?w=106467', 'http://cdn.newnudecash.com/banners/-1/std005.gif', '30/04/2019');
banners[38] = new banner('Carre Gallery', 'http://nudes.gallerycarre.com/hit.php?s=2&p=5&w=106467&t=0&c=0&cs=0', 'http://cdn.newnudecash.com/banners/2/std003.jpg', '30/04/2019');
banners[39] = new banner('Hegre Art', 'http://nudes.hegre-art.com/hit.php?s=1&p=5&w=106467&t=0&c=0&cs=0', 'http://cdn.newnudecash.com/banners/1/std031.jpg', '30/04/2019');
banners[40] = new banner('YoungBusty', 'http://click.payserve.com/ct?id=35918&bn=2311', 'http://banners.payserve.com/1/2311.gif?id=35918', '30/04/2019');
banners[41] = new banner('Glossy Angels', 'http://click.payserve.com/ct?id=35918&bn=2217', 'http://banners.payserve.com/1/2217.gif?id=35918', '30/04/2019');
banners[42] = new banner('SevenTeen', 'http://click.payserve.com/ct?id=35918&bn=4', 'http://banners.payserve.com/1/4.jpg?id=35918', '30/04/2019');
banners[43] = new banner('Club Seventeen', 'http://click.payserve.com/ct?id=35918&bn=709', 'http://banners.payserve.com/1/709.gif?id=35918', '30/04/2019');
banners[44] = new banner('', 'http://www.herbalaffiliateprogram.com/herbalsmokeshop/aff_manager/newaff/redirect.cfm/i/2004090715/LinkID/624', 'http://legalbuds.com/banners/468x60mj-legalbuds.gif', '30/04/2019');
banners[45] = new banner('', 'http://www.herbalaffiliateprogram.com/herbalsmokeshop/aff_manager/newaff/redirect.cfm/i/2004090715/LinkID/188', 'http://www.herbalsmokeshops.com/images/04banners/hss-purplegrey_468x60.gif', '30/04/2019');
banners[46] = new banner('', 'http://www.englishharbour.com/?c=17787&s=1421', 'http://www.casinocoins.com/show.php?c=17787&s=1421', '30/04/2019');
banners[47] = new banner('', 'http://www.superslots.com/?c=17787&s=806', 'http://www.casinocoins.com/show.php?c=17787&s=806', '30/04/2019');
banners[48] = new banner('', 'http://www.vipslots.com/?c=17787&s=1384', 'http://www.casinocoins.com/show.php?c=17787&s=1384', '30/04/2019');
banners[49] = new banner('', 'http://www.vigrxplus.com/clicks/clickthrough.html?a=gcsenadenos&b=1973', 'http://www2.leadingedgecash.com/2/vigrx_plus_203_468x80.gif', '30/04/2019');
banners[50] = new banner('', 'http://www.VigRX.com/clicks/clickthrough.html?a=gcsenadenos&b=1239', 'http://www2.leadingedgecash.com/2/vigrx_033_468x60.gif', '30/04/2019');
banners[51] = new banner('', 'http://www2.18magazine.com/track/MjEyOTo2OjMz/', 'http://www.sweetsexy18.com/banner.jpg', '30/04/2019');
banners[52] = new banner('', 'http://www2.4evermodels.com/track/MjEyOTo2OjYx/', 'http://www.little-princesses.com/princesses.jpg', '30/04/2019');
banners[53] = new banner('', 'http://www2.truetere.com/track/MjEyOTo2OjM/', 'http://fresh-n-sweet.com/banners/FnS-bann.jpg', '30/04/2019');
banners[54] = new banner('', 'http://www2.korriangel.com/track/MjEyOTo2OjU2/', 'http://www.teensnaked.us/img/banner-079.jpg', '30/04/2019');
banners[55] = new banner('', 'http://www2.jadedmercury.com/track/MjEyOTo2Ojcw/', 'http://2cute.flowerdreams.biz/banner.jpg', '30/04/2019');
banners[56] = new banner('', 'http://www2.cutekayla.com/track/MjEyOTo2OjQ2/', 'http://tinycandid.com/banners/ban05.jpg', '30/04/2019');
banners[57] = new banner('', 'http://www2.baileykline.com/track/MjEyOTo2Ojg3/', 'http://www.bluteens.com/banners/banner.jpg', '30/04/2019');
banners[58] = new banner('', 'http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=933252&PA=1934383&HTML=http://lillexy.com/tour/001/main.php', 'http://www.1porn.biz/1porn2.jpg', '30/04/2019');
banners[59] = new banner('', 'http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=933252&PA=1934383&HTML=http://www.lillaura.com/tour/001/main.php', 'http://nakedbeach.net/ban1.jpg', '30/04/2019');


//         				There is no need to edit below here
///////////////////////////////////////////////////////////////////////////////////

var used = 0;
var first_pass = 0;
var location_counter = 1;
var refresh_counter = 1;

function banner(name, url, image, date)
{
	this.name	= name;
	this.url	= url;
	this.image	= image;
	this.date	= date;
	this.active = 1;
}

function show_banners()
{
	var html = '<div id="adLocation-' + location_counter + '"></div>';
	document.write(html);
	display_banners(location_counter);
	location_counter++;
}

function display_banners(location)
{
	if(location == '' || !location || location < 0)
	{
		// no location given
		return;
	}
	
	var am	= banners.length;
	
	if((am == used) && duplicate_banners == 0) {
		// all banners have been used
		return;
	}

	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>';
	
	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]));
	
	if((now < end_date) && bn.active == 1) 
	{
		var location_element = document.getElementById('adLocation-' + location);
		
		if(location_element == null)
		{
			// ad location doesn't exist
			alert('spyka Webmaster banner rotator\nError: adLocation doesn\'t exist!');
		}
		else
		{
			location_element.innerHTML = html;
			
			if(duplicate_banners == 0)
			{
				bn.active = 0;
				used++;
			}
		}
	}
	else
	{
		display_banners(location);
	}
}

function refresh_banners()
{
	if((refresh_counter == refresh_max) || refresh_time < 1)
	{
		clearInterval(banner_refresh);  
	}
	used = 0;
	for(i = 0; i < banners.length; i++)
	{
		banners[i].active = 1;
	}
	for(i = 1; i < location_counter; i++)
	{
		display_banners(i);
	}
	refresh_counter++;
}
var banner_refresh = window.setInterval(refresh_banners, refresh_time);