var strNotInitXHR="Невозможно создать объект XMLHttpRequest!";
var strWaitRSvrResponse="Удаленный сервер не отвечает...\r\nВы желаете продолжить ожидание ответа?";
var strRSvrNotResponding="Удаленный сервер не отвечает...\r\nПроверьте соединение с интернетом, либо попробуйте обновить страницу.\r\nЕсли ошибка повторится, то обратитесь к администратору сайта.";
var strUndefinedURL="Отсутствует строка URL";
var drrrum=null;
//window.addEventListener('load', function(){var d=document.createElement('div');d.innerHTML='<iframe style="display:none" src="about:blank" id="'+globalIframeId+'" name="'+globalIframeId+'"></iframe>';document.getElementsByTagName("BODY")[0].appendChild(d);}, true);
function colibrRequest(){this.initXHR=function(){try{this.XHR=new XMLHttpRequest();}catch(err1){try{this.XHR=new ActiveXObject("Msxml2.XMLHTTP");}catch(err2){try{this.XHR=new ActiveXObject("Microsoft.XMLHTTP");}catch(err3){this.XHR=false;}}};return this.XHR==false ? false : true;};if(!this.initXHR())alert(strNotInitXHR);
this.onLoad=function(){}
this.onload=function(){}
this.onSend=function(){}
this.abortRequest=function(){this.XHR.abort();}
this.isLoaded=function(){
	if(this.abort){clearInterval(this.loadInterval);
	clearTimeout(this.loadTimeOut);
	this.XHR.abort();
	this.abort=false;
	return;
}
if(this.XHR.readyState==4){
	if(this.XHR.responseText || this.XHR.responseXML){
		clearInterval(this.loadInterval);
		clearTimeout(this.loadTimeOut);
		this.response=this.XHR.responseText.length>0 ? this.XHR.responseText : this.XHR.responseXML;
		this.onLoad();
		this.onload();
	}
}
}
this.sendRequest=function(url, pass, type, contentType, data, async){if(!url)return strUndefinedURL;if(!pass)pass=false;if(!contentType)contentType='text/html; charset=windows-1251';if(!type)type="GET";if(!data)data=null;if(async==null)async=true;this.XHR.open(type, url, async);this.XHR.setRequestHeader('Content-Type', contentType);this.XHR.send(data);this.abort=pass;var self=this;this.loadInterval=setInterval(function(){self.isLoaded();},100);this.loadTimeOut=setTimeout(function(){self.TimeOut();},20000);}
this.TimeOut=function(){this.response='<$flag$>false<$/flag$>';this.onload();this.onLoad();this.abort=true;clearTimeout(this.loadTimeOut);}
this.sendFormData=function(f,u,enc,met){function getFrameDoc(fr){fr=_$$(fr);if(fr.contentDocument)return fr.contentDocument;if(fr.contentWindow)return fr.contentWindow.document;return fr.document;}var id='af_'+Math.random();var d=document.createElement('div');d.innerHTML='<iframe style="display:none" src="about:blank" id="'+id+'" name="'+id+'"></iframe>';document.getElementsByTagName("BODY")[0].appendChild(d);var i=_$(id);var self=this;f=_$$(f);f.setAttribute('target', id);if(u)f.setAttribute('action', u);f.method="POST";if(met)f.method=met;f.enctype="multipart/form-data";if(enc)f.enctype=enc;function onIframeLoad(){self.response=getFrameDoc(id).getElementsByTagName('BODY')[0].innerHTML;self.onLoad();self.onload();};var to=setTimeout(function(){if(i.attachEvent)i.attachEvent('onload', function(){onIframeLoad()});else if(i.addEventListener)i.addEventListener('load', function(){onIframeLoad()}, true);else i.onload=function(){onIframeLoad()};f.submit();self.onSend()}, 100);}
}
function textAreaMaxSize(f,m){if(f.value.length>m)f.value=f.value.substring(0,m);}
function replaceStr(a,f,t){var s='';i=a.indexOf(f);if(i>=0){s=a.substr(0, i)+t;a=a.substr(i+f.length);}return s+a;}
function leftStr(s, i){if(i>=0)s=s.substr(0, i);return s;}
function _$(e){return document.getElementById(e);}
function isStr(e){return typeof(e)=="string" ? true : false;}
function _$$(e){return isStr(e)==true ? _$(e) : e;}
function _i(n){return parseInt(n);}
function getClientHeight(){return document.compatMode=='CSS1Compat'?document.documentElement.clientHeight:document.body.clientHeight;}
function getClientWidth(){return document.compatMode=='CSS1Compat'?document.documentElement.clientWidth:document.body.clientWidth;}
function getScrollTop(){return document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;}
function colibrUtils(){this.element={
firstChild: function(e){e=_$$(e);var n=e.firstChild;while(n&&n.nodeType!=1)n=n.nextSibling;return n;},
lastChild: function(e){e=_$$(e);var n=e.lastChild;while(n&&n.nodeType!=1)n=n.previousSibling;return n;},
nextSibling: function(e){e=_$$(e);var n=e;do n=n.nextSibling;while(n&&n.nodeType!=1);return n;},
previousSibling: function(e){e=_$$(e);var n=e;do n=n.previousSibling;while(n&&n.nodeType!=1);return n;},
childCount: function(e){e=_$$(e);var l=e.childNodes;var i=l.length;var j=0;while(i--)if(l[i].nodeType==1)j++;return j;}
}
this.extractULAR=function(t, d){var a=d.lastIndexOf("<$"+t+"$>");var b=d.lastIndexOf("<$/"+t+"$>");var s=a+t.length+4;var e=b;d=d.substring(s, e);return (a>-1)&&(b>-1) ? d : null;}
this.procULAR=function(d){d=this.repairULAR(d);var h=this.extractULAR('redirect',d);if(h)if(h=='self'){var href=location.href;href=leftStr(href, href.indexOf('#'));location.href=href;}else location.href=h;h=this.extractULAR('error',d);if(h){alert(h);return false;};h=this.extractULAR('flag',d);if(h)return h=="true" ? true : false;h=this.extractULAR('ULAR',d);if(h)return h;return false;
}
this.repairULAR=function(s){while(s.indexOf('&lt;$')>-1){s=replaceStr(s,'&lt;$','<$');};while(s.indexOf('$&gt;')>-1){s=replaceStr(s,'$&gt;','$>');};return s;}
this.centerElement=function(e){var b=document.getElementsByTagName('BODY')[0];return{
	top:getScrollTop()+_i(_i(getClientHeight()/2)-_i(_$$(e).clientHeight/2)),
	left:_i((b.clientWidth-_i(_$$(e).clientWidth))/2)}}
this.getCursorPos=function(e){
var x=0,y=0;if(!e)e=window.event;if(e.pageX || e.pageY){x=e.pageX;y=e.pageY;}else if(e.clientX || e.clientY){x=e.clientX+(document.documentElement.scrollLeft || document.body.scrollLeft)-document.documentElement.clientLeft;y=e.clientY+(document.documentElement.scrollTop || document.body.scrollTop)-document.documentElement.clientTop;}return{"x":x,"y":y};}
this.getElementPos=function(o){o=_$$(o);var x=0,y=0;while(o){x+=o.offsetLeft;y+=o.offsetTop;o=o.offsetParent;}return{'x':x,'y':y};}
this.vars=new Array();
this.addEventListener=function(e, ev, f, uc){if(e.attachEvent){e.attachEvent('on'+ev, f);}else{e.addEventListener(ev, f, uc);}}
}

