function ow2(img,txt,w,h)

 { 

var myWin2;
var w2=w*1.3;
var h2=h*1.3;

myWin2 = window.open('', 'tempWindow', 'toolbar=no scrollbars=yes resizable=yes width='+w2+',height='+h2);  
myWin2.document.open();

myWin2.document.writeln('<html>');
myWin2.document.writeln('<head>');
myWin2.document.writeln('<title>'+txt+'</title>');
myWin2.document.writeln('</head>');
myWin2.document.writeln('<body>');
myWin2.document.writeln('<h2 align="center">'+txt+'</h2><br />');
myWin2.document.writeln('<a href="#" onClick="window.close();"><img src="'+img+'" alt="'+txt+'" width="'+w+'" height="'+h+'" border="0"/></a>');
myWin2.document.writeln('</body>');
myWin2.document.writeln('</html>');

myWin2.focus();

 } 




function ow(url,namewindow,width,height,txt)
{
	
	var myWin=window.open(url,namewindow,'width='+width+',height='+height+', toolbar=no scrollbars=yes resizable=yes');
	myWin.focus();
}


function ShowHideSubMenu(id) {
		
	//if(!document.all[id]) return true;
    
	if (navigator.appName == "Netscape")
	{
		sub = document.getElementById(id);
		if (sub.className == 'showsubmenu')
			sub.className = 'hidesubmenu';
		else
			sub.className = 'showsubmenu';
     	}
     	else
     	{
		sub = document.all[id];
		if (sub.className == 'showsubmenu')
			sub.className = 'hidesubmenu';
		else
			sub.className = 'showsubmenu';
	}
	return false;
}

function sh(nameDiv)
{

if (navigator.appName == "Netscape")
	{
	  if(document.getElementById(nameDiv).style.display=='none')
		document.getElementById(nameDiv).style.display = 'block';
	  else
		document.getElementById(nameDiv).style.display = 'none';
	}
else
	{
	  eval('s='+nameDiv+'.style.display;');
	  if(s=='none')
		  eval(nameDiv+'.style.display="block";');
	  else
		  eval(nameDiv+'.style.display="none";');
	}
}

function ShowField(tr_id,tr_space_id,tr_space_ch_id,field_id)
{
	if(document.all[tr_id] != null)
		document.all[tr_id].style.display = 'block';
	if(document.all[field_id] != null)
		document.all[field_id].disabled = false;
	if(document.all[tr_space_id] != null)
		document.all[tr_space_id].style.display = 'block';
	if(document.all[tr_space_ch_id] != null)
		document.all[tr_space_ch_id].style.display = 'none';
}

function HideField(tr_id,tr_space_id,tr_space_ch_id,field_id)
{
	if(document.all[tr_id] != null)
		document.all[tr_id].style.display = 'none';
	if(document.all[field_id] != null)
		document.all[field_id].disabled = true;
	if(document.all[tr_space_id] != null)
		document.all[tr_space_id].style.display = 'none';
	if(document.all[tr_space_ch_id] != null)
		document.all[tr_space_ch_id].style.display = 'block';
}

function rotateImages() {
	if (document.images) {
		for (var i=0; i<rotateImages.arguments.length; i+=2) {
			document.all[rotateImages.arguments[i]].src = rotateImages.arguments[i+1];
		}
	}
}


function hlc(col,n) {
	r=1;	//количество строк в таблице
	eval('l'+n+'.style.background="'+col+'";');
//c0_0.style.background='red';
	for(i=0;i<r;i++)
		eval('c'+n+'_'+i+'.style.background="'+col+'";');
}
