// управление меню
function sHm() {
	hmTbl=document.getElementById("thmenu"); hmTd=document.getElementById("thmenu").getElementsByTagName("td");
	lastTd=hmTbl.rows[0].cells[hmTbl.rows[0].cells.length-1];
	for (i=0;i<hmTd.length;i++) {
		if (hmTd[i].className=="on") {
			hmTd[i].style.backgroundImage="none"; (hmTd[i-1])?hmTd[i-1].style.backgroundImage="none":null;
		}
	}
	lastTd.style.backgroundImage="none";
}

function sB() {
	vMenu=$("#vmenu").innerHeight(); vMenuDef=181; tPic=$("#title-pics").innerHeight();
	if (vMenu>tPic&&vMenu<=vMenuDef) { $("#title-pics").height(vMenu-10); $("#box-grey").height(vMenu); }
	else if (vMenu>tPic&&vMenu>vMenuDef) { $("#box-grey").height(tPic); }
	else if (vMenu<tPic) { $("#vmenu").height(tPic-58); $("#box-grey").height(tPic); }
}

function hLine() { $("#vmenu > ul > li:last").css("border","0"); }

function shUL( node ) {
   ul = node.parentNode.getElementsByTagName('ul')[0];
   if( ul.style.display == '' ) {
      ul.style.display = 'none';
      node.parentNode.className = '';
      
   } else {
      ul.style.display = '';
      node.parentNode.className = 'on';
      
   } // End if
   
} // End function shUL

function OpenWin(pageUrl,nameWin,widthWin,heightWin,sbar) {
hScreen=screen.availHeight; wScreen=screen.availWidth;
if (widthWin||heightWin) { (widthWin>wScreen)?widthWin=wScreen-200:null; (heightWin>hScreen)?heightWin=hScreen-100:null; }
if (nameWin=="modal") {
	(widthWin)?null:widthWin=wScreen-200; (heightWin)?null:heightWin=hScreen-100;
	pWin="dialogWidth:"+widthWin+"px; "+"dialogHeight:"+heightWin+"px; center:1;help:0;"
	window.showModalDialog(pageUrl,"",pWin);
} else {
	(widthWin)?null:widthWin=wScreen-160; (heightWin)?null:heightWin=hScreen-200;
	xPos=(wScreen-widthWin)/2; yPos=(hScreen-heightWin)/2;
	(sbar)?null:sbar=1; (nameWin)?null:nameWin="wintxt";
	pWin="left="+xPos+",top="+yPos+",width="+widthWin+",height="+heightWin+",scrollbars="+sbar;
	window.open(pageUrl,nameWin,pWin); 
} 
}