function show_hide_div(id){

    show_div_id = document.getElementById(id).value;
    show_div = document.getElementById(show_div_id)
    show_div.className = "visible";
	
    hide_div = document.getElementById(current_div)
    hide_div.className = "hidden";	
    
	current_div = show_div_id;
}

// fuer gal links
function link_popup(url,name,b,h,vspace,hspace,features){	
		
	var screen_b=screen.width;
	var screen_h=screen.height;
			
	if (screen_b>1024){screen_b=1024;}
	if (screen_h>768){screen_h=768;}
	
	if (!b) {var b = screen_b;}
	if (!h) {var h = screen_h;}	
	
	// fenster fuer windows kleiner machen 
	b=b-30;
	h=h-80;
	
	if (!vspace || !hspace){
		var vspace = 15;
		var hspace = 0;
	}
	if (!url){
		url="http://www.google.at";
	}
	
	var features="location=no, menubar=no, resizable=yes, status=yes, scrollbars=yes, toolbar=no, ";
		
 	popup = window.open (url, "gal_window", features+"width="+b+",height="+h+",left="+vspace+",top="+hspace);
	popup.focus();
}

function pop(url,name,b,h,vspace,hspace,features){	
	
	if (!name){
 		var now = new Date();
 		var name = now.getSeconds();
	}	
	
	var screen_b=screen.width;
	if (screen_b>1024){screen_b=1024;}
	var screen_h=screen.height;
	if (screen_h>768){screen_h=768;}
	
	if (!b) {var b = screen_b;}
	if (!h) {var h = screen_h;}
	
	if (!vspace || !hspace){
		var vspace = (screen_b-b)/2;
		var hspace = (screen_h-h)/2;
		if(vspace < 0){
			var vspace = 0;
			var hspace = 0;
		}
	}
	if (!url){
		url="http://www.google.at";
	}
	var features="location=no, menubar=no, resizable=yes, status=yes, scrollbars=yes, toolbar=no, ";
		
 	popup = window.open (url, name, features+"width="+b+",height="+h+",left="+vspace+",top="+hspace);
 	popup.focus();
}


function rollover(which,action){

    if (!document.getElementsByTagName) {
      return null;
	}
    
    var divs = document.getElementsByTagName("div");
    for(var i=0; i < divs.length; i++)
    {
      var div = divs[i];
      var id = div.id;
      if ((id == which) && (action=='show')){
        div.className = "";
      }else if ((id == which) && (action=='hide')){
        div.className = "hidden";
      }
    }
}

function showHide(which){

    if (!document.getElementsByTagName) {
      return null;
	}
    
    var divs = document.getElementsByTagName("div");
    for(var i=0; i < divs.length; i++)
    {
      var div = divs[i];
      var id = div.id;
      if ((id == which) && (div.className =='hidden')){
        div.className = "visible";
      }else if (id == which){
        div.className = "hidden";
      }else if (div.className =='visible'){
      	div.className = "hidden";
      }
    }
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
  				}
  				node.onmouseout=function() {
  				this.className=this.className.replace(" over", "");
   				}
   			}
  		}
 	}
}

window.onload=startList;
