tireToRandom = function(){}
tiresToRandomTop = new Array()
tiresToRandomBottom = new Array()

n=0
tiresToRandomTop[n] = new tireToRandom()
tiresToRandomTop[n].image = '/img/img_destaque_excellence_tcm1096-50956.jpg'
tiresToRandomTop[n].title = 'Excellence'
tiresToRandomTop[n].description = 'Goodyear Excellence usa la tecnología \’3 Zone\’ Tecnología para ofrecer seguridad superior, control y confort.'
tiresToRandomTop[n].link = '/LATireCatalog/action/subCategories?tiretype=2&locale=PE&header=inc_PE/tpl/hd-tirecat-auto.txt&footer=inc_PE/tpl/ft-tirecat-auto.txt'
tiresToRandomTop[n].target = '_top'

n++
tiresToRandomTop[n] = new tireToRandom()
tiresToRandomTop[n].image = '/img/home_top_eaglef1_gsd3_tcm1096-50934.gif'
tiresToRandomTop[n].title = 'Eagle F1 GSD3'
tiresToRandomTop[n].description = 'Goodyear liderango las llantas Ultra Alto Rendimiento. Fabricado en Europa. La experiencia aqui.'
tiresToRandomTop[n].link = '/LATireCatalog/action/subCategories?tiretype=2&locale=PE&header=inc_PE/tpl/hd-tirecat-auto.txt&footer=inc_PE/tpl/ft-tirecat-auto.txt'
tiresToRandomTop[n].target = '_top'

m=0
tiresToRandomBottom[m] = new tireToRandom()
tiresToRandomBottom[m].image = '/img/home_random_fortera_tripletred_tcm1096-183874.jpg'
tiresToRandomBottom[m].title = 'Fortera Tripletred'
tiresToRandomBottom[m].description = 'La Fortera Tripletred Edition de Goodyear es una llanta Premium de camioneta para usarla en carreteras en cualquier clima.'
tiresToRandomBottom[m].link = '/LATireCatalog/action/subCategories?tiretype=4&locale=PE&header=inc_PE/tpl/hd-tirecat-lt.txt&footer=inc_PE/tpl/ft-tirecat-lt.txt'
tiresToRandomBottom[m].target = '_top'

m++
tiresToRandomBottom[m] = new tireToRandom()
tiresToRandomBottom[m].image = '/img/home_bottom_wrangler_sra_tcm1096-50932.gif'
tiresToRandomBottom[m].title = 'Wrangler AT/S'
tiresToRandomBottom[m].description = 'El Wrangler AT/S es una llanta multipropósito capaz de manejarse en variados terrenos y aplicaciones.'
tiresToRandomBottom[m].link = '/LATireCatalog/action/subCategories?tiretype=4&locale=PE&header=inc_PE/tpl/hd-tirecat-lt.txt&footer=inc_PE/tpl/ft-tirecat-lt.txt'
tiresToRandomBottom[m].target = '_top'

m++
tiresToRandomBottom[m] = new tireToRandom()
tiresToRandomBottom[m].image = '/img/home_bottom_wrangler_rts_tcm1096-50930.gif'
tiresToRandomBottom[m].title = 'Wrangler RT'
tiresToRandomBottom[m].description = 'Tracción en todo terreno y silencioso en carretera.'
tiresToRandomBottom[n].link = '/LATireCatalog/action/subCategories?tiretype=4&locale=PE&header=inc_PE/tpl/hd-tirecat-lt.txt&footer=inc_PE/tpl/ft-tirecat-lt.txt'
tiresToRandomBottom[m].target = '_top'


homeRandomTire = ''
for(i=1;i<=1;i++){
	j = parseInt(Math.random()*2+1)
	randPos = (j==1)?'Top':'Bottom'
	maxRand = this['tiresToRandom'+randPos].length
	tireRanded = parseInt(Math.random()*maxRand)	
	//homeRandomTire +='<p>'+tireRanded+'</p>'
	homeRandomTire +='<a href="'+this['tiresToRandom'+randPos][tireRanded].link+'" class="item" target="'+this['tiresToRandom'+randPos][tireRanded].target+'">'
	homeRandomTire +='	<img src="'+this['tiresToRandom'+randPos][tireRanded].image+'" width="85" height="120" alt="'+this['tiresToRandom'+randPos][tireRanded].title+'" border="0">'
	homeRandomTire +='	<span class="title">'+this['tiresToRandom'+randPos][tireRanded].title+'</span>'
	homeRandomTire +=	this['tiresToRandom'+randPos][tireRanded].description
             	homeRandomTire +='</a> '
}
document.write(homeRandomTire)
