    // @author: Andreas Kuban
function move_box(an, box) {
  var cleft = 0;
  var ctop = 0;
  var obj = an;
  while (obj.offsetParent) {
    cleft += obj.offsetLeft;
    ctop += obj.offsetTop;
    obj = obj.offsetParent;
  }
  box.style.left = cleft + 'px';
  ctop += an.offsetHeight + 8;
  if (document.body.currentStyle &&
    document.body.currentStyle['marginTop']) {
    ctop += parseInt(
      document.body.currentStyle['marginTop']);
  }
  box.style.top = ctop + 'px';
}

function show_hide_box(an, width, height, borderStyle) {
  var href = an.href;
  

  if (boxdiv != document.getElementById('stadtplan')) {
    var boxdiv = document.getElementById('stadtplan');
    if (boxdiv.style.width=='100px') {
      move_box(an, boxdiv);
      boxdiv.style.width='500px';
    } else
      boxdiv.style.width='100px';
    return false;
  }

  boxdiv = document.createElement('div');
  boxdiv.setAttribute('id', href);
  boxdiv.style.display = 'block';
  boxdiv.style.position = 'absolute';
  boxdiv.style.width = width + 'px';
  boxdiv.style.height = height + 'px';
  boxdiv.style.border = borderStyle + 'px';
  boxdiv.style.backgroundColor = '#fff';

  var contents = document.createElement('iframe');
  contents.scrolling = 'no';
  contents.frameBorder = '0';
  contents.style.width = width + 'px';
  contents.style.height = height + 'px';
  contents.src = href;

  boxdiv.appendChild(contents);
  document.body.appendChild(boxdiv);
  move_box(an, boxdiv);

  return false;
}

  function showContact(value){
    document.getElementById("ToolTipContact").style.display = "block";
    document.getElementById(value).style.display = "block";
  }
  function hideContact(value) {
    document.getElementById("ToolTipContact").style.display = "none";
    document.getElementById(value).style.display = "none";
  }


function init(){
	var stadtplan = document.getElementById('stadtplan');
	if (stadtplan != null) {
		stadtplan.style.width='100px';
	}
}
window.onload = init; 

/**
 * @author: Christian Lahrz-Beckmann
 * @since: 19.01.2010
 */
jQuery(document).ready(function($){
	var doit = false;

	$('.box').hover(function(){
		$(this).find('.box_inside').show();
	}, function(){
		$(this).find('.box_inside').hide();
	});

	/**
	 * Veranstaltungen Suche Switch zwischen Aktuelles und Archiv der Monatszahlen 
	 */
	$('#aktuelles_suche select[name=archiv]').click(function() {
		var wert = $(this).val();
		if (wert == 'online') {
			$('#aktuelles_suche select[name=fachgebiet_archive]').css('display','none');
			$('#aktuelles_suche select[name=fachgebiet_online]').css('display','inline');

			$('#aktuelles_suche select[name=monat_archive]').css('display','none');
			$('#aktuelles_suche select[name=monat_online]').css('display','inline');
		} else {
			//Archiv anzeigen 
			$('#aktuelles_suche select[name=fachgebiet_archive]').css('display','inline');
			$('#aktuelles_suche select[name=fachgebiet_online]').css('display','none');

			$('#aktuelles_suche select[name=monat_archive]').css('display','inline');
			$('#aktuelles_suche select[name=monat_online]').css('display','none');
		}
	});
});