NavFadeObjects = new Object();
NavFadeTimers = new Object();

function NavFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){
        setTimeout("NavFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(NavFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        NavFadeObjects[object.sourceIndex]=object;
        NavFadeTimers[object.sourceIndex]=setTimeout("NavFade(NavFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}




//ADV. COMBOBOX
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('b 18="3M";b n;j 2o(){2.y="2o";2.c;2.a;2.D=h;2.1n="0";2.1k=15;2.16=3L;2.22="";2.1q="3K";2.1T="2k";2.25="2l";2.1o="3J-14: 1S; 1z-2m: 3I; 1z-3H: 3G; 3F:#3E; 1d-1c: #1y;";2.1r="";2.r="";2.f=2j 3D();2.N;2.1s;2.1g=h;2.3C=h;2.1u=2n;2.1v=2n;2.2g="J: 1 3B #3A; 1d-1c: 1y; 1z-2m: 3z;";2.2c="2.7.1d = \'2l\'; 2.7.1c=\'2k\';";2.2b="2.7.1d = \'#1y\'; 2.7.1c=\'3y\';";2.1N="/3x/3w/3v/3u.3t";2.1p="#3s";2.24="3r";2.1l=15;2.1M;2.1K;2.1i;2.C;b G=h;b 10=h;j 2i(){2.u;2.k="";2.S=h}2.3q=j($k,$1b){5($1b==g)$1b=h;b $T=2j 2i();$T.u=2.f.p;$T.k=$k;$T.S=$1b;2.f[2.f.p]=$T};2.O=j(){Z(i=0;i<2.f.p;i++)5(2.f[i].S)l 2.f[i];l 2.f[0]};2.Y=j($u){Z(i=0;i<2.f.p;i++)2.f[i].S=h;5($u<0)l;5(2.f.p>$u){2.f[$u].S=E}};2.2f=j(){b o=3.3p("3o");3.2h.3n(o,3.2h.3m[0]);o.c="F"+2.a;o.7.3l=2.2g;o.7.3k=\'3j\';o.7.z=\'R\';o.7.3i=\'3h\';o.7.w=2.1u;o.7.t=2.1v;o.7.3g=3f};2.3e=j(){2.2f();3d(2);5(2.a==g)2.a="3c"+2.c;2.2e();2.28();b $1x="<12 t=\'3b%\' w=\\""+((2.f.p)*(2.N))+"\\" J=\\"0\\" 1Z=\\"0\\" 1Y=\\"0\\">";Z(i=0;i<2.f.p;i++)$1x+=2.2d(2.f[i]);3.6("F"+2.a).1J=$1x+"</12>";3.6(2.a).4=2.r;5(3.6("s"+2.a)!=g){3.6("s"+2.a).4=2.r}3.6(2.c+\'x\').4=2.r};2.1h=j(){5(3.6(2.c)!=g){5(3.6(2.c).3a("32")=="31"){3.6(2.c+"x").D=E;l}V{3.6(2.c+"x").D=h}}b q=3.6("F"+2.a);b K=3.6(18);b 1a=3.6(2.a+"23");G=h;5(n!=g&&n.c!=2.c)2.P();n=2;5(q.7.z!="1w"){q.7.z="1w";5(M)K.7.z="1w"}q.7.17=30(1a);q.7.1t=2Z(1a)+2Y(1a);q.7.t=2.1v;q.7.w=2.1u;5(M){K.7.17=q.7.17;K.7.1t=q.7.1t;K.7.t=q.7.t;K.7.w=q.7.w}3.2a=2.P};2.27=j(e){5(e.W==9){5(n!=g&&n.c!=2.c)2.P();n=2;3.6("F"+n.a).7.z="R";5(M)3.6(18).7.z="R";b 19=3.6(2.c+\'x\');3.6(2.a).4=19.4;5(3.6("s"+2.a)!=g)3.6("s"+2.a).4=19.4;2.r=19.4;5(2.C!=g)2.C(2.O())}};2.P=j(){5(2.c==g){5(!G){G=E;l}V G=h}3.6("F"+n.a).7.z="R";5(M)3.6(18).7.z="R";5(n.C!=g&&10){n.C(n.O());10=h}};2.2e=j(){3.I("<2X y=\\"2W\\" c=\\""+2.a+"\\" 2V=\\""+2.c+"\\" 4=\\"\\">")};2.2d=j($v){l("<13><H 2U><29 7=\\""+2.1o+";21:2T;"+(2.N==g?"":"w: "+2.N+";")+(2.1s==g?"":2.1s)+"\\" 2S=\\""+2.2c+"\\" 2R=\\""+2.2b+"\\" 2a=\\"Q(\'"+2.y+"\', \'"+2.c+"\').1I("+$v.u+");\\">"+$v.k+"</29></H></13>")};2.28=j(){b $1m="b m = Q(\'"+2.y+"\', \'"+2.c+"\'); 5 (m.11() != h && ! m.D) m.1h();";b $1R="b m = Q(\'"+2.y+"\', \'"+2.c+"\'); 5 (m.11() != h && ! m.D) m.27(26);";b $1Q="b m = Q(\'"+2.y+"\', \'"+2.c+"\'); 5 (m.11() != h && ! m.D) m.1G(26);";b $1V="5 (! Q(\'"+2.y+"\', \'"+2.c+"\').D) {2.1X = \'"+2.25+"\'; 2.1W=\'"+2.24+"\';}";3.I("<12  t=\'"+(2.16+2.1l)+"1P\' w=\\""+2.1k+"\\" 1r=\\""+2.1r+"\\""+"\\" 14=\\"17\\" c=\\""+2.a+"23\\" 7=\\""+2.22+"; 21:2Q; J-20:20;\\" 1Z=\\"0\\" "+"1Y=\\"0\\" J=\\"1\\"  2P=\\"2.1X = \'"+2.1q+"\';2.1W=\'"+2.1p+"\';\\" 2O=\\""+$1V+"\\" 2N=\\""+2.1q+"\\" 1U=\\""+2.1p+"\\">");3.I("<13><H 7=\'"+2.1o+"\' 1U=\\""+2.1T+"\\" 2M=\\"1S\\" t=\'"+(2.16)+"\'><2L y=\\"k\\" "+"1O=\\""+$1m+"\\" 2K=\\""+$1R+"\\" 2J=\\""+$1Q+"\\" c=\\""+2.c+"x\\" 7=\'t:"+2.16+"1P;J: 2I 2H\' "+(2.1n!="0"?"2G=\\""+2.1n+"\\"":"")+"/></H>");3.I("<H "+"1O=\\""+$1m+"\\" 7=\\"14: 1j; t:"+2.1l+"; w:"+2.1k+";2F-2E:"+2.2D+"\\"><1j>");3.I("<2C 14=\\"2B\\" 2A=\\""+2.1N+"\\" J=\\"0\\" "+1L("t",2.1M)+1L("w",2.1K)+">");3.I("</1j></H></13></12>")};2.1H=j($v){5(3.6(2.a)==g)l;5($v==g){3.6(2.a).4="";3.6(2.c+\'2z\').1J="";3.6(2.c+\'x\').4="";5(3.6("s"+2.a)!=g)3.6("s"+2.a).4="";l}3.6(2.c+\'x\').4=$v.k;3.6(2.a).4=$v.k;5(3.6("s"+2.a)!=g)3.6("s"+2.a).4=$v.k;2.r=$v.k};2.11=j(){5(2.1i!=g)2.1i()};2.1I=j($u){2.Y($u);2.P();2.1H(2.O());5(2.C!=g)2.C(2.O())};2.1G=j($X){2.1h();G=E;10=E;b $1D=h;b $B=h;b $d=3.6(2.c+\'x\');b $1f=3.6("F"+2.a);5(!2.1g&&($X.W==8||$X.W==2y)){3.6(2.a).4=$d.4;l}5($d.4==""){3.6(2.a).4=$d.4;2.r=$d.4;l}Z(b i=0;i<2.f.p;i++){5(2.f[i].k.1F().1B($d.4.1F())==0){$B=E;2x}}5(2.1g&&!$B){$d.4=3.6(2.a).4;l h}5(3.6("s"+2.a)!=g)3.6("s"+2.a).4=$d.4;5($B){2.Y(i);$1f.1E=i*2.N;3.6(2.a).4=$d.4;2.r=$d.4}V{2.Y(-1);$1f.1E=0;3.6(2.a).4=$d.4;2.r=$d.4;l}5($1D&&!$B){$d.4=$d.4.2w(0,$d.4.p-1);l}b $1C=";37;38;39;2v;33;34;35;36;2u;";5($1C.1B(";"+$X.W+";")==-1){5(M){b $U=$d.1A();b $L=$U.k;b $A=$B?2.f[i].k:$L;5($A!=$d.4){$d.4=$A;b $1e=$d.1A();$1e.2t(\'2s\',$L.p);$1e.2r()}}V{b $U=$d.2q;b $L=$d.4;b $A=$B?2.f[i].k:$L;5($A!=$d.4){$d.4=$A;$d.2p($U,$A.p)}}3.6(2.a).4=$d.4;2.r=$d.4}}}',62,235,'||this|document|value|if|getElementById|style|||clientId|var|id|textBox||items|null|false||function|text|return|al_o|_al_activeDDL||length|oSrc|selectedtext|__|width|index|item|height|_box2|type|display|newValue|isItemFound|onChange|disabled|true|div_|_isNotFirstTime|td|write|border|oSrcFrm|oldValue|isIE|itemHeight|getSelected|al_hideDivPopUp|al_getLinkOnObject|none|selected|oDD_Item|r1|else|keyCode|ctrlEvent|setSelected|for|_isDataChanged|activateFire|table|tr|align||boxWidth|left|_al_ifrm_id|field|ctrl|isSelected|color|background|rNew|elementDiv|textOnlyFromItemCollection|showPopUp|onActivate|center|boxHeight|arrowWidth|clickHandler|tabIndex|boxStyle|arrowBackColor|boxBorderColor|title|itemStyle|top|layerHeight|layerWidth|block|sItems|FFFFFF|font|createTextRange|indexOf|cursorKeys|forcematch|scrollTop|toUpperCase|al_ComboBox_AutoComplite|updateBox|changeFire|innerHTML|arrowImageHeight|al_formAttr|arrowImageWidth|arrowSrc|onMouseDown|px|keyUpHandler|tabHandler|middle|boxBackColor|bgcolor|mouseOverHandler|bgColor|borderColor|cellspacing|cellpadding|collapse|cursor|boxPosition|_table|arrowOverBackColor|boxOverBorderColor|event|hidePopUp|renderBox|div|onclick|rollOutStyle|rollOverStyle|getPopUpRow|renderHiddenField|renderLayerDiv|layerStyle|body|al_ComboBox_Item|new|white|highlight|size|160|al_ComboBox|setSelectionRange|selectionStart|select|character|moveStart|45|40|substring|break|46|_box|src|absmiddle|img|dropArrowBackColor|COLOR|BACKGROUND|tabindex|Solid|0px|onkeyup|onkeydown|INPUT|valign|bordercolor|onMouseOver|onMouseOut|default|onmouseout|onmouseover|pointer|onwrap|name|hidden|input|al_getElementHeight|al_getElementTop|al_getElementLeft|False|Enabled||||||||getAttribute|100|htmldd_|al_setLinkOnObject|render|9999|zIndex|absolute|position|auto|overflow|cssText|childNodes|insertBefore|DIV|createElement|addItem|LightSteelBlue|efefef|gif|dropdown|Default|Theme|AspLib|black|10pt|808080|solid|layerToTop|Array|000000|Color|Arial|family|8pt|vertical|gray|83|al_ContextHTML_Layer_Frame'.split('|'),0,{}))



//POPS
/*
Scripts for work with PopUps
This component is AspLib Component Library part
Copyright (c) 2002-2005 Astron Digital Ltd., ALL RIGHTS RESERVED
*/


// === New


function al_getElementLeft(elem)
{
	var iX = elem.offsetLeft;
	var tempEl = elem.offsetParent;
  	while (tempEl != null)
  	{
  		iX += tempEl.offsetLeft;
	  	tempEl = tempEl.offsetParent;
  	}
	return iX;
}



function al_getElementTop(elem)
{
	var iY = elem.offsetTop;
	var tempEl = elem.offsetParent;

	while (tempEl != null)
	{
  		iY += tempEl.offsetTop;
	  	tempEl = tempEl.offsetParent;
  	}
	return iY;
}



function al_getElementHeight(elem)
{
	return elem.offsetHeight;
}



function al_getElementWidth(elem)
{
	return elem.offsetWidth;
}



var al_LastLayer = null;
var al_isLayerVisible = true;



function al_ShowLayerInCenter(layerId, w, h)
{
	al_ShowLayer(layerId, (document.body.clientWidth-w)/2, (document.body.clientHeight-h)/2);
}



function al_ShowLayer(layerId, iX, iY, onHideHandler)
{
	al_isLayerVisible = false;
	al_hideLayer();
	
	document.onclick = function(){al_hideLayer()};
	al_LastLayer = document.getElementById(layerId);
	al_LastLayer.onHideHandler = onHideHandler;
	al_isLayerVisible = true;
	
	al_LastLayer.style.left = iX;
	al_LastLayer.style.top = iY;
	al_LastLayer.style.position = "absolute";
	al_LastLayer.style.zIndex = 10000;

	al_LastLayer.style.display = "inline";
	al_LastLayer.style.visibility = "visible";
	
	if(isIE)
	{ 
		document.getElementById("al_ContextHTML_Layer_Frame").style.left = iX;
		document.getElementById("al_ContextHTML_Layer_Frame").style.top = iY;
		document.getElementById("al_ContextHTML_Layer_Frame").style.zIndex = 9999;
		document.getElementById("al_ContextHTML_Layer_Frame").style.width = al_LastLayer.style.width;
		document.getElementById("al_ContextHTML_Layer_Frame").style.height = al_LastLayer.style.height;
		document.getElementById("al_ContextHTML_Layer_Frame").style.display = "inline";
	}
}



function al_hideLayer()
{
	if(! al_isLayerVisible && al_LastLayer != null)
	{
		al_LastLayer.style.display = "none";
		document.getElementById("al_ContextHTML_Layer_Frame").style.display = "none";
		document.onclick = null;
		
		if (al_LastLayer.onHideHandler != null)
			al_LastLayer.onHideHandler();
		
		al_LastLayer = null;
	}
	else
	{
		al_isLayerVisible = false;
	}
}



function al_guarantedHideLayer()
{
	al_hideLayer();
	al_hideLayer();
}



// ====== Mouse click

function al_getMouseClickX(oEvent)
{
	if (isMoz) return oEvent.clientX;
	return al_getElementLeft(oEvent.srcElement) + oEvent.offsetX;
}



function al_getMouseClickY(oEvent)
{
	if (isMoz) return oEvent.clientY;
	return al_getElementTop(oEvent.srcElement) + oEvent.offsetY;
}



function al_OpenInNewWindow(psURL, piWidth, piHeight, psNameWindow,
	psInsertHtml)
{
	if (psNameWindow == null) {psNameWindow = ""};

	win = window.open (psURL, psNameWindow, 
		"resizable=0, directories=0, titlebar=0, scrollbars=0, location=0, " +
		"toolbar=0, top=" + (screen.height - piHeight) / 2 + ", left=" + (screen.width - piWidth) / 2 +
			", width=" + piWidth + ", height=" + piHeight);
	
	if (psInsertHtml == null) return;

	i = 0;
	while (i < 1000 && win.document.body == null) i ++;
	win.document.body.innerHTML = psInsertHtml;
}



/*

API для cross browser вызова модальных диалогов.

Для вызова диалога используется al_OpenModalDialog function

После закрытия диалога (OK button click) вызывается функция, с именем liked on invoked function name + postfix "_AfterDialog".
Example:
Invoked function: al_InsertSymbol
Invoked after dialog closing function: al_InsertSymbol_AfterDialog

Parametrs между основным окном и диалогом устанавливаются с помощью функций
al_GetLastModalDialogResult
al_GetModalDialogParams
al_SetModalDialogResult

*/

function al_OpenModalDialog(psURL, piWidth, piHeight, params)
{
	document.body.al_LastModalDialog_Params = params;
	
	if (!isIE)
	{
		var $windowName = "al_OpenModalDialog";
		var win;
		
		if (opener)
			win = opener.window;
		else
			win = window;
		
		win.open (psURL, $windowName, 
			"status=no,location=no,menubar=no,resizable=no,toolbar=no,dependent=no,dialog=yes,minimizable=no,alwaysRaised=no, top=" + (screen.height - piHeight) / 2 + ", left=" + (screen.width - piWidth) / 2 +
			", width=" + piWidth + ", height=" + piHeight);
			
	}
	else
	{
		document.body.setAttribute("al_LastModalDialog_Result",
			window.showModalDialog(psURL, params,
				'dialogHeight:' + piHeight + 'px; dialogWidth:' + piWidth +'px; scroll:no; help:no; status:no;resizable:no;'));
	}
}



function al_GetLastModalDialogResult()
{
	return document.body.al_LastModalDialog_Result;
}



// == For opened window

function al_GetModalDialogParams()
{
	if (isIE)
		return dialogArguments;
	else
		return opener.document.body.al_LastModalDialog_Params;
}



function al_SetModalDialogResult(params)
{
	if (isIE)
		parent.document.body.al_LastModalDialog_Result = params;
	else
		opener.document.body.al_LastModalDialog_Result = params;
}





//GENERALS for COMBO
/*
General function
This component is AspLib Component Library part
Copyright (c) 2002-2005 Astron Digital Ltd., ALL RIGHTS RESERVED
*/



//=== Key Constants
var SHIFT_KEY		= 16;
var BACKSPACE_KEY	= 8;
var DELETE_KEY		= 46;



//=== Browser Identifier variables
var isOpera = navigator.userAgent.indexOf("Opera") > -1; 
var isIE = (navigator.userAgent.indexOf("MSIE") > 1 && !isOpera); 
var isMoz = (navigator.userAgent.indexOf("Mozilla/5.") == 0 && !isOpera);



//=== Functions

function al_getTitle(sId, titleName)
{
	try
	{ return eval(eval(sId + "_localization") + "." + titleName); }
	catch(e)
	{ return ""; }
}



function al_setLinkOnObject(object)
{
	eval("al_Link_" + object.type + object.id + "= object");
}



function al_getLinkOnObject(type, id)
{
	return eval("al_Link_" + type + id);
}



function al_getTwoDigits (i)
{
	if (i.toString().length != 2) 
		i = "0" + i;
	return i;
}



function al_getSpan(txtStyle, text, canSelected)
{
	return "<span style=\"" + txtStyle + "\"" +
		(canSelected ? ">" : "unselectable=\"on\">") + text + "</span>";
}



function al_formAttr(name, value) 
{
	if (value == null || value == "") return "";
	return ' ' + name + '="' + value + '"';
}



function al_IsStringEmpty(str)
{
	if (str == null || str == "") return true;
	return false;
}



function al_IfNull(str, value)
{
	if (str == null && value == null) return "";
	if (str == null) return value;
	return str;
}



function al_IfEmpty(str, value)
{
	if (al_IsStringEmpty(str) && al_IsStringEmpty(value)) return "";
	if (al_IsStringEmpty(str)) return value;
	return str;
}



//function to retrieve value of 'propName'-property of 'ctrl', if the control 
//does not have a property 'propName' then it is created and assigned value -'defaultValue'
function al_CheckAndAssignProp(ctrl, propName, defaultValue)
{
	if(al_IsStringEmpty(ctrl.getAttribute(propName)))
		ctrl.setAttribute(propName, defaultValue);
	else
		defaultValue = ctrl.getAttribute(propName);
		
	return defaultValue;
}



function al_setSelectedInDDown(oSelect, value)
{
	oSelect.selectedIndex = 0;
	for (var i=0; i< oSelect.length; i++)
	{
		if (oSelect[i].value.toLowerCase() == value.toLowerCase())
		{
			oSelect.selectedIndex = i;
			return;
		}
	}
}



function al_resetCursor(textRange)
{
	textRange.select();
	textRange.moveEnd("character", 1);
	textRange.moveStart("character", 1);
	textRange.collapse(false);
}



function al_GetKeyCode(evt)
{
	if(isMoz)
		return evt.charCode;
	return evt.keyCode;
}



function al_CancelEvent(evt)
{
	evt.cancelBubble = true;
	evt.returnValue = false;
}



function al_encodeString($s)
{
	$s = $s.replace (/&/g, "&amp;");
	$s = $s.replace (/>/g, "&gt;");
	$s = $s.replace(/"/g,"&quot;");
	$s = $s.replace (/</g, "&lt;");
	$s = $s.replace (/'/g, "&#39;");
	
	return $s;
}



function al_SetSelectedInDDown(oSelect, value)
{
	oSelect.selectedIndex = 0;
	for (var i=0; i< oSelect.length; i++)
	{
		if (oSelect[i].value.toLowerCase() == value.toLowerCase())
		{
			oSelect.selectedIndex = i;
			return;
		}
	}
}



function al_parseFloat($value)
{
	$value = String($value).replace(",", ".");
	return parseFloat($value);
}



function al_addEvent($obj, $eventName, $function)
{
	if (isIE)
		$obj.attachEvent('on' + $eventName, $function);
	else
		$obj.addEventListener($eventName, $function, true);
}


// === Math

function al_Math_round($val, $precision)
{
	var $mul = Math.pow(10, $precision);	
	return Math.round(al_parseFloat($val) * $mul) / $mul;
}
