// Jeff
// www.huntingground.freeserve.co.uk

// ********** User Defining Area **********

data=[
["images/Pyruvat-3000.jpg","Alt / Pyruvat 3000","product_info.php?products_id=182&osCsid=57a3014f5135f7141a8db4d1feebc307"],
["images/low-carb-high-protein-bar.jpg","Alt / Low carb protein","product_info.php?products_id=183&osCsid=30e63a25bf6acd8b9a27463f36920c33"],
["images/protein-80-plus.jpg","Alt / Protein 80 plus","product_info.php?products_id=181&osCsid=50fd1629fe5fe83b8b621b8f040bf67f"],
["images/PREMIUM-WHEY.jpg","Alt / Premium whey","product_info.php?products_id=185&osCsid=dbc54fc89c55b93475a6d67c5aa7d248"],
["images/celltech.jpg","Alt / Cell tech hardcore","product_info.php?cPath=21&products_id=201&osCsid=d66af152fb05ca483a83c7c402dbbdd8"],
["images/NOS-X-10_Orange.jpg","Alt / NOS X 10","product_info.php?products_id=191&osCsid=0dc1d219f48a5487a835b784ba088cff"],
["images/MEGA-MASS-2000-3-kg.jpg","Alt / Mega mass","product_info.php?products_id=193&osCsid=7344dfc454da22c01076e2a9b92d016e"],
["images/nano-vapor-150-caps.jpg","Alt / Nano vapor pro","product_info.php?cPath=21&products_id=231&osCsid=114b8648af6c7971a150ae3d32e93e79"],
["images/Max.-Krea-Genic-120Caps_-new.jpg","Alt / Maximum Krea Genic ","product_info.php?products_id=179&osCsid=1e9cc076fdaa5c898e6ea247eff2ea8e"],
["images/thermo_caps1.jpg","Alt / Thermo caps","product_info.php?cPath=9_11&products_id=144&osCsid=63705df85487ebb9dbb4c927a9498193"],
["images/45_l.jpg","Alt / L-carnitin liquide","product_info.php?products_id=134&osCsid=4b82a6cd7be93e446410c38f4bbcb321"],
["images/CLA_Capsules.jpg","Alt / CLA kapsule","product_info.php?products_id=109&osCsid=6c5f3f6773986eb5da268db523f5d4ed"],
["images/celltech.jpg","Alt /Cell tech ","product_info.php?cPath=21&products_id=201&osCsid=1e9cc076fdaa5c898e6ea247eff2ea8e"],
["images/64_l.jpg","Alt / MULTI VITA + B Complex","product_info.php?products_id=139&osCsid=8fd500449b6403494f4ee91fd231ae11"],
["images/62_l.jpg","Alt / Magnesium liquid","product_info.php?products_id=138&osCsid=709dc5bf4aa5684389e9e562f63cf9cf"],
["images/ACE.jpg","Alt / Nano vapor","product_info.php?cPath=21&products_id=205&osCsid=114b8648af6c7971a150ae3d32e93e79"],
["images/35_l.jpg","Alt / L-Carnitine 1500","product_info.php?cPath=9_10&products_id=106&osCsid=e4d297602ea822c485af87fe7a8f6290"],
["images/38_l.jpg","Alt / Power Gainer","product_info.php?products_id=107&osCsid=bb4656a5a6b67dcf868d09846c05ad26"],
["images/nitro_300407_519.jpg","Alt/ Nitro tech","product_info.php?cPath=21&products_id=202&osCsid=1e9cc076fdaa5c898e6ea247eff2ea8e"],
["images/cryotest_box.jpg","Alt / Cryotest","product_info.php?cPath=21&products_id=198&osCsid=1e9cc076fdaa5c898e6ea247eff2ea8e"],
["images/mass_bottle.jpg","Alt /MassTech ","product_info.php?cPath=21&products_id=199&osCsid=1e9cc076fdaa5c898e6ea247eff2ea8e"],
["images/nano-x9.jpg","Alt /naNOx9 ","product_info.php?cPath=21&products_id=204&osCsid=1e9cc076fdaa5c898e6ea247eff2ea8e"],
["images/syntha6.jpg","Alt / Syntha","product_info.php?cPath=22&products_id=209&osCsid=1e9cc076fdaa5c898e6ea247eff2ea8e"],
["images/cellbooster.jpg","Alt / Cell Booster","product_info.php?cPath=5&products_id=213&osCsid=1e9cc076fdaa5c898e6ea247eff2ea8e"],
["images/PB_lecitin_500g.jpg","Alt / Lecitin","product_info.php?cPath=6&products_id=116&osCsid=1e9cc076fdaa5c898e6ea247eff2ea8e"]           // no comma at end of last index
]

