// JavaScript Document
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function wopen(url, name, w, h)
{
  // Fudge factors for window decoration space.
  // In my tests these work well on all platforms & browsers.
  w += 32;
  h += 96;
  wleft = (screen.width - w) / 2;
  wtop = (screen.height - h) / 2;
  // IE5 and other old browsers might allow a window that is
  // partially offscreen or wider than the screen. Fix that.
  // (Newer browsers fix this for us, but let's be thorough.)
  if (wleft < 0) {
    w = screen.width;
    wleft = 0;
  }
  if (wtop < 0) {
    h = screen.height;
    wtop = 0;
  }
  var win = window.open(url,
    name,
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars=yes, resizable=no');
  // Just in case width and height are ignored
  win.resizeTo(w, h);
  // Just in case left and top are ignored
  win.moveTo(wleft, wtop);
  win.focus();
}

$(function() {			
		$('a.popup').lightBox();
});

$(document).ready(function(){	
	$("a.ap").click(function(){
		$("div.langtext").css("display","none");
											
		var zahl=$("a.ap").index(this);
		$("div.langtext").eq(zahl).css("display","block");
	});
	
	$("a.changer").click(function(){
		var zahl=$("a.changer").index(this);	
		
		var groessen=$("a.changer").eq(zahl).attr("name");
		var groessen=groessen.substr(11);
		var js_array = groessen.split("---");
		
		var stelle=js_array[2];
		
		var inhalt_src=$("a.changer img").eq(zahl).attr("src");
		var inhalt_src=inhalt_src.substr(26);
		
		var inhalt_title=$("a.changer").eq(zahl).attr("title");
		
		
		
		$("img.changer_bild_"+stelle).attr("src","img/bilder_db/"+inhalt_src);
		$("img.changer_bild_"+stelle).attr("width",js_array[0]);
		$("img.changer_bild_"+stelle).attr("height",js_array[1]);
	});
});
