/********************************************************\u041D\u0430\u0431\u043E\u0440 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0445 \u0444\u0443\u043D\u043A\u0446\u0438\u0439 JavaScript \u0434\u043B\u044F belta.by********************************************************//*doSearch \u0432\u044B\u0437\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043D\u043E\u043F\u043A\u0438 \u0440\u044F\u0434\u043E\u043C \u0441\u043E \u0441\u0442\u0440\u043E\u043A\u043E\u0439 \u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0437\u0430\u043F\u0440\u043E\u0441\u0430 \u043D\u0430 \u0432\u0441\u0435\u0445 \u0444\u043E\u0440\u043C\u0430\u0445 */function openDbRelativeURL( url, target ){//Check we have a target window;target = (target == null ) ? window : target;//Work out the path of the database;if (location.pathname.indexOf('.nsf')!=-1){path = location.pathname.split('.nsf')[0] + '.nsf/';}else{path = location.pathname+'7days_plus.nsf/'}target.location.href = path + url;}function doSearch ( s ) {var regExp1 = /\bfield\b/;var regExp2 = /[(,),<,>,\[,\]]/;var str = s.value;if ( str == "" ){ alert("\u041D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E \u0447\u0442\u043E \u0438\u0441\u043A\u0430\u0442\u044C!");s.focus();} else { if ( typeof regExp1.source != 'undefined' ) //supports regular expression testing if ( regExp1.test( str ) || regExp2.test( str ) ){var alrt = "\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u0432 \u0437\u0430\u043F\u0440\u043E\u0441 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0435 \u0441\u043B\u043E\u0432\u043E 'field'"; alrt += "\n\u0430 \u0442\u0430\u043A\u0436\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B [, ], (, ), < or >";s.focus();return alert( alrt );}openDbRelativeURL("HTMLSearch?SearchView&Query=" + escape( str ) + "&SearchOrder=3&SearchWV=TRUE&start=1&count=10");}}function returnFalse(s){//guess the field if not supplied//s = (s == null) ? document.forms[0].Query : s;//if you want to do the search, use this linedoSearch(s);//if you want to alert the user, use this line//alert('Please use the \'Go!!\' button to do a search');//this line should always be here!!return false;}function returnSearchFalse(s, mode){//guess the field if not supplied//s = (s == null) ? document.forms[0].Query : s;//if you want to do the search, use this lineif (mode=="2"){	doExtendedSearch(s);}else{	doExtendedSearch(s);}//if you want to alert the user, use this line//alert('Please use the \'Go!!\' button to do a search');//this line should always be here!!return false;}//\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0445 \u0438 \u043A\u043E\u043D\u0435\u0447\u043D\u044B\u0445 \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432 \u0441\u0442\u0440\u043E\u043A\u0438function trim(aStr) {	//return aStr.replace(/^\s{1,}/, "").replace(/\s{1,}$/, "")}/*\u0424\u0443\u043D\u043A\u0446\u0438\u044F getPathName\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0434\u043B\u044F \u041E\u043F\u0435\u0440\u044B, \u043F\u043E\u0441\u043A\u043E\u043B\u044C\u043A\u0443 location.pathname\u0434\u043B\u044F \u043D\u0435\u0435 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0430\u043A\u0436\u0435 \u0438 location.search.*/function getPathName(){var pth = location.pathname.split('?');return pth[0];}/*NavigateView \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u0440\u0430\u0437\u0431\u0438\u0442\u044C \u0437\u0430\u043F\u0438\u0441\u0438 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u043D\u0430\u0433\u0440\u0443\u043F\u043F\u044B, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044F \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B start \u0438 count \u043C\u0435\u0442\u043E\u0434\u0430 ?OpenView.Arguments:d = \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435, \u043B\u0438\u0431\u043E "prev" \u043B\u0438\u0431\u043E "next"n = \u0447\u0438\u0441\u043B\u043E \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u043C\u044B\u0445 \u043D\u0430 \u043E\u0434\u043D\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435*/function navigateView (d, n) {	var c = 0;	var args = location.search.split('&');	var news = new Array();	var ii = 0;	for (var i = 0; i < args.length; i ++) {		if ( args[i].toLowerCase().indexOf('start=') != -1){			c = parseInt(args[i].split('=')[1]);		} else {			news[ii] = args[i];			ii ++;		}	}	 	var strt = getPathName();  		if (args[0] == ''){		location.href = strt + '?OpenView&start=' + n;	} else if (c == 0 && d == 'next'){		location.href += '&start=' + n;	} else if (c == 0 && d == 'prev'){		return alert('\u0412 \u0434\u0430\u043D\u043D\u043E\u043C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435\u0442.');	} else 	if (c <= n && d == 'prev'){		location.href = strt + news.join('&');	} else 	if (d == 'next'){		location.href = strt + news.join('&') + '&start=' + ( c + n );	} else 	if (d == 'prev'){		location.href = strt + news.join('&') + '&start=' + ( c - n);	}}/*view_replace_nodocuments \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0434\u043B\u044F \u0442\u043E\u0433\u043E \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u043E\u0435\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 Domino "No documents found" \u043D\u0430 \u043B\u044E\u0431\u043E\u0435 \u0434\u0440\u0443\u0433\u043E\u0435*/function view_replace_nodocuments(vMessage){  var h2 = document.getElementsByTagName("h2");  for (var vLoop = 0; vLoop < h2.length; vLoop++){   if (h2[vLoop].childNodes[0].nodeValue == "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B"){    h2[vLoop].childNodes[0].nodeValue = vMessage;   }   h2[vLoop].style.visibility = 'visible';  }}/*\u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u0432 \u0434\u0440\u0443\u0433\u043E\u043C \u043E\u043A\u043D\u0435 \u0441 \u0437\u0430\u0434\u0430\u043D\u043D\u044B\u043C \u0432\u043D\u0435\u0448\u043D\u0438\u043C \u0432\u0438\u0434\u043E\u043C*/function lm(dbname, viewname, unid) { window.open('/'+dbname+'/'+viewname+'/'+unid+'?OpenDocument', 'lastnews'+replace(unid,'$','0'), 'menubar,toolbar,scrollbars,status,resizable,width=570,height=360'); }/*open search results and append the search term in the URL..*/function openAndHighlight( dbname,viewname, unid ) {window.open('/'+dbname+'/'+viewname+'/'+unid+'?OpenDocument&Highlight=0,' + escape( appTerm ), 'lastnews'+unid, 'menubar,toolbar,scrollbars,status,resizable,width=570,height=360');}/*\u043D\u0430 \u0444\u043E\u0440\u043C\u0435 \u043F\u043E\u0438\u0441\u043A\u0430 \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u043F\u0440\u044F\u043C\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0438\u043A\u0438, \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0449\u0438\u0435 \u0440\u0435\u043B\u0435\u0432\u0430\u043D\u0442\u043D\u043E\u0441\u0442\u044C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 \u0441\u0434\u0435\u043B\u0430\u043D\u043D\u043E\u043C\u0443 \u0437\u0430\u043F\u0440\u043E\u0441\u0443*/function kill_boxes(){for( i=0; i<document.images.length ; i++ ){if( document.images[i].src.indexOf('vwicnsr1.gif') != -1){ document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0} //end ifif( document.images[i].src.indexOf('vwicnsr2.gif') != -1){ document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0} //end ifif( document.images[i].src.indexOf('vwicnsr3.gif') != -1){ document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0} //end ifif( document.images[i].src.indexOf('vwicnsr4.gif') != -1){ document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0} //end ifif( document.images[i].src.indexOf('vwicnsr5.gif') != -1){ document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0} //end ifif( document.images[i].src.indexOf('vwicnsr6.gif') != -1){ document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0} //end ifif( document.images[i].src.indexOf('vwicnsr7.gif') != -1){ document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0} //end if} // end for}function ToRegion() {(document.srch.select_reg.options[document.srch.select_reg.selectedIndex].value !="none")	location = document.srch.select_reg.options[document.srch.select_reg.selectedIndex].value  }function replace(string,text,by) {// Replaces text with by in string    var strLength = string.length, txtLength = text.length;    if ((strLength == 0) || (txtLength == 0)) return string;    var i = string.indexOf(text);    if ((!i) && (text != string.substring(0,txtLength))) return string;    if (i == -1) return string;    var newstr = string.substring(0,i) + by;    if (i+txtLength < strLength)        newstr += replace(string.substring(i+txtLength,strLength),text,by);    return newstr;}function appl_cl(id, cl){	document.getElementById(id).className=cl;}