var doc=document,ie4=document.all,opera=window.opera;var innerLayer,layer,x,y,doWheel=false,offsetX=15,offsetY=5;var tickerc=0,mTimer=new Array(),tickerTo=new Array(),tickerSpeed=new Array();var DZCP={init:function(){doc.body.id='dzcp-engine';var div=doc.createElement('div');div.setAttribute('id','infoDiv');doc.body.appendChild(div);layer=$('infoDiv');doc.body.onmousemove=DZCP.trackMouse;if($('navShout'))window.setInterval("var myAjax = new Ajax.Updater('navShout', '../inc/ajax.php?i=shoutbox', {method: 'get', onFailure: function() { var myAjax = new Ajax.Updater('navShout', '../inc/ajax.php?i=shoutbox', {method: 'get' }); } });",15000);},addEvent:function(obj,evType,fn){if(obj.addEventListener)
{obj.addEventListener(evType,fn,false);return true;}else if(obj.attachEvent){var r=obj.attachEvent('on'+evType,fn);return r;}else return false;},trackMouse:function(e){innerLayer=$('infoInnerLayer');if(typeof(layer)=='object')
{var ie4=doc.all;var ns6=doc.getElementById&&!doc.all;var mLeft=5;var mTop=-15;x=(ns6)?e.pageX-mLeft:window.event.clientX+doc.documentElement.scrollLeft-mLeft;y=(ns6)?e.pageY-mTop:window.event.clientY+doc.documentElement.scrollTop-mTop;if(innerLayer)
{var layerW=((ie4)?innerLayer.offsetWidth:innerLayer.clientWidth)-3;var layerH=(ie4)?innerLayer.offsetHeight:innerLayer.clientHeight;}else{var layerW=((ie4)?layer.clientWidth:layer.offsetWidth)-3;var layerH=(ie4)?layer.clientHeight:layer.offsetHeight;}
var winW=(ns6)?(window.innerWidth)+window.pageXOffset-12:doc.documentElement.clientWidth+doc.documentElement.scrollLeft;var winH=(ns6)?(window.innerHeight)+window.pageYOffset:doc.documentElement.clientHeight+doc.documentElement.scrollTop;layer.style.left=((x+offsetX+layerW>=winW-offsetX)?x-(layerW+offsetX):x+offsetX)+'px';layer.style.top=(y+offsetY)+'px';}
return true;},popup:function(url,x,y){url=(url.indexOf('img=')==-1)?url:'../popup.php?'+url;x=parseInt(x);y=parseInt(y)+50;popup=window.open(url,'Popup',"width=1,height=1,location=0,scrollbars=0,resizable=1,status=0");popup.resizeTo(x,y);popup.moveTo((screen.width-x)/2,(screen.height-y)/2);popup.focus();},initGameServer:function(serverID){var myAjax=new Ajax.Updater('navGameServer_'+serverID,'../inc/ajax.php?i=server&serverID='+serverID,{method:'get',onFailure:function(){DZCP.initGameServer(serverID);}});},initTeamspeakServer:function(){var myAjax=new Ajax.Updater('navTeamspeakServer','../inc/ajax.php?i=teamspeak',{method:'get',onFailure:function(){DZCP.initTeamspeakServer();}});},shoutSubmit:function(){var myAjax=new Ajax.Request('../shout/index.php?ajax',{method:'post',postBody:Form.serialize('shoutForm'),onSuccess:function(s){if(s.responseText)alert(s.responseText.replace(/  /g,' '));var myAjax=new Ajax.Updater('navShout','../inc/ajax.php?i=shoutbox',{method:'get',onFailure:function(){var myAjax=new Ajax.Updater('navShout','../inc/ajax.php?i=shoutbox',{method:'get'});}});if(!s.responseText)$('shouteintrag').value='';}});return false;},switchuser:function(){var url=doc.formChange.changeme.options[doc.formChange.changeme.selectedIndex].value;window.location.href=url},tempswitch:function(){var url=doc.form.tempswitch.options[doc.form.tempswitch.selectedIndex].value;if(url!='lazy')DZCP.goTo(url);},goTo:function(url,n){if(n==1)window.open(url);else window.location.href=url},maxlength:function(field,countfield,max){if(field.value.length>max)field.value=field.value.substring(0,max);else countfield.value=max-field.value.length;},showInfo:function(info){if(typeof(layer)=='object')
{layer.innerHTML='<div id="hDiv">'+'  <table class="hperc" cellspacing="0" style="height:100%">'+'    <tr>'+'      <td style="vertical-align:middle">'+'        <div id="infoInnerLayer">'+'          <table class="hperc" cellspacing="0">'+info+'</table>'+'        </div>'+'      </td>'+'    </tr>'+'  </table>'+'</div>';if(ie4&&!opera)
{layer.innerHTML+='<iframe id="ieFix" frameborder="0" width="'+$('hDiv').offsetWidth+'" height="'+$('hDiv').offsetHeight+'"></iframe>'
layer.style.display='block';}else layer.style.display='block';}},hideInfo:function(){if(typeof(layer)=='object')
{layer.innerHTML='';layer.style.display='none';}},toggle:function(id){if(id==0)return;else{if($('more'+id).style.display=='none')
{$('more'+id).style.display='';if($('img'+id))$('img'+id).src='../inc/images/collapse.gif';}else{$('more'+id).style.display='none';if($('img'+id))$('img'+id).src='../inc/images/expand.gif';}}},resizeImages:function(){for(var i=0;i<doc.images.length;i++)
{var d=doc.images[i];if(d.className=='content')
{var imgW=d.width;var imgH=d.height;if(maxW!=0&&imgW>maxW)
{d.width=maxW;d.height=Math.round(imgH*(maxW/imgW));if(!DZCP.linkedImage(d))
{var textLink=doc.createElement("span");var popupLink=doc.createElement("a");textLink.appendChild(doc.createElement("br"));textLink.setAttribute('class','resized');textLink.appendChild(doc.createTextNode('auto resized to '+d.width+'x'+d.height+' px'));popupLink.setAttribute('href',d.src);popupLink.setAttribute('rel','lightbox');popupLink.appendChild(d.cloneNode(true));d.parentNode.appendChild(textLink);d.parentNode.replaceChild(popupLink,d);}}}}},linkedImage:function(node){do{node=node.parentNode;if(node.nodeName=='A')return true;}
while(node.nodeName!='TD'&&node.nodeName!='BODY');return false;},calSwitch:function(m,y){var myAjax=new Ajax.Updater('navKalender','../inc/ajax.php?i=kalender&month='+m+'&year='+y,{method:'get'});},teamSwitch:function(obj){clearTimeout(mTimer[1]);var myAjax=new Ajax.Updater('navTeam','../inc/ajax.php?i=teams&tID='+obj,{method:'get',onComplete:function(){DZCP.initTicker('teams','h',60);}});},ajaxVote:function(id){DZCP.submitButton('contentSubmitVote');var pars=Form.serialize('navAjaxVote');var myAjax=new Ajax.Updater('navVote','../votes/index.php?action=do&ajax=1&what=vote&id='+id,{method:'post',postBody:pars});return false;},ajaxFVote:function(id){DZCP.submitButton('contentSubmitFVote');var pars=Form.serialize('navAjaxFVote');var myAjax=new Ajax.Updater('navFVote','../votes/index.php?action=do&fajax=1&what=fvote&id='+id,{method:'post',postBody:pars});return false;},ajaxPreview:function(form){var tag=doc.getElementsByTagName("textarea");for(var i=0;i<tag.length;i++)
{var thisTag=tag[i].className;var thisID=tag[i].id;if(thisTag=="editorStyle"||thisTag=="editorStyleWord"||thisTag=="editorStyleNewsletter")
{var inst=tinyMCE.getInstanceById(thisID);$(thisID).value=inst.getBody().innerHTML;}}
var url=prevURL;var addpars=(form=='cwForm')?'&s1='+$('screen1').value+'&s2='+$('screen2').value+'&s3='+$('screen3').value+'&s4='+$('screen4').value:'';var pars=Form.serialize(form)+addpars;$('previewDIV').innerHTML='<div style="width:100%;text-align:center">'
+' <img src="../inc/images/admin/loading.gif" alt="" />'
+'</div>';var myAjax=new Ajax.Updater('previewDIV',url,{method:'post',postBody:pars});},del:function(txt){txt=txt.replace(/\+/g,' ');txt=txt.replace(/oe/g,'ö');return confirm(txt+'?');},hideForumFirst:function(){$('allkat').checked=false;},hideForumAll:function(){for(var i=0;i<doc.forms['search'].elements.length;i++)
{var box=doc.forms['search'].elements[i];if(box.id.match(/k_/g))
box.checked=false;}},googleAPI:function(overlay){map=new GMap2($("memberMap"));map.addControl(new GLargeMapControl());map.addControl(new GMapTypeControl());function initMember(point,userInfo,team)
{var icon=new GIcon();if(team==1)icon.image='../inc/images/mappin_team.png';else icon.image='../inc/images/mappin.png';icon.iconSize=new GSize(20,34);icon.iconAnchor=new GPoint(10,32);icon.infoWindowAnchor=new GPoint(10,2);var marker=new GMarker(point,icon);GEvent.addListener(marker,"mouseover",function(){DZCP.showInfo(userInfo);});GEvent.addListener(marker,"mouseout",function(){DZCP.hideInfo();});GEvent.addListener(marker,"click",function(){DZCP.hideInfo();map.showMapBlowup(marker.getPoint(),5);});map.addOverlay(marker);}
function handle(delta)
{var s='';if(delta<0)s+="down";else s+="up";if(s=="down")map.zoomOut();if(s=="up")map.zoomIn();}
var mt=map.getMapTypes();for(var i=0;i<mt.length;i++){mt[i].getMinimumResolution=function(){return 4;};mt[i].getMaximumResolution=function(){return 17;};}
map.setCenter(new GLatLng(51.200000,12.50000),6);new GKeyboardHandler(map);map.addControl(new GMapTypeControl());eval(overlay);},submitButton:function(id){submitID=(id)?id:'contentSubmit';$(submitID).disabled=true;$(submitID).style.color='#909090';$(submitID).style.cursor='default';return true;},initTicker:function(objID,to,ms){tickerTo[tickerc]=(to=='h'||to=='v')?to:'v';tickerSpeed[tickerc]=(parseInt(ms)<=10)?10:parseInt(ms);var orgData=$(objID).innerHTML;var newData='  <div id="scrollDiv'+tickerc+'" class="scrollDiv" style="position:relative;left:0;z-index:1">';newData+='    <table id="scrollTable'+tickerc+'" class="scrolltable"  cellpadding="0" cellspacing="0">';newData+='      <tr>';newData+='        <td onmouseover="clearTimeout(mTimer['+tickerc+'])" onmouseout="DZCP.startTickerDiv('+tickerc+')">';for(var i=0;i<10;i++)newData+=orgData;newData+='        </td>';newData+='      </tr>';newData+='    </table>';newData+='  </div>';$(objID).innerHTML=newData;window.setTimeout("DZCP.startTickerDiv("+tickerc+");",1000);tickerc++;},startTickerDiv:function(subID){tableObj=$('scrollTable'+subID);obj=tableObj.parentNode;objWidth=(tickerTo[subID]=='h')?tableObj.offsetWidth:tableObj.offsetHeight;newWidth=(Math.floor(objWidth/2)*2)+2;obj.style.width=newWidth;DZCP.moveDiv(obj,newWidth,subID);},moveDiv:function(obj,width,subID){var thisObj=(typeof(obj)=='string')?$(obj):obj;if(tickerTo[subID]=='h')thisObj.style.left=(parseInt(thisObj.style.left)<=(0-(width/2)+2))?0:parseInt(thisObj.style.left)-1+'px';else thisObj.style.top=(thisObj.style.top==''||(parseInt(thisObj.style.top)<(0-(width/2)+6)))?0:parseInt(thisObj.style.top)-1+'px';mTimer[subID]=setTimeout("DZCP.moveDiv('"+thisObj.id+"', "+width+", "+subID+");",tickerSpeed[subID]);},addFlash:function(){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();var def=new Array('menu|false','quality|high','wmode|transparent','classid|clsid:d27cdb6e-ae6d-11cf-96b8-444553540000','type|application/x-shockwave-flash');for(var i=0;i<arguments.length;i=i+2)
{ret.objAttrs[arguments[i]]=arguments[i+1];ret.embedAttrs[arguments[i]]=ret.params[arguments[i]]=arguments[i+1];ret.params[arguments[i]]=arguments[i+1];}
for(var i=0;i<def.length;i++)
{var s=def[i].split('|');if(!ret.params[s[0]])
{ret.objAttrs[s[0]]=s[1];ret.embedAttrs[s[0]]=s[1];ret.params[s[0]]=s[1];}}
var str='<object ';for(var i in ret.objAttrs)str+=i+'="'+ret.objAttrs[i]+'" ';str+='>';for(var i in ret.params)str+='<param name="'+i+'" value="'+ret.params[i]+'" /> ';str+='<embed ';for(var i in ret.embedAttrs)str+=i+'="'+ret.embedAttrs[i]+'" ';str+=' ></embed></object>';doc.write(str);}}
DZCP.addEvent(window,'load',DZCP.init);DZCP.addEvent(window,'load',DZCP.resizeImages);DZCP.addEvent(window,'error',function(){return true;});