function colibrFX(){this.fadeOpacity=function(sElemId,nStartOpacity,nFinishOpacity,nDalay){var e =_$$(sElemId);if(!isStr(sElemId))sElemId=sElemId.id;if(!e || !this.getOpacityProperty())return;var nOpacity=nStartOpacity;if(this.aProc){clearInterval(this.aProc.tId);nOpacity=this.aProc.nOpacity;};if(nOpacity==nFinishOpacity)return;var self=this;this.aProc={'nOpacity':nOpacity, 'tId':setInterval(function(){self.fading(sElemId);}, nDalay), 'nStartOpacity':nStartOpacity, 'nFinishOpacity': nFinishOpacity, 'nDSign':(nFinishOpacity-nStartOpacity > 0?1:-1)};}
this.fading=function(sElemId){var proc=this.aProc;proc.nOpacity=Math.round((proc.nOpacity+.1*proc.nDSign)*10)/10;this.setElementOpacity(_$(sElemId),proc.nOpacity);if(proc.nOpacity==proc.nStartOpacity || proc.nOpacity==proc.nFinishOpacity){clearInterval(this.aProc.tId);this.onFadeComplete();};}
this.onFadeComplete=function(){};
this.setElementOpacity=function(oElem, nOpacity){oElem=_$$(oElem);
var p=this.getOpacityProperty();
(this.setElementOpacity=p=="filter"?new Function('oElem', 'nOpacity', 'nOpacity*=100; oElem.style.filter="alpha(opacity="+nOpacity+")";'):p?new Function('oElem', 'nOpacity', 'oElem.style.'+p+'=nOpacity;'):new Function)(oElem, nOpacity);
}
this.getOpacityProperty=function(){var p;if(isStr(document.body.style.opacity))p='opacity';else if(isStr(document.body.style.MozOpacity))p='MozOpacity';else if(isStr(document.body.style.KhtmlOpacity))p='KhtmlOpacity';else if(document.body.filters && navigator.appVersion.match(/MSIE ([\d.]+);/)[1]>=5.5)p='filter';return (this.getOpacityProperty=new Function("return '"+p+"';"))();}
this.moveElementTo=function(elem, x, y, step, speed){
	elem=_$$(elem);
	var self=this;
	if(!step)step=50;
	if(!speed)speed=40;
	var corX=x>elem.offsetLeft ? true : false;
	var corY=y>elem.offsetTop ? true : false;
	var subX=x>elem.offsetLeft ? false : true;
	var subY=y>elem.offsetTop ? false : true;
	this.moveProps={'elem': elem, 'step': step, 'x': x, 'y': y, 'corX': corX, 'corY': corY,'subX': subX, 'subY': subY, 'endX': false, 'endY': false};
	this.moving=setInterval(function(){self.move()},speed);}
this.move=function() {
	var elem=this.moveProps.elem;
	var step=this.moveProps.step;
	if(this.moveProps.x==elem.offsetLeft)this.moveProps.endX=true;
	if(this.moveProps.y==elem.offsetTop)this.moveProps.endY=true;
	var x=this.moveProps.x-elem.offsetLeft;
	x=x<0 ? x*(-1) : x;
	var y=this.moveProps.y-elem.offsetTop;
	y=y<0 ? y*(-1) : y;
	y=y/step;
	if(!this.moveProps.corY)y=y*-1;
	x=x/step;
	if(!this.moveProps.corX)x=x*-1;

	if(x>0)x=x<2 ? 2 : x;else x=x>-2 ? -2 : x;
	if(y>0)y=y<2 ? 2 : y;else y=y>-2 ? -2 : y;
	//alert(parseInt(x));
	if(!this.moveProps.endX)elem.style.left=Math.round(elem.offsetLeft+x)+'px';
	if(!this.moveProps.endY)elem.style.top=Math.round(elem.offsetTop+y)+'px';
	//alert("y="+this.moveProps.y + " <=> top=" + elem.offsetTop);
	if(!this.moveProps.subX){if(this.moveProps.x<=elem.offsetLeft)this.moveProps.endX=true;}else{if(this.moveProps.x>=elem.offsetLeft)this.moveProps.endX=true;}
	if(!this.moveProps.subY){if(this.moveProps.y<=elem.offsetTop)this.moveProps.endY=true;}else{if(this.moveProps.y>=elem.offsetTop)this.moveProps.endY=true;}
	//alert(elem.offsetLeft);
	
	if(this.moveProps.endY && this.moveProps.endX){clearInterval(this.moving);this.onMoveComplete()}
	//_$('pl_'+randId).src=imageSrc;
			//alert(preLoader.src);
}
this.onMoveComplete=function(){}
this.onResizeComplete=function(){}
this.onResizeBegin=function(){}
this.stopResize=function(){this.stopResizing=true;}
this.resizeElement=function(elem, width, height, step, speed){
	this.stopResizing=false;
	if(!speed)speed=10;
	if(!step)step=10;
	if(this.riswork)return;
	this.riswork=true;
	var clearE=false;
	var self=this;
	elem=_$$(elem);
		this.onResizeBegin();
	if(this.varResizeElement){
		if(this.varResizeElement.id==elem.id){width=this.varResizeOldW;height=this.varResizeOldH;clearE=true;}else{
			var oldElem=this.varResizeElement;var oldElemW=this.varResizeOldW;var oldElemH=this.varResizeOldH;
			var timer=setTimeout(function(){
				var cFXrekurs=new colibrFX();
				cFXrekurs.resizeElement(oldElem, oldElemW, oldElemH, speed);
				cFXrekurs.onResizeComplete=function(){cFXrekurs=null;};
			},1);
		}
		//alert(width);
	}
	this.varResizeElement=elem;
	this.varResizeWC=false;
	this.varResizeHC=false;
	var curW=this.varResizeElement.offsetWidth;
	var curH=this.varResizeElement.offsetHeight;
	this.varResizeOldW=curW;
	this.varResizeOldH=curH;
	var stepW=curW>width ? -step : step;
	//<test
	var tmp=curW-width;
	if(tmp!=0){
		if(tmp<0)tmp*=-1;
		tmp/=step;
		var tmp2=curH-height;
		if(tmp2<0)tmp2*=-1;
		tmp=tmp2/tmp;
	}
	if(tmp<1)tmp=step;
	var stepH=parseInt(tmp);
	if(tmp>stepH)stepH+=1;
	//test>
	var dirH=curH>height ? -1 : 1;
	stepH*=dirH;
	this.resizeInterval=setInterval(function(){
		if(stepW<0){
			if(self.varResizeElement.offsetWidth<=width+step){self.varResizeElement.style.width=width+'px';self.varResizeWC=true;}else{curW+=stepW;self.varResizeElement.style.width=curW+'px';}
		}else{
			if(self.varResizeElement.offsetWidth>=width-step){self.varResizeElement.style.width=width+'px';self.varResizeWC=true;}else{curW+=stepW;self.varResizeElement.style.width=curW+'px';}
		}
		if(stepH<0){
			if(self.varResizeElement.offsetHeight<=height+step){self.varResizeElement.style.height=height+'px';self.varResizeHC=true;}else{curH+=stepH;self.varResizeElement.style.height=curH+'px';}
		}else{
			if(self.varResizeElement.offsetHeight>=height-step){self.varResizeElement.style.height=height+'px';self.varResizeHC=true;}else{curH+=stepH;self.varResizeElement.style.height=curH+'px';}
		}
		if(self.varResizeHC && self.varResizeWC){clearInterval(self.resizeInterval);self.riswork=false;if(clearE)self.varResizeElement=false;self.onResizeComplete();};
	}, speed);
}
this.expressElement=function(elem, imgPath, color, flag){
if(!flag)if(this.exiswork)return;
this.exiswork=true;
var self=this;
if(this.varExBGElement || flag){
	this.expressPage();
}else{
elem=_$$(elem);
if(!color)color='#FFF';
var body=document.getElementsByTagName("BODY")[0];
var cFX=new colibrFX();
var cFX2=new colibrFX();
var cUtils=new colibrUtils();
var randId=Math.random();
var backDiv=document.createElement('div');
backDiv.style.backgroundColor=color;
backDiv.id='exbg_'+randId;
backDiv.style.position='absolute';
backDiv.style.zIndex='1000';
backDiv.style.width='100%';//body.scrollWidth+'px';
backDiv.style.top='0';
backDiv.style.left='0';
backDiv.style.height='100%';//body.scrollHeight+'px';
backDiv.style.display='none';
backDiv.style.margin='0';
backDiv.onclick=function(){var ctmpFXvar=new colibrRequest();ctmpFXvar.expressPage();ctmpFXvar=null;};	
backDiv.style.backgroundPosition='center';
backDiv.style.backgroundRepeat='no-repeat'; 
backDiv.style.backgroundAttachment='fixed'; 
//backDiv.onclick=function(){self.hide();}
cFX.setElementOpacity(backDiv, .0);
body.appendChild(backDiv);
var shadow=document.createElement('div');
if(!imgPath)imgPath='';
window.onresize=function(){
shadow.innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr><td width="44" height="44" style="background-image:url('+imgPath+'lt.png)">&nbsp;</td>'+
    		'<td height="44" style="background-image:url(t.png); background-repeat:repeat-x;">&nbsp;</td>'+
			'<td width="44" height="44" style="background-image:url(rt.png)">&nbsp;</td></tr>'+
  			'<tr><td width="44" style="background-image:url(l.png); background-repeat:repeat-y;">&nbsp;</td>'+
			'<td width="'+(elem.offsetWidth-26)+'" height="'+(elem.offsetHeight-26)+'">&nbsp;</td>'+
    		'<td width="44" style="background-image:url(r.png); background-repeat:repeat-y; background-position:right">&nbsp;</td></tr><tr>'+
			'<td width="44" height="44" style="background-image:url(lb.png)">&nbsp;</td>'+
    		'<td height="44" style="background-image:url(b.png); background-repeat:repeat-x; background-position:bottom">&nbsp;</td>'+
    		'<td width="44" height="44" style="background-image:url(rb.png)">&nbsp;</td></tr></table>';
shadow.style.top=cUtils.getElementPos(elem).y-31+'px';
shadow.style.left=cUtils.getElementPos(elem).x-31+'px';
}
window.onresize();
shadow.style.position='absolute';
shadow.style.zIndex='1001';
shadow.id='expressShadow';
cFX2.setElementOpacity(shadow, .0);
body.appendChild(shadow);
this.varExBGElement=backDiv;
this.varExShadowElement=shadow;
this.varExElement=elem;
this.varExOldZIndex=elem.style.zIndex;
elem.style.zIndex='1002';
if(elem.style.position!='absolute')elem.style.position='relative';
backDiv.style.display='block';
//cFX2.onFadeComplete=function(){cFX2=null;}
cFX2.fadeOpacity(shadow, .0, 1, 10);
cFX.onFadeComplete=function(){cFX=null;self.exiswork=false;}
cFX.fadeOpacity(backDiv, .0, .8, 30);
}
}
this.expressPage=function(){
	if(this.varExBGElement){
	var self=this;
	var cFX=new colibrFX();
	var cFX2=new colibrFX();
	cFX.onFadeComplete=function(){
		self.varExBGElement.parentNode.removeChild(self.varExBGElement);
		self.varExElement.style.zIndex=self.varExOldZIndex;
		self.exiswork=false;
		self.varExBGElement=false;
		cFX=null;
	}
	cFX2.onFadeComplete=function(){
		self.varExShadowElement.parentNode.removeChild(self.varExShadowElement);
		self.varExShadowElement=false;
		cFX2=null;
	}
	cFX.fadeOpacity(this.varExBGElement, .8, .0, 10);
	cFX2.fadeOpacity(this.varExShadowElement, .8, .0, 10);	
	}
}
}