imgPlaces=7 // number of images visible
imgWidth=92 // width of the images
imgHeight=100 // height of the images
imgSpacer=0 // space between the images

dir=0 // 0 = left, 1 = right

newWindow=0 // 0 = Open a new window for links 0 = no  1 = yes

// ********** End User Defining Area **********

moz=document.getElementById&&!document.all

step=1
timer=""
speed=20
nextPic=0
initPos=new Array()
nowDivPos=new Array()

function initHIS3(){

for(var i=0;i<imgPlaces+1;i++){ // create image holders
newImg=document.createElement("IMG")
newImg.setAttribute("id","pic_"+i)
newImg.setAttribute("src","")
newImg.style.position="absolute"
newImg.style.width=imgWidth+"px"
newImg.style.height=imgHeight+"px"
newImg.style.border=0
newImg.alt=""
newImg.i=i
newImg.onclick=function(){his3Win(data[this.i][2])}
document.getElementById("display_area").appendChild(newImg)
}

containerEL=document.getElementById("his3container")
displayArea=document.getElementById("display_area")
pic0=document.getElementById("pic_0")

containerBorder=(document.compatMode=="CSS1Compat"?0:parseInt(containerEL.style.borderWidth)*2)
containerWidth=(imgPlaces*imgWidth)+((imgPlaces-1)*imgSpacer)
containerEL.style.width=containerWidth+(!moz?containerBorder:"")+"px"
containerEL.style.height=imgHeight+(!moz?containerBorder:"")+"px"

displayArea.style.width=containerWidth+"px"
displayArea.style.clip="rect(0,"+(containerWidth+"px")+","+(imgHeight+"px")+",0)"
displayArea.onmouseover=function(){stopHIS3()}
displayArea.onmouseout=function(){scrollHIS3()}

imgPos= -pic0.width

for(var i=0;i<imgPlaces+1;i++){
currentImage=document.getElementById("pic_"+i)

if(dir==0){imgPos+=pic0.width+imgSpacer} // if left

initPos[i]=imgPos
if(dir==0){currentImage.style.left=initPos[i]+"px"} // if left

if(dir==1){ // if right
document.getElementById("pic_"+[(imgPlaces-i)]).style.left=initPos[i]+"px"
imgPos+=pic0.width+imgSpacer
}

if(nextPic==data.length){nextPic=0}

currentImage.src=data[nextPic][0]
currentImage.alt=data[nextPic][1]
currentImage.i=nextPic
currentImage.onclick=function(){his3Win(data[this.i][2])}
nextPic++
}

scrollHIS3()
}

timer=""
function scrollHIS3(){
clearTimeout(timer)
for(var i=0;i<imgPlaces+1;i++){
currentImage=document.getElementById("pic_"+i)

nowDivPos[i]=parseInt(currentImage.style.left)

if(dir==0){nowDivPos[i]-=step}
if(dir==1){nowDivPos[i]+=step}

if(dir==0&&nowDivPos[i]<= -(pic0.width+imgSpacer) || dir==1&&nowDivPos[i]>containerWidth){

if(dir==0){currentImage.style.left=containerWidth+imgSpacer+"px"}
if(dir==1){currentImage.style.left= -pic0.width-(imgSpacer*2)+"px"}

if(nextPic>data.length-1){nextPic=0}

currentImage.src=data[nextPic][0]
currentImage.alt=data[nextPic][1]
currentImage.i=nextPic
currentImage.onclick=function(){his3Win(data[this.i][2])}

nextPic++

}
else{
currentImage.style.left=nowDivPos[i]+"px"
}

}
timer=setTimeout("scrollHIS3()",speed)

}

function stopHIS3(){
clearTimeout(timer)
}

function his3Win(loc){
if(loc==""){return}
if(newWindow==0){
location=loc
}
else{
//window.open(loc)
newin=window.open(loc,'win1','left=430,top=340,width=300,height=300') // use for specific size and positioned window
newin.focus()
}
}

// add onload="initHIS3()" to the opening BODY tag

// -->
