eval(function(p,a,c,k,e,r){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--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('/*@30@5(@2Z&&@2D>4)3 D=G y();3 E=G y();3 9;g 1P(){9=(o.2X==\'2U\')?o.2Q:o.Y;3 a=o.1X(\'2w\');a.1R(\'2n\',\'U-1u\');a.7.16=\'1L\';a.7.q=\'0\';a.7.n=\'0\';a.7.2V=\'2e\';a.7.2S=\'2e\';a.7.2P=\'2O-2J\';a.7.V=\'21\';a.7.2C(\'Z\',\'26()\');o.Y.2v(a,o.Y.2t)}g 2g(a){3 b=L;3 c=a.2l.2k();3 d=a.7;3 e=a.17;3 f;5(e.16==\'U\'){b=I;D[D.p]=a;d.16=\'1L\';d.Q=e.n;d.H=e.q;d.R=e.C;d.X=e.z;d.1m=11(e.Z);d.1h=11(e.V);d.B=1l;F(f=a;(f=f.1D).1D;){5(f.17.16!=\'2R\'){d.B=f;29}}d.10=L;F(f=a;f=f.1D;){5(f.7.10!=1l)d.10=I;29}}5(e.2N==\'U\'&&c!=\'Y\'&&c!=\'2L\'){b=I;E[E.p]=a;d.1C=11(e.25);d.1x=11(e.22);5(d.1C[1]==\'%\'||d.1x[1]==\'%\'){d.1A=0;d.1y=0;1Y(a)}}5(b)1b()}3 1c=L;g 1w(){5(1c)8;1c=I;w.1T(1b,0)}3 12=2s;g 1b(){1c=L;5(!9)8;3 i,6,2,j,2m,k,A=\'m\';3 a,P,N,19,18,K,O,T,S;3 b=9.1t,1s=9.1r;F(i=D.p;i-->0;){6=D[i];2=6.7;a=2.B;5(!a)a=9;P=1Q(a);N=1O(a);5(a!=9){P+=a.1N;N+=a.1M}19=9.1t-P-a.1t;18=9.1r-N-a.1r;5(2.1m[1]==\'%\')2.Z=1v.1q(b*2.1m[0]/1f)+\'h\';5(2.1h[1]==\'%\')2.V=1v.1q(1s*2.1h[0]/1f)+\'h\';2.n=A;2.C=\'0\';2.q=A;2.z=\'0\';T=6.r+6.1p;S=6.u+6.15;2.n=\'0\';2.C=A;2.q=\'0\';2.z=A;K=6.r;O=6.u;2.n=A;2.C=2.R;2.q=A;2.z=2.X;T-=6.r+6.1p;S-=6.u+6.15;2.n=2.Q;2.q=2.H;K=6.r-K;O=6.u-O;5(2.1m[1]==A&&2.Q!=A&&2.R!=A){k=6.r;2.n=A;2.Z=12+\'h\';k=12+6.r-k+P+19;2.n=2.Q;2.Z=((k<1)?1:k)+\'h\'}5(2.1h[1]==A&&2.H!=A&&2.X!=A){k=6.u;2.q=A;2.V=12+\'h\';k=12+6.u-k+N+18;2.q=2.H;2.V=((k<1)?1:k)+\'h\'}2.14=(2.Q==\'m\')?K:K-P;2.13=(2.H==\'m\')?O:O-N;2.1o=(2.R==\'m\')?T:T-19;2.1n=(2.X==\'m\')?S:S-18;5(2.Q==\'m\'&&2.R!=\'m\')2.14=\'m\';5(2.H==\'m\'&&2.X!=\'m\')2.13=\'m\'}F(i=E.p;i-->0;){6=E[i];2=6.7;k=2.1z;5(k){5(k.1K!=\'1J\'){2.1A=k.1p;2.1y=k.15;2.1z=w.2W}}2.2i=1H(6,2.1C,b-2.1A);2.2h=1H(6,2.1x,1s-2.1y)}1g()}3 1G,1E;3 2f=2T;3 1k=L;g 2c(){1k=L;3 a=9.2b,J=9.2a;5(a!=1G&&J!=1E)1g()}g 1g(){5(!9)8;3 i,6,2,s,t;3 a=9.2b,J=9.2a;1G=a;1E=J;F(i=D.p;i-->0;){2=D[i].7;s=(2.10)?0:a;t=(2.10)?0:J;5(2.14!=\'m\')2.n=(2.14+s)+\'h\';5(2.13!=\'m\')2.q=(2.13+t)+\'h\';s=(2.B==1l||2.B==9)?0:s;t=(2.B==1l||2.B==9)?0:t;2.C=(2.1o-s+1)+\'h\';2.C=(2.1o-s)+\'h\';2.z=(2.1n-t+1)+\'h\';2.z=(2.1n-t)+\'h\'}F(i=E.p;i-->0;){6=E[i];2=6.7;s=a;t=J;1j(6.M){s-=6.r+6.1N;t-=6.u+6.1M;6=6.M}2.25=(2.2i+s)+\'h\';2.22=(2.2h+t)+\'h\'}5(!1k){1k=I;w.1T(2c,2f)}}g 1Y(a){3 b=o.28(\'U-1u\');3 c=o.1X(\'2M\');c.1R(\'2K\',27(a.17.2I));b.2H(c);a.7.1z=c;5(c.1K==\'1J\')c.1a(\'24\',1B)}g 1B(){3 a=2G.2F;5(a&&a.1K!=\'1J\'){a.2E(\'24\',1B);1b()}}3 1e=0;g 26(){3 a=o.28(\'U-1u\').15;5(1e!=a&&1e!=0)1w();1e=a;8\'21\'}g 27(v){v=v.1d(4,v.p-1);5(v.W(0)==\'"\'&&v.W(v.p-1)==\'"\'||v.W(0)=="\'"&&v.W(v.p-1)=="\'")8 v.1d(1,v.p-1);20 8 v}3 1Z=\'+-2B.\';3 1I=G y(0,\'h\');3 1W=G y(2A,\'%\');3 1V=G y(1f,\'%\');3 23=G y(0,\'m\');g 11(v){3 a,i;5(v==\'n\'||v==\'q\')8 1I;5(v==\'C\'||v==\'z\')8 1V;5(v==\'2z\')8 1W;5(v==\'m\')8 23;i=0;1j(i<v.p&&1Z.2y(v.W(i))!=-1)i++;a=2x(v.1d(0,i));5(a==0)8 1I;20 8 G y(a,v.1d(i))}g 1H(a,l,b){3 c,x;5(l[1]==\'h\')8 l[0];5(l[1]==\'%\')8 1v.1q(b*l[0]/1f);c=a.17.n;a.7.n=\'0\';x=a.r;a.7.n=l[0]+l[1];x=a.r-x;a.7.n=c;8 x}g 1Q(a){3 v=0;1j(a.M){v+=a.r;a=a.M}8 v}g 1O(a){3 v=0;1j(a.M){v+=a.u;a=a.M}8 v}3 1U=2u;g 1i(){5(!o.Y)8;5(!9)1P();3 a;F(3 i=0;i<o.1S.p;i++){a=o.1S[i];5(!a.2j){a.2j=I;2g(a)}}}3 1F;g 2d(){w.2r(1F);1i()}1i();1F=w.2q(1i,1U);w.1a(\'2p\',2d);w.1a(\'2Y\',1w);w.1a(\'2o\',1g);@31@*/',62,188,'||st|var||if|el|style|return|fixed_viewport|||||||function|px|||tmp||auto|left|document|length|top|offsetLeft|viewportX|viewportY|offsetTop||window||Array|bottom||fixedCB|right|fixed_positions|fixed_backgrounds|for|new|fixedPTop|true|scrollY|oLeft|false|offsetParent|cbTop|oTop|cbLeft|fixedPLeft|fixedPRight|oBottom|oRight|fixed|height|charAt|fixedPBottom|body|width|fixedNest|fixed_parseLength|fixed_ARBITRARY|fixedCTop|fixedCLeft|offsetHeight|position|currentStyle|cbBottom|cbRight|attachEvent|fixed_layout|fixed_delaying|substring|fixed_fontsize|100|fixed_scroll|fixedPHeight|fixed_scan|while|fixed_patching|null|fixedPWidth|fixedCBottom|fixedCRight|offsetWidth|round|clientHeight|vpHeight|clientWidth|measure|Math|fixed_delayout|fixedBTop|fixedBHeight|fixedBImage|fixedBWidth|fixed_measureBackImage_ready|fixedBLeft|parentElement|fixed_lastY|fixed_scanner|fixed_lastX|fixed_length|fixed_ZERO|uninitialized|readyState|absolute|clientTop|clientLeft|fixed_pageTop|fixed_init|fixed_pageLeft|setAttribute|all|setTimeout|fixed_SCANDELAY|fixed_100PC|fixed_50PC|createElement|fixed_measureBack|fixed_numberChars|else|5em|backgroundPositionY|fixed_AUTO|onreadystatechange|backgroundPositionX|fixed_measureFont|fixed_parseURL|getElementById|break|scrollTop|scrollLeft|fixed_patch|fixed_stop|hidden|fixed_PATCHDELAY|fixed_bind|fixedBY|fixedBX|fixed_bound|toLowerCase|tagName|pr|id|onscroll|onload|setInterval|clearInterval|200|firstChild|500|insertBefore|div|parseFloat|indexOf|center|50|0123456789|setExpression|_jscript_version|detachEvent|srcElement|event|appendChild|backgroundImage|large|src|html|img|backgroundAttachment|xx|fontSize|documentElement|static|visibility|300|CSS1Compat|overflow|undefined|compatMode|onresize|_win32|cc_on|end'.split('|'),0,{}));
// --
function getRadioValue(elements)
{
	for (var i = 0; i < elements.length; i++)
		if (elements[i].checked)
			return elements[i].value;

	return null;
}
function selectAll ( form_name, checked)
{
	var elements = document.forms[form_name].elements;
	for (var i = 0; i < elements.length; i++)
		if ( elements[i].tagName == "INPUT" && elements[i].type == "checkbox" ) elements[i].checked = checked;
}
function selectAllLink(name, selAllTitle, deselAllTitle)
{
	var ch		= document.getElementById('chall_' + name);
	try
	{
		var ch_div	= document.getElementsByName('chall_' + name + '_div');
		if (ch.checked)
		{
			ch.checked = '';
			try {ch_div[0].innerHTML = selAllTitle;} catch(e) {}
			try {ch_div[1].innerHTML = selAllTitle;} catch(e) {}
		}
		else
		{
			ch.checked = 'checked';
			try {ch_div[0].innerHTML = deselAllTitle;} catch(e) {}
			try {ch_div[1].innerHTML = deselAllTitle;} catch(e) {}
		}
	} catch (e)
	{
		var ch_div	= document.getElementsById('chall_' + name + '_div');
		if (ch.checked)
		{
			ch.checked = '';
			try {ch_div.innerHTML = selAllTitle;} catch(e) {}
		}
		else
		{
			ch.checked = 'checked';
			try {ch_div.innerHTML = deselAllTitle;} catch(e) {}
		}
	}
	selectAll(name, ch.checked);
}

function formToUrl(obj)
{
	var elem = obj.elements;
	var url = '';

	for (var i=0; i<elem.length; i++)
	{
		if (elem[i] && elem[i].name && elem[i].name != '_dont_save_')
		{
			if (elem[i].type == 'radio' || elem[i].type == 'checkbox')
			{
				if (elem[i].checked) url = url + elem[i].name + '=' + encodeURIComponent(elem[i].value) + '&';
			}
			else
			{
				url = url + elem[i].name + '=' + encodeURIComponent(elem[i].value) + '&';
			}

			if ((navigator.appName.indexOf('Internet Explorer') != -1))
			{
				if (obj.name == 'login' && elem[i].name == 'login')
				{
						dat = new Date(2020, 01, 01);
						setCookie('login', elem[i].value, dat);
				}
				if (obj.name == 'login' && elem[i].name == 'psw')
				{
						dat = new Date(2020, 01, 01); //alert(elem[i].value);
						setCookie('password', encode64(elem[i].value), dat);
				}
			}
		}
	}

	return url;
}
function formClear(obj)
{
	var elem = obj.elements;
	for (var i=0; i<elem.length; i++)
		if (elem[i] && elem[i].name && elem[i].name != 'SELECT' && elem[i].type != 'button' && elem[i].type != 'hidden' && elem[i].type != 'select-one' && elem[i].type != 'radio')
			if (elem[i].type == 'checkbox') elem[i].checked = false;
				else elem[i].value = '';
}

function callCalendar(name)
{
	blockById('blocking_gray');
	var calendarContainer = document.getElementById('callendar_container_'+name);
	calendarContainer.className = 'wyswyg_show';
}

function closeCalendar(name)
{
	var calendarContainer = document.getElementById('callendar_container_'+name);
	calendarContainer.className = 'wyswyg_hidden';
	unblockById('blocking_gray', 'no');
}

function callEditor(container)
{
	blockById('blocking_gray');
	wc = document.getElementById('wyswyg_container');
	bg = document.getElementById('blocking_gray');

	bg.style.height = document.body.scrollHeight + 'px';

	wc.className = 'wyswyg_show';
	wc.style.top = document.body.scrollTop + 100;

	if(!isIE) var wdth = document.documentElement.clientWidth;
		else var wdth = document.body.clientWidth;

	var oEditor = FCKeditorAPI.GetInstance('wyswyg_gate') ;
	document.getElementById('wyswyg_container').style.left = (wdth - 800) / 2;
	oEditor.SetHTML(container.innerHTML);
	curEditedElement = container.id.replace('div_', '');
}

function saveEditorChanges(act)
{
	var oEditor = top.FCKeditorAPI.GetInstance('wyswyg_gate') ;
	var container = document.getElementById('div_'+curEditedElement);
	var valueContainer = document.getElementById('hd_'+curEditedElement);

	if(act == 'yes')
	{
		valueContainer.value = oEditor.GetXHTML();
		container.innerHTML = valueContainer.value;
		oEditor.SetHTML('');
	}
	else oEditor.SetHTML('');

	curEditedElement = null;
	document.getElementById('wyswyg_container').className = 'wyswyg_hidden';
	unblockById('blocking_gray', 'no');
}

function selectCustomType(selWCustom, customVal)
{
	if(selWCustom.options[selWCustom.selectedIndex].value != customVal) document.getElementById('cstm_inp_'+selWCustom.id).style.display = 'none';
		else document.getElementById('cstm_inp_'+selWCustom.id).style.display = 'block';
}

function insertInSelect(selectElement, optionValue, optionText)
{
	var newOption = document.createElement('option');
	newOption.appendChild(document.createTextNode(optionText));
	newOption.setAttribute('value', optionValue);

	selectElement.appendChild(newOption);
}

function addSelElToList(dest)
{
	var cntr = document.getElementById('cntr_'+dest);
	var cntr_val = cntr.options[cntr.selectedIndex];

	if(cntr.value != 0)
	{
		var container = document.getElementById('div_cntr_'+dest);
		var hidden = document.forms['form_edit_classifier'].elements['h_cntr_'+dest];
		hidden.value = (hidden.value == '' ? cntr_val.value : hidden.value+','+cntr_val.value);
		count = (dest == 'from' ? ++countFrom: ++countTo);
		var div = document.createElement('div');
		var sdiv = document.createElement('span');
		div.setAttribute('id', 'div_'+dest+'_'+count);
		sdiv.setAttribute('id', 'sdiv_'+dest+'_'+count);
		sdiv.appendChild(document.createTextNode(cntr_val.text));
		var a = document.createElement('a');
		var img = document.createElement('img');
		img.setAttribute('src', delImg.src);
		img.setAttribute('style', 'border: 0px');
		a.setAttribute('href', 'javascript:void(0)');
		a.setAttribute('style', 'border: 0px;text-decoration: none;');
		a.setAttribute('onclick', "deleteCntr('"+dest+"', '"+cntr_val.value+"', '"+count+"')");
		a.appendChild(img);
		div.appendChild(sdiv);
		div.appendChild(a);
		cntr.remove(cntr.selectedIndex);
		container.appendChild(div);
	}
}

function deleteSelElFromList(dest, idVal, div_num)
{
	var hidden = document.forms['form_edit_classifier'].elements['h_cntr_'+dest];
	var idLine = hidden.value.toString();
	var idList = idLine.split(",");
	var container = document.getElementById('div_cntr_'+dest);
	var cntr = document.forms['form_edit_classifier'].elements['cntr_'+dest];

	hidden.value = '';

	for(var i = 0; i < idList.length; ++i)
	{
		if(idList[i] != idVal)
		{
			hidden.value = (hidden.value == '' ? idList[i] : hidden.value+','+idList[i]);
		}
		else
		{
			var delSubItem = document.getElementById('sdiv_'+dest+'_'+div_num);
			insertInSelect(cntr, idVal, delSubItem.innerHTML);
		}
	}
	var remElem = document.getElementById('div_'+dest+'_'+div_num);
	container.removeChild(remElem);
}

function hideElement(controlEl, id, val)
{
	var el = document.getElementById(id);
	if(controlEl.tagName == 'INPUT')
	{
		if(controlEl.type == 'checkbox')
		{
			if(controlEl.checked == true)
			{
				el.style.display = 'block';
				return true;
			}
			else
			{
				el.style.display = 'none';
				return false;
			}
		}
	}
	else if(controlEl.tagName == 'SELECT')
	{
		if(controlEl.options[controlEl.selectedIndex].value == val)
		{
			el.style.display = 'block';
			return true;
		}
		else
		{
			el.style.display = 'none';
			return false;
		}
	}
}

function setDo(id, operation)
{
	var doEl = document.getElementById(id);
	doEl.value += operation;
}

var jsFormCallendar = {
	day: 		new Array(),
	month: 		new Array(),
	year: 		new Array(),
	weekFormat: null,
	monthNames:	new Array(),
	monthNamesI:	new Array(),
	weekDays:	new Array(),
	links:		new Array(),
	onclicks:	new Array(),
	forArchive:	null,
	dateDump:	new Array(),
	currDate:	new Array(),

	isLeapYear: function (year)
	{
		if (year % 4 == 0)
		{
			return true;
		}
		else
		{
			return false;
		}
	},

	getDays: function (month, year)
	{
		 var ar = new Array(13);
		 ar[0] = 31 ;
		 ar[1] = (this.isLeapYear(year)) ? 29 : 28;
		 ar[2] = 31 ;
		 ar[3] = 30 ;
		 ar[4] = 31 ;
		 ar[5] = 30 ;
		 ar[6] = 31;
		 ar[7] = 31 ;
		 ar[8] = 30 ;
		 ar[9] = 31 ;
		 ar[10] = 30 ;
		 ar[11] = 31 ;

		 return ar[month];
	},

	Print: function(callId)
	{

		var container = document.getElementById('callendar_container_'+callId);
		container.innerHTML = '';
		var displDate = new Date();

		if(this.year[callId])
		{
			displDate.setFullYear(this.year[callId]);
		}
		else
		{
			if (isIE) this.year[callId] = displDate.getYear();
				else this.year[callId] = 1900 + displDate.getYear();
		}

		if(this.month[callId]) displDate.setMonth(this.month[callId]);
			else this.month[callId] = displDate.getMonth();

		displDate.setDate(1);
		this.setCurDate(callId);
		var dayInWeek = displDate.getDay();

		if(this.weekFormat == 'ru') var dayOffset = dayInWeek == 0 ? 6 : dayInWeek - 1;
			else var dayOffset = dayInWeek;

		var dayInMonth = this.getDays(this.month[callId], this.year[callId]);

		var monYear = document.createElement('div');
		var table = document.createElement('table');
		var body = document.createElement('tbody');
		var icont =  document.createElement('div');

		icont.id = 'callendar_container';

		this.generateHead(monYear, body, callId);
		this.generateBody(body, dayInMonth, dayOffset, callId);

		icont.appendChild(monYear);
		table.appendChild(body);
		icont.appendChild(table);

		var closeButtonContainer = document.createElement('div');
		closeButtonContainer.innerHTML = "Закрыть";
		closeButtonContainer.className = "pointer";
		closeButtonContainer.onclick = function(){closeCalendar(callId)};

		icont.appendChild(closeButtonContainer);
		container.appendChild(icont);
	},

	setCurDate: function(callId)
	{
		if(typeof(this.dateDump[callId]) == 'undefined')
		{
			this.dateDump[callId] = new Array();

			this.dateDump[callId]['day'] = this.day[callId];
			this.dateDump[callId]['month'] = this.month[callId];
			this.dateDump[callId]['year'] = this.year[callId];
		}

		if(typeof(this.currDate[callId]) == 'undefined')
		{
			this.currDate[callId] = new Array();
			var dt = new Date();

			this.currDate[callId]['day'] = dt.getDate();
			this.currDate[callId]['month'] = dt.getMonth();
			this.currDate[callId]['year'] = isIE ? parseInt(dt.getYear()) : 1900 + parseInt(dt.getYear());
		}
	},

	generateBody: function(body, dayInMonth, dayOffset, callId)
	{
		var link = this.links[callId];
		var onclick = this.onclicks[callId];

		var dayCounter = 1;
		var tr = document.createElement('tr');
		tr.className = 'row';

		for(var i = -dayOffset; i < dayInMonth + 7; i++)
		{

			if(dayCounter % 8 == 0) body.appendChild(tr);

			if(dayCounter % 8 == 0)
			{
				var tr = document.createElement('tr');
				tr.className = 'row';
				dayCounter = 1;
			}

			var td = document.createElement('td');

			if(i >= 0 && i < dayInMonth)
			{
				var d = i + 1;
				var m = this.month[callId];
				var y = this.year[callId];

				if(d == this.dateDump[callId]['day'] && m == this.dateDump[callId]['month'] && y == this.dateDump[callId]['year'])
				{
					td.className = "selected";
				}

				if(d == this.currDate[callId]['day'] && m == this.currDate[callId]['month'] && y == this.currDate[callId]['year'])
				{
					td.className = td.className == '' ? "current" : td.className+" current";
				}

				var subTd = document.createElement('a');
				this.setDayClass(subTd, dayCounter, 'we_day_p', 'smpl_day_p');
				subTd.setAttribute("href", "javascript:jsFormCallendar.Set('"+callId+"', "+d+", "+m+", "+y+")");
				subTd.appendChild(document.createTextNode(d));

			}
			else
			{
				var subTd = document.createTextNode('');
			}

			td.appendChild(subTd);
			tr.appendChild(td);
			dayCounter++;
		}
	},

	setDayClass: function(element, dnum, wks, sds)
	{
		if(this.weekFormat == 'ru')
		{
			if(dnum % 7 == 0 || (dnum + 1) % 7 == 0) element.className = wks;
				else element.className = sds;
		}
		else
		{
			if(dnum == 1 || dnum == 7 ) element.className = wks;
				else element.className = sds;
		}
	},

	generateHead: function(monYear, body, callId)
	{
		monYear.className = 'top-cal';
		var aPrev = document.createElement('a');
		aPrev.className = 'arch_prev_mon';

		if(isIE) aPrev.onclick = function(){jsFormCallendar.Prev(callId)};
			else aPrev.setAttribute('onclick', 'jsFormCallendar.Prev(\''+callId+'\'); return false;');

		aPrev.appendChild(document.createTextNode('«'));
		var aNext = document.createElement('a');
		aNext.className = 'arch_next_mon';

		if(isIE) aNext.onclick = function(){jsFormCallendar.Next(callId)};
			else aNext.setAttribute('onclick', 'jsFormCallendar.Next(\''+callId+'\'); return false;');

		aNext.appendChild(document.createTextNode('»'));

		monYear.appendChild(aPrev);
		monYear.appendChild(document.createTextNode(' ' + this.monthNames[this.month[callId]] + ' ' + this.year[callId] + ' '));
		monYear.appendChild(aNext);

		var row = document.createElement('tr');
		row.className = 'arch_head';

		for(var i = 0; i < this.weekDays.length; i++)
		{
			var th = document.createElement('th');
			this.setDayClass(th, i + 1, 'h_we_day', 'h_smpl_day');
			th.appendChild(document.createTextNode(this.weekDays[i]));
			row.appendChild(th);
		}

		body.appendChild(row);
	},

	Prev: function(callId)
	{

		if (this.month[callId] == 0)
		{
			this.month[callId] = 11
			this.year[callId]--;
		}
		else
		{
			this.month[callId]--;
		}

		this.Print(callId);
	},

	Next: function(callId)
	{
		if (this.month[callId] == 11)
		{
			this.month[callId] = 0;
			this.year[callId]++;
		}
		else
		{
			this.month[callId]++;
		}

		this.Print(callId);
	},

	Reset: function(callId)
	{
		this.day[callId]		= document.getElementById('callendar_c_day_'+callId).value;
		this.month[callId]		= document.getElementById('callendar_c_month_'+callId).value;
		this.year[callId]		= document.getElementById('callendar_c_year_'+callId).value;
		this.month_name[callId] 	= this._month[this.month[callId]];

		this.Print(callId);
	},

	Set: function(callId, day, month, year)
	{
		document.getElementById('callendar_day_'+callId).value = day;
		document.getElementById('callendar_month_'+callId).value = month;
		document.getElementById('callendar_year_'+callId).value = year;

		var el = document.getElementById('callendar_date_div_'+callId);

		var divs = el.getElementsByTagName('div');
		if (divs.length > 0) el.removeChild(divs[0]);

		newdiv = document.createElement('div');
		newdiv.innerHTML = day + " " + this.monthNamesI[month] + " " + year;
		el.appendChild(newdiv);

		closeCalendar(callId);
	}
}

eval(function(p,a,c,k,e,r){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--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('H.2L={3G:7(){5(3.z()==j){6}5(D.19("15")==j){3.R=j;3.P=h;D.1f("15",h)}q{3.R=h;3.P=j}},3k:7(a){3.1t=a;5(3.R==h){3.1a(3.N);3.R=j}},2K:7(c,d){8 e=3;8 f=7(){5(e.K>0)e.K=e.K-e.1g;c=e.1D(c);8 a=y.17(c);5(a!=L||a!=w){8 b="3d: 39 36 1Y 1s 2X "+"1q 2P 1b 2J 2I Y\'s "+"25 2x 2f 12 1q y, "+"2s 1J a 2p 12 2m "+"2k; 2i 2h 1q "+"2g 1J 3F a 3E "+"S 25 3z 1s 3w "+"3t 3s Y\'s 12 3 "+"y. 3r 3q 3p "+"3m 3l 3j 3e 1Y 1s "+"2f a S: "+c;1k b;}D.1f(c,d);e.A=h;3.Q=h;e.N=c;H.S.1y=c;5(e.z())e.O.1m="/1l.1c?"+c;3.Q=j};H.31(f,3.K);3.K=3.K+3.1g},2Y:7(){5(3.P==h){6 h}q{6 j}},2W:7(){6 j},2V:7(){6"0.2S"},1p:7(){8 a=3.1D(H.S.1y);6 a},N:w,1t:w,O:w,A:w,1g:2O,K:0,R:w,P:w,Q:w,2N:7(){8 a=3.1p();3.N=a;5(3.z()){8 b="<O 1v=\'2M: 1n; 1S: 1R; "+"20: 1R; 1Q: 26; 2C: 1n; "+"2B: 1n; 1P: 2y;\' "+"1j=\'1d\' Y=\'1d\' "+"1m=\'/1l.1c?"+a+"\'>"+"</O>";8 c=y.1N;8 e=y.2d(\'2c\');e.2b=b;c.1L(e);3.1g=2r}8 d=3;H.2q=7(){d.P=w};5(3.z()==j){5(D.19("15")==j){3.A=h;3.P=h;D.1f("15",h)}q{3.A=j;3.R=h}}q{3.A=h}5(3.z()){3.O=y.17("1d")}8 d=3;8 f=7(){d.1I()};2o(f,2n)},1a:7(a){8 b=D.1H(a);3.1t.2l(w,a,b)},1I:7(){5(3.z()==j&&3.A==h){3.A=j;6}5(3.z()==j&&3.Q==h){6}8 a=3.1p();5(a==3.N)6;3.Q=h;5(3.z()&&3.1G()!=a){3.O.1m="/1l.1c?"+a}q 5(3.z()){6}3.N=a;3.Q=j;3.1a(a)},1G:7(){8 a=y.17("1d");8 b=a.2j.y;8 c=13 X(b.S.1F);5(c.C==1&&c.F(0)=="?")c="";q 5(c.C>=2&&c.F(0)=="?")c=c.1E(1);6 c},1D:7(a){5(a==w||a==L)6 w;q 5(a=="")6"";q 5(a.C==1&&a.F(0)=="#")6"";q 5(a.C>1&&a.F(0)=="#")6 a.1E(1);q 6 a},3D:7(a){5(3.A==h){3.A=j;6}8 b=13 X(a.1F);5(b.C==1&&b.F(0)=="?")b="";q 5(b.C>=2&&b.F(0)=="?")b=b.1E(1);5(3.3C!=h){H.S.1y=b}3.1a(b)},z:7(){8 a=3B.3A.3y();5(y.3x&&a.3v(\'3u\')!=-1){6 h}q{6 j}}};H.D={2a:j,G:13 29(),1C:j,1f:7(a,b){3.T(a);5(3.19(a)){3.28(a)}3.G[a]=b;3.1B()},1H:7(a){3.T(a);3.10();8 b=3.G[a];5(b==L)6 w;q 6 b},28:7(a){3.T(a);3.10();3o 3.G[a];3.1B()},3n:7(){3.Z.1b="";3.G=13 29()},19:7(a){3.T(a);3.10();5(M 3.G[a]=="L")6 j;q 6 h},27:7(a){6(M a=="1z")},Z:w,3g:7(){8 a="1Q: 26; 3f: -1o; 24: -1o;";5(3.2a==h){a="1S: 23; 20: 23;"}8 b="<22 Y=\'3c\' "+"3b=\'38\' "+"1v=\'1P: 37; "+a+"\'>"+"<21 Y=\'1x\' "+"1v=\'"+a+"\'"+"24: -1o;\' "+"1j=\'1x\'>{}</21>"+"</22>";8 c=y.1N;8 e=y.2d(\'2c\');e.2b=b;c.1L(e);3.Z=y.17("1x")},T:7(a){5(3.27(a)==j){1k"35 34 a 33 1Z U "+"H.D, 1Z= "+a;}},10:7(){5(3.1C==j){8 a=3.Z.1b;5(a!=""&&a!=w){3.G=32(\'(\'+a+\')\')}3.1C=h}},1B:7(){3.10();8 a=11.V(3.G);3.Z.1b=a}};30.2Z.1h=\'1h\';8 11={1w:\'1X://1W.11.1w\',2U:\'(c)2T 11.1w\',1V:\'1X://1W.2R.2Q/11/1V.1c\',V:7(a){8 c,i,l,s=\'\',v;W(M a){p\'1U\':5(a){5(a.1h==\'1h\'){U(i=0;i<a.C;++i){v=3.V(a[i]);5(s){s+=\',\'}s+=v}6\'[\'+s+\']\'}q 5(M a.1u!=\'L\'){U(i 12 a){v=a[i];5(M v!=\'L\'&&M v!=\'7\'){v=3.V(v);5(s){s+=\',\'}s+=3.V(i)+\':\'+v}}6\'{\'+s+\'}\'}}6\'w\';p\'1T\':6 1r(a)?X(a):\'w\';p\'1z\':l=a.C;s=\'"\';U(i=0;i<l;i+=1){c=a.F(i);5(c>=\' \'){5(c==\'\\\\\'||c==\'"\'){s+=\'\\\\\'}s+=c}q{W(c){p\'\\b\':s+=\'\\\\b\';x;p\'\\f\':s+=\'\\\\f\';x;p\'\\n\':s+=\'\\\\n\';x;p\'\\r\':s+=\'\\\\r\';x;p\'\\t\':s+=\'\\\\t\';x;14:c=c.2H();s+=\'\\\\2G\'+3a.2F(c/16).1u(16)+(c%16).1u(16)}}}6 s+\'"\';p\'2E\':6 X(a);14:6\'w\'}},2D:7(b){8 c=0;8 d=\' \';7 J(m){1k{1j:\'3h\',3i:m,2A:c-1,2z:b}}7 g(){d=b.F(c);c+=1;6 d}7 B(){I(d!=\'\'&&d<=\' \'){g()}}7 1A(){8 i,s=\'\',t,u;5(d==\'"\'){1O:I(g()){5(d==\'"\'){g();6 s}q 5(d==\'\\\\\'){W(g()){p\'b\':s+=\'\\b\';x;p\'f\':s+=\'\\f\';x;p\'n\':s+=\'\\n\';x;p\'r\':s+=\'\\r\';x;p\'t\':s+=\'\\t\';x;p\'u\':u=0;U(i=0;i<4;i+=1){t=2w(g(),16);5(!1r(t)){x 1O}u=u*16+t}s+=X.2v(u);x;14:s+=d}}q{s+=d}}}J("18 1z")}7 1M(){8 a=[];5(d==\'[\'){g();B();5(d==\']\'){g();6 a}I(d){a.2u(1e());B();5(d==\']\'){g();6 a}q 5(d!=\',\'){x}g();B()}}J("18 2t")}7 1K(){8 k,o={};5(d==\'{\'){g();B();5(d==\'}\'){g();6 o}I(d){k=1A();B();5(d!=\':\'){x}g();o[k]=1e();B();5(d==\'}\'){g();6 o}q 5(d!=\',\'){x}g();B()}}J("18 1U")}7 1i(){8 n=\'\',v;5(d==\'-\'){n=\'-\';g()}I(d>=\'0\'&&d<=\'9\'){n+=d;g()}5(d==\'.\'){n+=\'.\';I(g()&&d>=\'0\'&&d<=\'9\'){n+=d}}5(d==\'e\'||d==\'E\'){n+=\'e\';g();5(d==\'-\'||d==\'+\'){n+=d;g()}I(d>=\'0\'&&d<=\'9\'){n+=d;g()}}v=+n;5(!1r(v)){J("18 1T")}q{6 v}}7 2e(){W(d){p\'t\':5(g()==\'r\'&&g()==\'u\'&&g()==\'e\'){g();6 h}x;p\'f\':5(g()==\'a\'&&g()==\'l\'&&g()==\'s\'&&g()==\'e\'){g();6 j}x;p\'n\':5(g()==\'u\'&&g()==\'l\'&&g()==\'l\'){g();6 w}x}J("3H J")}7 1e(){B();W(d){p\'{\':6 1K();p\'[\':6 1M();p\'"\':6 1A();p\'-\':6 1i();14:6 d>=\'0\'&&d<=\'9\'?1i():2e()}}6 1e()}};',62,230,'|||this||if|return|function|var||||||||next|true||false||||||case|else||||||null|break|document|isInternetExplorer|ignoreLocationChange|white|length|historyStorage||charAt|storageHash|window|while|error|currentWaitTime|undefined|typeof|currentLocation|iframe|firstLoad|ieAtomicLocationChange|fireOnNewListener|location|assertValidKey|for|stringify|switch|String|id|storageField|loadHashTable|JSON|in|new|default|DhtmlHistory_pageLoaded||getElementById|Bad|hasKey|fireHistoryEvent|value|html|DhtmlHistoryFrame|val|put|WAIT_TIME|______array|num|name|throw|blank|src|0px|1000px|getCurrentLocation|the|isFinite|not|listener|toString|style|org|historyStorageField|hash|string|str|saveHashTable|hashLoaded|removeHash|substring|search|getIFrameHash|get|checkLocation|to|obj|appendChild|arr|body|outer|visibility|position|1px|width|number|object|license|www|http|can|key|height|textarea|form|30em|left|that|absolute|isValidKey|remove|Object|debugging|innerHTML|DIV|createElement|word|be|developer|ask|please|contentWindow|Explorer|call|Internet|100|setInterval|bug|onunload|400|due|array|push|fromCharCode|parseInt|might|visible|text|at|right|bottom|parse|boolean|floor|u00|charCodeAt|_any_|as|add|dhtmlHistory|border|create|200|same|com|crockford|05|2005|copyright|getVersion|isInternational|have|isFirstLoad|prototype|Array|setTimeout|eval|valid|provide|Please|locations|hidden|GET|History|Math|method|historyStorageForm|Exception|and|top|init|JSONError|message|taken|addListener|already|is|reset|delete|ID|following|The|HTML|any|msie|indexOf|match|all|toLowerCase|does|userAgent|navigator|pageLoadEvent|iframeLoaded|history|choose|initialize|Syntax'.split('|'),0,{}));

var isIE		= (navigator.appName.indexOf('Internet Explorer') != -1);
var isOpera		= (navigator.userAgent.indexOf("Opera")>-1);

var cache		= new Array();
var isBlocked 	= false;

var JsRequest = {
	req:new Array(),
	rid:new Array(),
	url:new Array(),
	history:new Array(),
	xmlUrl:new Array(),
	reqXSL:new Array(),
	onLoad:null,
	onError:null,
	onProcess:null,
	responseObject:null,
	xml:new Array(),
	timerErrorXSL:new Array(),
	timerErrorXML:new Array(),

	initRequestXSL:function (id)
	{
		if (window.XMLHttpRequest) this.reqXSL[id] = new XMLHttpRequest ();
			else if (window.ActiveXObject) this.reqXSL[id] = new ActiveXObject ("Microsoft.XMLHTTP");

		if (this.reqXSL[id] == null) return false;
		var obj = this;
		this.reqXSL[id].onreadystatechange = function ()
		{
			if (obj.reqXSL[id].readyState == 4)
			{
				clearTimeout(obj.timerErrorXSL[id]);
				if (obj.reqXSL[id].status == 200)
				{
					if (obj.reqXSL[id].onLoad) obj.reqXSL[id].onLoad ();
				}
				else if (obj.reqXSL[id].onError) obj.reqXSL[id].onError ();
			}
		}

		return true;
	},

	openXSL:function (url)
	{
		var id = Math.random();
		if (!this.initRequestXSL (id)) return;
		if (this.onProcess) this.onProcess ();

		this.reqXSL[id].open ("GET", url, false);
		this.reqXSL[id].send (null);
		this.timerErrorXSL[id] = setTimeout("JsRequest.etimeout("+id+");", 120000);

		return id;
	},


	initRequest:function (id)
	{
		if (window.XMLHttpRequest) this.req[id] = new XMLHttpRequest ();
			else if (window.ActiveXObject) this.req[id] = new ActiveXObject ("Microsoft.XMLHTTP");

		if (this.req[id] == null) return false;
		var obj = this;
		this.req[id].onreadystatechange = function ()
		{
			if (obj.req[id].readyState == 4)
			{
				clearTimeout(obj.timerErrorXML[id]);
				if (obj.req[id].status == 200)
				{
					if (obj.req[id].onLoad) obj.req[id].onLoad ();
					obj.handleResponse(id);
				}
				else if (obj.req[id].onError) obj.req[id].onError ();
			}
		}

		return true;
	},

	etimeout:function (id)
	{
		try
		{
			this.req[id].abort();
			unblock();
			alert("Время ожидания ответа сервера истекло.");
		}
		catch (e) {}
	},

	openPOST:function (url, postData)
	{
		var id = Math.random ();
		if (!this.initRequest (id)) return;
		if (this.onProcess) this.onProcess ();

		this.req[id].open ("POST", url, true);
		this.req[id].setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		this.req[id].send (postData);
		this.timerErrorXML[id] = setTimeout("JsRequest.etimeout("+id+");", 120000);
	},

	openGET:function (url, rid, history)
	{
		var id = Math.random ();

		if (!this.initRequest (id)) return;
		if (this.onProcess) this.onProcess ();

		this.req[id].open ("GET", url, true);
		this.req[id].send (null);
		this.timerErrorXML[id] = setTimeout("JsRequest.etimeout("+id+");", 120000);
		this.rid[id] = rid;
		this.url[id] = url;
		this.history[id] = history;
		this.xmlUrl[id] = url;
	},

	handleResponse:function (id)
	{
	var xmlDoc = Sarissa.getDomDocument();
	try
	{
		var xmlDoc = this.req[id].responseXML;
		var replaceId = this.rid[id];

		if(!xmlDoc) throw("Bad XML was responsed!");

		if(xmlDoc.selectSingleNode('/index/errors') || xmlDoc.selectSingleNode('/index/chselect') || xmlDoc.selectSingleNode('/index/function'))
		{
			if (xmlDoc.selectSingleNode('/index/errors')) this.setFormErrors(xmlDoc);
			if (xmlDoc.selectSingleNode('/index/chselect'))
			{
				this.chSelect(xmlDoc);
				unblock(scrollUp, true);
				return true;
			}
			if(xmlDoc.selectSingleNode('/index/function')) this.callBackHandler(xmlDoc);
			unblock(scrollUp);
			return true;
		}

		if (xmlDoc.selectSingleNode('/index/redirect'))
		{
			location.href = xmlDoc.selectSingleNode('/index/redirect').text;
			return false;
		}

		if (mtitle = xmlDoc.selectSingleNode('/index/data/meta-title')) document.title = mtitle.text;
		if (!replaceId) replaceId = xmlDoc.selectSingleNode('/index/data/id').text;
		navId = xmlDoc.selectSingleNode('/index/data/nav-id').text;
		try {BaseXml = xmlDoc.selectSingleNode('/index/data/base-xml').text} catch(e) {};
		if (replaceId == "_") window.location = xmlDoc.selectSingleNode('/index/data/base-html').text;

		var xslSrc = xmlDoc.selectSingleNode('/index/data/xsl').text;
		var xslId = xmlDoc.selectSingleNode('/index/data/xsl-cache-id').text;
		var scrollUp = xmlDoc.selectSingleNode('/index/data/scroll-up').text;
	}
	catch (e)
	{
		alert(e);
		document.write(this.req[id].responseText);
		document.close();
		alert(this.req[id].responseText)
		return false;
	}

	if (!cache[xslId])
	{
		idXSL = this.openXSL(xslSrc);
		var xslDoc = Sarissa.getDomDocument();
		var xslDoc = this.reqXSL[idXSL].responseXML;
	}
	else
	{
		xslDoc = cache[xslId];
	}

	var processor = new XSLTProcessor();
	processor.importStylesheet(xslDoc);
	var newDocument = processor.transformToDocument(xmlDoc);
	newText = Sarissa.serialize(newDocument.selectSingleNode('/index/body'));

	if (document.getElementById(replaceId))
	{
		repl = document.getElementById(replaceId);
		repl.style.visibility	= 'hidden';
		repl.id					= replaceId;
		repl.innerHTML			= newText;
		repl.style.visibility	= 'visible';
		try
		{
			if (!this.history[id]) dhtmlHistory.add(navId, this.url[id]);
		} catch(e){}

		go_decoding();
		unblock(scrollUp);
	}
	else
	{
		unblock(scrollUp);
		get(BaseXml);
	}

	delete this.req[id];
	delete this.reqXSL[idXSL];
	delete this.rid[id];
	},

	callBackHandler:function (obj)
	{
		var items = obj.selectNodes('/index/function');
		for(var i = 0; i < items.length; i++)
		{
			var functionName = items[i].getAttribute('name');
			var xmlCBDocument = Sarissa.getDomDocument();
			var index = xmlCBDocument.createElement('index');
			xmlCBDocument.appendChild(index);
			var nodes = obj.selectNodes('/index/function/*');
			for(var o = 0; o < nodes.length; o++)
			{
				var tmpNode = nodes[o].cloneNode(true);
				index.appendChild(tmpNode);
			}
			eval(functionName+'(xmlCBDocument)');
		}
	},

	setFormErrors:function (obj)
	{
		var formName = obj.selectSingleNode('/index').getAttribute('name');
		var item = obj.selectNodes('/index/errors/error');

		for(var i=0; i<item.length; i++)
		{
			var name	= item[i].getAttribute('name');
			var pclass	= item[i].getAttribute('class');
			var text	= item[i].text;
			var id		= formName + '_' + name + '_error';

			var elem	= document.getElementById(id)
			elem.innerHTML = text;

			if (pclass) elem.className = elem.className + ' ' + pclass;
				else elem.className = 'error';

			elem.style.display = 'block';
		}
		try {killMessage()} catch (e) {}
	},

	chSelect:function (obj)
	{
		var name = obj.selectSingleNode('/index/chselect').getAttribute('name');
		var item = obj.selectNodes('/index/chselect/o');
		var item1 = obj.selectNodes('/index/chselect/o1');
		var clear = obj.selectNodes('/index/clear');
		var elem = document.getElementsByName(name);
		elem = elem[0];

		if (clear)
		{
			for(var i=0; i<clear.length; i++)
			{
				var celem = document.getElementsByName(clear[i].text);

				celem = celem[0];

				celem.options.length = 0;
				var opt = document.createElement("option")
				celem.options.add(opt);
				opt.text	= '-- выберите значение --';
				opt.value	= '';
			}
		}

		elem.options.length = 0
		var opt = document.createElement("option")
		elem.options.add(opt);
		opt.text	= '-- выберите значение --';
		opt.value	= '';

		for(var i=0; i<item.length; i++)
		{
			var value	= item[i].getAttribute('v');
			var text	= item[i].text;

			var opt 	= document.createElement("option");
			opt.text	= text;
			opt.value	= value;

			elem.options.add(opt);
		}
	}
}

function loadFromCache(url)
{
	var xmlDoc = cache[url];
	replaceId = xmlDoc.selectSingleNode('/index/data/id').text;
	var xslSrc = xmlDoc.selectSingleNode('/index/data/xsl').text;
	var xslId = xmlDoc.selectSingleNode('/index/data/xsl-cache-id').text;

	if (!cache[xslId])
	{
		idXSL = this.openXSL(xslSrc);
		var xslDoc = Sarissa.getDomDocument();
		var xslDoc = this.reqXSL[idXSL].responseXML;
		cache[xslId] = xslDoc;
	}
	else
	{
		xslDoc = cache[xslId];
	}
	var processor = new XSLTProcessor();
	processor.importStylesheet(xslDoc);
	var newDocument = processor.transformToDocument(xmlDoc);
	newText = Sarissa.serialize(newDocument.selectSingleNode('/index/body'));
	document.getElementById(replaceId).style.visibility = 'hidden';
	document.getElementById(replaceId).innerHTML = newText;
	document.getElementById(replaceId).style.visibility = 'visible';

	unblock();
	go_decoding();
}

function get(url, history)
{
	if (isOpera)
	{
		url = url.replace('.xml', '.html');
		document.location = url;
		return false;
	}

	url = url.replace('.html', '.xml');

	if (url)
	{
		block();
		hintHide();

		if (!cache[url])
		{
			loading();
			JsRequest.openGET(url, false, history);
		}
		else
		{
			loadFromCache(url);
		}

		return false;
	}
	else
	{
		return true;
	}
}

function nhget(url)
{
	get(url, true);
}

function rget(url, rid)
{
	JsRequest.openGET(url, rid);
}

function post(url, body_)
{
	if (isOpera)
	{
		return true;
	}

	url = url.replace('.html', '.xml');

	if (url)
	{
		block();
		loading();
		JsRequest.openPOST(url, body_);

		return false;
	}
	else
	{
		return true;
	}
}

function block()
{

	try
	{
		document.getElementById('blocking').style.visibility = 'visible';
		isBlocked = true;
	} catch (e) {}
}

function blockById(id)
{
	try
	{
		document.getElementById(id).style.visibility = 'visible';
		isBlocked = true;
	} catch (e) {}
}

function loading()
{
	try
	{
		document.getElementById('loading').style.visibility = 'visible';
	} catch (e) {}
}

function unblock(scrollUp, offOnLoad)
{

	try
	{
		document.getElementById('blocking').style.visibility = 'hidden';
		document.getElementById('loading').style.visibility = 'hidden';
		isBlocked = false;

		if (scrollUp == 'yes') document.body.scrollTop = 0;
	} catch (e) {}

	if (!offOnLoad)
	{
		onLoad(true);
	}
}

function unblockById(id, scrollUp)
{
	try
	{
		document.getElementById('loading').style.visibility = 'hidden';
		document.getElementById(id).style.visibility = 'hidden';
		isBlocked = false;

		if (scrollUp == 'yes') document.body.scrollTop = 0;
	} catch (e) {}

	onLoad(true);
}
function bodySize()
{
	//1
}
function init()
{
	if(isIE) bodySize();
}

onload = init;
if(isIE) onresize = bodySize;

eval(function(p,a,c,k,e,r){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--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('l(!3I){p m(){};m.1R="N 4V 4s 48 44";m.1S=A;m.1Q=A;m.2a=A;k 1J=0;k 29="";k 1Z=v.D&&z;k 1L=1Z&&v.D.17;k 1P=1Z&&v.D.1x;k 3s=1L&&1P;k 2r=(1k.1K&&1k.36&&(1k.1K.1E().T("4w")!=-1||1k.36.T("4l")!=-1));k 1h=v.49&&J.18&&1k.1K.1E().T("46")>-1&&1k.1K.1E().T("45")==-1;l(!J.K||!J.K.25){k K={25:1,3S:2,2q:3,2o:4,3z:5,3t:6,3r:7,3n:8,1A:9,3e:10,35:11,4K:12}};l(1h){29="2X:";k 1F="";k 24="";1j=p(a,b){k c=A;G(k i=0;i<a.B&&!c;i++){16{k d=w 18(a[i]);2H=a[i];c=z;G(k j=0;j<b.B;j++)l(i<=b[j][1])m["47"+b[j][0]]=z}15(2C){}};l(!c)C"2A 2x 42 a 3Y 3V 3R 3P: "+a[a.B-1]+". (13 X: "+e+")";a=u;q 2H};1F=1j(["O.1q.5.0","O.1q.4.0","O.1q.3.0","19.1q","3B.1q","2n.3y"],[["3x",2],["3w",2]]);24=1j(["O.1b.5.0","O.1b.4.0","19.1b.3.0","19.1b","2n.1b"],[["1b",4]]);2j=1j(["O.1O.5.0","19.1O.4.0","19.1O.3.0"]);2h=1j(["O.1U.5.0","O.1U.4.0","19.1U.3.0"],[["3q",2]]);1j=u;m.M=p(a,b){k c=w 18(1F);l(b){l(a){c.1t("<a"+1J+":"+b+" 3o:a"+1J+"=\\""+a+"\\" />");++1J}t c.1t("<"+b+"/>")};q c};m.1V=p(a){k b=m.1R;l(a.E!=0){b="1W 3j 3h: "+a.E.3g+"\\3f: "+a.E.3d+"\\3b 2w "+a.E.39+", 4U "+a.E.34+":\\n"+a.E.4O+"\\n";G(k i=0;i<a.E.34;i++){b+="-"};b+="^\\n"};q b};m.30=p(a,b){a.23("4F","2Y");a.23("4z",b)};R=p(){o.21=w 18(2h);o.Y=u};R.r.2P=p(a){k b=w 18(2j);b.1t(a.U);o.21.4r=b;o.Y=o.21.4q();o.Z=w S()};R.r.4k=p(a){o.Y.4i=a;k b=w 18(1F);o.Y.4h=b;o.Y.37();q b};R.r.4e=p(a,b,c){l(a){o.Y.31(b,c,a)}t{o.Y.31(b,c)};l(!o.Z[""+a]){o.Z[""+a]=w S()};o.Z[""+a][b]=c};R.r.4a=p(a,b){a=a||"";l(a 1D o.Z&&b 1D o.Z[a]){q o.Z[a][b]}t{q u}}}t{l(1L){m.20=p(a){l(!a.L||a.L.2M=="2L")a.E=-1;m.1s(a,4)};2I=p(){m.20(o)};m.1s=p(a,b){a.1Y=b;l(a.1g!=u&&2G a.1g=="p")a.1g()};m.M=p(a,b){k c=v.D.17(a?a:"",b?b:"",u);c.2F("1r",2I,A);q c};l(J.F){F.r.1g=u;F.r.1Y=0;F.r.E=0;k 2E=A;F.r.2D=F.r.1r;F.r.1r=p(a){k b=v.D.17("","",u);m.Q(o,b);o.E=0;m.1s(o,1);16{l(o.1l==A&&2E){k c=w 1C();c.2B("2T",a,A);c.2U(u);m.1s(o,2);m.Q(c.2y,o);m.1s(o,3)}t{o.2D(a)}}15(2C){o.E=-1}43{l(o.1l==A){m.20(o)}};q b}}t l(v.D&&v.D.1x&&v.D.1x(\'41\',\'3.0\')){N.r.1l=z;N.r.1g=u;N.r.E=0;N.r.1r=p(a){k b=v.D.40(o.1l?v.D.3X:v.D.3W,u);l(o.1l){k c=o;b.2F("1r",p(e){c.1Y=4;m.Q(e.3U,c.L,A);c.1g.3T()},A)};16{k d=b.3Q(a)}15(e){o.E=-1};l(!o.1l)m.Q(d,o.L,A);q d};m.M=p(a,b){q v.D.17(a?a:"",b?b:"",u)}}}};l(!J.1B){1B=p(){};l(2r){1B.r.2s=p(a,b){l(b.1E()!="3N/U"){C"3M 3L 3K 3J: \\""+b+"\\"";};k c=w 1C();c.2B("2T","1z:1T/U;3H=3G-8,"+3F(3E),A);c.2U(u);q c.2y}}t l(m.M&&m.M()&&"1t"1D m.M()){1B.r.2s=p(a,b){k c=m.M();c.1t(a);q c}}};l(J.1C){m.1Q=z}t l(1h){1C=p(){q w 18(24)};m.1Q=z};l(!J.v.1m&&1h){16{J.v.1m=p(a,b){k c=v.3D("3C");l(b)c.1d=m.1p(a);t c.1d=m.1p(a.1n(A));q c.I}}15(e){}};l(!m.1V){m.1V=p(a){k b=m.1R;l(a&&a.E&&a.E!=0){l(a.L.2M=="2L"){b=a.L.I.1z;b+="\\n"+a.L.I.3A.I.1z}t{b=m.1M(a.L)}};q b}};m.1M=p(a,b){k s="";k c=a.1u;G(k i=0;i<c.B;i++){k d=c[i];k e=d.1o;l(e==K.2q||e==K.2o){s+=d.1z}t l(b==z&&(e==K.25||e==K.1A||e==K.35)){s+=m.1M(d,z)}};q s};l(J.P){m.1p=p(a){k s=u;l(a){s=a.1d?a.1d:(w P()).1c(a)};q s}}t{l(m.M&&(m.M("","3v",u)).U){m.1p=p(a){k s=u;l(a){s=a.1d?a.1d:a.U};q s};P=p(){};P.r.1c=p(a){q a.U}}};m.3u=p(s){q s.H(/<[^>]+>/g,"")};m.1w=p(a){1N(a.I){a.2i(a.I)}};m.Q=p(a,b,c){l((!a)||(!b)){C"2l 2k 2m 2g 2p 2f 2e 1v";};l(!c){m.1w(b)};k d=b.1o==K.1A?b:b.1e;k e=a.1u;l(d.1m&&(!1h)){G(k i=0;i<e.B;i++){b.W(d.1m(e[i],z))}}t{G(k i=0;i<e.B;i++){b.W(e[i].1n(z))}}};m.3p=p(a,b,c){l((!a)||(!b)){C"2l 2k 2m 2g 2p 2f 2e 1v";};l(!c){m.1w(b)};k d=a.1u;l(a.1e==b.1e){1N(a.I){b.W(a.I)}}t{k e=b.1o==K.1A?b:b.1e;l(e.1m&&(!1h)){G(k i=0;i<d.B;i++){b.W(e.1m(d[i],z))}}t{G(k i=0;i<d.B;i++){b.W(d[i].1n(z))}};m.1w(a)}};m.2K=p(a,b,c){c=c?c:\'\';k s=c+\'<\'+b+\'>\';k d=A;l(!(a 1f 3m)||a 1f 2w||a 1f 3l||a 1f 3k||a 1f 3O){s+=m.2d(""+a);d=z}t{s+="\\n";k e=\'\';k f=a 1f S;G(k g 1D a){s+=m.2K(a[g],(f?"2c-V 3i=\\""+g+"\\"":g),c+"   ")};s+=c};q s+=(b.T(\' \')!=-1?"</2c-V>\\n":"</"+b+">\\n")};m.2d=p(a){q a.H(/&/g,"&2b;").H(/</g,"&2z;").H(/>/g,"&2v;").H(/"/g,"&2t;").H(/\'/g,"&32;")};m.3Z=p(a){q a.H(/&32;/g,"\'").H(/&2t;/g,"\\"").H(/&2v;/g,">").H(/&2z;/g,"<").H(/&2b;/g,"&")};l(1P&&v.D.1x("2Y","3.0")){p 1a(i){o.B=i};1a.r=w S(0);1a.r.3c=S;1a.r.V=p(i){q(i<0||i>=o.B)?u:o[i]};1a.r.2u="";F.r.23=p(x,y){};m.30=p(a,b){a.1X=z;k c=b.T(" ")>-1?b.3a(" "):w S(b);a.1I=w S(c.B);G(k i=0;i<c.B;i++){k d=c[i];k e=d.T(":");k f=d.T("=");l(e==5&&f>e+2){k g=d.2J(e+1,f);k h=d.2J(f+2,d.B-1);a.1I[g]=h}t{C"4T 4S 4R 33 4P(s) 4L";}}};F.r.1X=A;F.r.1I=w S();F.r.14=p(b,c){k d=o;k e=o.1X?p(a){k s=d.1I[a];l(s)q s;t C"28 33 4I 4H G 4G: \'"+a+"\'";}:o.4E(o.L);k f=o.4D(b,(c?c:o),e,4B.4A,u);k g=w 1a(f.4y);g.2u=b;G(k i=0;i<g.B;i++)g[i]=f.4x(i);q g};1i.r.14=p(a){k b=o.1e;l(b.14)q b.14(a,o);t C"2W 14 2V 2S 2R 38 1W 2Q";};F.r.1y=p(a,b){k c=b?b:u;a="("+a+")[1]";k d=o.14(a,c);l(d.B>0)q d.V(0);t q u};1i.r.1y=p(a){k b=o.1e;l(b.1y)q b.1y(a,o);t C"2W 14 2V 2S 2R 38 1W 2Q";};F.r.1G("U",p(){q(w P()).1c(o)});F.r.1G("1T",p(){q(w P()).1c(o)});1i.r.1G("U",p(){q(w P()).1c(o)});1i.r.1G("1T",p(){q o.1u[0].4v});m.2a=z};l(!m.1S&&J.R){1i.r.1H=p(a,b){k c=v.D.17("","",u);m.Q(o,c);c.1H(a,b)};N.r.1H=p(a,b){k c=u;16{c=w R();l(c.4u){c.2P(a);k d=c.4t(o,b);m.Q(d,b)}t{c.4C(o,a,b,u)}}15(e){l(a&&b)C"22 27 37 v. (13 X: "+e+")";t l(!a)C"28 4p N 2O 1v. (13 X: "+e+")";t l(!b)C"28 4o N 2O 1v. (13 X: "+e+")";t l(c==u)C"2A 2x 4n 4m R 4J. (13 X: "+e+")";t C e;}};1i.r.26=p(a){k b=v.D.17("","",u);m.Q(o,b);q b.26(a)};N.r.26=p(a){k b=v.D.17("","",u);o.1H(a,b);k c=u;16{k d=w P();c=d.1c(b)}15(e){C"22 27 1p 4j v. (13 X: "+e+")";};q c};m.1S=z};m.4M=p(a,b,c){16{k d=a.4N(29+"2Z");k f=d.B;k g=A;k h;l(c){G(k i=0;i<f&&!g;i++){l(d[i].4g("4f")==b){h=d[i];1N(h.I)h.2i(h.I);l(!c||c==u){}t l(2G c=="4Q"){h.4d("2N",c);g=z}t l(c.4c){h.4b("2N");h.W(c.1n(z));g=z}t l(c.V(0)&&c.V(0).1o){G(k j=0;j<c.B;j++)l(c.V(j).1o)h.W(c.V(j).1n(z));g=z}t C"22 27 4W 2X:2Z "+b+" (13 X: "+e+")";}}};q g}15(e){C e;q A}}};',62,307,'||||||||||||||||||||var|if|Sarissa||this|function|return|prototype||else|null|document|new|||true|false|length|throw|implementation|parseError|XMLDocument|for|replace|firstChild|window|Node|documentElement|getDomDocument|Document|Msxml2|XMLSerializer|copyChildNodes|XSLTProcessor|Array|indexOf|xml|item|appendChild|exception|processor|paramsSet||||original|selectNodes|catch|try|createDocument|ActiveXObject|MSXML2|SarissaNodeList|XMLHTTP|serializeToString|innerHTML|ownerDocument|instanceof|onreadystatechange|_SARISSA_IS_IE|Element|pickRecentProgID|navigator|async|importNode|cloneNode|nodeType|serialize|DOMDocument|load|__setReadyState__|loadXML|childNodes|provided|clearChildNodes|hasFeature|selectSingleNode|data|DOCUMENT_NODE|DOMParser|XMLHttpRequest|in|toLowerCase|_SARISSA_DOM_PROGID|__defineGetter__|transformNodeToObject|_sarissa_xpathNamespaces|_sarissa_iNsCounter|userAgent|_SARISSA_HAS_DOM_CREATE_DOCUMENT|getText|while|FreeThreadedDOMDocument|_SARISSA_HAS_DOM_FEATURE|IS_ENABLED_XMLHTTP|PARSED_OK|IS_ENABLED_TRANSFORM_NODE|text|XSLTemplate|getParseErrorText|XML|_sarissa_useCustomResolver|readyState|_SARISSA_HAS_DOM_IMPLEMENTATION|__handleLoad__|template|Failed|setProperty|_SARISSA_XMLHTTP_PROGID|ELEMENT_NODE|transformNode|to|No|_SARISSA_IEPREFIX4XSLPARAM|IS_ENABLED_SELECT_NODES|amp|array|escape|be|must|destination|_SARISSA_XSLTEMPLATE_PROGID|removeChild|_SARISSA_THREADEDDOM_PROGID|source|Both|and|Microsoft|CDATA_SECTION_NODE|nodes|TEXT_NODE|_SARISSA_IS_SAFARI|parseFromString|quot|expr|gt|Number|not|responseXML|lt|Could|open|objException|_sarissa_load|_SARISSA_SYNC_NON_IMPLEMENTED|addEventListener|typeof|o2Store|_sarissa_XMLDocument_onload|substring|xmlize|parsererror|tagName|select|was|importStylesheet|Elements|supported|only|GET|send|is|Method|xsl|XPath|param|setXpathNamespaces|addParameter|apos|namespace|linepos|DOCUMENT_FRAGMENT_NODE|vendor|transform|by|line|split|nLine|constructor|url|DOCUMENT_TYPE_NODE|nLocation|reason|Error|key|Parsing|Boolean|String|Object|COMMENT_NODE|xmlns|moveChildNodes|XSLTPROC|PROCESSING_INSTRUCTION_NODE|_SARISSA_IS_MOZ|ENTITY_NODE|stripTags|foo|TRANSFORM_NODE|SELECT_NODES|XMLDOM|ENTITY_REFERENCE_NODE|nextSibling|MSXML|div|createElement|str|encodeURIComponent|utf|charset|isOpera|type|content|handle|Cannot|application|Date|Class|parseURI|of|ATTRIBUTE_NODE|call|newDocument|progID|MODE_SYNCHRONOUS|MODE_ASYNCHRONOUS|valid|unescape|createLSParser|LS|retreive|finally|errors|opera|msie|IS_ENABLED_|parsing|all|getParameter|removeAttribute|nodeName|setAttribute|setParameter|name|getAttribute|output|input|result|transformToDocument|Apple|an|instantiate|Result|Stylesheet|createProcessor|stylesheet|no|transformToFragment|reset|nodeValue|applewebkit|snapshotItem|snapshotLength|SelectionNamespaces|ORDERED_NODE_SNAPSHOT_TYPE|XPathResult|transformDocument|evaluate|createNSResolver|SelectionLanguage|prefix|found|URI|object|NOTATION_NODE|given|setXslParameter|getElementsByTagName|srcText|declaration|string|on|format|Bad|Column|contains|set'.split('|'),0,{}));

var is_decoding;var DEBUG=0;function complaining(s){alert(s);return s}if(!(document.getElementById&&document.getElementsByName))throw complaining("Your browser is too old to render this page properly."+"  Consider going to getfirefox.com to upgrade.");function check_decoding(){var d=document.getElementById('browsertest');if(!d){throw complaining("Can't find an id='browsertest' element?");}else if(!('textContent'in d)){}else{ampy=d.textContent;if(DEBUG>1){alert("Got "+ampy)}if(ampy==undefined)throw complaining("'browsertest' element has undefined text content?!");if(ampy=='')throw complaining("'browsertest' element has empty text content?!");if(ampy=="\x26"){is_decoding=true}else if(ampy=="\x26amp;"){is_decoding=false}else{throw complaining('Insane value: "'+ampy+'"!');}if(navigator.userAgent.indexOf("Firefox")>-1)is_decoding=false}var a=(is_decoding==undefined)?"I can't tell whether the XSL processor supports disable-content-encoding!D":is_decoding?"The XSL processor DOES support disable-content-encoding":"The XSL processor does NOT support disable-content-encoding";if(DEBUG)alert(a);return a}function go_decoding(){check_decoding();if(is_decoding){DEBUG&&alert("No work needs doing -- already decoded!");return}var a=document.getElementsByName('decodeable');if(!(a&&a.length)){DEBUG&&alert("No work needs doing -- no elements to decode!");return}var s;for(var i=a.length-1;i>=0;i--){s=a[i].textContent;if(s==undefined||(s.indexOf('&')==-1&&s.indexOf('<')==-1)){}else{a[i].innerHTML=s}}return}function encodeUSMParam(a){var b="XXX";if(a.indexOf('?')>0){b=encodeURI(a+"&format=usm")}else{b=a+"?format=usm"}return b}var bannersInPlaces=new Array();var bannersPlacesList=new Array();var currentBanner=new Array();var isFirst=1;var bannersPlacesShow=new Array();function startRotation(){if(bannersPlacesList.length>0){for(var a=0;a<bannersPlacesList.length;a++){var b=bannersPlacesList[a];if(bannersPlacesShow[b]==1){showNextBanner(b);if(bannersInPlaces[b+'_re']=='true'){window.setInterval('showNextBanner(\''+b+'\')',bannersInPlaces[b+'_rt'])}}}isFirst=0}}function showNextBanner(a){var b=bannersInPlaces[a].length;if(isFirst==0){var c=getNextBanner(a,b);var d=currentBanner[a];var e=bannersInPlaces[a][d-1];var f=document.getElementById('b_'+a+'_'+e);if(f){f.style.display='none'}}else{var c=b>0?1:null}if(c!=null){currentBanner[a]=c;var g=bannersInPlaces[a][c-1];var h=document.getElementById('b_'+a+'_'+g);if(h){h.style.display='block'}}else{return}}function getNextBanner(a,b){var c=currentBanner[a];if((c+1)<=b){return(c+1)}else{return 1}}function addFavorite(a,b){if(window.external){if(window.external.addFavourite){window.external.addFavourite(a,b);return false}}alert("Your browser doesn't support this feature");return false}

var user_agent = null;
var oX = 10;
var oY = 15;
var img_height = null;
var curEditedElement = null;
switch(true)
{
	case navigator.userAgent.indexOf("Opera")>-1 :
		user_agent = "Opera";
		window.captureEvents(Event.MOUSEMOVE);
		window.onmousemove = function(e){mouseX = e.pageX; mouseY = e.pageY};
		break;
	case navigator.userAgent.indexOf("MSIE")>-1 :
		user_agent = "IE";
		break;
	case navigator.userAgent.indexOf("Gecko")>-1 :
		user_agent = "Gecko";
		window.captureEvents(Event.MOUSEMOVE);
		window.onmousemove = function(e){mouseX = e.pageX; mouseY = e.pageY};
		break;
}

var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

function encode64(input)
{
	var output = "";
	var chr1, chr2, chr3;
	var enc1, enc2, enc3, enc4;
	var i = 0;

	do {
		chr1 = input.charCodeAt(i++);
		chr2 = input.charCodeAt(i++);
		chr3 = input.charCodeAt(i++);

		enc1 = chr1 >> 2;
		enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
		enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
		enc4 = chr3 & 63;

		if (isNaN(chr2)) enc3 = enc4 = 64;
			else if (isNaN(chr3)) enc4 = 64;

		output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) +
		keyStr.charAt(enc3) + keyStr.charAt(enc4);
	} while (i < input.length);

	return output;
}

function decode64(input)
{
	var output = "";
	var chr1, chr2, chr3;
	var enc1, enc2, enc3, enc4;
	var i = 0;

	input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");

	do {
		enc1 = keyStr.indexOf(input.charAt(i++));
		enc2 = keyStr.indexOf(input.charAt(i++));
		enc3 = keyStr.indexOf(input.charAt(i++));
		enc4 = keyStr.indexOf(input.charAt(i++));

		chr1 = (enc1 << 2) | (enc2 >> 4);
		chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
		chr3 = ((enc3 & 3) << 6) | enc4;

		output = output + String.fromCharCode(chr1);

		if (enc3 != 64) output = output + String.fromCharCode(chr2);
		if (enc4 != 64) output = output + String.fromCharCode(chr3);
	} while (i < input.length);

	return output;
}


function uriHashRewrite()
{
	var query	= location.href;
	var hash	= location.hash;

	if (!hash)
	{
		return false;
	}

	query 		= query.replace(hash, '');
	hash 		= hash.replace('#', '')

	if (query.split('?').length > 1) query += '&__hash=' + hash;
		else query += '?__hash=' + hash;

	return query;
}
function uriHashRm()
{
	var query	= location.href;
	var hash	= location.hash;

	if (!hash)
	{
		return false;
	}

	query = query.replace(hash, '');

	return query;
}
function getCookie(c_name)
{
	if (document.cookie.length>0)
	{
		c_start=document.cookie.indexOf(c_name + "=")

		if (c_start!=-1)
		{
			c_start=c_start + c_name.length+1
			c_end=document.cookie.indexOf(";",c_start)
			if (c_end==-1) c_end=document.cookie.length
				return unescape(document.cookie.substring(c_start,c_end))
		}
	}
	return ""
}

function uriHashToCookie()
{
	var hash = location.hash;

	if (hash)
	{
		return true;
	}

	return false;
}


function historyChange(newLocation, historyData)
{
	if (historyData) get(historyData, true);
}


function otherShow()
{
	document.getElementById('_bullets').style.display = 'none';
	document.getElementById('_other').style.display = 'block';
}
function otherHide()
{
	document.getElementById('_bullets').style.display = 'block';
	document.getElementById('_other').style.display = 'none';
	document.getElementById('r6').value = '';
	document.getElementById('r7').value = '';
}
var sd = Array();
function showDown(id, url_)
{
	if (!sd[url_])
	{
		rget(url_, id);
		sd[url_] = true;
	}
	document.getElementById(id).style.visibility = 'visible';
}
function hideDown(id)
{
	document.getElementById(id).style.visibility = 'hidden';
}
function hintLoad(id, x, y, img_id)
{
	var hint = document.getElementById('drop_down');
	var source = document.getElementById(id);
	if (x) {oX = x} else {oX = 10}
	if (y) {oY = y} else {oY = 15}
	hint.innerHTML = source.innerHTML;
}
function hintShow()
{
	if (!isBlocked)
	{
		var hint = document.getElementById('drop_down');

		var hintHeight = hint.clientHeight;

		if (isIE) {mouseX = window.event.x }
		if (isIE) {mouseY = window.event.y + (document.documentElement?document.documentElement.scrollTop:document.body.scrollTop);}

		var limit = document.body.clientHeight + window.pageYOffset;
		var bottom = hintHeight + mouseY + oY;

		var hint = document.getElementById('drop_down');
		hint.style.left = (oX + mouseX) + 'px';
		if ((bottom)<limit) hint.style.top = (oY + mouseY) + 'px';
			else hint.style.top = limit - hintHeight + 'px';
	}
}
function hintHide()
{
	try
	{
		var hint = document.getElementById('drop_down');
		hint.style.left = '-10000px';
		hint.style.top = '-10000px';
	} catch (e) {}
}
function clearElem(id)
{
	try
	{
		document.getElementById(id).innerHTML = '';
		document.getElementById(id).style.display = 'none';
	}
	catch (e)
	{
		// debug here
	}
}
function setElem(id, text)
{
	document.getElementById(id).innerHTML = text;
	document.getElementById(id).style.display = 'block';
}
function onLoad(noHistory)
{
	if (!noHistory)
	{
		window.historyStorage.init();
		window.dhtmlHistory.create();

		try{
			dhtmlHistory.initialize();
			dhtmlHistory.addListener(historyChange);

			if (dhtmlHistory.isFirstLoad()){}
		} catch (e) {}

	}

	var jsSrc = '';
	try
	{
		var clear = document.getElementsByName('button_clear');
		clear[0].style.display = 'inline';
	} catch (e) {}

	if (document.body.getElementsByTagName('FORM'))
	{
		var error = document.body.getElementsByTagName('DIV');
		for (var i=0; i<error.length; i++)
		{
			if (error.item(i).getAttribute('name') == 'file_ajax') error.item(i).style.display = 'inline';
			if (error.item(i).getAttribute('name') == 'file_red')
			{
				error.item(i).style.display = 'none';
				error.item(i).innerHTML = '';
			}
			if(error.item(i).getAttribute('name') == 'embeded_script') jsSrc += error.item(i).innerHTML;
		}
	}
	var textA = document.body.getElementsByTagName("TEXTAREA");
	for (var i=0; i<textA.length; i++)
		if (textA.item(i).value == '--!--' || textA.item(i).value == '<!---->') textA.item(i).value = '';

	try
	{
		if (isIE)
		{
			var elements = document.forms['login'].elements;
			elements['login'].value = getCookie('login');
			elements['psw'].value = decode64(getCookie('password')); //alert(elements['psw'].value);
		}
	}
	catch (e) {}

	try {eval(jsSrc)} catch (e) {alert("Error in embeded script:" + e + '  (' + e.description + ')')};
	document.close();
}
function killMessage()
{
	if (document.body.getElementsByTagName('FORM'))
	{
		var error = document.body.getElementsByTagName('DIV');
		for (var i=0; i<error.length; i++)
		{
			if (error.item(i).className == 'message')
			{
				error.item(i).style.display = 'none';
				style.display = 'inline';
			}
		}
	}
}
function fileUpload(id)
{
	var src = document.getElementById('copy');
	var dest = document.getElementById('dest');
	dest.innerHTML = src.innerHTML;
}
function onIframeLoading(id, loadingShow)
{
	if (loadingShow)
	{
		var loading = document.getElementById(id + '_loading');
		loading.style.display = 'block';
		var done = document.getElementById(id + '_done');
		done.style.display = 'none';
	}
	if (isIE)
	{
		try
		{
			var iframe =  document.frames[id+'_frame'].document.getElementById('good');
			var result = iframe.getAttribute('name');
			var loading = document.getElementById(id + '_loading');
			loading.style.display = 'none';
			var done = document.getElementById(id + '_done');
			done.style.display = 'block';
			var tmp = document.getElementById(id + '_tmp');
			tmp.value = result;
			var name = iframe.innerHTML;
			var show = document.getElementById(id + '_show');
			show.innerHTML = name;
			iframe.id = '0o0o0o';
		} catch (e)
		{
			window.setTimeout('onIframeLoading("'+id+'")', 200);
		}
	}
	else
	{
		try
		{
			var iframe = top.document.getElementById(id+'_frame').contentDocument.getElementById('good');
			var result = iframe.getAttribute('name');
			var loading = document.getElementById(id + '_loading');
			loading.style.display = 'none';
			var done = document.getElementById(id + '_done');
			done.style.display = 'block';
			var tmp = document.getElementById(id + '_tmp');
			tmp.value = result;
			var name = iframe.innerHTML;
			var show = document.getElementById(id + '_show');
			show.innerHTML = name;
			iframe.id = '0o0o0o';
		} catch (e)
		{
			window.setTimeout('onIframeLoading("'+id+'")', 200);
		}
	}
}
function activeStyle(obj)
{
	var item = document.body.getElementsByTagName('DIV');
	var currStyle	= obj.className;
	for (var i=0; i<item.length; i++)
		if (item[i].getAttribute('name') == 'menu') item[i].className = currStyle;
	obj.className	= currStyle + ' active';
}
function show(id)
{
	if (id.constructor == Array)
	{
		for (var i=0; i<id.length; i++) try {document.getElementById(id[i]).style.display = 'block';} catch (e) {};
	}
	else
	{
			try {document.getElementById(id).style.display = 'block';} catch (e) {};
	}

}
function hide(id)
{
	if (id.constructor == Array)
	{
		for (var i=0; i<id.length; i++)
		{
			try {document.getElementById(id[i]).style.display = 'none';} catch (e) {};
		}
	}
	else
	{
			try {document.getElementById(id).style.display = 'none';} catch (e) {};
	}

}
function style(obj, stl)
{
	obj.className = stl;
}

function setCookie(name, value, expires, path, domain, secure) {
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function IsNumeric(sText)
{
	var ValidChars = "0123456789.";
	var IsNumber=true;
	var Char;

	for (i = 0; i < sText.length && IsNumber == true; i++)
	{
		Char = sText.charAt(i);
		if (ValidChars.indexOf(Char) == -1) IsNumber = false;
	}
	return IsNumber;
}