
	function GO(elemid)
	{
		var elem;

		if(typeof elemid == 'object')
		{
			elem=elemid;
		}
		else
		{
			if(document.getElementById)
			{
				elem=document.getElementById(elemid);
			}
			else if(document.all)
			{
				elem=document.all(elemid);
			}
			else if(document.layers)
			{
				elem=document.all[elemid];
			}
		}

		return elem;
	}



	function CCS(elemid, css_style, css_value, gett)
	{
		var elem;

		elem=GO(elemid);

		if(!elem)
		{
			if(gett) return Array(false, false);
			return false;
		}

		if(gett) return Array(true, elem.style[css_style]);


		if(elem.style)
		{
			elem.style[css_style]=css_value;
		}

		return true;
	}



	var CCB;

	function CCBD()
	{
		if(GO('top').style.filter != undefined)
		{
			CCB='ie';
		}
		else if(GO('top').style.opacity != undefined)
		{
			CCB='moz';
		}
		else
		{
			CCB='other';
		}
	}



	function CCO(elemid, val)
	{
		if(!CCB) CCBD();

		if(CCB != 'other')
		{
			if(typeof elemid != 'object')
			{
				elemid=GO(elemid);
			}

			if(CCB == 'ie')
			{
				elemid.style.filter='alpha(opacity=' + val + ')';
			}
			else
			{
				elemid.style.opacity=val / 100;
			}
		}
	}



	//window.onload=Init;

	function Counter()
	{
		var elem=GO('counterimg');

		if(elem)
		{
			var wwx=0,wwy=0;

			if (typeof(window.innerWidth) == 'number')
			{
				wwx=window.innerWidth;
				wwy=window.innerHeight;
			}
			else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
			{
				wwx=document.documentElement.clientWidth;
				wwy=document.documentElement.clientHeight;
			}
			else if (document.body && (document.body.clientWidth || document.body.clientHeight))
			{
				wwx=document.body.clientWidth;
				wwy=document.body.clientHeight;
			}

			elem.src='http://hitx.waudit.cz/h.php?id=10005&js=1&x='+screen.width+'&y='+screen.height+'&bit=' +screen.colorDepth+'&wx='+wwx+'&wy='+wwy+'&ref=' +escape(top.document.referrer)+'&t='+escape(document.title);
		}
	}


	function Post(url, vals)
	{
		var param='';

		for(key in vals)
		{
			param+=key + '=' + (vals[key] ? vals[key] : '') + '&';
		}
//alert(url);
		http=new XMLHttpRequest();
		http.open('POST', url, true);
		http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=utf-8');
		http.setRequestHeader('Content-length', param.length);
		http.setRequestHeader('Connection', 'close');

		http.onreadystatechange=function()
		{
			if(http.readyState == 4)
			{
				Post_Response(http.responseText);
			}
		}

		http.send(param);
	}



	function Post_Response(string)
	{
		var ex;

		ex=string.split("\n");

		if((ex[0] == '-start-') && (ex[ex.length-1] == '-end-'))
		{
			for(key in ex)
			{
				//alert(ex[key]);
				if((key == 0) || (key == (ex.length - 1))) continue;

				eval(ex[key]);
			}
		}
		else
		{
			//alert('ERJS: ' + string);
		}
	}

	/**
	*
	*  URL encode / decode
	*  http://www.webtoolkit.info/
	*
	**/

	var Url = {

		// public method for url encoding
		encode : function (string) {
			return escape(this._utf8_encode(string));
		},

		// public method for url decoding
		decode : function (string) {
			return this._utf8_decode(unescape(string));
		},

		// private method for UTF-8 encoding
		_utf8_encode : function (string) {
			string = string.replace(/\r\n/g,"\n");
			var utftext = "";

			for (var n = 0; n < string.length; n++) {

				var c = string.charCodeAt(n);

				if (c < 128) {
					utftext += String.fromCharCode(c);
				}
				else if((c > 127) && (c < 2048)) {
					utftext += String.fromCharCode((c >> 6) | 192);
					utftext += String.fromCharCode((c & 63) | 128);
				}
				else {
					utftext += String.fromCharCode((c >> 12) | 224);
					utftext += String.fromCharCode(((c >> 6) & 63) | 128);
					utftext += String.fromCharCode((c & 63) | 128);
				}

			}

			return utftext;
		},

		// private method for UTF-8 decoding
		_utf8_decode : function (utftext) {
			var string = "";
			var i = 0;
			var c = c1 = c2 = 0;

			while ( i < utftext.length ) {

				c = utftext.charCodeAt(i);

				if (c < 128) {
					string += String.fromCharCode(c);
					i++;
				}
				else if((c > 191) && (c < 224)) {
					c2 = utftext.charCodeAt(i+1);
					string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
					i += 2;
				}
				else {
					c2 = utftext.charCodeAt(i+1);
					c3 = utftext.charCodeAt(i+2);
					string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
					i += 3;
				}

			}

			return string;
		}

	}



	function HS(string)
	{
		string=string.replace(/&/g, '&amp;');
		string=string.replace(/</g, '&lt;');
		string=string.replace(/>/g, '&gt;');
		string=string.replace(/"/g, '&quot;');

		return string;
	}

