// \u0411\u0440\u0430\u0443\u0437\u0435\u0440\u0434\u0435\u0442\u0435\u043A\u0442isDOM=document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)isOpera=isOpera5=window.opera && isDOM //Opera 5+isOpera6=isOpera && window.print //Opera 6+isOpera7=isOpera && document.readyState //Opera 7+isMSIE=document.all && document.all.item && !isOpera //Microsoft Internet Explorer 4+isMSIE5=isDOM && isMSIE //MSIE 5+isNetscape4=document.layers //Netscape 4.*isMozilla=isDOM && navigator.appName=="Netscape" //Mozilla \u0438\u043B\u0438 Netscape 6.*////movercolor='#D0E0FF'; // \u0426\u0432\u0435\u0442 \u043F\u0443\u043D\u043A\u0442\u0430 \u043C\u0435\u043D\u044E \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430var showTimeout = null;var SHOW_DELAY=300;var HIDE_DELAY=500var hidetimeout = null;var oldmenu, oldcell;var moutcolor;  // \u0426\u0432\u0435\u0442 \u043F\u0443\u043D\u043A\u0442\u0430 \u043C\u0435\u043D\u044Eif (isNetscape4)document.captureEvents(Event.MOUSEMOVE);var curhidemenu=nullvar hidetimeout=nullvar timerID=nullfunction getScroll()         {         scrollXY=document.getElementsByTagName((document.compatMode && document.compatMode == 'CSS1Compat') ? "HTML" : "BODY")[0];	 return scrollXY.scrollTop;         }function showmenuV(menu,ParentCell){      if (oldmenu!=null){document.getElementById(oldmenu).style.visibility='hidden';}         oldcell=ParentCell;         point=getPageXY(document.getElementById(ParentCell));         if (document.getElementById(menu)==null) {return;}         document.getElementById(menu).style.left=document.getElementById(ParentCell).offsetWidth+document.getElementById(ParentCell).offsetLeft+"px";         document.getElementById(menu).style.top=(point.y-( isMSIE ? document.getElementById(ParentCell).offsetHeight : 0))+"px";        		if (window.innerHeight<(parseInt(document.getElementById(menu).style.top.substring(0, document.getElementById(menu).style.top.length-( isMSIE ? 0 : 2)))+document.getElementById(menu).clientHeight))			document.getElementById(menu).style.top=		 ((point.y)-document.getElementById(menu).clientHeight+document.getElementById(ParentCell).offsetHeight)+(isMSIE ? "" : "px");//		alert((isMSIE ? window.height : window.innerHeight)+", "+document.getElementById(menu).clientHeight+", "+(parseInt(document.getElementById(menu).style.top.substring(0, document.getElementById(menu).style.top.length-2))+window.height)+", "+document.getElementById(ParentCell).offsetHeight+", "+point.y);		//alert(""+		 ((isMSIE ? window.height : document.documentElement.clientHeight)-document.getElementById(menu).clientHeight)+(isMSIE ? "" : "px"));		if ( !isMSIE )			document.getElementById(menu).style.top=document.getElementById(menu).style.top+"px";			         document.getElementById(menu).style.visibility='visible';//		alert(document.documentElement.clientHeight+", "+document.getElementById(menu).style.top+document.getElementById(menu).style.height+", "+document.getElementById(menu).style.top +","+document.getElementById(menu).clientHeight);			         oldmenu=menu;         clearTimeout(hidetimeout);     }function showmenuG(menu,ParentCell)         {         if (oldmenu!=null){document.getElementById(oldmenu).style.visibility='hidden';}          oldcell=ParentCell;         if (document.getElementById(menu)==null) {return;}                  point=getPageXY(document.getElementById(ParentCell));         document.getElementById(menu).style.left=point.x+"px";         document.getElementById(menu).style.top=point.y+document.getElementById(ParentCell).offsetHeight+"px";//         document.getElementById(menu).style.left=(point.x-170)+"px";//         document.getElementById(menu).style.top=(point.y-120)+document.getElementById(ParentCell).offsetHeight+"px";//         document.getElementById(menu).style.position="relative";         		if (window.innerWidth<(document.getElementById(menu).style.left+document.getElementById(menu).style.width))			document.getElementById(menu).style.left=window.innerWidth-document.getElementById(menu).style.width;         document.getElementById(menu).style.visibility='visible';         oldmenu=menu;         clearTimeout(hidetimeout);         }//----------------------------function showmenuGTbl(menu,ParentCell)         {         if (oldmenu!=null){document.getElementById(oldmenu).style.visibility='hidden';}          oldcell=ParentCell;         if (document.getElementById(menu)==null) {return;}                  point=getPageXY(document.getElementById(ParentCell));//         document.getElementById(menu).style.left=point.x+"px";//         document.getElementById(menu).style.top=point.y+document.getElementById(ParentCell).offsetHeight+"px";         document.getElementById(menu).style.left=(point.x-170)+"px";         document.getElementById(menu).style.top=(point.y-120)+document.getElementById(ParentCell).offsetHeight+"px";//         document.getElementById(menu).style.position="relative";         		if (window.innerWidth<(document.getElementById(menu).style.left+document.getElementById(menu).style.width))			document.getElementById(menu).style.left=window.innerWidth-document.getElementById(menu).style.width;         document.getElementById(menu).style.visibility='visible';         oldmenu=menu;         clearTimeout(hidetimeout);         }//----------------------------function showmenuGU(menu,ParentCell)         {         if (oldmenu!=null){document.getElementById(oldmenu).style.visibility='hidden';}          oldcell=ParentCell;         if (document.getElementById(menu)==null) {return;}                  point=getPageXY(document.getElementById(ParentCell));         document.getElementById(menu).style.left=point.x+"px";         document.getElementById(menu).style.top=point.y-document.getElementById(menu).clientHeight+"px";		if (window.innerWidth<(document.getElementById(menu).style.left+document.getElementById(menu).style.width))			document.getElementById(menu).style.left=window.innerWidth-document.getElementById(menu).style.width;         document.getElementById(menu).style.visibility='visible';         oldmenu=menu;         clearTimeout(hidetimeout);         }function hidemenu(menu){	if (document.getElementById(menu)!=null)         document.getElementById(menu).style.visibility='hidden';         }function getPageXY(elm){  var point = { x: 0, y: 0 };  while (elm)  {    point.x += elm.offsetLeft;    point.y += elm.offsetTop;    elm = elm.offsetParent;  }       return (point);}function Bs_setshowmenuG(menu,ParentCell){//	location.status=menu;	if 	(curhidemenu==menu)	clearTimeout(hidetimeout);clearTimeout(showTimeout);showTimeout=setTimeout("showmenuG('"+menu+"','"+ParentCell+"')",SHOW_DELAY);}	///-------------------function Bs_setshowmenuGTbl(menu,ParentCell){//	location.status=menu;	if 	(curhidemenu==menu)	clearTimeout(hidetimeout);clearTimeout(showTimeout);showTimeout=setTimeout("showmenuGTbl('"+menu+"','"+ParentCell+"')",SHOW_DELAY);}//--------------------function Bs_setshowmenuGU(menu,ParentCell){//	if 	(curhidemenu==menu)	clearTimeout(hidetimeout);clearTimeout(showTimeout);showTimeout=setTimeout("showmenuGU('"+menu+"','"+ParentCell+"')",SHOW_DELAY);}	//  NEW version 29/09/2006function Bs_setshowmenuV(menu,ParentCell){//	location.status=menu;	if 	(curhidemenu==menu)	clearTimeout(hidetimeout);clearTimeout(showTimeout);showTimeout=setTimeout("showmenuV('"+menu+"','"+ParentCell+"')",SHOW_DELAY);}	// OLD version//function Bs_setshowmenuV(menu,ParentCell){////	if 	(curhidemenu==menu)//		{//		clearTimeout(hidetimeout);//		clearTimeout(hidetimeout);//		}//	location.status=menu;//clearTimeout(showTimeout);//showTimeout=setTimeout("showmenuV('"+menu+"','"+ParentCell+"')",SHOW_DELAY);//}	function Bs_setTHidemenu(menu){	clearTimeout(showTimeout);	curhidemenu=menu;	hidetimeout=setTimeout("hidemenu('"+menu+"')",HIDE_DELAY);	return hidetimeout;}	function bodyCloseMenus(){	Bs_setTHidemenu(curhidemenu);}function dontDiePlease(menu){	clearTimeout(showTimeout);	clearTimeout(hidetimeout);if (timerID!=null)     clearTimeout(timerID);//	Bs_setTHidemenu(menu);}	function getPreviousByDocNumber(pdc){pdc=pdc.substring(pdc.indexOf('.')+1); //alert("pdc: "+	pdc)if (pdc.indexOf('.')!=-1){	var bpdc;	bpdc=pdc.substring(0,pdc.lastIndexOf('.'));	if(pdc.substring(pdc.lastIndexOf('.')+1)=='1') {		pdc=bpdc;	}  else {		pdc=bpdc+"."+(parseInt(pdc.substring(pdc.lastIndexOf('.')+1))-1);	} };return pdc;}function getForumByURL(){if (document.URL.indexOf("11~")==-1) {	return false;} else {	return document.URL.substring(				document.URL.indexOf("11~")+3,				document.URL.indexOf("&", document.URL.indexOf("11~")+3)				);	}}function isBold(){	forumName=getForumByURL();	lastlogin=GetCookie("NsgLastForum-"+forumName);	return (LastLogin);}function unArrayAppendSort(array1, array2){ var array3=new Array(array1.length+array2.length); for (i=0; i<array1.length; i++) 	array3[i]=array1[i]; for (i=0; i<array2.length; i++) 	array3[i+array1.length]=array2[i]; array3=array3.sort(); var t="";  for (i=0; i<array3.length; i++){	 if (array3[i]==t) {	 	array3.splice(i, 1);	 	i--;	 	} else {	 	t=array3[i];	 	}	}  return array3; }	 	function switchDisplayById(id){	if (!document.getElementById(id)) 		return false; 		else {		var st = document.getElementById(id).style.display;		if (st=="none") document.getElementById(id).style.display="block"; 				else document.getElementById(id).style.display="none";		return true;		}	}function removeElement(arr, el){	for (i=0; i<arr.length; i++){		if (arr[i]==el)		arr.splice(i, 1);			}	return arr;}		function dotCount(el,dot){	var grid=16;	var dc=0;	if (!dot)		dot=".";	var curs=0;	while (el.indexOf(dot,curs)!=-1){		dc++;		curs=el.indexOf(dot,curs)+1;	}	return dc*grid;	}
