var ids=new Array('borito');

function picview(u,w,h,t)
{
    if (!t) t = "Kertimag";
	var x = (screen.availWidth-w)/2;
	var y = (screen.availHeight-h)/2;
	picwin = window.open("","picwin","width="+w+",height="+h+",left="+x+",top="+y);
	picwin.document.open();
	picwin.document.write('<html><title>' + t + '</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
	picwin.document.write('<a href="#" onClick="window.close()"><img src="'+u+'" width="'+w+'" height="'+h+'" border="0"></a>');
	picwin.document.write('</body></html>');
	picwin.document.close();
	picwin.focus();
}

function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=900,height=800,scrollbars=yes, location=0, resizable=1');
}


function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

function turndiv(id) {
 	if (document.getElementById) { // DOM3 = IE5, NS6
    //document.write("stílus: "+document.getElementById(id).style.display);
    if (document.getElementById(id).style.display == 'block') {
		  document.getElementById(id).style.display = 'none';}
    else {
      document.getElementById(id).style.display = 'block';
    }
	}
	else {
		if (document.layers) { // Netscape 4
      if (document.id.display == 'block') {
			  document.id.display = 'none';
      } else {
        document.id.display = 'block';
      }
		}
		else { // IE 4
      if (document.all.id.style.display == 'block') {
			  document.all.id.style.display = 'none';
      } else {
        document.all.id.style.display = 'block';
      }
		}
	}
}



// ---------------------------------------------
// --- Name:    Easy DHTML Treeview           --
// --- Author:  D.D. de Kerf                  --
// --- Version: 0.1           Date: 6-6-2001  --
// ---------------------------------------------
function Toggle(node)
{
	// Unfold the branch if it isn't visible
	if (node.nextSibling.style.display == 'none')
	//if (node.style.display == 'none')
	{
		// Change the image (if there is an image)
		/*if (node.children.length > 0)
		{
			if (node.children.item(0).tagName == "IMG")
			{
				node.children.item(0).src = "minus.gif";
			}
		}*/

		node.nextSibling.style.display = '';
		//node.style.display = '';
	}
	// Collapse the branch if it IS visible
	else
	{
		// Change the image (if there is an image)
		/*if (node.children.length > 0)
		{
			//if (node.children.item(0).tagName == "IMG")
			//{
				node.children.item(0).src = "plus.gif";
			//}
		}*/

		node.nextSibling.style.display = 'none';
		//node.style.display = 'none';
	}

}

