function Browser() {
	var b=navigator.appName
	if (b=="Netscape") this.b="ns"
	else if (b=="Microsoft Internet Explorer") this.b="ie"
	else this.b=b
	this.version=navigator.appVersion
	this.v=parseInt(this.version)
	this.ns=(this.b=="ns" && this.v>=4)
    this.ns4=(this.b=="ns" && this.v==4)
	this.ns5=(this.b=="ns" && this.v>=5)
	this.ie=(this.b=="ie" && this.v>=4)
	this.ie4=(this.version.indexOf('MSIE 4')>0)
	this.ie5=(this.version.indexOf('MSIE 5')>0)
	this.ie55=(this.version.indexOf('MSIE 5.5')>0)
	this.dom=((document.createRange&&(document.createRange().createContextualFragment))?true:false)
	this.min=(this.ns||this.ie)
	var ua=navigator.userAgent.toLowerCase()
	if (ua.indexOf("win")>-1) this.platform="win32"
	else if (ua.indexOf("mac")>-1) this.platform="mac"
	else this.platform = "other"
}
is=new Browser()

/*
  if ((is.ns) && (is.platform == "mac"))
	{
	document.write("<link rel=\"stylesheet\" type=\"text\/css\" href=\"css\/layers_ns_mac.css\">")
	};
	if ((is.ns) && (is.platform == "win32"))
	{
	document.write("<link rel=\"stylesheet\" type=\"text\/css\" href=\"css\/layers_ns_win32.css\">")
	};
	if ((is.ie) && (is.platform == "mac"))
	{
	document.write("<link rel=\"stylesheet\" type=\"text\/css\" href=\"css\/layers_ie_mac.css\">")
	};
	if ((is.ie) && (is.platform == "win32"))
	{
	document.write("<link rel=\"stylesheet\" type=\"text\/css\" href=\"css\/layers_ie_win32.css\">")
  };
*/

/*

  if (((is.ns) || (is.ie)) && (is.platform == "mac"))
	{
	document.write("<link rel=\"stylesheet\" type=\"text\/css\" href=\"..\/css\/fontsmac.css\">")
	};

	if (((is.ns5) || (is.ie)) && (is.platform == "win32"))
	{
	document.write("<link rel='stylesheet' type='text/css' href='../css/fontswin.css\'>")
	};
	
  if ((is.ns4)&& (is.platform == "win32"))
	{
	document.write("<link rel=\"stylesheet\" type=\"text\/css\" href=\"..\/css\/fontswinns4.css\">")
	};

*/

var activeLayer;

if(is.ns4) {
  window.captureEvents(Event.CLICK);
  window.onclick = startLayer;
  document.onmousedown= hideLastLayer;
}
else {
  document.onclick = startLayer;
}


function startLayer(evnt){
  hideLastLayer();
  if(is.ns4) window.routeEvent(evnt);
  return true;
}

function hideLastLayer(){
  if (activeLayer) {
    if(is.ns4) document.layers[activeLayer].visibility="hide";
    else document.getElementById(activeLayer).style.visibility="hidden";
  }
  activeLayer = null;
}




function showLayer(id){
  if(is.ns4) {
    if(document.layers[id].visibility != "show") document.layers[id].visibility = "show"
  }
  else {
    if(document.getElementById(id).style.visibility != "visible") document.getElementById(id).style.visibility = "visible"
  }
  activeLayer = id;
}

function hideLayer(id){
  if(is.ns4){
    if(document.layers[id].visibility != "hide") document.layers[id].visibility = "hide"
  }
  else {
    if(document.getElementById(id).style.visibility != "hidden") document.getElementById(id).style.visibility = "hidden"
  }
  activeLayer = null;
}

function toggleLayer(id){
  if(is.ns4){
    if(document.layers[id].visibility == "show") hideLayer(id)
    else showLayer(id)
  }
  else {
    if(document.getElementById(id).style.visibility == "visible") hideLayer(id)
    else showLayer(id)
  }
}



function okno1(){
	window.open('list01.html',"001",'toolbar=0, menubar=1,location=0,scrollbars=yes,width=640,height=500,resizable=0,left=30');	
}
function okno2(){
	window.open('list01.html',"002",'toolbar=0, menubar=1,location=0,scrollbars=yes,width=640,height=500,resizable=0,left=30');	
}
function okno3(){
	window.open('list01.html',"003",'toolbar=0, menubar=1,location=0,scrollbars=yes,width=640,height=500,resizable=0,left=30');	
}
function okno4(){
	window.open('list01.html',"004",'toolbar=0, menubar=1,location=0,scrollbars=yes,width=640,height=500,resizable=0,left=30');	
}
function okno5(){
	window.open('list01.html',"005",'toolbar=0, menubar=1,location=0,scrollbars=yes,width=640,height=500,resizable=0,left=30');	
}
