//Distances
function InitDistances()
{
	document.getElementById('orig').options[0] = new Option ('-Seleccionar-', '', false, false);
	document.getElementById('dest').options[0] = new Option ('-Seleccionar-', '', false, false);
	for (x = 0; x < polos.length; x++) 
	{
		document.getElementById('orig').options[x+1] = new Option (polos[x], x, false, false);
		document.getElementById('dest').options[x+1] = new Option (polos[x], x, false, false);
	}
}
function calcula()
{
	document.getElementById('dist').value = distancias(document.getElementById('orig').value, document.getElementById('dest').value);
}

function GetTodayDay(culture)
{
	if(culture == "en")
		return GetEnglishTodayDay();
	else if(culture == "ru")
		return GetRussianTodayDay();
	else
		return GetSpanishTodayDay();
}
function GetSpanishTodayDay()
{
	var d=new Date();
	var monthname=new Array("enero","febrero","marzo","abril","mayo","junio","julio","augosto","septiembre","octubre","noviembre","diciembre");
		//Ensure correct for language. Spanish is "1 de enero del 2004"
	
	var TODAY = d.getDate() + " de " + monthname[d.getMonth()] + " del " + d.getFullYear();
	document.write(TODAY);
}

function GetEnglishTodayDay()
{
	var d=new Date();
	var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	//Ensure correct for language. English is "January 1, 2004"
	var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
	document.write(TODAY);
}

function GetRussianTodayDay()
{
	var d=new Date();
	var monthname=new Array("январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь");
	//Ensure correct for language. English is "January 1, 2004"
	var TODAY = d.getDate() + " " + monthname[d.getMonth()] + " " + d.getFullYear();
	document.write(TODAY);
}

function GetYear()
{
	var d=new Date()
	document.write(d.getFullYear());
}
