
	// separators
	var JS_ROW_END		= '~';
	var JS_CELL_END		= '¬';
	var JS_INDEX		= '÷';
	var req_url = 'http://www.livescore.in/gr/x/req/';
	// tournament list for tournament menu
	var tlist = {};

	/** show minority sport menu
	 */
	function menumin_show()
	{
		document.getElementById('menumin').style.display = 'block';
	};

	/** hide minority sport menu
	 */
	function menumin_hide()
	{
		menumin_fix_param = false;
		setTimeout('menumin_try_to_hide()', 200);
	};

	/** set minority menu fix
	 */
	function menumin_fix()
	{
		menumin_fix_param = true;
	};

	var menumin_fix_param = false;

	/** try to hide minority menu
	 */
	function menumin_try_to_hide()
	{
		if(!menumin_fix_param)
		{
			document.getElementById('menumin').style.display = 'none';
		}
	};

	/** Display timezone popup menu
	 */
	function display_tz(element_id)
	{
		if(element = document.getElementById(element_id))
		{
			if(element.style.display == 'block')
			{
				element.style.display = 'none';

								tz_flash_banner_switch(true);
							}
			else
			{
				var as = element.getElementsByTagName('a');
				var actual = document.getElementById('tzactual').innerHTML;
				actual = actual.replace('+', '[+]');

				var tz_date = new Date();
				tz_date = tz_date.getTimezoneOffset() / -60;
				tz_date = new Number(tz_date);
				tz_date = tz_date.toFixed(0);

				var tz_default_local = (tz_date >= 0 ? 'GMT[+]' + tz_date : 'GMT' + tz_date) + '$';

				for(var i = 0; i < as.length; i++)
				{
					var css = '';

					if(as[i].innerHTML.match(actual) != null)
						css += ' active';

					if(as[i].innerHTML.match(tz_default_local) != null)
						css += ' tzdefault';

					if(css == '')
						rem_attr(as[i], 'class');
					else
						set_attr(as[i], 'class', css);
				}

								tz_flash_banner_switch(false);
				
				element.style.display = 'block';
			}
		}
	};

	if (typeof document.getElementsByClassName == 'undefined')
	{
		document.getElementsByClassName = function(className, tagName) {
			var tag      = typeof tagName == 'undefined' ? '*':tagName;
			var children = document.body.getElementsByTagName(tag);
			var elements = [], child;

			for (var i = 0, length = children.length; i < length; i++)
			{
				child = children[i];

				if (get_attr(child, 'class').match("(^|\ )" + className + "(\ |$)")) elements.push(child);
			}
			return elements;
		};
	}

	function tz_flash_banner_switch(show)
	{
		var visibility = (typeof show == 'undefined' || !show) ? 'hidden':'visible';
		var elements = document.getElementsByClassName("adscontent", 'div');
		var banner_nohide_sport_list = 'soccer|hockey|basketball';

		for (i in elements)
		{
			el = elements[i];
			id_is_ok = typeof el.id != 'undefined' && el.id.match("^lsadvert-left_menu");

			if (id_is_ok)
			{
				if (el.id != 'lsadvert-left_menu_1' && banner_nohide_sport_list.match(sport)) break;
				var next_sibling = el.nextSibling;
				var nclass = get_attr(next_sibling, "class");

				el.style.visibility = visibility;
				nclass == "adsclick" || nclass == "adsgraphhori" && (next_sibling.style.visibility = visibility);
				nclass == "adsgraphhori" && (next_sibling.style.visibility = visibility);
			}
		}
	};

	function set_tz(tz, element_id)
	{
		var iframe = document.getElementById('livescoreContent');

		if(iframe && iframe.contentWindow)
		{
						iframe.contentWindow.change_tz(tz);
					}

		clientStorage.drivers.localCookie.store('fs_tza', tz, 360*86400, 'self', '/');
				set_actual_tz('tzactual', tz);
		
		if(element = document.getElementById(element_id))
		{
			element.style.display = 'none';

						tz_flash_banner_switch(true);
					}

				change_tz_line(tz);
						
		try
		{
			document.disable_refresh_check_once();
		} catch (e) {}
		

		return true;
	};

	function set_actual_tz(element_id, tz)
	{
		var cookie_tz = clientStorage.drivers.localCookie.get('fs_tza');

		if(cookie_tz != null && cookie_tz <= 13 && cookie_tz >= -11)
			tz = cookie_tz

		var offset = tz * 3600 * (-1);

		element = document.getElementById(element_id);

		if(element)
		{
			var time_only = (typeof tz_actual_short == 'undefined' ? false : (tz_actual_short ? true : false));
			element.innerHTML = utime2time(gmdate, offset, time_only, true, true) + ', GMT' + (tz >= 0 ? '+' : '') + tz;
		}
	};

	function create_tzcontent(element_id)
	{
		var element = document.getElementById(element_id);
		var ul = document.createElement('ul');

		set_attr(ul, 'id', 'tzcontent');

		for(var i in tz_list)
		{
			if(typeof tz_list[i] != 'number')
				continue;

			var li = document.createElement('li');

			if(i % 2)
				set_attr(li, 'class', 'even');

			li.innerHTML = '<a href="#" onclick="return !set_tz(' + tz_list[i] + ', \'tzcontent\')"></a>';

			ul.appendChild(li);
		}

		element.appendChild(ul);

		rebuild_tzcontent(element_id);
	};

	function rebuild_tzcontent(element_id)
	{
		var element = document.getElementById(element_id);
		var as = element.getElementsByTagName('a');

		var time_only = (typeof tz_list_short == 'undefined' ? false : (tz_list_short ? true : false));

		for(var i in tz_list)
		{
			if(typeof tz_list[i] != 'number')
				continue;

			var offset = tz_list[i] * 3600 * (-1);
			var new_content = utime2time(gmdate, offset, time_only, true, true) + ', GMT' + (tz_list[i] >= 0 ? '+' : '') + tz_list[i];

			if(as[i].innerHTML != new_content)
			{
				as[i].innerHTML = utime2time(gmdate, offset, time_only, true, true) + ', GMT' + (tz_list[i] >= 0 ? '+' : '') + tz_list[i];
			}
		}
	};

	function gmdate_recount()
	{
		gmdate += 2;

		set_actual_tz('tzactual', tz_default);
		rebuild_tzcontent('tzcontentenv');
	};

	/** Display/Hide element (TV gonet)
	*/
	function display_hide_gonet(id)
	{
		var element = document.getElementById(id);

		if(element.style.display == 'block')
			element.style.display = 'none';
		else
			element.style.display = 'block';
	};

	/** Autoresize TV program
	*/
	function set_mbox_width_class()
	{
		var bannerIdParts = ["right_zone_1", "right_zone_1_hockey", "right_zone_1_basketball", "right_zone_1_tennis"];
		var mbox_width = 0;

		for (var i in bannerIdParts) 
		{
			if ((element = document.getElementById("lsadvert-" + bannerIdParts[i])) && (element.clientWidth > 102))
			{
				mbox_width = element.clientWidth;
				break;
			}
		}

		if (mbox_width && (element = document.getElementById("rccontent"))) {
			for (i in element.childNodes)
			{
				if (element.childNodes[i].tagName == "DIV" && element_hasClass(element.childNodes[i], "mbox"))
				{
					element.childNodes[i].style.width = mbox_width + 'px';
				}
			}
		}
	};

		function change_tz_line(tz)
	{
		//	timezone line
		if(image_element = document.getElementById('time-zone-line'))
		{
			var tz_index = (tz >= 0 ? '+' : '') + tz; 
			if(position_x = tz_image_position_x[tz_index])
			{
				image_element.style.left = position_x + 'px';
			}
		}
	};
	
