//  izmotools.js created on April 4th , 2008 to run  the Featured/ Pre-Owned Vehicles Image with their Year, Make, Model to display on Home Page 
var izmo = {
	rotate: function(imgId, yearId, makeId, modelId, priceId) {
	this.currentRec = this.currentRec || 0 ; 
	//alert(this.currentRec);
	this.imageTag=document.getElementById(imgId);
	this.yearTag=document.getElementById(yearId);
	this.makeTag=document.getElementById(makeId);
	this.modelTag=document.getElementById(modelId);	
	this.priceTag=document.getElementById(priceId);		
	this.totRec = izmo.osbBean.length;
	this.setOneRec();
	},
	hide: function(imgId) {
	this.imageTag=document.getElementById(imgId);
	(this.imageTag)? (this.imageTag.visibility ='hidden') : '';
	},
	setOneRec : function() {
    this.currentRec = ( this.currentRec == this.totRec ) ? 0 : this.currentRec; 
	(this.imageTag)? ( this.imageTag.src = izmo.osbBean[this.currentRec].imag) :'118857.jpg';
	
	
	(this.yearTag)? (this.yearTag.innerHTML = izmo.osbBean[this.currentRec].year):'';
	(this.makeTag)? (this.makeTag.innerHTML = izmo.osbBean[this.currentRec].make):'';
	///alert(izmo.osbBean[this.currentRec].model);
	////////////////////////////////////////////////


	
	if(izmo.osbBean[this.currentRec].model == 'N/A')
	{
		(this.modelTag)? (this.modelTag.innerHTML = '') :'';
	}
	else
	{
	(this.modelTag)? (this.modelTag.innerHTML = izmo.osbBean[this.currentRec].model) :'';
	}

	////////////////////////////////////////
	if(izmo.osbBean[this.currentRec].year == 'N/A')
	{
		(this.yearTag)? (this.yearTag.innerHTML = '') :'';
	}
	else
	{
	(this.yearTag)? (this.yearTag.innerHTML = izmo.osbBean[this.currentRec].year) :'';
	}
	////////////////////////////////////////
	if(izmo.osbBean[this.currentRec].make == 'N/A')
	{
		(this.makeTag)? (this.makeTag.innerHTML = '') :'';
	}
	else
	{
	(this.makeTag)? (this.makeTag.innerHTML = izmo.osbBean[this.currentRec].make) :'';
	}
	////////////////////////////////////////
	if(izmo.osbBean[this.currentRec].price == 'N/A' || izmo.osbBean[this.currentRec].price == '-')
	{
		(this.priceTag)? (this.priceTag.innerHTML = '') :'';
	}
	else
	{
	(this.priceTag)? (this.priceTag.innerHTML = izmo.osbBean[this.currentRec].price) :'';
	//(this.priceTag)? (this.priceTag.innerHTML = '$'+izmo.osbBean[this.currentRec].price) :'';
	}
	//(this.priceTag)? (this.priceTag.innerHTML = izmo.osbBean[this.currentRec].price) :'';	
	this.currentRec++;	
	setTimeout("izmo.setOneRec()",5000);
	}	
} ;
izmo.osbBean=[];
	