<!--
/*<img src="../../../img/content/winterkoernerraps/remy.jpg" alt="" class="preview" height="208" width="165" />*/
function imagePreview () 
{
	if( $('img.preview').length>0 )
	{
		$('img.preview').after(function ()
		{
			var src = $(this).attr('src');
			var klasse = $(this).attr('class');
			var picinfo = $(this).attr('alt');

			$(this).wrapAll('<div class="'+ klasse +'" />');
			$(this).attr('class', '');
			
			$(this).after('<p class="picinfo">' + picinfo + '</p>');
			$(this).after('<a href="javascript:openFoto(\''+src+'\')" class="piclarger">gr&ouml;sser</a>'); //Linkf für "Grösser" erzeugen. damit kann man die Funktion openFoto aufrufen
		});
	}
}

function headerProblem () 
{
	// solving problem
	if ( $('img.imageHeader').length>0 ) {
		var imgSrc = $('img.imageHeader').attr('src');
		$('#wr_banner').css("background", "url("+imgSrc+")" );
	}
}

function openFoto(img)  //img ... pfad
{
  foto= new Image();
  foto.src=(img);
  controlFoto(img);
}

function controlFoto(img)
{
  if((foto.width!=0)&&(foto.height!=0))
  {
    viewFoto(img);
  }
  else
  {
    interval_a="ControlFoto('"+img+"')";
	interval_b=setTimeout(interval_a,20);
  }
}

function viewFoto(img)
{
  width=foto.width;
  height=foto.height+42;
  try 
  {
    if (output.closed == false) throw "offen";
  }
  catch(e)
  {
	if (e=="offen") 
	{
	  output.close();
	}
  }

  ScreenWidth = screen.width; 
  ScreenHeight = screen.height; 
  xpos = (ScreenWidth/2)-(width/2); 
  ypos = (ScreenHeight/2)-(height/2); 

  output=window.open("","output","left="+xpos+",top="+ypos+",width="+width+",height="+height+",location=0,toolbar=0,menubar=0,status=0,scrollbars=no,resizable=0");  
  var t=img.split("/"); //Dateiname extrahieren
  
  output.document.writeln("<html><head><title>"+t[t.length-1]+"<\/title><link rel=\"stylesheet\" href=\"css/main.css\" type=\"text/css\" media=\"screen\" /><\/head>");
  output.document.writeln("<body bgcolor=\"white\" text=\"white\" link=\"blue\" vlink=\"white\" alink=\"white\" leftmargin=\"0\" marginwidth=\"0\" topmargin=\"0\" marginheight=\"0\">");
  output.document.writeln("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\">");
  output.document.writeln("<tr><td width=\"100%\" height=\"100%\" align=\"left\" valign=\"top\"><p><img src=\""+img+"\" width=\""+foto.width+"\" height=\""+foto.height+"\" border=\"10\" alt=\""+t[t.length-1]+"\"><\/p><\/td><\/tr>");
  output.document.writeln("<tr><td width=\"100%\" height=\"100%\" align=\"center\" valign=\"top\" ><a href=\"javascript:self.close()\">Schlie&szlig;en</a><\/td><\/tr>");
  output.document.writeln("<\/table><\/body><\/html>");
  output.focus();
}

-->


