// Popup Window
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus)
{
if(pos=="random")
{
myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
}
if(pos=="center")
{
myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;
}
else if((pos!='center' && pos!="random") || pos==null)
{
myleft=10;mytop=2
}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=yes,toolbar=no,resizable=no";
win=window.open(mypage,myname,settings);
win.focus();
}


// Captcha neu laden
function CaptchaReload()
{
document.getElementById('captcha').src='images/kontakt/securitycode.php?width=80&height=40&characters=4&'+Math.random();
}


// .swf laden
function writeFlash(title, w, h) {
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9.0.0.0" width="' + w + '" height="' + h + '" ID="sf" VIEWASTEXT>')
document.write('  <param name="movie" value="' + title + '.swf" />')
document.write('  <param name="quality" value="high" />')
document.write('  <param name="wmode" value="window" />')
document.write('  <param name="allowScriptAccess" value="always" />')
document.write('  <param name="allowFullScreen" value="true" />')
document.write('  <embed src="' + title + '.swf" quality="high" name="sf" allowScriptAccess="always" allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + w + '" height="' + h + '"></embed>')
document.write('</object>')
}

