var VAR_URL = "http://www.cocktail-nacht.de";

//----------------------------------------------------------------------------------
// Ein- und Ausblenden einer ausgeaehlten Ebene ("layer"):
function show_layer(layer,img){
	
 	if(document.getElementById(layer).style.display == 'none')
 		{
	document.getElementById(layer).style.display = 'block';
	document.getElementById(img).src = VAR_URL+'/images/icon_close.gif';
  		}
 	else
 		{
	document.getElementById(layer).style.display = 'none';
	document.getElementById(img).src = VAR_URL+'/images/icon_open.gif';
  		}
}

//----------------------------------------------------------------------------------
// Branchenauswahl:
function menue_box(eintraege){
	var img = "BUTTON_menue_box";
	var box = "menue_box";
	var hoehe = (eintraege*28)+28;
	
 	if(document.getElementById(box).style.height == '18px')
 		{
	document.getElementById(img).src = 'images/icon_close.gif';
	document.getElementById(box).style.height = hoehe +'px';
  		}
 	else
 		{
	document.getElementById(img).src = 'images/icon_open.gif';
	document.getElementById(box).style.height = '18px';
  		}
}

//----------------------------------------------------------------------------------
//POPUP
function popup(inhalt,w,h){
  var fenster = window.open(inhalt, "Information", "width="+w+",height="+h+",hotkeys=no,dependent=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")
  if (fenster.opener==null)
  {
    fenster.opener = self
  }
  fenster.focus();
  fenster.moveTo(screen.width/2-395,screen.height/2-280);
}


function fotodetailbox(album,bild){
	
	
 	if(document.getElementById("fotodetailbox").style.display == 'none')
 		{
	document.getElementById("fotodetailbox").style.display = 'block';
  		}
 	else
 		{
	document.getElementById("fotodetailbox").style.display = 'none';
  		}
}


//Fotos-Popup
function fotodetail(album,bild){
  var fenster = window.open("../include/fotodetail.inc.php?dir="+album+"&pic="+bild, "Information", "width=450,height=550,hotkeys=no,dependent=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")
  if (fenster.opener==null)
  {
    fenster.opener = self
  }
  fenster.focus();
  fenster.moveTo(screen.width/2-395,screen.height/2-280);
}

//---------------------------------------------------
//allgemeine Funktionen
//auslesen von SELECT-Feldern
function selectWert(sObj) {
    with (sObj) return options[selectedIndex].value;
  }