/*
 * Tool used to save data on client side
 * Watch out for driver names. For example 'localStorage' cannot be used in order to use localStorage
 */

clientStorage = {

	p3p_needed:false,
	p3p_available:false,
	driver:"localCookie",
	utime:null,
	ready:false,

	/* Hash containing objects' drivers
	 */
	drivers:
	{
		/* HTML5s' local storage
		 */
		"locStorage":
		{
			"id":1,
			"available":false,
			"ttl_key":"data_ttl",

			get: function(key)
			{
				try {
					if (key == this.ttl_key || this.check_ttl(key))
						return localStorage.getItem(key);
				}
				catch(e)
				{
					// TODO: do something on localStorage error
				}

				return null;
			},


			/* Save value in localStorage
			 * @param string key   identifier
			 * @param string value
			 * return void;
			 */
			store: function(key, value, ttl)
			{
				try
				{
					localStorage.setItem(key, value);
					(typeof ttl != 'undefined') && (key != this.ttl_key) && this.store_ttl(key, ttl);
				}
				catch (e)
				{
					// TODO: do something on localStorage error
				}
			},


			/* Delete value from localStorage
			 * @param string key   identifier
			 * @return void
			 */
			drop: function(key)
			{
				try
				{
					localStorage.removeItem(key);
				}
				catch(e)
				{
					// TODO: do something on localStorage error
				}
			},


			/* Save ttl of information
			 */
			store_ttl: function(key, ttl)
			{
				var date = new Date();
				var ttl_arr = {};

				(ttl_str = this.get(this.ttl_key)) && (ttl_arr = JSON.parse(ttl_str));
				ttl_arr[key] = ttl + Math.floor(date.getTime()/1000);
				this.store(this.ttl_key, JSON.stringify(ttl_arr));
			},


			/* Check if the data are valid
			 */
			check_ttl: function(key)
			{
				var ttl_arr = {};
				(ttl_str = this.get(this.ttl_key)) && (ttl_arr = JSON.parse(ttl_str));

				return true;
				return (typeof ttl_arr == 'undefined') || (typeof ttl_arr[key] == 'undefined') || (ttl_arr[key] > (new Date).getTime()/1000);
			}
		},


		/* Classic cookies
		 */
		"localCookie":
		{
			"id":2,
			"available":true,

			/* Get cookie value
			 * @param	string key identifier
			 * @param	object origin object to save with
			 * @return	mixed
			 */
			get: function(key, origin)
			{
				var origin    = (typeof origin == 'undefined' || origin == 'self' || !this.p3p_needed) ? document:origin;
				var force_p3p = origin != document || this.p3p_needed;
				var value     = null;

				if (!force_p3p || (force_p3p && this.p3p_available))
				{
					if (origin.cookie.length > 0)
					{
						c_start = origin.cookie.indexOf(key + "=");

						if (c_start != -1)
						{
							c_start = c_start + key.length+1;
							c_end = origin.cookie.indexOf(";", c_start);

							if (c_end == -1)
								c_end = origin.cookie.length;

							value = unescape(origin.cookie.substring(c_start, c_end));
						}
					}
				}
				else
				{
					value = clientStorage.drivers.remoteCookie.get(key);
				}

				return value;
			},


			/* Save value using cookies
			 * @param string key identifier
			 * @param string value value
			 * @param int ttl time to live in days
			 * @param object origin object to save with
			 * @param string path path to save with
			 * @return void
			 */
			store: function(key, value, ttl, origin, path)
			{
				var origin    = (typeof origin == 'undefined' || origin == 'self' || !this.p3p_needed) ? document:origin;
				var force_p3p = origin != document || this.p3p_needed;
				var cookie = '';
				var exdate = new Date();

				if(!force_p3p || (force_p3p && this.p3p_available))
				{
					(value === '' || value === null) && (ttl = -86400);
					exdate.setTime(exdate.getTime() + ttl * 1000);
					cookie = key + "=" + escape(value) + ((ttl == null) ? "" : ";expires=" + exdate.toGMTString());

					if(typeof path != 'undefined' && path != null)
						cookie += ';path=' + path;

					if(typeof domain != 'undefined' && domain != null)
						cookie += ';domain=' + domain;

					origin.cookie = cookie;
				}
				else
				{
					clientStorage.drivers.remoteCookie.store(key, value);
				}
			},


			/* Destroy cookie
			 * @param string key
			 */
			drop: function(key)
			{
				this.store(key, '', -5000);
			}
		},


		/* Cookies by request to server
		 */
		"remoteCookie":
		{
			"id":3,
			"available":true,

			/* Make a hit and bring back cookie with a request (IE < 8 & external iframe)
			 * @param string key identifier
			 * @return mixed
			 */
			get: function(key)
			{
				var url = 'http://www.livescore.in/x/req/c_r/' + key;

				if(key == 'fs_tza') return null;

				// msie cache/gzip bug
				if(ie)
				{
					var pom = clientStorage.time + '';
					url += '~' + pom.substr(6, 4);
				}

				var ae_cookie = new ajaxObject(url, clientStorage.process_remote_cookie_response, key);
				ae_cookie.rtext(true);
				var value = ae_cookie.update();

				return (value == '-' || value == '') ? null : unescape(value);
			},

			/* Make a hit and store cookie with a request (IE < 8 & external iframe)
			 * @param string key identifier
			 * @param int ttl time to live in secs
			 * @param string value value
			 */
			store: function(key, value, ttl)
			{
				var url = 'http://www.livescore.in/x/req/c_w/' + key;

				// msie cache/gzip bug
				if(ie)
				{
					var pom = clientStorage.time + '';
					url += '~' + pom.substr(6, 4);
				}
				value = escape(value);
				if(value == '')
					value = '-';
				var ae_cookie = new ajaxObject(url);
				ae_cookie.async(false);
				var headers = {cv:value};
				if(typeof ttl != 'undefined')
						headers.ct = ttl;
				ae_cookie.update('','',headers);
			},


			/* Destroy cookie
			 */
			drop: function(key)
			{
				this.store(key, '');
			},


			/* Process response from get_by_remote_cookie
			 * @return void
			 */
			process_remote_cookie_response: function(r_status, r_headers, r_content, r_trigger)
			{
				this.container = (r_content.length > 0) ? r_content:'';
			}
		},


		/* HTML5s' local session storage
		 */
		"sessStorage":
		{
			"id":4,
			"available":false,
			"ttl_key":"data_ttl",

			/* Get value from html5 session storage
			 * @param string key identifier
			 * @return mixed
			 */
			get: function(key, origin)
			{
				if(this.available)
				{
					try
					{
						if (key == this.ttl_key || this.check_ttl(key))
							return sessionStorage.getItem(key);
					}
					catch(e)
					{
						// TODO: do something on sessionStorage error
					}

				}
				else
				{
					return clientStorage.drivers.localCookie.get(key, origin);
				}

				return null;
			},


			store: function(key, value, ttl, origin, path)
			{
				if(this.available)
				{
					try
					{
						sessionStorage.setItem(key, value);
						typeof ttl != 'undefined' && ttl !== null && this.store_ttl(key, ttl);
					}
					catch(e)
					{
						// TODO: do something on sessionStorage error
					}
				}
				else
				{
					clientStorage.drivers.localCookie.store(key, value, ttl, origin, path);
				}
			},


			/* Destroy value in session storage
			 */
			drop: function(key)
			{
				try
				{
					localStorage.removeItem(key);
				}
				catch(e)
				{
					// TODO: do something on sessionStorage error
				}
			},


			/* Save ttl of information
			 */
			store_ttl: function(key, ttl)
			{
				var date = new Date();
				var ttl_arr = {};

				(ttl_str = this.get(this.ttl_key)) && (ttl_arr = JSON.parse(ttl_str));
				ttl_arr[key] = ttl + Math.floor(date.getTime()/1000);
				this.store(this.ttl_key, JSON.stringify(ttl_arr));
			},


			/* Check if the data are valid
			 */
			check_ttl: function(key)
			{
				var ttl_arr = {};
				(ttl_str = this.get(this.ttl_key)) && (ttl_arr = JSON.parse(ttl_str));

				return (typeof ttl_arr == 'undefined') || (typeof ttl_arr[key] == 'undefined') ||  (ttl_arr[key] > (new Date).getTime()/1000);
			}
		}
	},


	/* Init is autorun on any of get(), store() or drop()
	 * @return void
	 */
	init: function()
	{
		this.p3p_available = this.is_browser_p3p_compatible();
		this.p3p_needed    = typeof iframe_external != 'undefined' && iframe_external;
		this.utime = Math.round(new Date().getTime() / 1000);

		this.drivers.locStorage.available  = typeof localStorage != 'undefined' && localStorage;
		this.drivers.sessStorage.available = typeof sessionStorage != 'undefined' && sessionStorage;
		this.drivers.localCookie.available = !this.p3p_needed || (this.p3p_needed && this.p3p_available);

		// ommit using classic cookies by default to save traffic
		this.driver = this.drivers.locStorage.available ? 'locStorage':(this.drivers.localCookie.available ? 'localCookie':'remoteCookie');
		this.ready = true;

		this.migrate();
	},


	/* Do we have P3P useable browser?
	 * @return boolean
	 */
	is_browser_p3p_compatible: function()
	{
		if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") !== -1)
		{
			sub = navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE")+5);
			ver = parseInt(sub.substr(0, sub.indexOf('.')));
			return ver >= 8;
		}

		return true;
	},


	/* Store value within clientStorage. Can be chained
	 * @param	string key identifier
	 * @param	string value value
	 * @param	int ttl [null] time to live in days
	 * @param	object origin [document] object to save with (used by cookies)
	 * @param	string domain [null] domain to save with (used by cookies)
	 * @return	clientStorage
	 */
	store: function(key, value, ttl, origin, path)
	{
		!this.ready && this.init();

		var ttl = (typeof ttl == 'undefined' ? null:ttl);
		var path = (typeof path == 'undefined' ? null:path);

		this.drivers[this.driver].store(key, value, ttl, origin, path);
		return this;
	},


	/* Get value
	 * @param	string key                identifier
	 * @param object origin [document]  object to save with (used by cookies)
	 * @return string
	 */
	get: function(key, origin)
	{
		!this.ready && this.init();
		return this.drivers[this.driver].get(key, origin);
	},


	/* Try to store a value by custom driver priorities
	 * @param array driver_suggestions array of driver names
	 */
	store_in: function(driver_suggestions, key, value, ttl, origin, path)
	{
		for (i in driver_suggestions)
		{
			var dr = this.drivers[driver_suggestions[i]];
			if (dr.available) return dr.store(key, value, ttl, origin, path);
		}
	},


	/* Try to get a value by custom driver priorities
	 * @param array driver_suggestions array of driver names
	 */
	get_by: function(driver_suggestions, key, origin)
	{
		for (i in driver_suggestions)
		{
			var dr = this.drivers[driver_suggestions[i]];
			if (dr.available) return dr.get(key, origin);
		}
	},


	/* Destroy key
	 * @return this;
	 */
	drop: function(key)
	{
		!this.ready && this.init();
		this.drivers[this.driver].drop(key);
		return this;
	},


	/* Migrate old data from cookies
	 */
	migrate: function()
	{
		paths = this.get('paths-migrated-from-cookies') || '';
		cpath = '<' + document.location.pathname.replace(/\\/g,'/').replace(/\/[^\/]*$/, '') + '>';
		if (cpath == '<>') cpath = '</>';

		if (paths.indexOf(cpath) === -1)
		{
			var cookie = document.cookie;
			var cookie_pieces = cookie.split(';');

			for (i in cookie_pieces)
			{
				var a = cookie_pieces[i].indexOf('=');

				key = (a >= 0) ? cookie_pieces[i].substr(0,a):cookie_pieces[i];
				val = (a >= 0) ? cookie_pieces[i].substr(a+1):'';

				if (this.driver == 'locStorage' && !this.get(key))
				{
					this.store(key, val);
					this.drivers.localCookie.drop(key);
				}
			}

			this.store('paths-migrated-from-cookies', paths + cpath);
		}
	},


	/* aliases
	 */
	store_cookie: function(key, value, ttl, origin, path)
	{
		return this.drivers.localCookie.store(key, value, ttl, origin, path);
	},

	get_cookie: function(key, origin)
	{
		return this.drivers.localCookie.get(key, origin);
	},

	store_in_session: function(key, value, ttl)
	{
		return this.drivers.sessStorage.store(key, value, ttl);
	},

	get_from_session: function(key)
	{
		return this.drivers.sessStorage.get(key);
	}
};
	/** left menu script
	* @param	string	param	id og menu element
	*/ 
	function lmenu_show(c_id)
	{
		tlist['vars_' + c_id]['loading'] = false;
		//lmenu_show_loading(c_id);
		var elm = document.getElementById('lmenu_' + c_id);
		var str = elm.innerHTML;
		var tmp_link = str.match(/<a(.|\n|\s)+?<\/a>/gi);
		if(tmp_link.length > 1)
			tmp_link = tmp_link[0];
		else
			tmp_link = tmp_link;
		
		var lastClass = get_attr(elm, 'class').split(" ");
		rem_attr(elm, 'class', 'active');
		set_attr(elm, 'class', lastClass[1]);

		if(str.match(/<span class="active-top">/gi))
		{
			var str = elm.innerHTML.toString();
			var tmp_submenu = str.match(/<ul(.|\n|\s)+?<\/ul>/gi);
			elm.innerHTML = tmp_link + tmp_submenu;
			var ul = elm.getElementsByTagName('ul');
			if(typeof ul != 'undefined')
				set_attr(ul[0], 'class', 'submenu hidden');
		}
		else
		{
			
			var x = tlist['c_' + c_id];
			var x_length = x.length - 1;
			y = '<ul class="submenu">';

			for (var i in x) 
			{
				var tclass = ' class="';
				//if(x[i]['class']!=0)
				//	tclass += x[i]['class'];
				if(i == x_length)
					tclass += 'last';
				tclass += '"';
				y += '<li' + tclass +'><a href=\"' + sport_url + x[i]['url'] + '/' +'\">' + x[i]['name'] + '</a></li>';
			}

			y += '</ul>';

			elm.innerHTML = '<span class="active-top"></span>' + tmp_link + y + '<span class="active-bottom"></span>';
			
			set_attr(elm, 'class', 'active'+' '+get_attr(elm, 'class'));
		}
		return false;
	};
	
	/** left menu script - check data (fill or show)
	* @param	string	param	c_id og menu element
	* @param	string	param	url of data request
	* @param	string	param	s_id id of sport
	*/
	function lmenu(c_id,url,s_id)
	{
		if(typeof tlist['c_' + c_id] != 'undefined')
		{
			lmenu_show(c_id);
			return false;
		}
		tlist['vars_' + c_id] = Array();
		tlist['vars_' + c_id]['loading'] = true;
		setTimeout('lmenu_show_loading('+c_id+')', 500);
		url += 'm_' + s_id + '_' + c_id;
		var menu_ajax = new ajaxObject(url, lmenu_response, 'menu');
		menu_ajax.update();
		return false;
	}
	
	/** left menu script - check data (fill or show)
	*/
	function lmenu_response(r_status, r_headers, r_content, r_trigger)
	{
		var data = r_content.split(JS_ROW_END);
		var c_id = null;
		var c_url = null;
		for(var i in data)
		{
			var row = data[i].split(JS_CELL_END);
			for(var j in row)
			{
				var text = row[j];
				if(!text)
					continue;
				
				var key = text.substring(0,2);
				var val = text.substring(3);
				
				if(key == 'MC')
				{
					c_id = val;
					continue;
				}
				
				if(key == 'ML')
				{
					c_url = val;
					continue;
				}
				
				if(c_id == null || c_url == null)
					continue;
				
				if(typeof tlist['c_' + c_id] == 'undefined')
					tlist['c_' + c_id] = Array();
				
				if(typeof tlist['c_' + c_id][i] == 'undefined')
					tlist['c_' + c_id][i] = Array();
				
				switch(key)
				{
					case 'MN':
						tlist['c_' + c_id][i]['name'] = val;
						break;
					case 'MU':
						tlist['c_' + c_id][i]['url'] = c_url + '/' + val;
						break;
				}
			}
		}
		if(c_id != null && typeof tlist['c_' + c_id] != 'undefined')
			lmenu(c_id);
	}
	
	function lmenu_show_loading(c_id)
	{
		var elm = document.getElementById('lmenu_' + c_id);
		var str = elm.innerHTML;
		var tmp_link = str.match(/<a(.|\n|\s)+?<\/a>/gi);
		if(tmp_link.length > 1)
			tmp_link = tmp_link[0];
		else
			tmp_link = tmp_link;
		
		if(tlist['vars_' + c_id]['loading'])
		{
			// another check if it is loaded
			if(tlist['vars_' + c_id]['loading'])
			{
				set_attr(elm, 'class', 'active'+' '+get_attr(elm, 'class'));
				elm.innerHTML = '<span class="active-top fake"></span>' + tmp_link + '<ul class="submenu"><li class="last"><a class="no-underline"><div class="menu_loading">&nbsp;</div></a></li></ul><span class="active-bottom"></span>';
			}
		}
	}

	/** Utimate Ajax Object
	 * http://www.hunlock.com/blogs/The_Ultimate_Ajax_Object
	 */
	function ajaxObject(url, callbackFunction, actionTrigger)
	{
		var that = this;
		this.updating = false;
		this.aborting = false;
		this.ajax_async = true;
		this.container = null;
		this.return_text_after_update = false;

		this.abort = function()
		{
			if(that.updating)
			{
				that.updating = false;
				that.aborting = true;
				that.AJAX.abort();
				that.AJAX = null;
			}
		};

		this.async = function(val)
		{
			that.ajax_async = val ? true : false;
		};
		
		this.rtext = function(val)
		{
			that.return_text_after_update = val ? true : false;
			that.async(!that.return_text_after_update);
		};

		this.update = function(passData, postMethod, headers)
		{
			if(that.updating)
				return false;

			that.AJAX = null;

			if(window.XMLHttpRequest)
				that.AJAX = new XMLHttpRequest();
			else
				that.AJAX = new ActiveXObject("Microsoft.XMLHTTP");

			if (that.AJAX == null)
				return false;
			else
			{
				that.AJAX.onreadystatechange = function()
				{
					try
					{
						if (that.AJAX.readyState == 4)
						{
							that.updating = false;
							if(!that.aborting)
								if (that.AJAX.status == 200 || that.AJAX.status == 304 || that.AJAX.status == 204 || that.AJAX.status == 1223 || that.AJAX.status == 0)
								{
									if(that.return_text_after_update)
										return that.AJAX.responseText;
									else
										that.callback(that.AJAX.status, that.AJAX.getAllResponseHeaders(), that.AJAX.responseText, actionTrigger);

									if (mpe_indicator_status != null) update_comm_status('ajax');
								}
							that.AJAX = null;
						}
					}

					catch(e) {}
				};

				if(typeof passData == 'undefined')
					passData = '';
				that.updating = new Date();

				if (/post/i.test(postMethod))
				{
					var uri = urlCall;
					that.AJAX.open("POST", uri, that.ajax_async);
					if(typeof callbackFunction != 'undefined' && !webkit)
						that.AJAX.setRequestHeader('User-Agent', 'core' + (ie6 ? '/ie6' : ''));
					that.AJAX.setRequestHeader('Accept-Language', '*');
					that.AJAX.setRequestHeader('Accept', '*/*');
					that._setHeaders(headers);
					that.AJAX.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					that.AJAX.setRequestHeader("Content-Length", passData.length);
					that.AJAX.send(passData);
				}
				else
				{
					var uri = urlCall + (passData == '' ? '' : ('?' + passData));
					that.AJAX.open("GET", uri, that.ajax_async);
					if(typeof callbackFunction != 'undefined' && !webkit)
						that.AJAX.setRequestHeader('User-Agent', 'core' + (ie6 ? '/ie6' : ''));
					that.AJAX.setRequestHeader('Accept-Language', '*');
					that.AJAX.setRequestHeader('Accept', '*/*');					
					that._setHeaders(headers);

					if(typeof u_304 != 'undefined' && u_304 != '' && (actionTrigger == 'update' || actionTrigger == 'game'))
						that.AJAX.setRequestHeader('X-Signature', u_304);
					
					if(typeof feed_sign != 'undefined')
						that.AJAX.setRequestHeader('X-Fsign', feed_sign);

					that.AJAX.send(null);
				}

				if(!that.ajax_async && that.AJAX != null)
				{
					if(that.AJAX.status == 200 || that.AJAX.status == 304 || that.AJAX.status == 204 || that.AJAX.status == 1223 || that.AJAX.status == 0)
					{
						if(that.return_text_after_update)
							return that.AJAX.responseText;
						else
							that.callback(that.AJAX.status, that.AJAX.getAllResponseHeaders(), that.AJAX.responseText, actionTrigger);
						that.AJAX = null;
					}
				}

				return true;
			}
		};
		
		this._setHeaders = function(headers)
		{
			if (typeof headers != 'undefined')
			{
				for(var i in headers)
				{
					that.AJAX.setRequestHeader(i, headers[i]);
				}
			}
		};

		var urlCall = url;
		this.callback = callbackFunction || function () {};
	};


	/** Get an attribute of an element
	 * @param	element	an element to set an atribute for
	 * @param	name	the attribute name
	 */
	function get_attr(element, name)
	{
		var attr = '';

		if(element)
		{
			if(ie)
			{
				switch(name)
				{
					default:
						break;

					case 'class':
						attr = element.className;
						break;

					case 'id':
						attr = element.id;
						break;

					case 'rowspan':
						attr = element.rowSpan;
						break;

					case 'colspan':
						attr = element.colSpan;
						break;
				}
			}
			else
				attr = element.getAttribute(name);
		}

		if(!attr)
			attr = '';

		return attr.toString();
	};

	/** Set an attribute of an element
	 * @param	element	an element to set an atribute for
	 * @param	name	the attribute name
	 * @param	content	content of the attribute
	 */
	function set_attr(element, name, content)
	{
		if(ie)
		{
			switch(name)
			{
				default:
					break;

				case 'class':
					element.className = content;
					break;

				case 'rowspan':
					element.rowSpan = content;
					break;

				case 'colspan':
					element.colSpan = content;
					break;
				case 'id':
					element.id = content;
					break;
				
				case 'title':
					element.title = content;
					break;

				case 'type':
					element.type = content;
					break;

				case 'name':
					element.name = content;
					break;
			}
		}
		else
			element.setAttribute(name, content);
	};

	/** Remove attribute on element
	 * @param	object	element	an object element e.g. TD, TR, ...
	 * @param	string	attr	attribute to be removed
	 */
	function rem_attr(element, attr)
	{
		if(ie)
			set_attr(element, attr, '');
		else
			element.removeAttribute(attr);
	};
	
	function element_indexOfClassName(element, className)
	{
		return (" " + element.className + " ").indexOf(" " + className + " ");
	};
	
	function element_hasClass(element, className)
	{
		return (element_indexOfClassName(element, className) >= 0);
	};
	
	function element_addClass(element, className)
	{
		if (element_indexOfClassName(element, className) >= 0)
			return false;
		element.className += " " + className;
		return true;
	};
	
	function element_removeClass(element, className)
	{
		var position = element_indexOfClassName(element, className);
		if (position < 0)
			return false;
		var str = element.className;
		element.className  = (
			position > 0
				? str.substr(0, position - 1) + str.substr(position + className.length)
				: str.substr(0, position) + str.substr(position + className.length + 1)
		);
		return true; 
	};

	function text_append(text, append, unique, last)
	{
		var unique = (typeof unique == 'undefined' || unique == true) ? true : false;
		var last = (typeof last == 'undefined' || last == true) ? true : false;

		var tmp_text = text.toLowerCase();
		var tmp_append = append.toLowerCase();

		if(!tmp_text.match(tmp_append) && tmp_append.indexOf(' ') == 0)
			tmp_append = tmp_append.substr(1);

		if(text.length == 0)
		{
			return append;
		}
		else if(!unique || (unique && tmp_text.match(tmp_append) == null))
		{
			if(last)
				return text + append;
			else
				return append + text;
		}

		return text;
	};

	/** String prototype: Append text (case insensitive)
	* @param	string	append	an append part
	* @param	bool 	[unique = true] append only if append part is not allready included in text
	* @param	bool	[last = true]	if true append last, false append before
	* @return	string	string after to be appended
	*/
	String.prototype.append = function(append, unique, last)
	{
		var unique = (typeof unique == 'undefined' || unique == true) ? true : false;
		var last = (typeof last == 'undefined' || last == true) ? true : false;

		var tmp_text = this.toLowerCase();
		var tmp_append = append.toLowerCase();

		if(!tmp_text.match(tmp_append) && tmp_append.indexOf(' ') == 0)
			tmp_append = tmp_append.substr(1);

		if(this.length == 0)
		{
			return append;
		}
		else if(!unique || (unique && tmp_text.match(tmp_append) == null))
		{
			if(last)
				return this + append;
			else
				return append + this;
		}
	};

	/* Remove text (case insensitive)
	* @param	string	text	a text to be removed from
	* @param	string	remove	a part to be removed
	* @return	string	text	after to be removed
	*/
	function text_remove(text, remove)
	{
		var tmp_text = text.toLowerCase();
		var tmp_remove = remove.toLowerCase();

		// try to remove leading gap
		if(tmp_text.match(tmp_remove) == null && tmp_remove.indexOf(' ') == 0)
			tmp_remove = tmp_remove.substr(1);

		if(tmp_text.match(tmp_remove))
		{
			var index_start = tmp_text.indexOf(tmp_remove);
			var index_stop = tmp_remove.length;

			tmp_remove = text.substr(index_start, index_stop);

			if(tmp_remove.length > 0)
				text = text.replace(tmp_remove, '');
		}

		return text;
	};

	/** fill begining zero if number is less then 10
	* @param	integer	num	number to be corrected
	*/
	function fill_zero(num)
	{
		if(num < 10)
			return '0' + num;
		else
			return num;
	};

	/** Test if element is in array checked by its key
	* @param	array	sa		source array
	* @param	var		key		key to be checked
	* @return	bool	true if element is in array, false otherwise
	*/
	function test_array_key(sa, key)
	{
		if(typeof sa == 'undefined' || typeof sa[key] == 'undefined')
			return false;

		return true;
	};

	/** Test if value exist in array
	 * @param	array	sa		source array
	 * @param	string	val		value to be checked
	 * @return	bool	true if value is in array, false otherwise
	 */
	function test_array_val(sa, val)
	{
		for(var i in sa)
		{
			if(sa[i] == val)
				return true;
		}

		return false;
	};

	/** Try to find value and return its key
	 * @param	array 	sa		source array
	 * @param	string	val		value to be checked
	 * @return	var		key if value is found, false otherwise
	 */
	function get_array_key(sa, val)
	{
		for(var i in sa)
		{
			if(sa[i] == val)
				return i.to_number();
		}

		return false;
	};

	/** Try to find value and return its string key
	 * @param	array 	sa		source array
	 * @param	string	val		value to be checked
	 * @return	var		key if value is found, false otherwise
	 */
	function get_array_string_key(sa, val)
	{
		for(var i in sa)
		{
			if(sa[i] == val)
				return i;
		}

		return false;
	};

	/** Remove an element from array by its key
	* @param	array	sa		source array
	* @param	var		key		remove array key
	* @return	array	affected array
	*/
	function remove_array_key(sa, key)
	{
		var tmp_sa = new Array();
		for(var i in sa)
			if(i != key)
				tmp_sa[i] = sa[i];

		return tmp_sa;
	};

	/** Window prototype: Open help window
	* @url		string	url		url of window
	*/
	window.open_help = function(url)
	{
		var id = Math.floor(Math.random() * 1000);
		return this.open( url, id, 'hotkeys=no, resizable=no, toolbar=no, status=no, dependent=yes, scrollbars=1, width=520, height=500' );
	};

	/** Number prototype: Convert string to number
	* @return	number
	*/
	Number.prototype.to_number = function()
	{
		return this;
	};

	/** String prototype: Convert string to number
	* @return	number
	*/
	String.prototype.to_number = function()
	{
		var pom = this - 0;

		if(isNaN(pom))
			return this;
		else
			return pom;
	};

	/** Convert utime to dbdate
	* @param	integer	utime	unix timestamp
	* @return	string	date in db format (YYYY-MM-DD)
	*/
	function utime2dbdate(utime)
	{
		var tmp = new Date();
		tmp.setTime(utime * 1000);

		return tmp.getFullYear() + '-' + fill_zero((tmp.getMonth() + 1)) + '-' + fill_zero(tmp.getDate());
	};

	/** Convert utime to GMT dbdate
	* @param	integer	utime	unix timestamp
	* @return	string	GMT date in db format (YYYY-MM-DD)
	*/
	function utime2gmt_dbdate(utime)
	{
		var tmp = new Date();
		tmp.setTime(utime * 1000);

		return tmp.getUTCFullYear() + '-' + fill_zero((tmp.getUTCMonth() + 1)) + '-' + fill_zero(tmp.getUTCDate());
	};

	/** Convert dbdate to utime
	* @param	string	date in db format (YYYY-MM-DD)
	* @return	integer	utime
	*/
	function dbdate2utime(dbdate)
	{
		var tmp = new Date();
		dbdate = dbdate.split('-');

		if(dbdate.length == 3)
		{
			tmp.setFullYear(dbdate[0]);
			tmp.setMonth((dbdate[1] - 1));
			tmp.setDate(dbdate[2]);
			tmp.setHours(0);
			tmp.setMinutes(0);
			tmp.setSeconds(0);
			tmp.setMilliseconds(0);

			return tmp.getTime() / 1000;
		}

		return 0;
	};

	/** Convert utime to human time
	* @param	integer utime				unix timestamp
	* @param	integer	offset				gmt offset
	* @param	bool	[time_only = true]	display only time
	* @param	bool	[full_date = false]	display full date DD.MM.YYYY
	* @param	bool	[no_year = false]	do not display year if full date is set
	*
	* @return	string	formated date/time
	*/
	function utime2time(utime, offset, time_only, full_date, no_year)
	{
		var service_time	= new Date(); // for service use

		time_only = (typeof time_only == 'undefined' || time_only) ? true : false;
		full_date = (typeof full_date == 'undefined' || !full_date) ? false : true;
		no_year = (typeof no_year == 'undefined' || !no_year) ? false : true;

		var time = '';

		utime = utime.to_number();
		offset = offset.to_number();

		service_time.setTime((utime + (service_time.getTimezoneOffset() * 60) - offset) * 1000);

		if(!time_only)
			time += fill_zero(service_time.getDate()) + '.' + fill_zero(service_time.getMonth().to_number() + 1) + '.' + (no_year ? '' : (full_date ? service_time.getFullYear() : '')) + ' ';

		time += fill_zero(service_time.getHours()) + ':' + fill_zero(service_time.getMinutes());

		return time;
	};

	/** Odds format
	* @param	float	odds number
	*
	* @return	return formated odds number
	*/
	function odds_format(odds)
	{
		if(odds < 10)
			return odds.toPrecision(3);
		else if(odds < 100)
			return odds.toPrecision(4);
		else
			return odds.toPrecision(5);
	};

	/** Replace parenthesis for Hebrew version
	*
	* @param	string	str string to be converted
	*
	* @return	string	converted string
	*/
	function fix_entities(str)
	{
		return str.replace(/\(/g, "&rlm;(");
	};

	/** Detect client browser
	 * @param	string	browser schortcat (ie|ff)
	 * @return	bool	true|false true if browser match the shortcut
	 */
	function browser_detect(type)
	{
		if(type == 'ie' && navigator.userAgent.match(/MSIE/))
			return true;
		else if(type == 'ie6' && navigator.userAgent.match(/MSIE 6/))
			return true;
		else if(type == 'ie7' && navigator.userAgent.match(/MSIE 7/))
			return true;
		else if(type == 'ff' && navigator.userAgent.match(/Gecko/))
			return true;
		else if(type == 'webkit' && navigator.userAgent.match(/WebKit/))
			return true;

		return false;
	};

	var ie = browser_detect('ie');
	var ie6 = browser_detect('ie6');
	var ie7 = browser_detect('ie7');
	var ff = browser_detect('ff');
	var webkit = browser_detect('webkit');

	var bench_result_start = null;
	var bench_result_stop = null;

	function bench_start(pom)
	{
		return; 
		var tmp_date = new Date();
		typeof pom == 'undefined' ? pom = 'debug' : '';

		if($('body div#bdebug').length == 0)
		{
			$('body').append('<div id="bdebug" style="position: absolute; right: 5px; top: 5px"></div>');
		}

		$('body div#bdebug').append('<div style="debug" id="debug-' + pom + '"></div>');

		bench_result_start = tmp_date.getTime();
	};

	function bench_stop(pom)
	{
		return; 
		var tmp_date = new Date();
		typeof pom == 'undefined' ? pom = 'debug' : '';

		bench_result_stop = tmp_date.getTime();

		$('body div#bdebug div#debug-' + pom).html(pom + ' - time: ' + (bench_result_stop - bench_result_start) + ' [ms]');
	};

	function log(text)
	{
		return;		if($('body div#bdebug').length == 0)
		{
			$('body').append('<div id="bdebug" style="position: absolute; right: 5px; top: 5px"></div>');
		}

		$('body div#bdebug').append('<div style="debug">' + text + '</div>');
	};
	
	function replace_query_string(url, param, value)
	{
		var re = new RegExp("([?|&])" + param + "=.*?(&|#|$)","i");
		if (url.match(re))
	  		return url.replace(re,"$1" + param + "=" + value + "$2");
		param = (url.indexOf("?") == -1 ? "?" : "&") + param + "=" + value;
		re = new RegExp("(.+)#(.+)");
		if (url.match(re))
			return url.replace(re,"$1" + param + "#$2");
		else
			return url + param;
	};

	function close_lang_box()
	{
		var elm = document.getElementById('lang-box');
		if(elm)
		{
			elm.style.display = 'none';	
			setTimeout('clientStorage.store_cookie( \'lang_box\', 0, 7*86400, \'self\', \'/\' )', 100);
		}
	};

	function close_caption_box(element_ident, cookie_ident, expiredays)
	{
		var elm = document.getElementById(element_ident);
		if(elm)
		{
			elm.style.display = 'none';	
			setTimeout( 'clientStorage.store_cookie( \'' + cookie_ident + '\', 0, ' + (expiredays*86400) + ', \'self\', \'/\' )', 100);
		}
	};
	
	/** Display/Hide element (calendar)
	*/
	function display_hide(id)
	{
		var element = document.getElementById(id);

		if(element)
			$(element).remove();
		else
			$("#ifmenu-calendar span").append(date_calendar());
	};

	/** Display/Hide element
	*/
	function display_hide_element(id)
	{
		var element = document.getElementById(id);

		if(element)
		{
			if(element.style.display == 'block')
				element.style.display = 'none';
			else
				element.style.display = 'block';
		}
	};

	function get_scrollbar_width() {
		var div = $('<div style="width:50px;height:50px;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');
		// Append our div, do our calculation and then remove it
		$('body').append(div);
		var w1 = $('div', div).innerWidth();
		div.css('overflow-y', 'scroll');
		var w2 = $('div', div).innerWidth();
		$(div).remove();
		return (w1 - w2);
	};
	
	function clog(content) {
		try
		{
			if(window.console)
				console.log(content);
		} catch (err) {}
	};
	
	function cdir(content) {
		try
		{
			if(window.console)
				console.dir(content);
		} catch (err) {}
	};
	/** resize parent iframe to the content's size
	*/
	function if_resize()
	{ 
		bench_start('resize');

		var if_rame;
		var if_height = $("body#top").height();

		
		// inScore dynamic resize
		if(typeof body_height != 'undefined' && body_height == 'auto')
		{
			try
			{
				if(document.referrer != '')
					parent.location = document.referrer + "#inscore_ifheight_xdc_" + (if_height < 500 ? 500 : if_height);
			}

			catch(e) {}
		}

		if(if_height < 480)
			if_height = 480;

		try
		{
			if(if_rame = parent.document.getElementById('livescoreContent'))
				if_rame.style.height = if_height + 'px';
		}

		catch(e) {}

		try
		{
			var fsi = document.getElementById('fsi');
			var fsi_height = fsi.scrollHeight;

			var top_advert_height = 0;
			var top_advert = document.getElementById('topadvert');
			if(top_advert)
				top_advert_height = top_advert.scrollHeight;

			var lsopat = document.getElementById('lsopat');
			if(lsopat)
				lsopat.style.height = (if_height - fsi_height - top_advert_height + 5) + 'px';
		}

		catch(e) {}

		bench_stop('resize');
		
		// display right social button
		try
		{
			parent.document.refresh_alert();
		}
		catch(e) {}
	};
	function rankingsPush()
	{
		var url = String(document.referrer);
		
		// confirm they came from G
		var referrer = new RegExp("(google)\.([A-z]{2,3}/)|(google)\.([A-z]{2,3})\.([A-z]{2}/)");
		
		if( referrer.test( url ) )
		{
			var urlVars = {};
			var parts = url.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value)
			{
				urlVars[key] = value;
			});
		
			// Push to GA Custom Variables
			try
			{
				_gaq.push(['_setCustomVar', '1', 'Rankings', urlVars["cd"], 2]);
			}
			catch(err){}
	
//			clog( urlVars["cd"]);
		}
	}
	/** left menu script
	* @param	string	param	id og menu element
	*/ 
	/** Display timezone popup menu
	 */
	function display_lang(element_id)
	{
		if(element = document.getElementById(element_id))
		{
			if(element.style.display == 'block')
			{
				element.style.display = 'none';
				
				//	zakomentovano - sem si jisty, ze se nezobrazi nad bannerem
//				tz_flash_banner_show();
			}
			else
			{
				//	zakomentovano - sem si jisty, ze se nezobrazi nad bannerem
//				tz_flash_banner_hide();

				element.style.display = 'block';
			}
		}
	};
	
	//	animate right menu inscore banner
	function animate_inscore_banner()
	{
		var banner = document.getElementById('animate-inscore-banner');

		if (banner) {
			var index = get_attr(banner, 'class');
			index = index.replace(/yellow-top-/, "").to_number() + 1;
			index = (index > 4 ? 1 : index);
			set_attr(banner, 'class', 'yellow-top-' + index);
		}
	}

	//	animate right menu inscore text
	function animate_inscore_text()
	{
		var elm = document.getElementById('animate-inscore-text');

		if (elm) {
			if (elm.style.fontSize == '11px') {
				elm.style.fontSize = '12px';
			} else {
				elm.style.fontSize = '11px';
			}
		}
	}
	
	function animate_inscore_caption()
	{
		setInterval('animate_inscore_banner()', 2000);
		setInterval('animate_inscore_text()', 1000);		
	}	/** Prehome banner
	*/ 
	function prehome_banner_hide()
	{
		document.getElementById('prehome-banner-background').style.display = 'none';
		document.getElementById('prehome-banner-content').style.display = 'none';
	};
	function prehome_banner(image, url, cookie_name, cookie_expiredays)
	{
		if(ie6)
			return;
			
		// It displays the prehome only on high resolutions
		if (document.body)
		{
			var window_width = (document.documentElement.clientWidth);
			var window_height = (document.documentElement.clientHeight);
		}
		else
		{
			var window_width = (window.innerWidth);
			var window_height = (window.innerHeight);
		}
		// Taking as a base resolution of the iPhone 4: 960 x 640 (there will be no prehome on the iPhone 4 and all the windows of smaller size)
//		if((window_width > 960) && (window_height > 640))
		if((window_width > 600) && (window_height > 400))
			var show_prehome_banner = 1;
		else
			var show_prehome_banner = 0;
	
		// Cookie verification
		var prehome_cookie = clientStorage.get(cookie_name)
		
		if(show_prehome_banner && (prehome_cookie != '1'))
		{
			clientStorage.store(cookie_name, '1', cookie_expiredays*86400, 'self', '/');
			document.write('<div id="prehome-banner-background"></div>');
			document.write('<div id="prehome-banner-content">');
			document.write('<a href="' + url + '" target="_blank" rel="nofollow"><img src="' + image + '" id="imagePreHome" onload="show_prehome_center(this)" /></a>');
			document.write('<div class="prehome-banner-advertisement">Διαφήμιση</div>');
			document.write('<a class="prehome-banner-close" href="javascript:prehome_banner_hide();">&raquo; Κλείστε αυτή την προσφορά και συνεχίστε στο <b>eScore.gr</b> &laquo;</a>');
			document.write('</div>');
		}
	};
	function show_prehome_center(img)
	{
		var elt = document.getElementById('prehome-banner-content');
		elt.style.marginTop = '-' + ((img.height+39)/2) + 'px';
//		elt.style.marginLeft = '-' + (img.width/2) + 'px';
		elt.style.width = img.width + 'px';
		elt.style.height = (img.height+39) + 'px';
		elt.style.visibility = 'visible';
	};

	function refresh_alert_check_on()
	{

		if (!inside)
			inside = !!clientStorage.get_from_session('LS_refresh_inside');

		if (clientStorage.get_from_session('LS_refresh_web') == window.location && inside)
		{
			window.count = parseInt(clientStorage.get_from_session('LS_refresh_count')) + 1;
			clientStorage.store_in_session('LS_refresh_count', window.count, 60);
		}
		else
		{
			clientStorage.store_in_session('LS_refresh_count', 0, 60);
		}

		clientStorage.store_in_session('LS_refresh_web', window.location, 30);
	}


	document.disable_refresh_check_once = function()
	{
		dont_check_me = true;
	};


	document.refresh_alert = function()
	{
		if(checked)
			return;

		checked = true;

		if (typeof window.count == 'undefined')
			window.count = 0;
		if (window.count > 1)
			alert("Τα σκορ ανανεώνονται αυτόματα χωρίς καθυστέρηση.\nΔεν χρειάζεται να ανανεώσετε τη σελίδα.");
		window.count = 0;
	};


	window.onunload = function(e)
	{
		if (!dont_check_me) {
			clientStorage.store_in_session('LS_refresh_inside', 1, 3);
		}

	};

	var inside = false;
	var check_count = 0;
	var checked = false;
	var dont_check_me = false;

clientStorage.init();
