// JavaScript Document
var banDelay = 10000; // display for 5.000 seconds each
var banners = {
banner1 : ['<a href="BWPTGetStrong.html"><img src="images/main.jpg" width="520" height="275" border="0" alt="Get Strong, Olympic Style DVD" /></a>'
,'<a href="semiprivate.html"><img src="images/main2.jpg" width="520" height="275" border="0" alt="BW-PT Specials" /></a>'
,'<a href="training.html"><img src="images/main1.jpg" width="520" height="275" border="0" alt="Personal Training" /></a>'
]
, banner2 : ['I have been working with BWPT for several years now.  What started for me as a trial run, to see if I even liked personal training, quickly turned into a routine and fitness regimen that I can\'t live without.  I have utilized BWPT for personal training as well as other fitness classes such as boot camps and Yoga.   I\'ve also utilized Brian Wright to support our Wellness program at work, which has been extremely successful.  Brian is a talented professional who is eager to share his knowledge and expertise with others. <span id="quoteauthor">Kelly T. Neiman</span>'
,'Things with Rhonda are going well.  I\'ve definitely seen improvements and progression and have enjoyed the workouts with her. <span id="quoteauthor">E. Derrick & Jen</span>'
,'I wanted to thank you for all your efforts over the last year to help me improve my strength and flexibility, and tailor workouts appropriate for me that will help me change my metabolism.  In the year since I started working with you, I\'m pleased to report that I\'ve lost 36 pounds!  In 9 months of working with you and changing my eating habits, I\'ve lost 36 pounds and I\'ve maintained this new weight level for the last 3 months.  I am hoping to lose another 10+ pounds, and I know you\'ll help me toward that goal. <span id="quoteauthor">Amy M. Nice</span>'
]
};

// Banner Rotator
// copyright 12th October 2009 by Stephen Chapman
// http://javascript.about.com
// permission to use this Javascript on your web page is granted
// provided that all of the code below in this script (including these
// comments) is used without any alteration
var banimg = []; for (x in banners) {for (var i=banners[x].length-1; i >= 0; i--) {var b = banners[x][i].match(/<img.+?src=['"](.*?)['"]/);if (b) banimg.push(b[1]);}} for (var i = banimg.length - 1; i >= 0; i--) {var h = new Image(); h.src = banimg[i];}
function randOrd(){return (Math.round(Math.random())-0.5); }
var banlist = [];function Ban(b) {this.loc = document.getElementById(b);this.ary = banners[b];this.ary.sort(randOrd);this.cnt = -1;banlist.push(this);}function rotateBan() {for (var j = banlist.length - 1; j >= 0; j--) {var max = banlist[j].ary.length;banlist[j].cnt++;if (banlist[j].cnt >= max) banlist[j].cnt = 0;banlist[j].loc.innerHTML = banlist[j].ary[banlist[j].cnt];}setTimeout(rotateBan,banDelay);} function startBanner() {for (x in banners) {if (document.getElementById(x)) new Ban(x);} rotateBan();} 

window.onload = startBanner;

