function fensterweite()
{
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
 else return 0;
}

function fensterhoehe()
{
 if (window.innerHeight) return window.innerHeight;
 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
 else return 0;
}

function close_announce()
{
 document.getElementById('announce').style.display='none';
}

function show_announce(picname, picx, picy, xoffset, yoffset, text, timer, url, fgcolor, bgcolor)
{
 x=(fensterweite()-picx)/2+parseInt(xoffset);
 y=(fensterhoehe()-picy)/2+parseInt(yoffset);
 z="<div id=announce style='"
 z+="position:absolute; top:"+y+"px; left:"+x+"px; margin:0; padding:0; visibility:visible;"
 z+="width:"+picx+"px; height:"+picy+"px;"
 z+="font-size:12px; font-weight:bold; text-align:center; line-height:100%;"
 z+="border-width:2px; border-style:outset; border-color:darkgray;"
 z+="color:"+fgcolor+"; background-color:"+bgcolor+";'>"
 z+="<br><br>"
 z+=text
 z+="<a href="+url+" onclick=close_announce();return false>"
 z+="<div style='background-image:url("+picname+");"
 z+="width:"+picx+"px; height:"+picy+"px;"
 z+="position:absolute; top:-2px; left:-2px; margin:0; padding:0; visibility:visible;"
 z+="border-width:2px; border-style:outset; border-color:darkgray;"
 z+="background-color:transparent; color:transparent;'>"
 z+="</div>"
 z+="</a>"
 z+="<div style='position:absolute; top:2px; right:2px;'><a href='javascript:close_announce();' alt='Schlie&szlig;en' title='Schlie&szlig;en'>X</a></div>"
 z+="</div>"
 document.write(z);
 window.setTimeout('close_announce()',timer*1000);
}

