function setHomeLocation(id)  {
var days = 365;
var name ="pogoda";
var date = new Date();
date.setDate(date.getDate() + days);
document.cookie = name + '=' + id + ';expires=' + date.toGMTString() +'; path=/';

var startL = document.getElementById("startL");
startL.style.display ="block";

}

function getHomeLocation()  {
var name = "pogoda";
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0)  {
return c.substring(nameEQ.length,c.length);
}
}
return null;
}

function getStartLoc()  {
var locId = getHomeLocation();
var startL=document.getElementById("startL");
if (locId != null)  {
	startL.style.display = "block";
	PogodaLok.loadIt(locId);
}
else  {
	startL.style.display = "none";
}

}

function removeHomeLocation()  {
var date = new Date();
date.setDate(date.getDate() -1);
document.cookie = 'pogoda=;expires=' + date.toGMTString() + '; path=/';

var startL = document.getElementById("startL");
startL.style.display ="none";

}

function refreshHomeLocation()  {
var startL = document.getElementById("startL");
	if (getHomeLocation() != null)  {
		startL.style.display = "block";
	}
	else  {
		startL.style.display = "none";
	}
}