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='../Templates/mats/reservations-cars_files/en_cars-prices.html'>VW Beetle Cabrio</a></font><BR> <font color='red'>Weekly Price:</font> 365€ <br> <font color='red'>Additional Day:</font> 52€"
		offerImg.src = "Images/offers/VWBeetleCabrio.jpg"
	}
	
	if (intOfferNum == 1)
	{
	    y[0].innerHTML = "<font class='boldbody'><a href='../Templates/mats/reservations-cars_files/en_cars-prices.html'>Suzuki Alto</a></font><BR><font color='red'>Weekly Price:</font> 145€ <br> <font color='red'>Additional Day:</font> 21€"
		offerImg.src = "Images/offers/SuzukiAlto.jpg"
	}
	
	if (intOfferNum == 2)
	{
	      y[0].innerHTML = "<font class='boldbody'><a href='../Templates/mats/reservations-cars_files/en_cars-prices.html'>Opel Agila</a></font><BR><font color='red'>Weekly Price:</font> 175€ <br> <font color='red'>Additional Day:</font> 25€"
		offerImg.src = "Images/offers/OpelAgila.jpg"
	}
	if (intOfferNum == 3)
	{
	     y[0].innerHTML = "<font class='boldbody'><a href='../Templates/mats/reservations-cars_files/en_cars-prices.html'>Smart Automatic</a></font><BR><font color='red'>Weekly Price:</font> 250€ <br> <font color='red'>Additional Day:</font> 36€"
		offerImg.src = "Images/offers/SmartAutomatic.jpg"
	}
	if (intOfferNum == 4)
	{
	     y[0].innerHTML = "<font class='boldbody'><a href='../Templates/mats/reservations-cars_files/en_cars-prices.html'>Renault Megane</a></font><BR><font color='red'>Weekly Price:</font> 295€ <br> <font color='red'>Additional Day:</font> 42€"
		offerImg.src = "Images/offers/RenaultMagane.jpg"
	}
	if (intOfferNum == 5)
	{
	     y[0].innerHTML = "<font class='boldbody'><a href='../Templates/mats/reservations-cars_files/en_cars-prices.html'>VW Touran</a></font><BR><font color='red'>Weekly Price:</font> 395€ <br> <font color='red'>Additional Day:</font> 56€"
		offerImg.src = "Images/offers/VWTouran.jpg"
	}
	if (intOfferNum == 6)
	{
	     y[0].innerHTML = "<font class='boldbody'><a href='../Templates/mats/reservations-cars_files/en_cars-prices.html'>Suzuki Jimny</a></font><BR><font color='red'>Weekly Price:</font> 330€ <br> <font color='red'>Additional Day:</font> 47€"
		offerImg.src = "Images/offers/SuzukiJimny.jpg"
	}
	intOfferNum = (intOfferNum + 1) % 6
	
	window.setTimeout('CarOffersPreview()', 3000)
}

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='../Templates/mats/reservations-cars_files/en_motos-prices.html'>Suzuki Katana</a></font><BR> <font color='red'>Weekly Price:</font> 110€ <br> <font color='red'>Additional Day:</font> 16€"
		offerImg.src = "Images/offers/SuzukiKatana.jpg"
	}
	
	if (intBikesOfferNum == 1)
	{
	    y[0].innerHTML = "<font class='boldbody'><a href='../Templates/mats/reservations-cars_files/en_motos-prices.html'>Suzuki Hocuto 110cc</a></font><BR><font color='red'>Weekly Price:</font> 150€ <br> <font color='red'>Additional Day:</font> 21€"
		offerImg.src = "Images/offers/SuzukiHocuto.jpg"
	}
	
	if (intBikesOfferNum == 2)
	{
	      y[0].innerHTML = "<font class='boldbody'><a href='../Templates/mats/reservations-cars_files/en_motos-prices.html'>Suzuki Burgman</a></font><BR><font color='red'>Weekly Price:</font> 200€ <br> <font color='red'>Additional Day:</font> 29€"
		offerImg.src = "Images/offers/SuzukiBurgman.jpg"
	}
	if (intBikesOfferNum == 3)
	{
	     y[0].innerHTML = "<font class='boldbody'><a href='../Templates/mats/reservations-cars_files/en_motos-prices.html'>Suzuki Intruder</a></font><BR><font color='red'>Weekly Price:</font> 230€ <br> <font color='red'>Additional Day:</font> 33€"
		offerImg.src = "Images/offers/SuzukiIntruder.jpg"
	}
	if (intBikesOfferNum == 4)
	{
	     y[0].innerHTML = "<font class='boldbody'><a href='../Templates/mats/reservations-cars_files/en_motos-prices.html'>Suzuki FreeWind</a></font><BR><font color='red'>Weekly Price:</font> 270€ <br> <font color='red'>Additional Day:</font> 39€"
		offerImg.src = "Images/offers/SuzukiFreeWind.jpg"
	}
	
	
	intBikesOfferNum = (intBikesOfferNum + 1) % 4
	
	window.setTimeout('BikeOffersPreview()', 3000)
}

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 ");
}
