<!--
function getCookie(name) {
	var prefix = name + "=";
	var cookieStartIndex = document.cookie.indexOf(prefix);
	if (cookieStartIndex == -1) return null;
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
	if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length;
	return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function setCookie(name, value, expires) {
	if (expires == 'permanent'){
		expires = 'Fri, 25 Dec 2099 23:59:59 GMT';
	} else {
		((expires) ? "; expires=" + expires.toGMTString() : "");
	}
	var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires : "") + "; path=/";
	document.cookie = curCookie;
}

function delCookie(name)
{
	document.cookie = name + "=; expires=Fri, 31 Dec 1999 23:59:59 GMT; path=/";
}

function logout(){
	delCookie('login');
	delCookie('password');
	location.href="/";
}

function storeClocks(name) {
	setCookie("cityClocks",name,'permanent');
	getClocks();
}

function getClocks() {

	var city = getCookie('cityClocks');
	var out='';

	if (!city) {
		city='moscow';
	}

	swfobject.embedSWF(
	    "/i/" + city + ".swf", 
	    "swf-clocks", 
	    "55", "55", "9.0.0", "", {}, {wmode:"opaque"}, {});
}

function setLondon()
{
	document.getElementById("city").innerHTML="Лондон";
}

function setVladivostok()
{
	document.getElementById("city").innerHTML="Владивосток";
}

function setMoscow()
{
	document.getElementById("city").innerHTML="Москва";
}
//-->