function initialization() {
	// позиционируем прокрутку до текущего элементу.
	var ul = $$('ul.fileposts');
	if(  ul.length )
	{
		var ul = ul[0];
		var e = ul.select('li a.active')[0];
		if (e) {
			e = e.up();
			var top = e.positionedOffset().top - ul.positionedOffset().top -1;
			console.log( top );
			ul.scrollTop = top;
		}
	}
	
}

Event.observe(self, 'load', selfLoad);
function selfLoad(){

	selfResize();
}

Event.observe(self, 'resize', selfResize);
function selfResize(){

}


// поиск
function ge()
{
 var ea;
 for( var i = 0; i < arguments.length; i++ ) {
 var e = arguments[i];
 if( typeof e == 'string' )
 e = $(e);
 if( arguments.length == 1 )
 return e;
 if( !ea )
 ea = new Array();
 ea[ea.length] = e;
 }
 return ea;
}

function placeholderSetup(id) {
 var el = ge(id);
 if(!el) return;
 if(el.type != 'text') return;
 if(el.type != 'text') return;

 var ph = el.getAttribute("placeholder");
 if( ph && ph != "" ) {
 el.value = ph;
 el.style.color = '#777';
 el.is_focused = 0;
 el.onfocus = placeholderFocus;
 el.onblur = placeholderBlur;
 }
}

function placeholderFocus() {
 if(!this.is_focused) {
 this.is_focused = 1;
 this.value = '';
 this.style.color = '#000';

 var rs = this.getAttribute("radioselect");
 if( rs && rs != "" ) {
 var re = $(rs);
 if(!re) { return; }
 if(re.type != 'radio') return;

 re.checked=true;
 }
 }
}

function placeholderBlur() {
 var ph = this.getAttribute("placeholder")
 if( this.is_focused && ph && this.value == "" ) {
	 this.is_focused = 0;
	 this.value = ph;
	 this.style.color = '#777';
 }
}