// Flexible Image Slideshow- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use

var ultimateshow=new Array()

//ultimateshow[x]=["path to image", "OPTIONAL link for image", "OPTIONAL link target"]

//ultimateshow[0]=['/images/ad_headers/aerosport.jpg', 'http://www.aerosport.com', '_new']
ultimateshow[0]=['/admin/images/ad_headers/Good-Attorneys.jpg', 'http://www.goodattorneysatlaw.com/', '_new']
ultimateshow[1]=['/admin/images/ad_headers/air-sur.jpg', 'http://www.air-sur.com', '_new']
//ultimateshow[2]=['/admin/images/ad_headers/signature.jpg', 'http://www.signatureflight.com', '_new']
ultimateshow[2]=['/admin/images/ad_headers/tampa-jet-center.jpg', 'http://www.tampajet.com', '_new']
ultimateshow[3]=['/admin/images/ad_headers/hiller.jpg', 'http://www.hillergroup.com', '_new']
ultimateshow[4]=['/admin/images/ad_headers/flightline.jpg', 'http://www.flightlinegroup.com', '_new']
ultimateshow[5]=['/images/ad_headers/banyan-air.jpg', 'http://www.banyanair.com', '_new']
//ultimateshow[6]=['/admin/images/ad_headers/Naples-Jet-Center.gif', 'http://www.naplesjetcenter.com', '_new']
//ultimateshow[7]=['/admin/images/ad_headers/piper1-468x179.jpg', 'http://www.piper.com', '_new']
//ultimateshow[8]=['/admin/images/ad_headers/piper2-468x179.jpg', 'http://www.piper.com', '_new']
ultimateshow[6]=['/images/ad_headers/Ascent-WingsFATA.jpg', 'http://www.ascent1.com/', '_new']
ultimateshow[7]=['/admin/images/ad_headers/nl-allen-groupe.jpg', 'http://www.allengroupe.com', '_new']
//ultimateshow[8]=['/admin/images/ad_headers/conklin-decker.jpg', 'mailto:Nel@Conklindd.com', '']
ultimateshow[8]=['/admin/images/banner-robbins-equitas.jpg', 'http://www.floridalawyer.com/', '_new']
ultimateshow[9]=['/images/ad_headers/FATA-Web-Banner-June-2010.gif', 'http://www.mybravopoints.com ', '_new']
//ultimateshow[11]=['/images/ad_headers/aviation-law-new-FBO.jpg', 'http://www.richpa.net/', '_new']
ultimateshow[10]=['/images/ad_headers/SEBRing-Bannerv6.gif', 'http://www.sebring-airport.com', '_new']
ultimateshow[11]=['/images/ad_headers/jacksonville-aviation-authority.jpg', 'http://www.jaa.aero', '_new']
ultimateshow[12]=['/images/ad_headers/eastern-aviation-fuels.jpg', 'http://www.easternaviationfuels.com', '_new']

//configure the below 3 variables to set the dimension/background color of the slideshow

var slidewidth="468px" //set to width of LARGEST image in your slideshow
var slideheight="179px" //set to height of LARGEST iamge in your slideshow
var slidecycles="continous" //number of cycles before slideshow stops (ie: "2" or "continous")
var randomorder="yes" //randomize the order in which images are displayed? "yes" or "no"
var preloadimages="yes" //preload images? "yes" or "no"
var slidebgcolor='white'

//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=6000

////Do not edit pass this line////////////////

var ie=document.all
var dom=document.getElementById
var curcycle=0

if (preloadimages=="yes"){
for (i=0;i<ultimateshow.length;i++){
var cacheimage=new Image()
cacheimage.src=ultimateshow[i][0]
}
}

var currentslide=0

function randomize(targetarray){
ultimateshowCopy=new Array()
var the_one
var z=0
while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!="_selected!"){
ultimateshowCopy[z]=targetarray[the_one]
targetarray[the_one]="_selected!"
z++
}
}
}

if (randomorder=="yes")
randomize(ultimateshow)
else
ultimateshowCopy=ultimateshow

function rotateimages(){
curcycle=(currentslide==0)? curcycle+1 : curcycle
ultcontainer='<center>'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='<a href="'+ultimateshowCopy[currentslide][1]+'" target="'+ultimateshowCopy[currentslide][2]+'">'
ultcontainer+='<img src="'+ultimateshowCopy[currentslide][0]+'" border="0">'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='</a>'
ultcontainer+='</center>'
if (ie||dom)
crossrotateobj.innerHTML=ultcontainer
if (currentslide==ultimateshow.length-1) currentslide=0
else currentslide++
if (curcycle==parseInt(slidecycles) && currentslide==0)
return
setTimeout("rotateimages()",slidedelay)
}

if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')

function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : document.all.slidedom
rotateimages()
}

if (ie||dom)
window.onload=start_slider