function closeMiddle()  {
	$('#content-middle').hide("3000");
	$('#opener').attr('title', 'Mehr');
	$('#opener .img').next().text("weiterlesen");
	$('#opener .img').css('background-position','-15px 0px');
	$("#opener").unbind('click');
	$("#opener").one('click',openMiddle);
	return false;
}
function openMiddle()  {
	$('#content-middle').show("3000");
	$('#opener').attr('title', 'Schließen');
	$('#opener .img').next().text("schließen");
    $('#opener .img').css('background-position','0px 0px');
    $("#opener").unbind('click');
    $("#opener").one('click',closeMiddle);
    return false;
}

  $(document).ready(function(){
    $('#opener .img').css('background-position','-15px 0px');
    $("#opener").one('click',openMiddle);
 //* alert("hoehe: " + $("#haendlerliste"));*/
		if (418 <  $("#content .right-area .frame #content-wide .frame").height()
		&& !$("#haendlerliste").length > 0
		&& !$("#katalogbestellung").length > 0
		)
		{
    	$("#content .right-area").css("overflow-y", "scroll");
    }
/*
    $("#content .right-area").css("overflow", "scroll");
*/
  });

function openGallery() {
	var height=screen.height;
	var width=screen.width;
	var baseNode = document.getElementsByTagName('base')[0];
	var base = baseNode.getAttribute('href');
	openPic(base +'fileadmin/templates/auranote/simpleviewer/index.html', 'Gallerie', 'width='+width+',height='+height+',menubar=no,status=no,toolbar=no,location=no')
}