is1hArr=[

["../images/dealers/cwc-adriana.jpg","../images/dealers/cwc-adrianal.jpg"],
["../images/dealers/cwc-alejandra.jpg","../images/dealers/cwc-alejandral.jpg"],
["../images/dealers/cwc-anne.jpg","../images/dealers/cwc-annel.jpg"],
["../images/dealers/cwc-alondra.jpg","../images/dealers/cwc-alondra.jpg"],
["../images/dealers/cwc-amy.jpg","../images/dealers/cwc-amyl.jpg"],
["../images/dealers/cwc-blanca.jpg","../images/dealers/cwc-blancal.jpg"],
["../images/dealers/cwc-candy.jpg","../images/dealers/cwc-candyl.jpg"],
["../images/dealers/cwc-charlyn.jpg","../images/dealers/cwc-charlynl.jpg"],
["../images/dealers/cwc-daina.jpg","../images/dealers/cwc-dainal.jpg"],
["../images/dealers/cwc-andrea.jpg","../images/dealers/cwc-andrea.jpg"],
["../images/dealers/cwc-maybell.jpg","../images/dealers/cwc-maybelll.jpg"],
["../images/dealers/cwc-angel.jpg","../images/dealers/cwc-angel.jpg"],
["../images/dealers/cwc-priscilla.jpg","../images/dealers/cwc-priscillal.jpg"],
["../images/dealers/cwc-angelica.jpg","../images/dealers/cwc-angelica.jpg"],
["../images/dealers/cwc-angie.jpg","../images/dealers/cwc-angie.jpg"],
["../images/dealers/cwc-kimberly.jpg","../images/dealers/cwc-kimberlyl.jpg"],
["../images/dealers/cwc-barbara.jpg","../images/dealers/cwc-barbara.jpg"],
["../images/dealers/cwc-caro.jpg","../images/dealers/cwc-caro.jpg"],
["../images/dealers/cwc-carolinab.jpg","../images/dealers/cwc-carolinab.jpg"],
["../images/dealers/cwc-cindy.jpg","../images/dealers/cwc-cindy.jpg"],
["../images/dealers/cwc-clarita.jpg","../images/dealers/cwc-clarita.jpg"],
["../images/dealers/cwc-dayana.jpg","../images/dealers/cwc-dayana.jpg"],
["../images/dealers/cwc-ebley.jpg","../images/dealers/cwc-ebley.jpg"],
["../images/dealers/cwc-elena.jpg","../images/dealers/cwc-elena.jpg"],
["../images/dealers/cwc-elisa.jpg","../images/dealers/cwc-elisa.jpg"],
["../images/dealers/cwc-erica.jpg","../images/dealers/cwc-erica.jpg"],
["../images/dealers/cwc-eugenia.jpg","../images/dealers/cwc-eugenia.jpg"],
["../images/dealers/cwc-fabiola.jpg","../images/dealers/cwc-fabiola.jpg"],
["../images/dealers/cwc-fanny.jpg","../images/dealers/cwc-fanny.jpg"],
["../images/dealers/cwc-gabriela.jpg","../images/dealers/cwc-gabriela.jpg"],
["../images/dealers/cwc-giannina.jpg","../images/dealers/cwc-giannina.jpg"],
["../images/dealers/cwc-hazel.jpg","../images/dealers/cwc-hazel.jpg"],
["../images/dealers/cwc-isabel.jpg","../images/dealers/cwc-isabel.jpg"],
["../images/dealers/cwc-ivannia.jpg","../images/dealers/cwc-ivannia.jpg"],
["../images/dealers/cwc-jazmin.jpg","../images/dealers/cwc-jazmin.jpg"],
["../images/dealers/cwc-jeannette.jpg","../images/dealers/cwc-jeannette.jpg"],
["../images/dealers/cwc-jenifer.jpg","../images/dealers/cwc-jenifer.jpg"],
["../images/dealers/cwc-jessica.jpg","../images/dealers/cwc-jessica.jpg"],
["../images/dealers/cwc-johana.jpg","../images/dealers/cwc-johana.jpg"],
["../images/dealers/cwc-karla.jpg","../images/dealers/cwc-karla.jpg"],
["../images/dealers/cwc-karol.jpg","../images/dealers/cwc-karol.jpg"],
["../images/dealers/cwc-kianny.jpg","../images/dealers/cwc-kianny.jpg"],
["../images/dealers/cwc-kmile.jpg","../images/dealers/cwc-kmile.jpg"],
["../images/dealers/cwc-laura.jpg","../images/dealers/cwc-laura.jpg"],
["../images/dealers/cwc-lidianeth.jpg","../images/dealers/cwc-lidianeth.jpg"],
["../images/dealers/cwc-lliana.jpg","../images/dealers/cwc-lliana.jpg"],
["../images/dealers/cwc-luisa.jpg","../images/dealers/cwc-luisa.jpg"],
["../images/dealers/cwc-margelle.jpg","../images/dealers/cwc-margelle.jpg"],
["../images/dealers/cwc-maria.jpg","../images/dealers/cwc-maria.jpg"],
["../images/dealers/cwc-mariel.jpg","../images/dealers/cwc-mariel.jpg"],
["../images/dealers/cwc-mariela.jpg","../images/dealers/cwc-mariela.jpg"],
["../images/dealers/cwc-marielena.jpg","../images/dealers/cwc-marielena.jpg"],
["../images/dealers/cwc-mary.jpg","../images/dealers/cwc-mary.jpg"],
["../images/dealers/cwc-meli.jpg","../images/dealers/cwc-meli.jpg"],
["../images/dealers/cwc-melissa.jpg","../images/dealers/cwc-melissa.jpg"],
["../images/dealers/cwc-nicole.jpg","../images/dealers/cwc-nicole.jpg"],
["../images/dealers/cwc-nilray.jpg","../images/dealers/cwc-nilray.jpg"],
["../images/dealers/cwc-norma.jpg","../images/dealers/cwc-norma.jpg"],
["../images/dealers/cwc-rebeca.jpg","../images/dealers/cwc-rebeca.jpg"],
["../images/dealers/cwc-scarleth.jpg","../images/dealers/cwc-scarleth.jpg"],
["../images/dealers/cwc-shanon.jpg","../images/dealers/cwc-shanon.jpg"],
["../images/dealers/cwc-sharom.jpg","../images/dealers/cwc-sharom.jpg"],
["../images/dealers/cwc-sianny.jpg","../images/dealers/cwc-sianny.jpg"],
["../images/dealers/cwc-siney.jpg","../images/dealers/cwc-siney.jpg"],
["../images/dealers/cwc-sol.jpg","../images/dealers/cwc-sol.jpg"],
["../images/dealers/cwc-sophie.jpg","../images/dealers/cwc-sophie.jpg"],
["../images/dealers/cwc-steph.jpg","../images/dealers/cwc-steph.jpg"],
["../images/dealers/cwc-susan.jpg","../images/dealers/cwc-susan.jpg"],
["../images/dealers/cwc-tatiana.jpg","../images/dealers/cwc-tatiana.jpg"],
["../images/dealers/cwc-teresita.jpg","../images/dealers/cwc-teresita.jpg"],
["../images/dealers/cwc-vanessa.jpg","../images/dealers/cwc-vanessa.jpg"],
["../images/dealers/cwc-veronica.jpg","../images/dealers/cwc-veronica.jpg"],
["../images/dealers/cwc-yuni.jpg","../images/dealers/cwc-yuni.jpg"]

]

