var toggle=0;
function testfunc(o)
{
	var f;

	++toggle;
	if (toggle%2==0) f="gray()"; else f="";
	//document.images[0].style.filter=f;
	 alert(toggle);
}

function ZeigeBild(bildname,orientation)
{
	var ref,parameter,dateiname,htmlcode,b,h;

	dateiname=bildname.substring(bildname.indexOf("/")+1,bildname.length);

	funccode="<script language=\"JavaScript\" type=\"text/javascript\">\n";
	funccode+="<!--\n";
	funccode+="var toggle=0;\n";
	funccode+="function testfunc(){\n";
	funccode+="++toggle;\n";
	funccode+="if (toggle%2==0) f=\"gray()\"; else f=\"\";\n";
	funccode+="document.images[0].style.filter=f;}\n";
	funccode+="\/\/-->\n";
	funccode+="<\/script>\n"; 

	htmlcode="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
	htmlcode+="<html style=\"height: 100%\">\n<head>\n<title>"+dateiname+"<\/title>\n";
	htmlcode+=funccode+"<\/head>\n<body style=\"margin: 0; padding: 10; height: 100%\">\n";
	istyle=" style=\"border:double 10px #747474; padding:10px; background:url('Hintergrund/zickzack.gif');\" ";

	istyle="";

	proz=90;
	fak = 2/3;
	b = screen.availWidth*(proz/100);
	h = b*fak;
	if (orientation==1)
	{
		h = screen.availHeight*(proz/100);
		b = h*fak;
	}
	h=Math.round(h);
	b=Math.round(b);

	htmlcode+="<img name=\"pbild\"" + istyle + "src=\"" + bildname + "\" width=\"" + "100%" + "\"" + " height=\"" + "100%" + "\"" + " alt=\""+bildname+"\" title=\"[Mausklick schlie&szlig;t Fenster!]\" onmousemove=\"testfunc()\" onclick=\"window.close()\">\n<\/body>\n<\/html>\n";

 	parameter="width="+b+",height="+h+",screenX="+(screen.width-b)/2+",screenY="+(screen.height-h)/2+",left="+(screen.width-b)/2+",top="+(screen.height-h)/2;

  	ref=window.open("","bildfenster",parameter);
  	ref.document.open("text/html");
  	ref.document.write(htmlcode);
  	ref.document.close();
  	ref.focus();
}

