	function GetCookie(sName)
	{
		var aCookie = document.cookie.split("; ");
		for (var i=0; i < aCookie.length; i++)
		{
			var aCrumb = aCookie[i].split("=");
			if (sName == aCrumb[0])
				return unescape(aCrumb[1]);
		}
		return null;
	}
	
	function SetCookie(cN, cV, cE, cP)
	{
		cV = escape(cV);
		
		if (cE == "")
		{
			var nowDate = new Date();
			nowDate.setHours(nowDate.getHours() + 12);
			cE = nowDate.toGMTString();
		}
		
		(cP != "") ? cP = ";Path=" + cP : cP = '/';
		
		document.cookie = cN + "=" + cV + ";expires=" + cE + cP;
	}

	function DeleteCookie(sName, path, domain)
	{
		if (GetCookie(sName)) 
		{
				document.cookie = sName + "=" + 
				((path) ? "; path=" + path : "") +
				((domain) ? "; domain=" + domain : "") +
				"; expires=Thu, 01-Jan-70 00:00:01 GMT"
		}
	}
	
	function gE(el)
	{ return document.getElementById(el); }
	

	function InnerToFromAjax(_url, oInsertTo)
	{
		var oAjax;

		if (window.XMLHttpRequest)
		{
			oAjax = new XMLHttpRequest();
		}
		else if (window.ActiveXObject)
		{
			try 
			{
				oAjax = new ActiveXObject('Msxml2.XMLHTTP');
			} catch (e){}
			try 
			{
				oAjax = new ActiveXObject('Microsoft.XMLHTTP');
			} catch (e){}
		}

		if (oAjax)
		{
			oAjax.onreadystatechange = function()
			{
				if (oAjax.readyState == 4 && oAjax.status == 200) 
				{
					var sContent = oAjax.responseText;
					oInsertTo.innerHTML = sContent;
				}
			};
			oAjax.open("POST", _url, true);
			oAjax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			oAjax.send('is_ajax=1');
		}
		else
		{
			alert("AJAX not init!");
		}
	}
	
	function AlertFromAjax(_url)
	{
		var oAjax;

		if (window.XMLHttpRequest)
		{
			oAjax = new XMLHttpRequest();
		}
		else if (window.ActiveXObject)
		{
			try 
			{
				oAjax = new ActiveXObject('Msxml2.XMLHTTP');
			} catch (e){}
			try 
			{
				oAjax = new ActiveXObject('Microsoft.XMLHTTP');
			} catch (e){}
		}

		if (oAjax)
		{
			oAjax.onreadystatechange = function()
			{
				if (oAjax.readyState == 4 && oAjax.status == 200) 
				{
					alert( oAjax.responseText );
				}
			};
			oAjax.open("POST", _url, true);
			oAjax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
			oAjax.send('is_ajax=1');
		}
		else
		{
			alert("AJAX not init!");
		}
	}