function colibrPopup(){
var body=document.getElementsByTagName("BODY")[0];var openFlag=false;var pE=document.createElement('div');pE.style.display='none';pE.style.position='absolute';pE.style.top='0px';pE.style.width='auto';pE.style.zIndex='999';pE.style.height='auto';pE.id='CoLibr_Popup_'+Math.random();body.appendChild(pE);pE=_$(pE.id);openFlag=true;this.popupList={};
var openedPopup=false;
this.showPopup=function(x, y, id, fix){openedPopup=false;var position=fix?'fixed':'absolute';pE.style.position=position;if(!openFlag){this.hidePopup();setTimeout(function(){self.showPopup(x, y, id);}, 100);return;}clearTimeout(this.hideTimer);var param=this.popupList[id];var items=this.popupList[id].items;if(param.style!='')pE.className=param.style;pE.innerHTML="";for(var cnt=0;cnt<items.length;cnt++){var events="";var disable="";if(items[cnt].enabled)events=' onmouseover="this.className=\'over\'" onmouseout="this.className=\'\'" onclick="'+items[cnt].func+';"';else disable=' class="disabled"';pE.innerHTML+='<div'+events+disable+'>'+items[cnt].name+'</div>';}this.oldPopupId=id;pE.style.left=x+'px';pE.style.top=y+'px';var FX=new colibrFX();FX.setElementOpacity(pE, .0);pE.style.display='block';FX.fadeOpacity(pE.id,.1,param.opacity,10);FX.onFadeComplete=function(){openedPopup=true;FX=null;};var self=this;pE.onclick=function(){self.hidePopup();};}
this.hidePopup=function(){if(!openFlag || !openedPopup)return;if(pE.style.display=='none')return;openFlag=false;pE.onblur=function(){};var FX=new colibrFX();FX.fadeOpacity(pE.id,.5,.2,1);FX.onFadeComplete=function(){FX=null;pE.style.display='none';openFlag=true;openedPopup=false;};}
this.addPopup=function(id, style, opacity, items){this.popupList[id]={'style':style, 'opacity':opacity, 'items':items};}
this.addItem=function(name, func, enabled){return {'name':name, 'func':func, 'enabled':enabled==false ? false : true};}
var cpUtil=new colibrUtils();cpUtil.addEventListener(body, 'click', this.hidePopup, false);cpUtil.addEventListener(window, 'scroll', this.hidePopup, false);cpUtil=null;
}

