/*

    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	= 120;

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('Americas Taco Shop', 'http://www.americastacoshop.net', '/files/120x60americastacoshop.gif', '30/12/2019');

banners[1] = new banner('The Big Printing', 'http://www.thebigprinting.com', '/files/120x60TheBigPrinting2.gif', '30/12/2019');

banners[2] = new banner('BCBSAZ', 'http://www.azblue.com', '/files/120x60BCBS.gif', '30/12/2019');

banners[3] = new banner('Hotel Indego', 'http://www.scottsdalehiphotel.com', '/files/120x60Hotelindigo.gif', '30/12/2019');

banners[4] = new banner('Allstate Storage', 'http://www.allstateministorage.com', '/files/120x60AllstateSelfStorage.gif', '30/12/2019');

banners[5] = new banner('Munch a Lunch', 'http://www.one-community.us/pages/members-directory-item?r=VLR78LCTMI', '/files/120x60Munchalunch.gif', '30/12/2019');

banners[6] = new banner('Radisson Poco Diablo', 'http://www.radissonsedona.com', '/files/120x60RadissonPocoDiablo2.gif', '30/12/2019');

banners[7] = new banner('Site Mechanix', 'http://www.sitemechanix.com', '/files/120x60-SiteMech.gif', '30/12/2019');

banners[8] = new banner('Chandler Center 4 Arts', 'http://www.chandlercenter.org', '/files/120x60ChandlerCenter4Arts.gif', '30/12/2019');

banners[9] = new banner('Camelback Mazda', 'http://www.camelbackdifference.com', '/files/120x60_Mazda.jpg', '30/12/2019');

banners[10] = new banner('Camelback Subaru', 'http://www.subaruoncamelback.com', '/files/120x60_Subaru.jpg', '30/12/2019');

banners[11] = new banner('Camelback Volkswagen', 'http://www.camelbackdifference.com', '/files/120x60_VW.jpg', '30/12/2019');

banners[12] = new banner('Burland Jewelry', 'http://www.burlandjewelry.com', '/files/120x60BurlandJewelry.gif', '30/12/2019');

banners[13] = new banner('Arcadia Dermatology', 'http://www.arcadiadermatology.com', '/files/120x60ArcadiaDermatology.gif', '30/12/2019');

banners[14] = new banner('Understanding Women', 'http://www.DrSweeten.com', '/files/120x60UnderstandingWome.gif', '30/12/2019');

banners[15] = new banner('Phoenix Mercury', 'http://www.phoenixmercury.com', '/files/120x60PhoenixMercury.gif', '30/12/2019');

banners[16] = new banner('Cowdreamz', 'http://www.cowdreamz.com', '/files/120x60Cowdreamz[1].gif', '30/12/2019');

banners[17] = new banner('Magic Touch Air', 'http://www.magictouchair.com', '/files/120x60MagicTouchAir[1].gif', '30/12/2019');

banners[18] = new banner('Networking Phoenix', 'http://www.networkingphoenix.com', '/files/NetworkingPhoenix-Logo-with.gif', '30/12/2019');

banners[19] = new banner('Postal Max', 'http://www.postalmax.com', '/files/120x60postalmax.gif', '30/12/2019');

banners[20] = new banner('Schuster Printing', 'http://www.schustercompany.com', '/files/120x60SchusterPrinting.gif', '30/12/2019');

banners[21] = new banner('Tailwinds', 'http://www.Tailwindsaz.com', '/files/120x60TailwindsPetResort.gif', '30/12/2019');

banners[22] = new banner('Pock Landscaping', 'http://www.pocklandscapesolutions.com', '/files/120x60-Pock-Landscaping.gif', '30/12/2019');

banners[23] = new banner('Fairwinds Pet Memorial', 'http://www.fairwinds-forever.com', '/files/120x60Fairwinds-Pet-Memoria.gif', '30/12/2019');

banners[24] = new banner('Cabinets by C and W', 'http://www.cabinetsbycandf.com', '/files/120x60-Cabinets-by-C-and-F.gif', '30/12/2019');

banners[25] = new banner('Comerica Bank', 'http://www.comerica.com', '/files/120x60Comerica.gif', '30/12/2019');

banners[26] = new banner('Visiting Angels', 'http://www.visitingangels.com/AZ/', '/files/120x60VisitingAngels.gif', '30/12/2019');

banners[27] = new banner('Hospice of Arizona', 'http://www.americanhospice.com', '/files/120x60hospiceofarizona.gif', '30/12/2019');

banners[28] = new banner('Casalino Chiropractic', 'http://www.casalinochiropractic.com', '/files/120x60casalino.gif', '30/12/2019');

banners[29] = new banner('Zen Laser', 'http://www.zenlaser.com', '/files/120x60zenlaser.gif', '30/12/2019');

banners[30] = new banner('Five Star Ford', 'http://www.fivestarford.com', '/files/120x60fivestar.gif', '30/12/2019');

banners[31] = new banner('7th Street Consignment', 'http://www.7thstreetconsignmentgallery.com', '/files/120x607th-street.gif', '30/12/2019');

banners[32] = new banner('Senza Pelo Medspa', 'http://www.www.arizonaelectrolysis.com', '/files/120x60pelo.gif', '30/12/2019');

banners[33] = new banner('Weekends Only', 'http://www.weekendsonlyaz.com', '/files/120x60wof[1].gif', '30/12/2019');

banners[34] = new banner('Desperado Film Festival', 'http://www.desperadofilmfestival.com', '/files/120x60desperado.gif', '30/12/2019');

banners[35] = new banner('Arcadia Signs', 'http://www.arcadiasignarama.com', '/files/120x60arcadiasign.gif', '30/12/2019');

banners[36] = new banner('Subaru Superstore', 'http://www.shopsubaru.com', '/files/120x60subaru.gif', '30/12/2019');

banners[37] = new banner('State Farm', 'http://www.statefarm.com/careers', '/files/120x60statefarm.gif', '30/12/2019');

banners[38] = new banner('Hannahs Caramel Apples', 'http://www.hannahscaramelapples.com/?Click=40', '/files/120x60-hannahsapples.gif', '30/12/2019');

banners[39] = new banner('Kai-Zen', 'http://www.kai-zen.net', '/files/120x60kaizen.gif', '30/12/2019');

banners[40] = new banner('Send Out Cards', 'http://www.sendoutcards.com/laurab', '/files/120x60sendoutcards.gif', '30/12/2019');

banners[41] = new banner('Cruises Inc', 'http://sglenn.cruisesinc.com/travel/cruises/', '/files/120x60cruisesinc.gif', '30/12/2019');

banners[42] = new banner('Allstate', 'http://www.allstate.com', '/files/120x60allstate.gif', '30/12/2019');

banners[43] = new banner('Kodis Natural Pet Food', 'http://www.kodisnaturalpetfoods.com', '/files/120x60Kodi.gif', '30/12/2019');

banners[44] = new banner('Mg Boals and Associates', 'http://www.mgboals.com', '/files/120x60MGBoals.gif', '30/12/2019');

banners[45] = new banner('Taking Stock', 'http://www.takingstockresinv.com', '/files/120x60taking-stock.gif', '30/12/2019');

banners[46] = new banner('House Seats', 'http://az.houseseats.com', '/files/120x60houseseats.gif', '30/12/2019');

banners[47] = new banner('Molina Fine Jewelers', 'www.finejeweler.com', '/files/120x60molina.gif', '30/12/2019');

banners[48] = new banner('Odyssey Healthcare', 'http://www.odsyhealth.com', '/files/120x60odyssey.gif', '30/12/2019');

banners[49] = new banner('Clean and Fresh Cleaning', 'http://www.cleannfreshcleaning.com', '/files/120x60cleannfreash.gif', '30/12/2019');

banners[50] = new banner('Fiesta Inn', 'http://www.fiestainnresort.com', '/files/120x60fiestaresort.gif', '30/12/2019');

banners[51] = new banner('Dignity Memorial', 'http://www.sci-corp.com', '/files/120x60sci.gif', '30/12/2019');

banners[52] = new banner('Public Market', 'http://www.phoenixpublicmarket.com', '/files/120x60CommunityFoodConnections.gif', '30/12/2019');

banners[53] = new banner('United Parking Systems', 'http://www.unitedparkingsystems.com', '/files/120x60unitedparkingsystems.gif', '30/12/2019');

banners[54] = new banner('Nationwide Insurance', 'http://www.nationwide.com/kirkhobbs', '/files/120x60nationwide.gif', '30/12/2019');

banners[55] = new banner('Life Design Events', 'http://www.lifedesignevents.com', '/files/120x60lifedesign.gif', '30/12/2019');

banners[56] = new banner('Tyler Enstrom Mass Mutual', 'http://www.dollarhidefinancial.com', '/files/120x60massmutual.gif', '30/12/2019');

banners[57] = new banner('Judy Young Integra', 'http://www.integratelecom.com', '/files/120x60JudyYoung.gif', '30/12/2019');

banners[58] = new banner('Just Breathe', 'http://www.justbreathewellness.com/', '/files/120x60justbreathe.gif', '30/12/2019');

banners[59] = new banner('Kevings Cleaning Service', 'http://www.kevincleans.com', '/files/120x60kevinscleaning.gif', '30/12/2019');

banners[60] = new banner('Integrated Health', 'http://www.docberni.com', '/files/120x60IHA.gif', '30/12/2019');

banners[61] = new banner('Radisson Poco Diablo', 'http://www.radissonsedona.com', '/files/120x60pocodiablo.gif', '30/12/2019');

banners[62] = new banner('EmbroidMe', 'http://www.embroidme-phoenix.com', '/files/120x60EmbroidMe.gif', '30/12/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){return;}var am=banners.length;if((am==used)&&duplicate_banners==0){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){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);