﻿var popup;
function BildPopup(Bild, Titel, B, H)
{
if (Titel == '') Titel = Bild;
ClosePopup();
popup = window.open(Bild,Ersetzen(Ersetzen(Titel,"-","")," ",""),'width='+B+',height='+H+',resizable=no');
popup.document.write('<html><head><title>');
popup.document.write(Titel);
popup.document.write('</title></head>');
popup.document.write('<body leftmargin="0" topmargin="0" bgcolor="black" style="border: 0px">');
popup.document.write('<table cellspacing="0" cellpadding="0" width="'+B+'" height="'+H+'">');
popup.document.write('<tr><td align="center" valign="middle">');
popup.document.write('<img src="'+Bild+'" border="0">');
popup.document.write('</td></tr></table></body></html>');
popup.resizeBy(B-popup.document.body.offsetWidth,H-popup.document.body.offsetHeight);
popup.focus();
if (navigator.appName.substring(0,8) == "Netscape")
{
	popup.location = Imgsrc;
	popup.resizeTo(B+13,H+13);
}
}

function ClosePopup()
{
if (popup == undefined)
{
	return
}
if (popup.closed == false)
{
	popup.close();
}
}

function Video(Z, V, B, H, C, A)
{
if (C == undefined) C='1'
if (A == undefined) A='true'
if (Z) {} else return
Z.innerHTML='' + 
'<object id="MediaPlayer" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject"' +
'standby="Loading Microsoft Windows Media Player components..." height="' + H.toString() + '" width="' + B.toString() + '">' + 
'<param name="playcount" value="' + C.toString() + '" /><param name="enabled" value="true" /><param name="enablecontextmenu" value="true" />' +
'<param name="mute" value="false" /><param name="url" value="' + V.toString() + '" /><param name="autostart" value="' + A.toString() + '" />' +
'<param name="uimode" value="none" /></object>'
Z.style.cursor='default'
}

function ZufallsBild(Z, URL, Anz)
{
Rnd="000"+parseInt(Math.random()*Anz+1)
Z.style.backgroundImage="url("+URL+"galerie/galerie"+Rnd.substr(Rnd.length-Anz.toString().length)+".jpg)";
}

function Ersetzen(e, RegA, ET){
var Text;
do
{
	Text=e;
	e=e.replace(RegA, ET);
}
while (e != Text);
return e}
