function show(url,x,y)
{
	addons = 'resizable=no,scrollbars=no,';
	if ( screen.width < x ) {
		x = screen.width - 100;
		addons = 'scrollbars=yes,left=0,right=0,';
	}
	if ( screen.height - 50 < y ) {
		y = screen.height - 150;
		addons = 'scrollbars=yes,left=0,right=0,';
	}
	var url2 = '?mode=ienlarge&i='+url;
	window.open(url2,'', 'toolbar=yes,location=no,status=no,menubar=no,' + addons + 'width='+x+', height='+y);
}

function open_window(url, n, w, h)
{
	var newwin = window.open(url, n, 'toolbar=no, directories=no, location=no, status=no, scrollbars=yes, menubar=no, ' +
	'screenX=0, screenY=0, width=' + w + ', height=' + h);
	return false;
}

function setCookie (name, value, expires, path, domain, secure) {
      document.cookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

cur_date = new Date();
userlocaltime = cur_date.getHours();// + ":" + cur_date.getMinutes();
setCookie("usertime_rus", userlocaltime);
setCookie("usertime", userlocaltime);

function change_span_bg(who, to)
{
	document.getElementById(who).style.backgroundColor = to;
}

