tireToRandom = function(){}
tiresToRandomTop = new Array()
tiresToRandomBottom = new Array()

//to add new tires to arrays just increment n or m variable one more time before intializing array element

n=0
tiresToRandomTop[n] = new tireToRandom()
tiresToRandomTop[n].image = '/img/home_top_eagle_ventura_tcm1098-50933.gif'
tiresToRandomTop[n].title = 'EAGLE VENTURA'
tiresToRandomTop[n].description = 'Neumático deportivo que da el mejor desempeño en cualquier condición climática.'
tiresToRandomTop[n].link = '/LATireCatalog/action/subCategories?tiretype=2&locale=VE&header=inc_VE/tpl/hd-tirecat-auto.txt&footer=inc_VE/tpl/ft-tirecat-auto.txt'
tiresToRandomTop[n].target = '_top'

n++
tiresToRandomTop[n] = new tireToRandom()
tiresToRandomTop[n].image = '/img/home_random_assurance_tripletred_tcm1098-145418.jpg'
tiresToRandomTop[n].title = 'ASSURANCE TRIPLETRED'
tiresToRandomTop[n].description = 'Este neumático esta diseñado para aquellos conductores de vehículos que buscan tenerlo todo en un mismo producto.'
tiresToRandomTop[n].link = '/LATireCatalog/action/subCategories?tiretype=2&locale=VE&header=inc_VE/tpl/hd-tirecat-auto.txt&footer=inc_VE/tpl/ft-tirecat-auto.txt'
tiresToRandomTop[n].target = '_top'

n++
tiresToRandomTop[n] = new tireToRandom()
tiresToRandomTop[n].image = '/img/eagle_excellence_random_tcm1098-131253.jpg'
tiresToRandomTop[n].title = 'EAGLE EXCELLENCE'
tiresToRandomTop[n].description = 'Innovador neumático de alto desempeño, con un diseño asimétrico que ofrece mayor dirigibilidad al conductor.'
tiresToRandomTop[n].link = '/LATireCatalog/action/subCategories?tiretype=2&locale=VE&header=inc_VE/tpl/hd-tirecat-auto.txt&footer=inc_VE/tpl/ft-tirecat-auto.txt'
tiresToRandomTop[n].target = '_top'

n++
tiresToRandomTop[n] = new tireToRandom()
tiresToRandomTop[n].image = '/img/home_bottom_wrangler_mtr_tcm1098-50958.gif'
tiresToRandomTop[n].title = 'WRANGLER MTR'
tiresToRandomTop[n].description = 'Un magnifico neumático todo terreno concebido para hacer frente a todo tipo de obstáculos.'
tiresToRandomTop[n].link = '/LATireCatalog/action/subCategories?tiretype=4&locale=VE&header=inc_VE/tpl/hd-tirecat-lt.txt&footer=inc_VE/tpl/ft-tirecat-lt.txt'
tiresToRandomTop[n].target = '_top'


m=0
tiresToRandomBottom[m] = new tireToRandom()
tiresToRandomBottom[m].image = '/img/home_bottom_ForteraHL_tcm1098-75170.gif'
tiresToRandomBottom[m].title = 'FORTERA'
tiresToRandomBottom[m].description = 'Creado pensando en los exigentes conductores de vehículos SUV, quienes al volante de carros fabricados a partir de chasis de camioneta, recorren principalmente, las vías de la ciudad.'
tiresToRandomBottom[m].link = '/LATireCatalog/action/subCategories?tiretype=4&locale=VE&header=inc_VE/tpl/hd-tirecat-lt.txt&footer=inc_VE/tpl/ft-tirecat-lt.txt'
tiresToRandomBottom[m].target = '_bottom'

m++
tiresToRandomBottom[m] = new tireToRandom()
tiresToRandomBottom[m].image = '/img/home_random_wrangler_adventure_tcm1098-145415.jpg'
tiresToRandomBottom[m].title = 'WRANGLER ADVENTURE'
tiresToRandomBottom[m].description = 'Con tecnología Durawall es el neumático de Goodyear que resiste diferentes tipos de caminos, ideal para conductores de camioneta y pick-ups.'
tiresToRandomBottom[m].link = '/LATireCatalog/action/subCategories?tiretype=4&locale=VE&header=inc_VE/tpl/hd-tirecat-lt.txt&footer=inc_VE/tpl/ft-tirecat-lt.txt'
tiresToRandomBottom[m].target = '_bottom'

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)
