//   *********   Random **************

var btnImgArr = new Array(8);btnImgArr[0] = 'ctl5__ctl26_0';btnImgArr[1] = 'ctl5__ctl26_1';btnImgArr[2] = 'ctl5__ctl26_2';btnImgArr[3] = 'ctl5__ctl26_3';btnImgArr[4] = 'ctl5__ctl26_4';btnImgArr[5] = 'ctl5__ctl26_5';btnImgArr[6] = 'ctl5__ctl26_6';btnImgArr[7] = 'ctl5__ctl26_7'; 
var pause = false;var initialcnt = 0;var initialurl='';var urlArray = new Array(8);
var imgArray = new Array(8);
var textArray = new Array(8);
var salePriceArray = new Array(8);
var strikePriceArray = new Array(8);
var maxCounter = 7;var previousBtnImg;var counter = 0;
var timer =3000; 
var timer1 ;

imgArray[0] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_lucky-bamboo_3_sodalita.jpg';textArray[0] ='Azul da Cor do Mar';
strikePriceArray[0] ='';
salePriceArray[0] ='R$ 125,00';
urlArray[0] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=786&CategoryID=22';



imgArray[1] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_lucky-bamboo_3_sb.jpg';textArray[1] ='Tr&ecirc;s Desejos';
strikePriceArray[1] ='';
salePriceArray[1] ='R$ 117,00';
urlArray[1] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=787&CategoryID=22';



imgArray[2] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_lucky_bamboo_trio.jpg';textArray[2] ='Sa&uacute;de, Sorte e Paz';
strikePriceArray[2] ='';
salePriceArray[2] ='R$ 160,00';
urlArray[2] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=793&CategoryID=22';



imgArray[3] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_lucky-bamboo_cone.jpg';textArray[3] ='Enlace';
strikePriceArray[3] ='';
salePriceArray[3] ='R$ 123,00';
urlArray[3] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=788&CategoryID=22';



imgArray[4] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_lucky-bamboo_piram.jpg';textArray[4] ='Gis&eacute;';
strikePriceArray[4] ='';
salePriceArray[4] ='R$ 85,00';
urlArray[4] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=791&CategoryID=22';



imgArray[5] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_lucky-bamboo_7.jpg';textArray[5] ='Sorte Minha';
strikePriceArray[5] ='';
salePriceArray[5] ='R$ 165,00';
urlArray[5] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=790&CategoryID=22';



imgArray[6] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_lucky_bamboo_verm.jpg';textArray[6] ='Dual';
strikePriceArray[6] ='';
salePriceArray[6] ='R$ 128,00';
urlArray[6] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=795&CategoryID=22';



imgArray[7] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_lucky-bamboo_1_vpeq.jpg';textArray[7] ='Espiral Temporal';
strikePriceArray[7] ='';
salePriceArray[7] ='R$ 72,00';
urlArray[7] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=789&CategoryID=22';



