	var pos = 0;
	var width = 340;
	var sTime = 0;
	var cTime = 0;

	function PB_start()
	{
		dt = new Date();
		sTime = dt.getTime();
	}; //func

	function PB( newpos )
	{
		var kbit = "";

		if ( document.all.progress_bar )
		{
			w = Math.ceil( ( newpos / 100 )*width );
			if ( w > width )
			{
				w = width;
			}; //if
			document.all.progress_bar.width = w;

			obj = getObjectByID( 'tstatus' );
			if ( obj )
			{
				obj_d = getObjectByID( 'data' );
				if ( obj_d )
				{
					ct = new Date();
					cTime = ct.getTime();

					if ( sTime = cTime )
					{
						aj = 0;
					} else
					{
						aj = ( cTime - sTime ) / 1000;
					}; //if

					if ( aj == 0 )
					{
						aj = .1;
						ed = 0;
					} else
					if ( aj < 2 )
					{
						ed = 1;
					} else
					{
						ed = 0;
					}; //if

					ki = ( ed == 0 );

//					kilobaidid = obj_d.innerHTML.length / 1024;
//					kiirus = kilobaidid / aj;
//					kbps = ( Math.round( ( kiirus * 8 ) * 10 * 1.02 ) ) / 10;
//					kB_s = ( Math.round( ( kilobaidid * 10 ) / aj ) ) / 10;

//					obj.innerHTML = obj.innerHTML + " <h1>(" + obj_d.innerHTML.length + " áàéò)</h1>";
//					obj.innerHTML = obj.innerHTML + "<h1>" + kbps + "êáèò/cåê / " + kB_s + " êÁ/ñåê</h1>";

//					kbit = ' (' + kbps + 'Êáèò/ñåê)';
				}; //if

				obj.innerHTML = "<br><h1>" + Math.ceil(( w / width ) * 100 ) + ' %' + kbit + '</h1>';
			}; //if
		}; //if
	}; //func

	function getObjectByID(id, o)
	{ // v1.0
		var c, el, els, f, m, n;
		if (!o) o = document;
		if (o.getElementById) el = o.getElementById(id); else 
			if (o.layers) c = o.layers; else
				if (o.all) el = o.all[id];
		if (el) return el;
		if (o.id==id || o.name==id) return o;
		if (o.childNodes) c = o.childNodes;
		if (c)
			for (n=0; n<c.length; n++) {
				el = getObjectByID(id,c[n]);
				if (el) return el;
			}; //for
		f = o.forms;
		if (f)
			for (n=0; n<f.length; n++) {
				els = f[n].elements;
				for (m=0; m<els.length; m++) {
					el = getObjectByID(id,els[n]);
					if (el) return el;
				}; //for
			}; //for
		return null;
	}; //func

	function ShowHideObj( id )
	{
		obj = getObjectByID( id );
		if ( obj != null )
		{
			if ( obj.className == 'hidden' )
			{
				obj.className = 'visible';
			} else
			{
				obj.className = 'hidden';
			}; //if
		}; //if
	}; //func

	// (C) InputPlaceholder by artlebedev.ru

	function InputPlaceholder (input, value, cssFilled, cssEmpty)
	{
		var thisCopy = this
	
		this.Input = input
		this.Value = value
		this.SaveOriginal = (input.value == value)
		this.CssFilled = cssFilled
		this.CssEmpty = cssEmpty

		this.setupEvent (this.Input, 'focus', function() {return thisCopy.onFocus()})
		this.setupEvent (this.Input, 'blur',  function() {return thisCopy.onBlur()})
		this.setupEvent (this.Input, 'keydown', function() {return thisCopy.onKeyDown()})

		if (input.value == '') this.onBlur();

		return this
	}; //func

	InputPlaceholder.prototype.setupEvent = function (elem, eventType, handler)
	{
		if (elem.attachEvent)
		{
			elem.attachEvent ('on' + eventType, handler)
		}

		if (elem.addEventListener)
		{
			elem.addEventListener (eventType, handler, false)
		}
	}; //func

	InputPlaceholder.prototype.onFocus = function()
	{
		if (!this.SaveOriginal &&  this.Input.value == this.Value)
		{
			this.Input.value = ''
		}
		else
		{
			this.Input.className = this.CssFilled
		}
	}; //func

	InputPlaceholder.prototype.onKeyDown = function()
	{
		this.Input.className = this.CssFilled
	}; //func

	InputPlaceholder.prototype.onBlur = function()
	{
		if (this.Input.value == '' || this.Input.value == this.Value)
		{
			this.Input.value = this.Value
			this.Input.className = this.CssEmpty
		}
		else
		{
			this.Input.className = this.CssFilled
		}
	}; //func