imageSize=60 // % size the image is shown at, if set to zero the fixed width and heights are used
fixedWidth=100 // set a fixed width
fixedHeight=100 // set a fixed height
spacerWidth=5 // space between images

autoWidth=0 // 0 = no, 1 = yes, sets the width to the widest image size

defaultSpeed=2 
maxSpeed=50

popupLeft= 100 // pixels
popupTop= 100 // pixels

totalWidth=0
displayWidth=0
displayHeight=0
speed=defaultSpeed

preload=[]

for(var i=0;i<is1hArr.length;i++){
preload[i]=[]

for(var j=0;j<is1hArr[i].length;j++){
preload[i][j]=new Image()
preload[i][j].src=is1hArr[i][j]
}

}

function initHS1(){
imgBox=document.getElementById("image_box")
imgNum=is1hArr.length

if(document.getElementById&&document.all&&document.compatMode!="CSS1Compat"){
ieBorder=parseInt(document.getElementById("inner_box").style.borderWidth)*2
}
else{
ieBorder=0
}

for(var i=0;i<imgNum;i++){ // set image size

newImg=document.createElement("IMG")
newImg.setAttribute("src",is1hArr[i][0])
newImg.setAttribute("id","pic"+i)
newImg.i=i
newImg.onclick=function(){getBigPic(this.i)}

newImg.onmouseover=function(){toggleOpac(this)}
newImg.onmouseout=function(){toggleOpac(this)}

if(imageSize!=0){ // use percentage size
newImg.style.width=preload[i][0].width/100*imageSize+"px"
newImg.style.height=preload[i][0].height/100*imageSize+"px"
}
else{ // use fixed size
newImg.style.width=fixedWidth+"px"
newImg.style.height=fixedHeight+"px"
}

imgBox.appendChild(newImg)

}

for(var i=0;i<imgNum;i++){
totalWidth+=(document.getElementById("pic"+i).offsetWidth)
document.getElementById("pic"+i).style.marginRight=spacerWidth+"px"

if(autoWidth==1){
if(document.getElementById("pic"+i).offsetWidth>displayWidth){
displayWidth=document.getElementById("pic"+i).offsetWidth
}

}
else{
displayWidth=parseInt(document.getElementById("inner_box").style.width)
}


if(document.getElementById("pic"+i).offsetHeight>displayHeight){
displayHeight=document.getElementById("pic"+i).offsetHeight
}

}

for(var i=0;i<imgNum;i++){ // vertically center images
document.getElementById("pic"+i).style.marginBottom=(displayHeight-document.getElementById("pic"+i).height)/2+"px"
}

totalWidth=totalWidth+(imgNum*spacerWidth)

imgHolderWidth=displayWidth+ieBorder
document.getElementById("outer_box").style.width=imgHolderWidth+"px"
document.getElementById("inner_box").style.width=imgHolderWidth+"px"
imgBox.style.width=totalWidth+"px"

imgHolderHeight=displayHeight+ieBorder
document.getElementById("inner_box").style.height=imgHolderHeight+"px" 
document.getElementById("inner_box").style.clip="rect(0,"+(imgHolderWidth+"px")+","+(imgHolderHeight+"px")+",0)"

}

