var nomousemove=0;							
var cur;
function viewFullPicture( href, ctitle, numofimg )
{
popupWin = window.open( '','', 'resizable=yes, height=610, width=610, titlebar=no, menubar=no,location=no ');
imgtitle = ctitle.toString() + " (рис. " + numofimg.toString() + ")"; 
popupWin.document.open();
popupWin.document.write( "<html><head><title>" + imgtitle + "</title></head><body><img alt='' src='" + href + "'></body></html>"); 
popupWin.document.close();
popupWin.focus();
return false;
}
					
function sw_css()
{
if ( screen.width > 1024 ) document.styleSheets('css1').href='a1600.css';

}
				
						
function SetNodeStatus(sName)							
{	
var news;
	Nodes.load("NodeStore");
	news = Nodes.getAttribute("nodes_str");
	if ( news == null ) news = sName + "_";
	else 	news = news.concat( sName + "_");
	Nodes.setAttribute("nodes_str", news );
	Nodes.save("NodeStore");
}							
							
							
							
function DelNodeStatus(sName)							
{		
var nodes_str;	
var news = new String("");							
	
	Nodes.load("NodeStore"); 
	nodes_str = Nodes.getAttribute("nodes_str");
	if( nodes_str != null )
{
   var as = nodes_str.split("_");							
	  for (var i=0; i < as.length; i++)							
 		 {							
 			if( as[i] == sName ) continue;						
	 		if( as[i].length ) news = news.concat( as[i], "_");						
  		}	
}
	Nodes.setAttribute("nodes_str", news );
	
	Nodes.save("NodeStore");
							
}							
							
function subdisplay( subname )							
{

var obj = find_obj( subname );							
if( !obj ) return 0;							
if ( obj.style.visibility == "hidden" )							
	{	
					
	obj.style.visibility = "visible";						
	obj.style.display = "list-item";
	obj = find_obj( 'img' + subname );						
	obj.src = "opened.bmp";						
	SetNodeStatus( subname );						
	}						
else							
	{						
	obj.style.visibility = "hidden";						
	obj.style.display = "none";						
	obj = find_obj( 'img' + subname );						
	obj.src = "closed.bmp";						
	DelNodeStatus( subname );						
							
	}						
}

function opennode( subname )							
{

var obj = find_obj( subname );							
if( !obj ) return 0;							
					
	DelNodeStatus( subname );						
	SetNodeStatus( subname );						
						
}				
							
function init()							
{							
	Nodes.load("NodeStore"); 
	nodes_str = Nodes.getAttribute("nodes_str");
	if( nodes_str != null )
 	{
					
	var as = nodes_str.split("_");							
	 for (var i=0; i < as.length; i++)							
  		if( as[i].length )
  		{
		var obj = find_obj( as[i] );							
		if( !obj ) continue;							
    	obj.style.visibility = "visible";						
    	obj.style.display = "list-item";
	    obj = find_obj( 'img' + as[i] );						
    	obj.src = "opened.bmp";						

 		}						
	}						
						
}							
						
function find_obj( elementId )							
{							
var obj = 0;
obj = document.all( elementId );							
if( obj ) return obj;
for ( var i= 0 ; i < document.forms.length ; i ++ )							
{
obj = document.forms.item(i).elements( elementId );
if( obj ) return obj;
							
}
return 0;							
}

function go( href )
{
document.location.replace( href );
}
function gview( href )
{
popupWin = window.open( href,'Description', 'resizable=yes, titlebar=yes, toolbar=no, menubar=no,location=no'); 
popupWin.focus(); 

}
	


