// (c)2008, www.netwoar.net, thomas jungwirth 

function mybody()
	{
	}

function navigation()
	{
	}

function show_pro(id, z)
	{
	
	new fam_white(id);
	if(document.getElementById(id + 'f' + z))
		{
		document.getElementById(id + 'f' + z).style.backgroundColor = "#E2EbE4";
		document.getElementById(id + 'f' + z).style.color = "#000000";//#004d15
		}
	new hide_pro(id);
	if(document.getElementById(id + 'f' + z + 'p'))
		{
		document.getElementById(id + 'f' + z + 'p').style.display = 'block';
		}

	}

function show_fam(id)
	{
	var file;
	file = 'notroot/make_hd_list.php?ah_id=' + id ;
	new load_get(file, 'hd_list');

	//new hide_all();
	new fam_white(id);
	if(document.getElementById(id + 'f'))
		{
		document.getElementById(id + 'f').style.display = 'block';
		document.getElementById(id + 'f1').style.backgroundColor = "#AADDAA";
		}
	if(document.getElementById(id + 'f1p'))
		{
		document.getElementById(id + 'f1p').style.display = 'block';
		}
	if(document.getElementById(id))
		{
		document.getElementById(id).style.backgroundColor = "#AADDAA";
		}
	
	}


function hide_all()
	{
	var i, j;
	for(i=1; i<=25; i++)
		{
		if(document.getElementById('h' + i + 'f'))
			{
			document.getElementById('h' + i + 'f').style.display = 'none';
			for(j=1; j<=25; j++)
				{
				if(document.getElementById('h' + i + 'f' + j + 'p'))
					{
					document.getElementById('h' + i + 'f' + j + 'p').style.display = 'none';
					}
				}
			}
		if(document.getElementById('h' + i))
			{
			document.getElementById('h' + i).style.backgroundColor = "#FFFFFF";
			}
		}
	}

function fam_white(id)
	{
	var i;
	for(i=1; i<=25; i++)
		{
		if(document.getElementById(id + 'f'+ i))
			{
			document.getElementById(id + 'f'+ i).style.backgroundColor = '#FFFFFF';
			document.getElementById(id + 'f'+ i).style.color = '#004d15';
			}
		}
	}

function hide_pro(id)
	{
	var i;
	for(i=1; i<=25; i++)
		{
		if(document.getElementById(id + 'f'+ i + 'p'))
			{
			document.getElementById(id + 'f'+ i + 'p').style.display = 'none';	
			}
		}
	}



function change_bkg(file)
	{
		if(file)
			{
			//document.getElementById('alles').style.backgroundImage = "url(" + file + ")";
			}
	}

function change_sub(file)
	{
	new load_get(file + '.php', 'maincontent');
	}

function load_google()
	{
	new load_get('content/plan.php', 'maincontent');
	}


function change_color(m, id)
	{
		if(m=='0')
			{
			document.getElementById(id).style.color = "#006600";
			}
		if(m=='1')
			{
			document.getElementById(id).style.color = "#333333";
			}
	}

function load_get(file, id) 
	{
	var http = false;
		if(navigator.appName == "Microsoft Internet Explorer") 
			{
  			http = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			else 
			{
  			http = new XMLHttpRequest();
			} 

  	http.open("GET", file, true);
  	http.onreadystatechange=function() 
		{
    	if(http.readyState == 4) 
			{
      		document.getElementById(id).innerHTML = http.responseText;
    		}
  		}
  	http.send(null);
	}


function load_post(file, id, post) 
	{
        var http = null;
        if (window.XMLHttpRequest) {
           http = new XMLHttpRequest();
        } else if (window.ActiveXObject) {
           http = new ActiveXObject("Microsoft.XMLHTTP");
        }
        if (http != null) {
           http.open("POST", file, true);
           http.onreadystatechange = ausgeben;
           http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
           http.send(post);
        }
        
        function ausgeben() {
           if (http.readyState == 4) {
              document.getElementById(id).innerHTML = http.responseText;
           }
        }
	}


function GrafikAnzeigen(GrafikURL, Breite, Hoehe)
{
Fensteroptionen="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0";
Grafikfenster=window.open("", "", Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);
Grafikfenster.focus();
Grafikfenster.document.open();
with(Grafikfenster)
{
document.write("<html><head>");
document.write("<title>Grafikanzeige</title>");
document.write("</head>");
document.write("<body leftmargin=\"0\" marginheight=\"0\" marginwidth=\"0\" topmargin=\"0\">");
document.write("<img border=\"0\" onclick=\"window.close();\" src=\""+ GrafikURL +"\" title=\"click  2 close\">");
document.write("</body></html>");
}
return;
}


