tireToRandom = function(){}
tiresToRandomTop = new Array()
tiresToRandomBottom = new Array()

n=0
tiresToRandomTop[n] = new tireToRandom()
tiresToRandomTop[n].image = '/img/img_destaque_excellence_tcm1093-50956.jpg'
tiresToRandomTop[n].title = 'Excellence'
tiresToRandomTop[n].description = 'Goodyear crea una línea de llantas con un exclusivo diseño asimétrico: dos diseños diferentes en el área de contacto con el suelo.'
tiresToRandomTop[n].link = '/tyres/auto/new_prods/new_prod1.html'
tiresToRandomTop[n].target = '_top'

n++
tiresToRandomTop[n] = new tireToRandom()
tiresToRandomTop[n].image = '/img/home_top_eaglef1_gsd3_tcm1093-50934.gif'
tiresToRandomTop[n].title = 'Eagle F1'
tiresToRandomTop[n].description = 'La Eagle F1 es la  llanta de Ultra Alto Desempeño diseñada para satisfacer las más altas necesidades de control y seguridad en altas velocidades.'
tiresToRandomTop[n].link = '/tyres/auto/new_prods/new_prod2.html'
tiresToRandomTop[n].target = '_top'

n++
tiresToRandomTop[n] = new tireToRandom()
tiresToRandomTop[n].image = '/img/duraplus_random_tcm1093-136009.jpg'
tiresToRandomTop[n].title = 'GPS Duraplus'
tiresToRandomTop[n].description = 'La llanta que te da exactamente lo que necesitas para manejar más kilómetros por más tiempo.'
tiresToRandomTop[n].link = '/tyres/auto/new_prods/new_prod3.html'
tiresToRandomTop[n].target = '_top'

m=0
tiresToRandomBottom[m] = new tireToRandom()
tiresToRandomBottom[m].image = '/img/home_bottom_wrangler_hp_tcm1093-50929.gif'
tiresToRandomBottom[m].title = 'Wrangler HP'
tiresToRandomBottom[m].description = 'La combinación del manejo de alto desempeño y capacidad de tracción en cualquier temporada, hacen de la Wrangler HP una excelente opción para el manejo dentro de carretera.'
tiresToRandomBottom[m].link = '/tyres/ult_lt/new_prods/new_prod1.html'
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)