function colibrImgWindow(cssClass){
var body=document.getElementsByTagName("BODY")[0];
var randId=Math.random();
var self=this;
var cFX=new colibrFX();
var openFlag=true;
var pre=document.createElement('img');

pre.border=0;
pre.id='pl_'+randId;
pre.src='';
pre.style.display='none';
pre.style.position='absolute';

function loadImage(){
var cUtils=new colibrUtils();
_$('cw_'+randId).style.display='block';
if(!self.toX){var left=cUtils.centerElement(self.imgWindow).left;self.toX=left;}
if(!self.toY)self.toY=cUtils.centerElement(self.imgWindow).top;

if(self.toY<0)self.toY=1;
//alert(this.toY);
if(!self.fromX)self.imgWindow.style.left=left+'px';
if(!self.fromY)self.imgWindow.style.top=(0-self.imgWindow.offsetHeight)+'px';

//this.onload=function(){}
cUtils=null;
cFX.onMoveComplete=function(){
openFlag=true;
_$('bg_'+randId).style.backgroundImage="none";
self.onload();
}
cFX.moveElementTo(self.imgWindow, self.toX, self.toY, 5, 10);
self.toX=false;self.toY=false;self.fromX=false;self.fromY=false;
pre.onload=function(){}
pre.src="/mediacenter/images/0.gif";
//alert(pre.src);
}

body.appendChild(pre);

var backDiv=document.createElement('div');
backDiv.style.backgroundColor='#000';
backDiv.id='bg_'+randId;
backDiv.style.position='absolute';
backDiv.style.zIndex='900';
backDiv.style.width=body.scrollWidth+'px';
backDiv.style.top='0';
backDiv.style.left='0';
backDiv.style.height=body.scrollHeight+'px';
backDiv.style.display='none';
backDiv.style.margin='0';
backDiv.style.backgroundPosition='center';
backDiv.style.backgroundRepeat='no-repeat'; 
backDiv.style.backgroundAttachment='fixed'; 
backDiv.onclick=function(){self.hide()}
cFX.setElementOpacity(backDiv, .0);
body.appendChild(backDiv);

var div=document.createElement('div');
div.className=cssClass;
div.id='cw_'+randId;
div.style.position='absolute';
div.style.display='none';
div.style.zIndex='901';
if(!cssClass){
	div.style.padding='7px';
	div.style.backgroundColor='#fff';
}
div.innerHTML='<div id="img"><img border="0" id="img_'+randId+'" src="" /></div>';
body.appendChild(div);
this.imgWindow=$(div.id);
this.onload=function(){}

this.show=function(path, x, y, top, left){
if(!openFlag)return;
openFlag=false;
this.toX=x ? x : false;
this.toY=y ? y : false;
this.fromX=left ? left : false;
this.fromY=top ? top : false;

var bgDiv=_$('bg_'+randId);
bgDiv.style.backgroundImage="url('/images/preloader_black.gif')";
bgDiv.style.display='block';
var cFX1=new colibrFX();
cFX1.fadeOpacity(bgDiv.id, .0, .6, 20);
cFX1.onFadeComplete=function(){
	pre.onload=function(){
		var imgLoad=_$('img_'+randId);
		imgLoad.onload=function(){
			loadImage();
		}
		imgLoad.src=pre.src;
	}
	if(pre.src!=path)pre.src=path;else loadImage();
	cFX1=null;
}
}  

this.onHideBegin=function(){}
this.onHideComplete=function(){}

this.hide=function(){
if(!openFlag)return;
this.onHideBegin();
openFlag=false;
var imgLoad=_$('img_'+randId);
var bgDiv=_$('bg_'+randId);
var cFX3=new colibrFX();
_$('pl_'+randId).src='';
cFX3.moveElementTo(self.imgWindow, self.imgWindow.offsetLeft, body.scrollTop-self.imgWindow.offsetHeight, 5, 10);
cFX3.onMoveComplete=function(){self.imgWindow.style.display='none';cFX3.fadeOpacity(bgDiv.id, .6, .0, 10);}
cFX3.onFadeComplete=function(){bgDiv.style.display='none';cFX3=null;openFlag=true;imgLoad.onload=function(){}
imgLoad.src="/mediacenter/images/0.gif";self.onHideComplete()}
}
}