leftTimer=""
function scrollHS1(n){

clearTimeout(leftTimer)
imgBoxPos=parseInt(imgBox.style.left)
if(n==1){
imgBoxPos-=speed
}
else{
imgBoxPos+=speed
}

imgBox.style.left=imgBoxPos+"px"
leftTimer=setTimeout("scrollHS1("+n+")",50)

if(n==1&&imgBoxPos< -(totalWidth-imgHolderWidth)+(spacerWidth-ieBorder)){
imgBox.style.left=-(totalWidth-imgHolderWidth)+spacerWidth-ieBorder+"px"
clearTimeout(leftTimer)
}

if(n==0&&imgBoxPos> 0-speed){
imgBox.style.left=0
clearTimeout(leftTimer)
}

}

function fast(){
speed=maxSpeed
}

function slow(){
speed=defaultSpeed
}

function pause(){
clearTimeout(leftTimer)
}


picWin=null

function getBigPic(p){
if(is1hArr[p]&&is1hArr[p]!=""){

bigImg=new Image()
bigImg.src=is1hArr[p][1]

data="\n<center>\n<img src='"+bigImg.src+"'>\n</center>\n"

if(picWin){picWin.close()} // if window exists close it

winProps = "left= "+popupLeft+", top = "+popupTop+", width="+(bigImg.width+20)+", height="+(bigImg.height+20)+", scrollbars=no, resizable=yes, status=no"

picWin=window.open("","win1",winProps)
picWin.document.write("<HTML>\n<HEAD>\n<TITLE><\/TITLE>\n")
picWin.document.write("<\/HEAD>\n")
picWin.document.write("<BODY style='background-color:black;margin-top:10px;margin-left:10px'>\n")
picWin.document.write("<div id=\"display\">"+data+"<\/div>")
picWin.document.write("\n<\/BODY>\n<\/HTML>")
picWin.document.close()
}
}

maxOpac=70
minOpac=100

function toggleOpac(obj){

if(obj.filters){

if(obj.filters.alpha.Opacity==minOpac){
obj.filters.alpha.Opacity=maxOpac}
else{obj.filters.alpha.Opacity=minOpac}

}
else{

if(obj.style.opacity == maxOpac/100){
obj.style.opacity = minOpac/100}
else{obj.style.opacity = maxOpac/100}

}

}

