//   *********   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_noel_rosas_vermelhas.jpg';textArray[0] ='Noel';
strikePriceArray[0] ='';
salePriceArray[0] ='R$ 99,00';
urlArray[0] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=1042&categoryID=31';



imgArray[1] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_rosas-importadas-natall.jpg';textArray[1] ='Doce Natal';
strikePriceArray[1] ='';
salePriceArray[1] ='R$ 110,00';
urlArray[1] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=1043&CategoryID=31';



imgArray[2] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_lillies_glassed.jpg';textArray[2] ='L&iacute;rios em Vidro';
strikePriceArray[2] ='';
salePriceArray[2] ='R$ 89,00';
urlArray[2] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=972&CategoryID=1';



imgArray[3] ='http://www.florencanto.com.br/ImagesCached/prd_images/random_importadas-chocolates.jpg';textArray[3] ='Rosas do Amanhecer';
strikePriceArray[3] ='';
salePriceArray[3] ='R$ 99,00';
urlArray[3] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=334&CategoryID=2';



imgArray[4] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_candel_lillies.jpg';textArray[4] ='Lillies';
strikePriceArray[4] ='';
salePriceArray[4] ='R$ 95,00';
urlArray[4] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=970&CategoryID=1';



imgArray[5] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_romantico_extreme.jpg';textArray[5] ='Rom&acirc;ntico Extremo';
strikePriceArray[5] ='';
salePriceArray[5] ='R$ 113,00';
urlArray[5] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=956&CategoryID=1';



imgArray[6] ='http://www.florencanto.com.br/ImagesCached/prd_images/Random_seated_down_bear.jpg';textArray[6] ='Eu te Amo';
strikePriceArray[6] ='';
salePriceArray[6] ='R$ 105,00';
urlArray[6] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=817&CategoryID=1';




imgArray[7] ='http://www.florencanto.com.br/ImagesCached/prd_images/RANDOM_rosas_e_canela.jpg';textArray[7] ='Rosas e Canela';
strikePriceArray[7] ='';
salePriceArray[7] ='R$ 145,00';
urlArray[7] = 'http://www.florencanto.com.br/Produto-detalhe.aspx?prd_id=974&CategoryID=2';



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;}}}}
												