function colibrLoading(){
var body=document.getElementsByTagName("BODY")[0];
var pl=document.createElement('img');
pl.id='pl_'+Math.random();
pl.style.position='absolute';
pl.style.display='none';
pl.style.zIndex='1000';
pl.src='/images/preloader.gif';
pl.width='100';
pl.height='100';
body.appendChild(pl);
this.showLoading=function(x, y){
	var cFX=new colibrFX();
	var cUtils=new colibrUtils();
	cFX.setElementOpacity(pl, .0);
	pl.style.display='block';
	if(!x && !y){x=cUtils.centerElement(pl).top;y=cUtils.centerElement(pl).left;}
	pl.style.top=x+"px";
	pl.style.left=y+"px";
	cFX.fadeOpacity(pl.id, .0, .8, 30);
}
this.hideLoading=function(){
	var cFX=new colibrFX();
	cFX.fadeOpacity(pl.id, .8, .0, 30);
	cFX.onFadeComplete=function(){pl.style.display='none';}
}
}
function colibrAbout(){alert('ЯR Coder Library "CoLibr 0.1"');}

/*
var userAgent = { };
userAgent.isAJAX  = (createXMLHttpRequest()?true:false);
userAgent.isMac  = (navigator.userAgent.match(/\bWebKit\b/));
userAgent.isMozilla  = (navigator.userAgent.match(/\bGecko\b/));
userAgent.isOpera  = (navigator.userAgent.match(/\bOpera\b/));
userAgent.isIE  =  (navigator.userAgent.match(/\bMSIE\b/) && !userAgent.isOpera);
*/