function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function showimg(img,w,h,t){
	var win=window.open('about:blank','_blank','top=50,left=350,width='+w+',height='+h+',menubar=0,scrollbars=0,status=0,resizable=0');
	with(win.document){
		open();
		write('<html><title>"'+t+'"</title><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><img src='+img+' width='+w+' height='+h+'></body></html>');
		close();
	}
}

	function Zoom(xlink,x,y){
		x1=x+20;
		y1=y+40;
		window.open(xlink,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height='+y1+',width='+x1);
	}

function shfile(file,w,h){
window.open(file,'_blank','top=50,left=350,width='+w+',height='+h+',menubar=0,scrollbars=1,status=0,resizable=1');
}

function shfileKDS(file){
window.open('_kds/'+file,'_blank','menubar=0,scrollbars=1,status=0,resizable=1');
}

function downloadKDS(file){
window.open(file,'_top','menubar=0,scrollbars=1,status=0,resizable=1');
}

<!--
function trim(str) {
	return str.replace(/^\s*/,'').replace(/\s*$/,'');
}

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 getCookie(name) {
	var prefix=name+"="
	var cookieStartIndex=document.cookie.indexOf(prefix)
	if (cookieStartIndex==-1) return null;
	var cookieEndIndex=document.cookie.indexOf(";", cookieStartIndex + prefix.length)
	if (cookieEndIndex==-1)	cookieEndIndex=document.cookie.length
	return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}

function deleteCookie(name, path, domain) {
	if (getCookie(name)) {
		c=new Date();
		c.setTime(c.getTime()-1000);
		document.cookie=name+"="+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+"; expires="+c.toGMTString()+";";
	}
}

function _goto(link) {
	if ((typeof(link)!='undefined') && link) {
		document.location.href=link;
		return false
	}
}

function selValue(el,str) {
	for (var i=0;i<el.length;i++) {
		if ((!el[i].value && el[i].text==str) || el[i].value==str) {
			el.selectedIndex=i;
			return;
		}
	}
	el.selectedIndex=0;
}


function cf(){
	document.search_form.str.focus();
}

function justnow(){
<!--   // Array ofmonth Names
	var monthNames = new Array( "Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря");
	var now = new Date();
	
	thisYear = now.getYear();
	if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem
	document.write("на " + now.getDate() + "  " + monthNames[now.getMonth()] + ", " + thisYear);
}

function justnow1(){
<!--   // Array ofmonth Names
	var monthNames = new Array( "Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря");
	var now = new Date();
	
	thisYear = now.getYear();
	if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem
	document.write(now.getDate() + "  " + monthNames[now.getMonth()] + ", " + thisYear);
}

function justnow2(d){
<!--   // Array ofmonth Names
	var monthNames = new Array( "Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря");
	var now = new Date();
	
	thisTime = now.getTime();
	nextTime = thisTime + d*86400000;
	now.setTime(nextTime);
	
	thisYear = now.getYear();
	nextday = now.getDate();
	if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem
	document.write(nextday + "  " + monthNames[now.getMonth()] + ", " + thisYear);
}

// -->