var intOfferNum = 1;
var intBikesOfferNum = 1;
var intPicsNum = 1;
// Rotates many offer in the first page of Alianthos
function CarOffersPreview()
{
	// 1. Get the Image of the Special Offer (first offer)
	var offerImg = document.getElementById('specialofferImage')
	
	// 2. Get the Info (second cell)
	var x=document.getElementById('specialofferTable').rows
	var y=x[1].cells
	
	if (intOfferNum == 0)
	{
	    y[0].innerHTML = "<font class='boldbody'><a href='cz_cars-prices.html'>VW Beetle Cabrio</a></font>"
		offerImg.src = "Images/offers/VWBeetleCabrio.jpg"
	}
	
	if (intOfferNum == 1)
	{
	    y[0].innerHTML = "<font class='boldbody'><a href='cz_cars-prices.html'>Renault Megane Cabrio</a></font>"
		offerImg.src = "Images/offers/RenaultMeganeCabrio.jpg"
	}
	
	if (intOfferNum == 2)
	{
	      y[0].innerHTML = "<font class='boldbody'><a href='cz_cars-prices.html'>Mercedes Vito</a></font>"
		offerImg.src = "Images/offers/MercedesVito.jpg"
	}
	if (intOfferNum == 3)
	{
	      y[0].innerHTML = "<font class='boldbody'><a href='cz_cars-prices.html'>VW Touran</a></font>"
		offerImg.src = "Images/offers/VWTouran.jpg"
	}
	if (intOfferNum == 4)
	{
	    	     y[0].innerHTML = "<font class='boldbody'><a href='cz_cars-prices.html'>Mercedes CLK Cabrio</a></font>"
		offerImg.src = "Images/offers/MercedesCLKCabrio.jpg"
	}
	
	intOfferNum = (intOfferNum + 1) % 5
	
	window.setTimeout('CarOffersPreview()', 1500)
}

function MainPicPreview()
{
	// 1. Get the Image of the Special Offer (first offer)
	var picImg = document.getElementById('main_pic')
	
	// 2. Get the Info (second cell)
	
	if (intPicsNum == 0)
	{
		picImg.src = "Images/FirstPage/FIRST_PAGE_CARS.jpg"
		
	}
	
	if (intPicsNum == 1)
	{
		picImg.src = "Images/FirstPage/FIRST_PAGE_BIKES.jpg"
	}
	
	intPicsNum = (intPicsNum + 1) % 2
	window.setTimeout('MainPicPreview()', 6000)
}

function BikeOffersPreview()
{
	// 1. Get the Image of the Special Offer (first offer)
	var offerImg = document.getElementById('specialBikeofferImage')
	
	// 2. Get the Info (second cell)
	var x=document.getElementById('specialBikeofferTable').rows
	var y=x[1].cells
	
	if (intBikesOfferNum == 0)
	{
	    y[0].innerHTML = "<font class='boldbody'><a href='it_motos-prices.html'>Suzuki Katana</a></font><BR> <font color='red'>Prezzi a settimana:</font> 110&euro; <br> <font color='red'>Giorni addizionali:</font> 16&euro;"
		offerImg.src = "Images/offers/SuzukiKatana.jpg"
	}
	
	if (intBikesOfferNum == 1)
	{
	    y[0].innerHTML = "<font class='boldbody'><a href='it_motos-prices.html'>Suzuki Hocuto 110cc</a></font><BR><font color='red'>Prezzi a settimana:</font> 150&euro; <br> <font color='red'>Giorni addizionali:</font> 21&euro;"
		offerImg.src = "Images/offers/SuzukiHocuto.jpg"
	}
	
	if (intBikesOfferNum == 2)
	{
	      y[0].innerHTML = "<font class='boldbody'><a href='it_motos-prices.html'>Suzuki Burgman</a></font><BR><font color='red'>Prezzi a settimana:</font> 200&euro; <br> <font color='red'>Giorni addizionali:</font> 29&euro;"
		offerImg.src = "Images/offers/SuzukiBurgman.jpg"
	}
	if (intBikesOfferNum == 3)
	{
	     y[0].innerHTML = "<font class='boldbody'><a href='it_motos-prices.html'>Suzuki Intruder</a></font><BR><font color='red'>Prezzi a settimana:</font> 230&euro; <br> <font color='red'>Giorni addizionali:</font> 33&euro;"
		offerImg.src = "Images/offers/SuzukiIntruder.jpg"
	}
	if (intBikesOfferNum == 4)
	{
	     y[0].innerHTML = "<font class='boldbody'><a href='it_motos-prices.html'>Suzuki FreeWind</a></font><BR><font color='red'>Prezzi a settimana:</font> 270&euro; <br> <font color='red'>Giorni addizionali:</font> 39&euro;"
		offerImg.src = "Images/offers/SuzukiFreeWind.jpg"
	}
	
	
	intBikesOfferNum = (intBikesOfferNum + 1) % 4
	
	window.setTimeout('BikeOffersPreview()', 1500)
}

function launch(filename){
	//window.event.ReturnValue = false;
	newWind1 = window.open(filename, "_edition", "toobar=no, menubar=no, statusbar=no, scrollbars=yes, resizable=yes, width=680, height=515, top = 55, left=55 ");
	return false;
}
function launch_ext(filename){
	//window.event.returnValue = false;
	newWind2 = window.open(filename, "_external", "toobar=yes, menubar=yes, scrollbars=yes, statusbar=yes, resizable=yes, top = 55, left=55 width=680 height=505");
}
function launch_short(filename){
	//window.event.returnValue = false;
	newWind3 = window.open(filename, "", "toobar=no, menubar=no, statusbar=no, scrollbars=yes, resizable=yes, width=680, height=420, top = 55, left=55 ");
}