var t;	var j = 0 	;	var p = 8;	var preLoad = new Array(); for (i = 0; i < p; i++)	{preLoad[i] = new Image();preLoad[i].src = imgArray[i];	}
function runSlideShow(){  if (pause){return;}  if (document.getElementById){ if(counter > maxCounter)counter = 0;
if(typeof(ChangeColor) == 'function'){ChangeColor(counter);}if (document.getElementById('ctl5__ctl26__productimage')!=null)if (document.getElementById('ctl5__ctl26__productname')!=null){if (initialcnt==0){   initialurl =document.getElementById('ctl5__ctl26__productdetails').href;var firstpos=initialurl.lastIndexOf('?');initialurl='';} initialcnt = 1 ;}{ document.getElementById('ctl5__ctl26__productname').href  = urlArray[counter]+initialurl;
 }document.getElementById('ctl5__ctl26__productimage').style.filter='blendTrans(duration=4)';if (document.getElementById('ctl5__ctl26__productname')!=null){ document.getElementById('ctl5__ctl26__productimage').style.filter='blendTrans(duration=crossFadeDuration)'; }if (document.getElementById('ctl5__ctl26__productname')!=null){ if(document.all)document.getElementById('ctl5__ctl26__productimage').filters.blendTrans.Apply() ;}}if (document.getElementById('ctl5__ctl26__productimage')!=null) {document.getElementById('ctl5__ctl26__productimage').src = preLoad[counter].src;}if (document.getElementById('ctl5__ctl26__productname')!=null){ document.getElementById('ctl5__ctl26__productname').innerHTML  = textArray[counter];
}if (document.getElementById('ctl5__ctl26__productsaleprice')!=null){ document.getElementById('ctl5__ctl26__productsaleprice').innerHTML  = salePriceArray[counter];
 }if (document.getElementById('ctl5__ctl26__productstrikeprice')!=null){ document.getElementById('ctl5__ctl26__productstrikeprice').innerHTML  = strikePriceArray[counter];
document.getElementById('ctl5__ctl26__productstrikeprice').href  = urlArray[counter]+initialurl;
 }if (document.getElementById('ctl5__ctl26__productsaleprice')!=null){ document.getElementById('ctl5__ctl26__productsaleprice').href  = urlArray[counter]+initialurl;
 }if (document.getElementById('ctl5__ctl26__productname')!=null)if (document.getElementById('ctl5__ctl26__productdetails')!=null){ document.getElementById('ctl5__ctl26__productdetails').href  = urlArray[counter]+initialurl;
 }if (document.getElementById('ctl5__ctl26__productbuybutton')!=null){ document.getElementById('ctl5__ctl26__productbuybutton').href  = urlArray[counter]+initialurl;
 }if (document.all){if (document.getElementById('ctl5__ctl26__productimage')!=null){document.getElementById('ctl5__ctl26__productimage').filters.blendTrans.Play();}} t = setTimeout('runSlideShow()',timer);
if (pause==false)counter++;
} t = setTimeout('runSlideShow()', timer);
function changeImage(){if(counter > maxCounter)counter = 0;
if(typeof(ChangeColor) == 'function'){ChangeColor(counter)};if (document.getElementById('ctl5__ctl26__productimage')!=null)if (document.getElementById('ctl5__ctl26__productname')!=null){if (initialcnt==0){   initialurl =document.getElementById('ctl5__ctl26__productdetails').href;var firstpos=initialurl.lastIndexOf('?');initialurl='';} initialcnt = 1 ;}{document.getElementById('ctl5__ctl26__productimage').src  = imgArray[counter] ;
}if (document.getElementById('ctl5__ctl26__productname')!=null){ document.getElementById('ctl5__ctl26__productname').innerHTML  = textArray[counter];
}if (document.getElementById('ctl5__ctl26__productsaleprice')!=null){ document.getElementById('ctl5__ctl26__productsaleprice').innerHTML  = salePriceArray[counter];
 }if (document.getElementById('ctl5__ctl26__productstrikeprice')!=null){ document.getElementById('ctl5__ctl26__productstrikeprice').innerHTML  = strikePriceArray[counter];
document.getElementById('ctl5__ctl26__productstrikeprice').href  = urlArray[counter];
 }if (document.getElementById('ctl5__ctl26__productsaleprice')!=null){ document.getElementById('ctl5__ctl26__productsaleprice').href  = urlArray[counter]+initialurl;
 }if (document.getElementById('ctl5__ctl26__productname')!=null){ document.getElementById('ctl5__ctl26__productname').href  = urlArray[counter]+initialurl;
 }if (document.getElementById('ctl5__ctl26__productdetails')!=null){ document.getElementById('ctl5__ctl26__productdetails').href  = urlArray[counter]+initialurl;
 }if (document.getElementById('ctl5__ctl26__productbuybutton')!=null){ document.getElementById('ctl5__ctl26__productbuybutton').href  = urlArray[counter]+initialurl;
 } if (pause==false) timer1 = window.setTimeout('changeImage()', timer);
if (pause==false)counter++;
}


function ChangeColor(index){for(i=0;i < btnImgArr.length; i++){if (document.getElementById(btnImgArr[i])!=null){if(i==index){var val = document.getElementById(btnImgArr[i]).src;var newstring = val.replace("_off","_on");document.getElementById(btnImgArr[i]).src = newstring;}else{var val = document.getElementById(btnImgArr[i]).src;var newstring = val.replace("_on","_off");document.getElementById(btnImgArr[i]).src = newstring;}}}}
												



