preload();

function preload() {
	var bilder = new Array();
	bilder[0] = "/images/1x1.gif";
	bilder[1] = "/images/pfeil.gif";

	im = new Array();
	for (var i = 0; i < bilder.length; i++) {
		im[i]     = new Image();
		im[i].src = bilder[i];
	}
}

function setimg( imgname, num ) {
	imgname.src = im[num].src;
	// alert(imgname.src);
}

function popup(myfile,mytitle,x,y,mytext,mytextheight) {
	var myx, myy;
	// class body.popup hat 10px rand zusaetzlich
	myx = x + 20;
	var textheight;
	if( mytextheight ) {
		textheight = mytextheight;
	}
	else {
		// Standard 4 Zeilen Text, 25px pro Zeile
		textheight = 100;
	}
	myy = y + 20 + textheight;
	// alert(geom);
	// alert("title="+mytitle);
	// F = window.open( "about:blank", "Ansicht", "width=" + x + ", height=" + y );
	var F = window.open( "", "", "width=" + myx + ", height=" + myy + ", menubar=no, status=no, toolbar=no, location=no, scrollbars=no, dependent=yes" );
	F.document.write( "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n" );
	F.document.write( "<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-15\">\n<title>"+mytitle+"</title><link rel=\"stylesheet\" rev=\"stylesheet\" href=\"marco.css\"></head><body class=\"popup\">\n" );
	F.document.write( "<table cellspacing=0 cellpadding=0 border=0 width=" + x + "><tr><td>\n" );
	F.document.write( "<img src=\""+myfile+"\" width="+x+" height="+y+" alt=\""+mytitle+"\">\n" );
	F.document.write( "</td></tr>\n" );
	F.document.write( "<tr><td height=10><img src=\"images/1x1.gif\" alt=\"\" width=1 height=10></td></tr>\n" );
	F.document.write( "<tr><td class=\"bildtext\">"+mytext+"</td></tr></table>" );
	F.document.write( "</body></html>" );
	// F.document.title = mytitle;
}