function getmobCookie(k) {
	var ck = " " + document.cookie, s = " " + k + "=", res = null, offset = 0, end = 0;
	if (ck.length > 0) {
		offset = ck.indexOf(s);
		if (offset != -1) {
			offset += s.length;
			end = ck.indexOf(";", offset)
			if (end == -1) {
				end = ck.length;
			}
			res = unescape(ck.substring(offset, end));
		}
	}
	return (res);
}
if (((typeof screen != 'undefined' && typeof screen.width != 'undefined' && typeof screen.height != 'undefined' && screen.width > 50 && screen.height > 50 && screen.width <= 320 && screen.height <= 480)) && !getmobCookie("notgotomobile")) {
	window.location = "http://m.labirint.ru" + (window.location.pathname || '') + (window.location.search || '') + (window.location.search ? '&' : '?') + 'sw=' + screen.width + '-' + screen.height;
}

