var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
		
function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}		

/*
Up down slideshow Script
By Dynamic Drive (www.dynamicdrive.com)
For full source code, terms of use, and 100's more scripts, visit http://www.dynamicdrive.com
*/

///////configure the below four variables to change the style of the slider///////
//set the scrollerwidth and scrollerheight to the width/height of the LARGEST image in your slideshow!
var scrollerwidth='300px'
var scrollerheight='410px'
//3000 miliseconds=3 seconds
var pausebetweenimages=2500

//configure the below variable to change the images used in the slideshow. If you wish the images to be clickable, simply wrap the images with the appropriate <a> tag
var slideimages=new Array()

slideimages[0]='<div align="center"><a style="cursor:hand" href="index.php?page=shopping&amp;action=viewproduct&amp;pid=10028"><img src="images/library/D1R_WSRG_300x300.png" border="0" title="Samurai D1R WSRG alloy wheels" onload="fixPNG(this)"></a><br><div style="background-color:#000; width:140px">Lenso&nbsp;D1R WSRG</div></div>'

slideimages[1]='<div align="center"><a style="cursor:hand" href="index.php?page=shopping&amp;action=viewproduct&amp;pid=10033"><img src="images/library/Miami_300x300.png" border="0" title="Lenso Miami alloy wheels" onload="fixPNG(this)"></a><br><div style="background-color:#000; width:140px">Lenso&nbsp;Miami</div></div>'

slideimages[2]='<div align="center"><a style="cursor:hand" href="index.php?page=shopping&amp;action=viewproduct&amp;pid=10226"><img src="images/library/ES7_300x300.png" border="0" title="Lenso ES7 alloy wheels" onload="fixPNG(this)"></a><br><div style="background-color:#000; width:140px">Lenso&nbsp;ES7</div></div>'

slideimages[3]='<div align="center"><a style="cursor:hand" href="index.php?page=shopping&amp;action=viewproduct&amp;pid=8364"><img src="images/library/Symphony_2_300x300.png" border="0" title="Axe Symphony 2 alloy wheels" onload="fixPNG(this)"></a><br><div style="background-color:#000; width:140px">Axe&nbsp;Symphony&nbsp;2</div></div>'

slideimages[4]='<div align="center"><a style="cursor:hand" href="index.php?page=shopping&amp;action=viewproduct&amp;pid=10218"><img src="images/library/Conquista_300x300.png" border="0" title="Lenso Conquista alloy wheels" onload="fixPNG(this)"></a><br><div style="background-color:#000; width:140px">Lenso&nbsp;Conquista</div></div>'

<!--slideimages[5]='<div align="center"><a style="cursor:hand" href="index.php?page=shopping&amp;action=viewproduct&amp;pid=8270"><img src="images/library/Riviera_HS_300x300.png" border="0" title="Devil Riviera HS" onload="fixPNG(this)"></a><br><div style="background-color:#000; width:140px">Devil&nbsp;Riviera&nbsp;HS</div></div>'-->

<!--slideimages[6]='<div align="center"><a style="cursor:hand" href="index.php?page=shopping&amp;action=viewproduct&amp;pid=8399"><img src="images/library/Concerto_BKI.png" border="0" title="Lenso Concerto alloy wheels" onload="fixPNG(this)"></a><br><div style="background-color:#000; width:140px">Lenso&nbsp;Concerto BKI</div></div>'-->

//extend this list

///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (slideimages.length>2)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=scrollerheight
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}
else{
tdiv2.style.top=scrollerheight
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll



