var popWin = null    // use this when referring to pop-up window
var winCount = 0
var winName = "popWin2"
function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
  var d_winLeft = 0  // default, pixels from screen left to window left
  var d_winTop = 0   // default, pixels from screen top to window top
  winName = "popWin2" + winCount++ //unique name for each pop-up window
   closePopWin()         // close any previously opened pop-up window
  if (openPopWin.arguments.length >= 4)  // any additional features? 
    winFeatures = "," + winFeatures
  else 
    winFeatures = "" 
  if (openPopWin.arguments.length == 6)  // location specified
    winFeatures += getLocation(winWidth, winHeight, winLeft, winTop)
  else
    winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop)
  popWin = window.open(winURL, winName, "width=" + winWidth 
           + ",height=" + winHeight + winFeatures)
  }
function closePopWin(){    // close pop-up window if it is open 
  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(popWin != null) if(!popWin.closed) popWin.close() 
  }
function getLocation(winWidth, winHeight, winLeft, winTop){
  return ""
  }

 // for Netscape 4+ and IE 4+
<!--
function getLocation(winWidth, winHeight, winLeft, winTop){
  var winLocation = ""
  if (winLeft < 0)
    winLeft = screen.width - winWidth + winLeft
  if (winTop < 0)
    winTop = screen.height - winHeight + winTop
  if (winTop == "cen")
    winTop = (screen.height - winHeight)/2 - 20
  if (winLeft == "cen")
    winLeft = (screen.width - winWidth)/2
  if (winLeft>0 & winTop>0)
    winLocation =  ",screenX=" + winLeft + ",left=" + winLeft	
                + ",screenY=" + winTop + ",top=" + winTop
  else
    winLocation = ""
  return winLocation
  }

/***********************************************
* Image Thumbnail Viewer II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Specify image paths and optional link (set link to "" for no link):
var dynimages=new Array()
dynimages[0]=["circus_time.gif", "http://www.quadsport.com/ct.htm"]
dynimages[1]=["giant_slide.gif", "http://www.quadsport.com/gs.htm"]
dynimages[2]=["giantslide_rollers.jpg", "http://www.quadsport.com/gs.htm"]
dynimages[3]=["giantslide_stairs.jpg", "http://www.quadsport.com/gs.htm"]
dynimages[4]=["giantslide_slide.jpg", "http://www.quadsport.com/gs.htm"]
dynimages[5]=["giantslide_assault.jpg", "http://www.quadsport.com/gs.htm"]
dynimages[6]=["giantslide_elevation.jpg", "http://www.quadsport.com/gs.htm"]
dynimages[7]=["bouncycastle_sideon.jpg", "http://www.quadsport.com/bc.htm"]
dynimages[8]=["bouncycastle_leftart.jpg", "http://www.quadsport.com/bc.htm"]
dynimages[9]=["bouncycastle_rightart.jpg", "http://www.quadsport.com/bc.htm"]
dynimages[10]=["mini_quads.gif", "http://www.quadsport.com/mq.htm"]
dynimages[11]=["circus_fun_slide.gif", "http://www.quadsport.com/cfs.htm"]
dynimages[12]=["circusslide_left.jpg", "http://www.quadsport.com/cfs.htm"]
dynimages[13]=["circusslide_right.jpg", "http://www.quadsport.com/cfs.htm"]
dynimages[14]=["splash.jpg", "http://www.quadsport.com/splash.htm"]
dynimages[15]=["splash2.jpg", "http://www.quadsport.com/splash.htm"]
dynimages[16]=["splash3.jpg", "http://www.quadsport.com/splash.htm"]
dynimages[17]=["splash4.jpg", "http://www.quadsport.com/splash.htm"]
dynimages[18]=["kc.jpg", "http://www.quadsport.com/kc.htm"]
dynimages[19]=["coco_inside.jpg", "http://www.quadsport.com/coco.htm"]
dynimages[20]=["coco_clown.jpg", "http://www.quadsport.com/coco.htm"]
dynimages[21]=["millennium_voyager.gif", "http://www.quadsport.com/lq.htm"]
dynimages[22]=["lazer_targetsguns.gif", "http://www.quadsport.com/lq.htm"]
dynimages[23]=["rodeo_bull.gif", "http://www.quadsport.com/rb.htm"]
dynimages[24]=["rodeobull_closeup.jpg", "http://www.quadsport.com/rb.htm"]
dynimages[25]=["bungee_runner.gif", "http://www.quadsport.com/br.htm"]
dynimages[26]=["equalizer.gif", "http://www.quadsport.com/eq.htm"]
dynimages[27]=["titans_challenge.jpg", "http://www.quadsport.com/tc.htm"]

//Preload images ("yes" or "no"):
var preloadimg="yes"

//Set optional link target to be added to all images with a link:
var optlinktarget=""

//Set image border width
var imgborderwidth=0

//Optionally, change 1.0 and 0.7 below to affect Wipe gradient size and duration in seconds in IE5.5+:
var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)"

///////No need to edit beyond here/////

if (preloadimg=="yes"){
for (x=0; x<dynimages.length; x++){
var myimage=new Image()
myimage.src=dynimages[x][0]
}
}

function returnimgcode(theimg, imgtype){
var imghtml=""
if (theimg[1]!="")
  {
  if (imgtype=="popup")
    {
    imghtml='<img src="'+theimg[0]+'" border="'+imgborderwidth+'" width="415" height="200">'
    }
  else
    {
    imghtml='<a href="'+theimg[1]+'" target="'+optlinktarget+'">'
    imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+'" width="207" height="103">'
    imghtml+='</a>'
    }
  }
return imghtml
}

function modifyimage(loadarea, imgindex, imgtype){
if (document.getElementById){
var imgobj=document.getElementById(loadarea)
if (imgobj.filters && window.createPopup){
imgobj.style.filter=filterstring
imgobj.filters[0].Apply()
}
imgobj.innerHTML=returnimgcode(dynimages[imgindex], imgtype)
if (imgobj.filters && window.createPopup)
imgobj.filters[0].Play()
return false
}
}
