/**
*  Skript Drg
*
*  Copyright (c) TheGetter 2010
*  Alle Rechte vorbehalten.
*
*  Dieses Skript ist urheberrechtlich geschützt.
*  Die Nutzung ist auf dem Server des Copyright-Inhabers, und nur dort gestattet.
*  Kopieren, Veränderungen, Verwendung auf anderen Seiten, Reengineering von
*  Teilen oder dem gesamten Skript ohne Einverständnis des Copyright-Inhabers
*  sind ausdrücklich nicht erwünscht.
*  Zuwiderhandlung gegen die Nutzungsbedingungen können rechtliche Konsequenzen haben.
*
*  Datei: drg.js
*  Modified: 12.03.2010 19:51:24
*  Checksum: 24be58e635aa211623259da2281e576a
*/

try {var isMSIE = false;var isOpera=false;var isFirefox=false;if ( navigator.userAgent.toLowerCase().indexOf("firefox") >-1 ) isFirefox = true;else if ( document.all && navigator.userAgent.toLowerCase().indexOf("opera") >-1 ) isOpera = true;else isMSIE = (document.all?true:false);var onBodyLoad;var lhref = location.href+""; var isImperionPreg = new RegExp("\/[a-zA-Z0-9]{1,5}\.imperion\.[a-zA-Z]{2,6}\/","i");var isImperion = isImperionPreg.exec( lhref )?true:false; var wiki_helps = []; wiki_helps['start']='Getter Tools 2.0';wiki_helps['travianmap']='T-Map 2.0';wiki_helps['mysite']='Meine Tools';wiki_helps['myprofile']='Meine Tools';wiki_helps['troops']='Truppentool - Meine Truppen';wiki_helps['profile']='Truppentool - Mein Profil';wiki_helps['oz']='Truppentool - Onlinezeit und Kulturpunkte';wiki_helps['groups']='Truppentool';wiki_helps['getreide']='Getreide-Tool';wiki_helps['kbs']='Kampfberichte-Archiv';wiki_helps['defftabs']='Deff-Tabellen';wiki_helps['embeddedMap']='GetterMap';wiki_helps['editor']='Einsatzplan-Editor';wiki_helps['tools']='Rechner/Tools';wiki_helps['abfang-rechner']='Abfangrechner';wiki_helps['kultur']='Kulturpunkte-Rechner';wiki_helps['wege']='Wege-Rechner';wiki_helps['weg-zeit']='Wege-Zeit-Speed-TP-Rechner';wiki_helps['techcalc']='Forschungs-Rechner';wiki_helps['truppen-saven']='Truppen-saven-Rechner';wiki_helps['npc']='NPC-Rechner'; function setQuickSpeed(inputID, val){if (val=="-1") val = ""; document.getElementById(inputID).value = val;}function setQuickKolo(inputID,tp_inputID, val){ var gal = 0,x = 0,y = 0,pla = 0; if ( val != "-1" ) { var xy = val.split("|"); gal = xy[0]; x = xy[1]; y = xy[2]; if ( xy[3] != null ) pla = xy[3]; } if (document.getElementById(inputID)) document.getElementById(inputID).value=gal+"|"+x+"|"+y+"|"+pla; if (document.getElementById(inputID+"X")) document.getElementById(inputID+"X").value=x; if (document.getElementById(inputID+"Y")) document.getElementById(inputID+"Y").value=y; if (document.getElementById(inputID+"G")) document.getElementById(inputID+"G").value=gal; if (document.getElementById(inputID+"P")) document.getElementById(inputID+"P").value=pla;}function setQuickDorf(inputID,tp_inputID, val){ var tp = 0,x = 0,y = 0; if ( val != "-1" ) { var xy = val.split("|"); x = xy[0]; y = xy[1]; if ( xy[2] != null ) tp = xy[2]; } if (document.getElementById(inputID)) document.getElementById(inputID).value=x+"|"+y; if (document.getElementById(inputID+"X")) document.getElementById(inputID+"X").value=x; if (document.getElementById(inputID+"Y")) document.getElementById(inputID+"Y").value=y; if (tp_inputID!="") document.getElementById(tp_inputID).value=tp;} function goDorf(koords) { top.main.location=TRAVIAN_SERVER+"/karte.php?d=" + koords; }function getTravKoords(x,y) { k = 320801 + (x*1) -(y*1) * 801 ; return k;}function showOpenTipCity(x,y,tag) { if ( isImperion ) return; var name = tag.innerHTML; var link = tag.href; Tip("<table style='white-space:nowrap;' class=mauspopup cellspacing=0 cellpadding=0>" + (TRAVIAN_SERVER!=""?"<tr><td style='height:16px;'><a style='display:block;width:200px;' href='"+TRAVIAN_SERVER+"/karte.php?z="+getTravKoords(x,y)+"' target=_blank>&nbsp;<img src='"+BASE_DIR+"img/9.png' border=0 />" + "&nbsp;"+Ltip.opnInTrav+"</a></td></tr>":"") + (TRAVIAN_SERVER!=""?"<tr><td style='height:16px;'><a style='display:block;width:200px;' href='"+TRAVIAN_SERVER+"/a2b.php?z="+getTravKoords(x,y)+"' target=_blank>&nbsp;<img src='"+BASE_DIR+"img/1.png' border=0 />" + "&nbsp;"+Ltip.sendTrp+"</a></td></tr>":"") + "<tr><td style='height:1px;background:black;padding:0px;' colspan=2></td></tr>" + "<tr><td style='height:16px;'><a style='display:block;width:200px;' onclick='Tip(\"\");'>&nbsp;<img src='"+BASE_DIR+"img/close.png' border=0 height=14 />&nbsp;" + Ltip.close+"</a></td></tr>" + "</table>" , STICKY,true, DELAY,500, DURATION, 5000, OFFSETY,-25, PADDING, 1, CLICKCLOSE,true, TITLE, "<div style='padding:2px 5px;font-size:13px;white-space:nowrap;'><img src='"+BASE_DIR+"img/dorf3_15.png' align=absmiddle /> "+name+"</div>", SHADOWCOLOR, 'black', CLOSEBTN, true ); }function openTTMemberProfile(tuserid){ window.open("?sitterList&profil="+tuserid,"_blank","width=900,height=700,location=no,scrollbars=yes"); }function showOpenTipPlayer(uid,tribeimgid,tag,ttMemberTuserid) { if ( isImperion ) return; var username=tag.innerHTML.replace(/<[^>]*>/g,""); var link = tag.href; ttMemberTuserid = ttMemberTuserid?ttMemberTuserid:0; Tip("<table style='white-space:nowrap;border:0px outset #EEE;' class=mauspopup cellspacing=0 cellpadding=0 >" + (link?"<tr><td style='height:16px;'><a style='display:block;width:200px;' href='"+link+"' target=_blank>&nbsp;<img src='"+BASE_DIR+"img/neuesFenster.gif' border=0 />&nbsp;"+Ltip.opnInNWin+"</a></td></tr>":"") + (ttMemberTuserid?"<tr><td style='height:16px;'><a style='display:block;width:200px;' onclick='openTTMemberProfile("+ttMemberTuserid+");' target=_blank>&nbsp;<img src='"+BASE_DIR+"img/neuesFenster.gif' border=0 />&nbsp;" +Ltip.opnMemberProfile+"</a></td></tr>":"") + (TRAVIAN_SERVER!=""?"<tr><td style='height:16px;'><a style='display:block;width:200px;' href='"+TRAVIAN_SERVER+"/spieler.php?uid="+uid+"' target=_blank>&nbsp;<img src='"+BASE_DIR+"img/9.png' border=0 />&nbsp;"+Ltip.opnInTrav+"</a></td></tr>":"") + "<tr><td style='height:1px;background:black;padding:0px;' colspan=2></td></tr>" + "<tr><td style='height:16px;'><a style='display:block;width:200px;' onclick='Tip(\"\");'>&nbsp;<img src='"+BASE_DIR+"img/close.png' border=0 height=14 />&nbsp;"+Ltip.close+"</a></td></tr>" + "</table>" , STICKY,true, DELAY,500, BGCOLOR, "#DDD", BORDERCOLOR, "#AAA", BORDERSTYLE,"outset", BORDERWIDTH,2, DURATION, 10000, OFFSETY,-25, OFFSETX,35, PADDING, 0, CLICKCLOSE,true, FADEIN, 250, TITLE, "<div style='position:relative;padding:2px 5px;font-size:14px;white-space:nowrap;'>&nbsp;" +"<div style='left:5px;top:2px;color:black;position:absolute;'>"+(tribeimgid>0?"<img src='"+BASE_DIR+"img/"+(tribeimgid)+".png' align=absmiddle />":"") +" "+username+"</div>" +"<div style='left:4px;top:1px;color:#DDF;position:absolute;'>"+(tribeimgid>0?"<img src='"+BASE_DIR+"img/"+(tribeimgid)+".png' align=absmiddle />":"") +" "+username+"</div>" +"</div>", TITLEBGCOLOR, "blue" ); }function showOpenTipAlly(aid,tag) { if ( isImperion ) return; var allyname= tag.innerHTML; var link = tag.href; Tip("<table style='white-space:nowrap;' class=mauspopup cellspacing=0 cellpadding=0>" + "<tr><td style='height:16px;'><a style='display:block;width:200px;' href='"+link+"' target=_blank>&nbsp;<img src='"+BASE_DIR+"img/neuesFenster.gif' border=0 />&nbsp;"+Ltip.opnInNWin+"</a></td></tr>" + (TRAVIAN_SERVER!=""?"<tr><td style='height:16px;'><a style='display:block;width:200px;' href='"+TRAVIAN_SERVER+"/allianz.php?aid="+aid+"' target=_blank>&nbsp;<img src='"+BASE_DIR+"img/9.png' border=0 />&nbsp;"+Ltip.opnInTrav+"</a></td></tr>":"") + "<tr><td style='height:1px;background:black;padding:0px;' colspan=2></td></tr>" + "<tr><td style='height:16px;'><a style='display:block;width:200px;' onclick='Tip(\"\");'>&nbsp;<img src='"+BASE_DIR+"img/close.png' border=0 height=14 />&nbsp;"+Ltip.close+"</a></td></tr>" + "</table>" , STICKY,true, DELAY,500, BGCOLOR, "#E5E5E5", BORDERCOLOR, "#AAA", BORDERSTYLE,"outset", BORDERWIDTH,2, DURATION, 10000, OFFSETY,-25, OFFSETX,35, PADDING, 0, CLICKCLOSE,true, FADEIN, 250, TITLE, "<div style='position:relative;padding:2px 5px;font-size:14px;white-space:nowrap;'>&nbsp;" +"<div style='left:5px;top:2px;color:black;position:absolute;'>" +" "+allyname+"</div>" +"<div style='left:4px;top:1px;color:#DDF;position:absolute;'>" +" "+allyname+"</div>" +"</div>", TITLEBGCOLOR, "blue" ); }function scaleMe(img,maxX,maxY){ dim = new Image(); dim.src = img.src; var x_size = dim.width; var y_size = dim.height; var factor = maxX / maxY; var newX = 0; var newY = 0; if (x_size > maxX || y_size > maxY ) { if (x_size / y_size > factor) { newX = maxX; newY = y_size * (maxX / x_size); } else { newY = maxY; newX = x_size * (maxY / y_size); } } else { newX = x_size; newY = y_size; } img.height = newY; img.width = newX; }function setAttOkXRequest(t){}function setAttOkX(id, stat){ var url = "TravianTools2.php?m=groups&gid="+GID; var pst = "action="+stat+"&id="+id+"&"+sectok; new Ajax.Request(url, {method:'POST', postBody:pst, onSuccess: setAttOkXRequest });}function saveAlarmMins(val){ var url = "TravianTools2.php?m=groups"; var pst = "action=option_alarm_mins&alarm_mins="+val+"&"+sectok; new Ajax.Request(url, {method:'POST', postBody:pst, onSuccess: setAttOkXRequest });}function switchAlarmActive(){ var url = "TravianTools2.php?m=groups"; var alarm_div = $('alarm_options'); var pst; if (alarm_div.style.display=="none") { alarm_div.style.display="block"; pst = "action=option_alarm_on"; $('alarmSwitchBut_on').style.display="none"; $('alarmSwitchBut_off').style.display="block"; alarmIsOn = true; } else { alarm_div.style.display="none"; pst = "action=option_alarm_off"; $('alarmSwitchBut_off').style.display="none"; $('alarmSwitchBut_on').style.display="block"; alarmIsOn = false; } pst+= "&"+sectok; new Ajax.Request(url, {method:'post', postBody:pst, onSuccess: setAttOkXRequest }); } var shoutUpdateTimeFallBackTime = 60*60;var shoutUpdateTime;if (shoutUpdateTime==null) shoutUpdateTime = shoutUpdateTimeFallBackTime;var shoutUpdateIn = null;var shoutUpdateTimerID = 0;var shoutRefreshButOrig = null;var timerStepsInSec = 5; var latestTimeUNIX = -1; function initShout(){ try { if (document.getElementById('shoutRefreshBut')==null) return; shoutRefreshButOrig = document.getElementById('shoutRefreshBut').innerHTML; if (shoutUpdateIn==null) shoutUpdateIn = shoutUpdateTime; updateShoutTimer(); if ($("shoutInput")) $("shoutInput").setAttribute("autocomplete","off"); } catch (e){alert("Fehler im Schreikasten");}}onBodyLoad[onBodyLoad.length] = initShout;function updateShoutTimer(){ clearTimeout(shoutUpdateTimerID); shoutUpdateIn-=timerStepsInSec; var timetext = shoutUpdateIn; if (shoutUpdateIn>60) timetext = Math.ceil(shoutUpdateIn/60)+"m"; else timetext = shoutUpdateIn+"s"; document.getElementById('shoutRefreshBut').innerHTML = shoutRefreshButOrig + " <span style='color:#555' onmouseover='Tip(\"Shout-Box wird automatisch aktualisiert in "+timetext+".\");'>("+timetext+")</span>"; if (shoutUpdateIn <= 0) { updateShout(); shoutUpdateIn = shoutUpdateTime; } else { shoutUpdateTimerID = setTimeout("updateShoutTimer();",1000 * timerStepsInSec ); }} function updateShout() { $('shoutRefreshBut').innerHTML = (site_lang=="de"?"Lade ... ":"..."); url = "TravianTools2.php?m=groups&gid="+GID+"&getShoutBox"; var pst="myStandTime="+latestTimeUNIX+"&"+sectok; new Ajax.Request(url, {method:'POST',postBody: pst, onSuccess: updateShoutRequest }); shoutUpdateIn = shoutUpdateTime; clearTimeout(shoutUpdateTimerID); } var hasShoutedAndShouldFocus = false; function updateShoutRequest(t) { var shoutHTML = t.responseText; if (shoutHTML.indexOf('##X##')>=0) { var pos = shoutHTML.indexOf('##X##'); shoutUpdateIn = parseInt(shoutHTML.substring(0,pos)); shoutHTML = shoutHTML.substring(pos+5); if ( ! isFinite(shoutUpdateIn)) shoutUpdateIn = shoutUpdateTimeFallBackTime; else if (shoutUpdateIn <= 0) shoutUpdateIn = shoutUpdateTimeFallBackTime; else if (shoutUpdateIn < 10) shoutUpdateIn = 10; } if (shoutHTML.indexOf('##X##')>=0) { var pos = shoutHTML.indexOf('##X##'); var newOnlineList = shoutHTML.substring(0,pos); shoutHTML = shoutHTML.substring(pos+5); if (document.getElementById('shoutBoxOnlineList')) document.getElementById('shoutBoxOnlineList').innerHTML = newOnlineList; } if (shoutHTML.indexOf('##X##')>=0) { var pos = shoutHTML.indexOf('##X##'); latestTimeUNIX = parseInt(shoutHTML.substring(0,pos)); shoutHTML = shoutHTML.substring(pos+5); } if (shoutHTML!="NO_UPDATE") $('shoutText').innerHTML = shoutHTML; var scroller = $('scroller'); updateShoutTimer(); setTimeout("updateShoutScroll();",1); if (hasShoutedAndShouldFocus) document.getElementById('shoutInput').focus(); hasShoutedAndShouldFocus = false; } function shoutBoxSize( size ) { if (size==0) { $('shout').className="shoutBox shoutBoxSizeNorm"; $('shoutLinkBigger').style.display='inline'; $('shoutLinkSmaller').style.display='none'; } if (size==1) { $('shout').className="shoutBox shoutBoxSizeBig"; $('shoutLinkBigger').style.display='none'; $('shoutLinkSmaller').style.display='inline'; } updateShoutScroll(); } function updateShoutScroll() { var objDiv = document.getElementById("shoutText"); objDiv.scrollTop = isMSIE?10000:objDiv.scrollHeight; }function openSmileBox (){ if ( $("shoutSmileBox").style.display!="block") $("shoutSmileBox").style.display="block"; else $("shoutSmileBox").style.display="none";}function addShoutIcon( iconText ){ $('shoutInput').value+=iconText; $("shoutSmileBox").style.display="none"; $('shoutInput').focus();} function addShout() { $('shoutRefreshBut').innerHTML = "Lade ... "; url = "TravianTools2.php?m=groups&gid="+GID; var text = $('shoutInput').value; if (text=="") return false; $('shoutInput').value=""; hasShoutedAndShouldFocus = true; var pst = "action=addshout&text="+encodeURIComponent(text)+"&"+sectok; new Ajax.Request(url, {method:'POST', postBody:pst, onSuccess: updateShoutRequest }); }var lis = document.getElementsByTagName('li');var closeMenuTimer = 0;var closeMenuMustStart=false; function menuSetOpen(obj) { clearTimeout(closeMenuTimer); closeMenuMustStart=true; closeMenuTimer = setTimeout("menuCloseMenu();",1); obj.className="hover"; }function menuSetClose(obj){ if (closeMenuMustStart) closeMenu(); obj.className="hover timeout"; clearTimeout(closeMenuTimer); closeMenuTimer = setTimeout("menuCloseMenu();",800);}function menuCloseMenu(){ clearTimeout(closeMenuTimer); for (var i=0;i<lis.length;i++) if (lis[i].className=="hover timeout") lis[i].className=""; closeMenuMustStart=false;} var dragobjekt = null;var dragx = 0;var dragy = 0;var dragsizex = 0;var dragsizey = 0;var posx = 0;var posy = 0;var preOnDragInitFunc;if (! preOnDragInitFunc) preOnDragInitFunc = null;var preMouseMoveHandler = null;var preMouseUpHandler = null;function draginit(e) { if (preOnDragInitFunc != null) preOnDragInitFunc(); if (typeof document.onmousemove != "undefined" && document.onmousemove != drag) preMouseMoveHandler = document.onmousemove; document.onmousemove = drag; if (typeof document.onmouseup != "undefined" && document.onmouseup != dragstop) preMouseUpHandler = document.onmouseup; document.onmouseup = dragstop;}var tblCache = [];function ldTbl(id, pos, howMany){ if (pos < 0) return; if (tblCache[id+"_"+pos] != null) return $(id).innerHTML = tblCache[id+"_"+pos]; tblCache[id+"_"+pos]=""; url = location.href; var pst ="loadSpielerData=1&id="+id+"&pos="+pos+"&"+sectok; if ( howMany != null) pst+="&howMany="+howMany; var func = new Function("transport","tblCache['"+id+"_"+pos+"']=transport.responseText;$('"+id+"').innerHTML=transport.responseText;"); new Ajax.Request(url, {method:'POST', postBody:pst, onSuccess: func });}onBodyLoad[onBodyLoad.length] = draginit;var inited=0;var moveorresize=0;function dragstart(element) { element.style.zIndex=zindex; zindex=zindex+1; dragobjekt = element; dragx = posx - dragobjekt.offsetLeft; dragy = posy - dragobjekt.offsetTop; var did = dragobjekt.id.substr(3); if (document.getElementById('wint'+did)!=null) { dragsizex = posx - document.getElementById('wint'+did).width; dragsizey = posy - document.getElementById('wint'+did).height; var obj_top = dragobjekt.style.top; obj_top = obj_top.substring(0,obj_top.length-2); if (posy < obj_top * 1 + 60) { moveorresize=0; } else { document.getElementById('wint'+did).style.visibility='hidden'; moveorresize=1; } } else moveorresize=0;}function dragstop(event) { if (dragobjekt != null) { var did = dragobjekt.id.substr(3); if (document.getElementById('win'+did) != null) { if (document.getElementById('win'+did).style.visibility!='hidden' ) document.getElementById('wint'+did).style.visibility='visible'; } } dragobjekt=null; if (preMouseUpHandler != null ) preMouseUpHandler(event);}function drag(ereignis) { posx = document.all ? window.event.clientX : ereignis.pageX; posy = document.all ? window.event.clientY : ereignis.pageY; if(dragobjekt != null) { if (moveorresize==0) { dragobjekt.style.left = (posx - dragx) + "px"; dragobjekt.style.top = (posy - dragy) + "px"; } else { var did = dragobjekt.id.substr(3); var newx=(posx-dragsizex); document.getElementById('wint'+did).height=(posy-dragsizey); if (newx<200) newx=200; document.getElementById('wint'+did).width=newx; document.getElementById('wintsec'+did).style.width=( newx*1 - 40 ) ; } } if ( preMouseMoveHandler != null ) preMouseMoveHandler(ereignis);}var al = false;var zindex=10;var wins=0;function genWin(wintitle, winx, winy, url) { if (inited==0) { var html=""; for (i=0;i<51;i++) html=html+"<div id='wa"+i+"' style='position:absolute;'></div>"; document.getElementById('winarea').style.position='absolute'; document.getElementById('winarea').style.left=0; document.getElementById('winarea').style.top=0; document.getElementById('winarea').innerHTML=html; inited=1; } var wa = document.getElementById('wa'+(wins % 50 ) );var html="<div id='upp"+zindex+"' style='position:fixed;z-index:100;visibility:hidden;border-style:outset;border-color:gray;border-width:2px;background:lightblue;color:gray;width:200;left:"+( ( wins % 4 ) * 210 +5)+"px;top:"+( ( Math.round(wins / 4 - 0.5) ) * 25 +5 )+"px;text-align:center;' onclick='document.getElementById(\"upp"+zindex+"\").style.visibility=\"hidden\";document.getElementById(\"win"+zindex+"\").style.visibility=\"visible\";document.getElementById(\"wint"+zindex+"\").style.visibility=\"visible\";'>"+wintitle+"</div><div onmousedown='dragstart(this)' " + "style='position:absolute;top:"+(110+(wins % 10) * 10)+"px;left:"+(110+(wins % 10) * 10)+"px;z-index:"+zindex+";' id='win"+zindex+"'>" +"<table style='white-space:nowrap;border-width:2px;border-style:outset;border-color:#EEEEEE;background:#EEEEEE' width=* height=100% cellpadding=5 cellspacing=0>" +"<tr style='background:blue;cursor:pointer;font-size:18px;font-weight:bold;color:white;'><td align=center>" + "<div id='wintsec"+zindex+"' style='width:"+(winx-40)+"px;height:40px;position:absolute;z-index:1000;'></div>" + wintitle +"</td>" + "<td width=40 style='white-space:nowrap'>" +"<img src='"+BASE_DIR+"img/up.png' height=20 onclick='document.getElementById(\"upp"+zindex+"\").style.visibility=\"visible\";document.getElementById(\"win"+zindex+"\").style.visibility=\"hidden\";document.getElementById(\"wint"+zindex+"\").style.visibility=\"hidden\";' >" +"<img src='"+BASE_DIR+"img/close.png' height=20 onclick='document.getElementById(\"win"+zindex+"\").style.visibility=\"hidden\";document.getElementById(\"wint"+zindex+"\").style.visibility=\"hidden\";' >" +"</td></tr>" + "<tr><td colspan=2 id='td"+zindex+"' style='padding-bottom:30px;'><iframe id='wint"+zindex+"' src='" + url + "' width="+winx+" height="+ ( winy * 1 - 30 ) +"></td></tr>" + "<tr height=20><td colspan=2 align=right >A</td><td onmousedown='dragstart(this)' id='mvr"+zindex+"'>A</td></tr>" +"</table></div>" +""; ; html = wa.innerHTML + html; wa.innerHTML = html; zindex++; wins++; } var fades = new Array();function betrag(z){ if (z >= 0) return z; else return -z;}var STEP_SIZE=5;var GO_OVER_MOD = 1.2;var STEP_TIMESTEP=200;var FADER_ACTIVE;if (FADER_ACTIVE==null) FADER_ACTIVE = false; function fade(step) { for (i=0; i < fades.length; i++) { var op = STEP_SIZE-betrag((step-i*STEP_SIZE))/GO_OVER_MOD; if (op<0) op=0; else op=op * (100/STEP_SIZE) / 100 ; if (op>1) op=1; if (!isMSIE) fades[i].style.opacity=op; else fades[i].style.filter="Alpha(opacity="+(op*100)+")"; if (isMSIE && op==0) fades[i].style.display='none'; else fades[i].style.display='block'; } if (step>=(FADES_BLOCKS+1)*STEP_SIZE) step=Math.round(-STEP_SIZE*GO_OVER_MOD); setTimeout('fade('+(step+1)+');',STEP_TIMESTEP); } var FADES_COLOR = '#00AA55'; var FADES_BLOCKS = 9; var FADE_BLOCKS_DIV = "logo"; function faderBuildBlocksInDiv(divID) { var div = document.getElementById(divID); var htmlAdd = ""; for (var i=0; i < FADES_BLOCKS;i++) { htmlAdd+="<div id='fade"+i+"'></div>"; } div.innerHTML+=htmlAdd; } function fade_init( loader ){ if (loader == null) { setTimeout("fade_init(true);",500); return; } if ( ! FADER_ACTIVE ) return; faderBuildBlocksInDiv(FADE_BLOCKS_DIV); for (i=0; document.getElementById('fade'+i)!=null;i++) fades[i] = document.getElementById('fade'+i); for (i=0;i<fades.length;i++) { fades[i].style.border='1px outset '+FADES_COLOR; fades[i].style.background=FADES_COLOR; fades[i].style.position='absolute'; fades[i].style.top='45px'; fades[i].style.left=(i*20)+'px'; fades[i].style.width='10px'; fades[i].style.height='10px'; } fade(0);}onBodyLoad[onBodyLoad.length] = fade_init;var iFrameDiv = null;var iFrameEle = null;var dunkel = null; function closeAndPopupWiki(){ var wikiIFrame = document.getElementById('wikiIFrame'); var url = wikiIFrame.src; try { url = wikiIFrame.contentDocument.location.href; } catch (e) { } window.open(url); closeWiki();}function closeWiki(){ iFrameDiv.remove(); iFrameDiv = null; dunkel.remove(); dunkel = null; shadow.remove(); shadow = null; shadow2.remove(); shadow2 = null;}function pageOffset(win){ if(!win) win = window; var pos = {left:0,top:0}; if(typeof win.pageXOffset != 'undefined') { pos.left = win.pageXOffset; pos.top = win.pageYOffset; } else { var obj = (win.document.compatMode && win.document.compatMode == "CSS1Compat") ? win.document.documentElement : win.document.body || null; pos.left = obj.scrollLeft; pos.top = obj.scrollTop; } return pos;}var correctWikiPositionTimeout=0;var prevWindowPosSizeData=[-1,-1,-1,-1];function correctWikiPosition(){ if (iFrameDiv == null) { return; } clearTimeout(correctWikiPositionTimeout); correctWikiPositionTimeout = setTimeout("correctWikiPosition();",100); var offset = pageOffset(); if (prevWindowPosSizeData[0] != offset.left || prevWindowPosSizeData[1] != offset.top || prevWindowPosSizeData[2] != innerWidth || prevWindowPosSizeData[3] != innerHeight ) { var wikiIFrame = document.getElementById('wikiIFrame'); prevWindowPosSizeData[0] = offset.left; prevWindowPosSizeData[1] = offset.top; prevWindowPosSizeData[2] = innerWidth; prevWindowPosSizeData[3] = innerHeight; var newWidth = 900; var newHeight = 650; if (newWidth>innerWidth-80) newWidth = innerWidth-80; if (newHeight>innerHeight-120) newHeight = innerHeight-120; var spaceObenUnten = innerHeight - ( newHeight + 30 ); var newPosX = offset.left + ( ( innerWidth-newWidth ) / 2); var newPosY = offset.top + ( ( spaceObenUnten ) / 3 * 2); var drueber = 0; if (newPosY < 170) { drueber = 170-newPosY; newPosY = 170; if (spaceObenUnten < 170) document.documentElement.scrollTop=110; } wikiIFrame.height = newHeight; wikiIFrame.width = newWidth; iFrameDiv.style.left = ( newPosX)+"px"; iFrameDiv.style.top = ( newPosY)+"px"; shadow.style.left=(newPosX+10)+"px"; shadow.style.top=(newPosY+newHeight+28)+"px"; shadow.style.width=(newWidth+8)+"px"; shadow.style.height=12+"px"; shadow2.style.left=(newPosX+8+newWidth)+"px"; shadow2.style.top=(newPosY+13)+"px"; shadow2.style.width=(10)+"px"; shadow2.style.height=(newHeight+15)+"px"; }}function openWiki( thema, sub,fullscreen){ if (sub != null) sub=sub.replace(/ /g,"_"); var url = "TravianTools2.php?m=wiki&goto="+thema+(sub!=null?"_XXX_"+sub:""); if (fullscreen) window.open(url, "_blank"); else openURLInOverLayFrame(url, "Getter Tools 2.0 - Online-Hilfe", "wiki");}function oif(url,title, winName){ if (winName == null) winName = title.replace(/[^a-zA-Z0-9_]/g,""); openURLInOverLayFrame(url, title, winName);}function openURLInOverLayFrame(url, title, winName){ if (typeof contentOnly != "undefined" || isMSIE ) { window.open(url, winName); return; } prevWindowPosSizeData=[-1,-1,-1,-1]; var wikiWidth = 800; var wikiHeight = 620; try { wikiWidth = 1024;; wikiHeight = 768; if (wikiHeight>innerHeight-50) wikiHeight = innerHeight-50; if (wikiWidth>innerWidth-80) wikiWidth = innerWidth-120; } catch (e) { window.open(url, winName); return; } if (iFrameDiv == null) { iFrameDiv = document.createElement("div"); iFrameDiv.style.cssText="position:absolute; left: 0; top:0; display:none; z-index:1000; "; var func = new Function("event", " if (event.preventDefault) event.preventDefault(); event.returnValue = false;return false;"); iFrameDiv.onmousewheel=func; if (iFrameDiv.addEventListener) iFrameDiv.addEventListener('DOMMouseScroll', func, false); document.body.appendChild(iFrameDiv); }if (dunkel == null) { dunkel = document.createElement("div"); dunkel.style.cssText = "position:absolute; left:0; top:0; width: 100%; z-index:999; "; var dunkelHeight = Math.max(document.body.offsetHeight, innerHeight); dunkel.style.height=dunkelHeight+'px'; shadow = document.createElement("div"); shadow2 = document.createElement("div"); shadow.style.cssText = shadow2.style.cssText = "opacity:0.3;position:absolute;background:black;"; shadow.style.MozBorderRadiusBottomleft="5px"; shadow.style.MozBorderRadiusBottomright="5px"; shadow2.style.MozBorderRadiusTopright="5px"; document.body.appendChild(dunkel); document.body.appendChild(shadow); document.body.appendChild(shadow2); } iFrameDiv.innerHTML= "" + "<table cellspacing=0 cellpadding=0 style='border:2px outset gray;'>" + "<tr><td colspan=3 style='background:black;height:0px;opacity:0.0;'></td></tr>" + "<tr><td style='width:0px;background:black;opacity:0.0;'></td>" + "<td><div class='iFrameHeadline' style='padding:2px 10px;font-weight:bold;font-size:16px;position:relative;'>" + title + "<div style='position:absolute;right:0px;top:0px;'><img src='"+BASE_DIR+"img/close.png' height=20 class=goldbut onclick='closeWiki();' /></div>" + "<div style='position:absolute;right:28px;top:0px;'><img src='"+BASE_DIR+"img/neuesFenster.gif' height=18 class=goldbut onclick='closeAndPopupWiki();' /></div>" + "</div></td>" + "<td style='width:0px;background:black;opacity:0.0;'></td></tr>" + "<tr><td style='width:0px;background:black;opacity:0.0;'></td>" + "<td>" + "<iframe id='wikiIFrame' src='"+url+"' width="+wikiWidth+" height="+wikiHeight+"></iframe>" + "</td>" + "<td style='width:0px;background:black;opacity:0.0;'></td></tr>" + "<tr><td colspan=3 style='background:black;height:0px;opacity:0.0;'></td></tr>" + "</table>" ; correctWikiPosition(); iFrameDiv.style.display='block'; dunkel.style.display='block';}function startMapA(aid, did){ var div = document.getElementById(did); div.innerHTML="<iframe frameborder=0 src='"+BASE_DIR+"TravianTools2.php?m=embeddedMap&semb&said="+aid+"' width=470 height=359></iframe>";}function startMapS(uid, did){ var div = document.getElementById(did); div.innerHTML="<iframe frameborder=0 src='"+BASE_DIR+"TravianTools2.php?m=embeddedMap&semb&suid="+uid+"' width=470 height=359></iframe>";}function showGetterMapHelp(){Tip("<b>Die embedded GetterMap 2.1</b><br /><br />"+ "Diese Karte zeigt dir beliebige Markierungen in deiner Travianwelt an.<br />"+ "Gehe mit der <b>Maus</b> über einen Spieler, um seine Dörfer <i>aufblinken</i> zu sehen, mit dem "+ "<b>Häckchen</b> schaltest du seine Markierungen an/aus, und mit dem <b>Auge-Knopf</b> scrollt die "+ "Aussicht automatisch alle seine Dörfer ins Bild.<br />Du kannst die Karte durch Greifen und Ziehen verschieben, "+ "und mit dem Mausrad zoomen. Gehe mit der Maus über ein Dorf um genauere Infos zu diesem Dorf zu erhalten. ",WIDTH,300)}function initMakeH2Helper(){ try { var h2list = document.getElementsByTagName("h2"); var isFirst = true; if ( site_lang == "de" ) for (var j=0;j < h2list.length; j++) if (h2list[j].className.indexOf('noTrans') == -1 ) { var item = h2list[j]; var classClass = item.className; if (classClass != null) if (classClass.indexOf("nohelp")==-1) { var itemId = item.id; if (isFirst && ( itemId== null || itemId == "") ) { itemId = wikithema; } isFirst = false; if (wiki_helps[itemId]!=null) { item.style.position="relative"; var helpDiv = document.createElement("div"); helpDiv.style.cssText="position:absolute; right:"+(isMSIE?18:1)+"px; top:"+(isMSIE?4:3)+"px; height:26px; width: 26px; "; helpDiv.className="goldbut"; helpDiv.onmousedown=allowSelect; var nehme_wikithema = wiki_helps[itemId]; helpDiv.onmouseover=new Function("Tip('Hilfe zum Thema: \""+nehme_wikithema+"\"aufrufen.');"); helpDiv.onclick=new Function("openWiki('"+nehme_wikithema+"','"+item.innerHTML.replace(/<[^>]*>/g,"").replace(/'/g,"")+"');"); helpDiv.innerHTML="<img style='position:absolute;left:0;top:0;' src='"+BASE_DIR+"img/help_24."+(isMSIE?"gif":"png")+"' height='24' />"; if (! isMSIE && use_effekt ) { var shadowDiv = document.createElement("div"); shadowDiv.style.cssText="position:relative; left:0; top:0; "; shadowDiv.innerHTML= "<div style='position:absolute;left:2px;top:2px;'><span style='color:black;opacity:0.15;'>"+item.innerHTML.replace(/<[^>]*>/g,"")+"</span></div>" + "<div style='position:absolute;left:0px;top:0px;'><span style=''>"+item.innerHTML.replace(/<[^>]*>/g,"")+"</span></div>&nbsp;" ; item.innerHTML=""; item.appendChild(shadowDiv); } item.appendChild(helpDiv); } } } } catch(e) { } try { for (var j=0; j<20;j++) { var item = document.getElementById('wB'+j); if (item==null) break; var html = item.innerHTML; item.innerHTML= "<div class=shaderTextBack>"+html+"</div>" + "<div class=shaderText>"+html+"</div>"; } } catch(e) { } try { var h2list = document.getElementsByTagName("li"); if ( use_effekt ) for (var j=0;j < h2list.length; j++) if (h2list[j].className.indexOf("iM2top")>0) { if (! isMSIE) { var item = h2list[j].firstChild; var shadowDiv = document.createElement("div"); shadowDiv.style.cssText="position:relative; left:0; top:0; "; shadowDiv.innerHTML= "<div style='position:absolute;lef2t:1px;t2op:1px;width:100%;' class=shadow><span style='color:black;'>"+item.innerHTML+"</span></div>" + "<div style='position:absolute;left:0px;top:0px;width:100%;'><span >"+item.innerHTML+"</span></div>&nbsp;" ; item.innerHTML=""; item.appendChild(shadowDiv); } } } catch(e) { }} function initMake2HelperFirstMenuAufruf(){ var h2list = document.getElementsByTagName("li"); if ( use_effekt ) for (var j=0;j < h2list.length; j++) if (h2list[j].className.indexOf("el")>-1 && h2list[j].className.indexOf("iM2top")==-1 ) { if (! isMSIE) { var item = h2list[j].firstChild; var shadowDiv = document.createElement("div"); shadowDiv.style.cssText="position:relative; left:0; top:0; "; shadowDiv.innerHTML= "<div style='position:absolute;lef2t:1px;t2op:1px;width:100%;' class='shadow'><span style='color:black;'>"+item.innerHTML+"</span></div>" + "<div style='position:absolute;left:0px;top:0px;width:100%;'><span >"+item.innerHTML+"</span></div>&nbsp;" ; item.innerHTML=""; item.appendChild(shadowDiv); } }}function alertAdbl(){alert("Hallo G-Tool2.0 - Nutzer!\n\n" + "Du benutzt einen Werbe-Blocker. (z.B. Adblock)\n\n" + "Bitte helfe diese Seite zu unterstützen, indem du die Werbung auf dieser Seite nicht blockierst. " + "G-Tools2.0 ist kostenlos, der Server auf dem es läuft ist das aber nicht.\n\n" + "Bitte schalte deinen Werbeblocker für diese Seite aus (Bei Adblock ganz einfach: Rechtsklick unten rechts auf Adblock in der Statusleiste, und dort >Whitelist this whole site< wählen.) \n" + "");}var smsg=[ "G-Tools 2.0 wird gestartet", "<br />Welt wird geladen", ".", ".", ".", "<b>ok</b><br />Verbindung zur Datenbank hergestellt.", "<br />Interface wird aufgebaut", ".", ".", "<b>ok</b><br />Welt wird initialisiert", ".", "ok<br><font color=green><b>Fertig</b>.</font>", "" ];function startStartUp(){ document.body.style.overflow="hidden"; if(typeof isMSIE != "undefined" && isMSIE) document.body.style.height="100%"; startUp(0);}function startUp(step){ if (smsg[step]==null) { var startUp = document.getElementById('startUp'); startUp.style.display="none"; document.body.style.overflow=""; return; } var startUpLog = document.getElementById('startUpLog'); var startUpPrg = document.getElementById('startUpPrg'); startUpLog.innerHTML +=smsg[step]; startUpPrg.innerHTML +="<div style='width:8px;height:8px;border:1px outset green;background:green;float:left;margin-right:4px;'></div>"; step++; setTimeout("startUp("+step+");",250);}var closeTimeout=null;function oNavi(ele, parents){ if (closeTimeout!=null) closeAll(); clearTimeout(closeTimeout); ele.className+=' el_hover'; if (parents!=null ) { if (parents>=1) ele.parentNode.parentNode.className='el el_hover'; if (parents>=2) ele.parentNode.parentNode.parentNode.parentNode.className='el el_hover';}}var firstMenuAufruf = true; function lNavi(ele){ if (firstMenuAufruf) { firstMenuAufruf = false; initMake2HelperFirstMenuAufruf(); } clearTimeout(closeTimeout); closeTimeout=setTimeout('closeAll();',500);}function closeAll(){ clearTimeout(closeTimeout); closeTimeout=null; var all=document.getElementsByTagName('li'); for (var i=0; i < all.length;i++) all[i].className=all[i].className.replace(/ ?el_hover ?/g,' '); }function writeZitat(){ var sprueche = [ "GT2 - Dann klappts auch mit dem Nachbarn!", "Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, aber bei dem Universum bin ich mir noch nicht ganz sicher.", "Phantasie ist wichtiger als Wissen, denn Wissen ist begrenzt.", "Probleme kann man niemals mit derselben Denkweise lösen, durch die sie entstanden sind.", "Das, wobei unsere Berechnungen versagen, nennen wir Zufall.", "Ich denke niemals an die Zukunft. Sie kommt früh genug.", "Zeit ist das, was man an der Uhr abliest.", "Gott würfelt nicht.", "Wenn 50 Millionen Menschen etwas Dummes sagen, bleibt es trotzdem eine Dummheit.", "Die Freiheit ist ein Luxus, den sich nicht jedermann gestatten kann.", "Was man mit Gewalt gewinnt, kann man nur mit Gewalt behalten.", "Der Klügere gibt nach! Eine traurige Wahrheit, sie begründet die Weltherrschaft der Dummheit.", "Nichtstun macht nur dann Spaß, wenn man eigentlich viel zu tun hätte.", "Vegetarier: Essen meinem Essen das Essen weg!", "Ihr aber seht und sagt: Warum? Aber ich träume und sage: Warum nicht?", "Dummheit ist auch eine natürliche Begabung.", "Die beste und sicherste Tarnung ist immer noch die blanke und nackte Wahrheit. Die glaubt niemand!", "Wer die Freiheit aufgibt, um Sicherheit zu gewinnen, wird am Ende beides verlieren.", "Um sicher Recht zu tun, braucht man sehr wenig vom Recht zu wissen. Allein um sicher Unrecht zu tun, muß man die Rechte studiert haben.", "Die meisten Menschen sind so glücklich, wie sie es sich selbst vorgenommen haben.", "Das Ganze ist mehr als die Summe seiner Teile.", "" ]; var rand = Math.round( Math.random() * ((sprueche.length)-1) ); document.write( "<div style='position:absolute;top:1px;left:1px;width:100%;color:black;'>"+sprueche [ rand ]+"</div>" + "<div style='position:relative;top:0px;left:0px;width:100%;'>"+sprueche [ rand ]+"</div>" );}function initAdBlckDetect(){ setTimeout('check_ads()', 4000);}onBodyLoad[onBodyLoad.length] = initAdBlckDetect;function check_ads() { var blocked = false; var e = document.getElementsByTagName("iframe"); for (var i = 0; i < e.length; i++) if ((e[i].src.indexOf("googlesyndication.com") > -1) && (e[i].setAttribute && (e[i].style.visibility == "hidden" || e[i].style.display == "none"))) blocked = true; if ((e.length == 0) || blocked){ var s = "Message displayed when ads are being blocked"; var newDiv = document.createElement("div"); var adsDiv =document.getElementById('adsDiv'); if (adsDiv != null) { var text = "<span style='font-size:16px;font-weight:bold;'><span style='font-size:20px'>Du benutzt einen Werbe-Blocker. (z.B. Adblock)</span><br />" + "Die Programmierung und Bereitstellung der G-Tools 2.0 kostet viel Aufwand, Mühe und verursacht Server-Kosten. " + "<br />Unterstütze die frei zugänglichen und kostenlosen Tools, indem du deinen Werbeblocker für diese Webseite deaktivierst. " + "</span>"; if (site_lang!='de') text="<span style='font-size:16px;font-weight:bold;'><span style='font-size:20px'>You are using an Adblocker.</span><br />" + "You can use this website for free. But the website's server and maintenance cost us money!<br />So be fair, deactivate the adblocker, so that this website can remain free in the future." + "</span>"; newDiv.innerHTML= "<div style='text-align:center;z-index:0;position:absolute;top:4px;left:1px;width:100%;color:white'>" + text + "</div>" + "<div style='text-align:center;z-index:0;position:absolute;top:3px;left:0;width:100%;color:red;'>" + text + "</div>" ; newDiv.style.zIndex="0"; adsDiv.appendChild(newDiv); } }}function showTipSpan(element,width){ if (width == null) width = 300; var text = ""; for (var i = 0; i < element.childNodes.length;i++) if (element.childNodes[i].className=='htip') text = element.childNodes[i].innerHTML; Tip(text, WIDTH, width);} var tabData=[]; function preserveTableSort(id) { var tab = document.getElementById(id); var tabBody = tab.childNodes[0]; var rows = tabBody.childNodes.length; var rowsData = []; var row =tabBody.childNodes[ 0 ]; var row2 =tabBody.childNodes[ 1 ]; var row2colsInnerText = []; if (row2!=null) { var cols = row2.childNodes.length; for ( var j=0;j < cols; j++) { var cell = row2.childNodes[ j ]; if (cell != null && cell.tagName!=null && cell.tagName.toLowerCase()=="td") row2colsInnerText[row2colsInnerText.length] = cell.innerHTML.replace(/<[^>]*>/g,""); } } var cols = row.childNodes.length; j_with_colspan=0; for (var j=0; j < cols; j++) { var cell = row.childNodes[j]; if (cell != null && cell.tagName!=null && cell.tagName.toLowerCase()=="td") { var innerText = cell.innerHTML.replace(/<[^>]*>/g,""); var colspan = cell.getAttribute('colspan'); if (colspan == null || ! isFinite(colspan)) colspan=1; var defaultFirstSortDirDesc = false; try { if ( row2colsInnerText [ j_with_colspan ] != null && isFinite (row2colsInnerText [ j_with_colspan ] ) ) defaultFirstSortDirDesc = true; } catch (e) {} cell.className+=" linkStyle"; cell.onclick=new Function("initTableSort(\""+id+"\","+j_with_colspan+","+(!defaultFirstSortDirDesc)+");"); if (colspan>1) j_with_colspan+=colspan-1; } j_with_colspan++; } } function initTableSort(id, firstSortCol, firstSortAsc) { try { var tab = document.getElementById(id); var tabBody = tab.getElementsByTagName("tbody")[0]; var rows = tabBody.childNodes.length; var rowsData = []; if (rows ==0) return; for (var i =0; i < rows;i++) { var row = tabBody.getElementsByTagName("tr")[i]; if (row != null && row.tagName!=null && row.tagName.toLowerCase()=="tr") { var cols = row.getElementsByTagName("td").length; var rowData=[]; for (var j=0; j < cols; j++) { var cell = row.childNodes[j]; var cell = row.getElementsByTagName("td")[j]; var tdClass= cell.className; if (cell != null && cell.tagName!=null && cell.tagName.toLowerCase()=="td") { var innerText = cell.innerHTML.replace(/<[^>]*>/g,""); var tdWidth = cell.width; var tdAlign = cell.align; var colspan = cell.getAttribute('colspan'); if (colspan == null || ! isFinite(colspan)) colspan=1; var sortableEntry = innerText; if (cell.className.indexOf("sort")>=0) { var regex = new RegExp("sort([0-9\-]+)"); var match = regex.exec(cell.className); if (match!=null) sortableEntry = match[1]; } if (isFinite(sortableEntry.replace(/[.,%\(\)+]/g,"")) && sortableEntry != "") { sortableEntry = sortableEntry.replace(/[.,%\(\)+]/g,"") * 1;} else if (isFinite(sortableEntry.replace(/[%]/,"")) && sortableEntry != "") { sortableEntry = sortableEntry.replace(/[%]/,"") * 1;} else if (isFinite(sortableEntry) && sortableEntry !== ""&& sortableEntry !== null) sortableEntry = sortableEntry * 1; else sortableEntry = sortableEntry.toLowerCase(); if (i==0) sortableEntry="HEAD"; eingetragenerColspan = colspan; for (var t=0; t < colspan; t++) { rowData[rowData.length]=[ cell.innerHTML , sortableEntry , tdClass , tdWidth , tdAlign , eingetragenerColspan ]; eingetragenerColspan=0; } } } var trStyle = row.style; var trClass = row.className; var trOnMouseOver = row.getAttribute('onmouseover'); var trOnMouseOut = row.getAttribute('onmouseout'); rowsData[rowsData.length]=[rowData,trClass,trStyle, trOnMouseOver, trOnMouseOut]; } } var tableStyle = tab.style.cssText; var tableClass = tab.className; var tableCellspacing = tab.getAttribute('cellspacing'); var tableCellpadding = tab.getAttribute('cellpadding'); tabData[id]=[rowsData,tableClass,tableStyle, tableCellspacing, tableCellpadding,null,null]; drawTable(id); if (firstSortCol!=null) sortTable(id, firstSortCol, firstSortAsc); }catch (e) { scriptErrors[0] = "Tabellenfunktionsfehler.Err.1. Die Sortierung ist dadurch nicht möglich.."; } } var sortCol = 0; var sortAsc = false; function sortTableComperator(a,b) { if (a[0][sortCol][1] == "HEAD") return -1; if (b[0][sortCol][1] == "HEAD") return 1; if (a[0][sortCol][1] > b[0][sortCol][1]) return (sortAsc?1:-1); if (a[0][sortCol][1] < b[0][sortCol][1]) return (sortAsc?-1:1); return 0; } function sortTable(id,col,asc) { try { var curTabData =tabData[id]; var rowsData = curTabData[0]; sortCol = col; sortAsc = asc; curTabData[5] = sortCol; curTabData[6] = sortAsc; }catch (e) { scriptErrors[0] = "Tabellenfunktionsfehler.Err.2.0. Die Sortierung ist dadurch nicht möglich.."; } try { rowsData.sort( sortTableComperator ); }catch (e) { scriptErrors[0] = "Tabellenfunktionsfehler.Err.2.1. Die Sortierung ist dadurch nicht möglich.."+e; } try { drawTable(id); }catch (e) { scriptErrors[0] = "Tabellenfunktionsfehler.Err.2.2. Die Sortierung ist dadurch nicht möglich.."; } } function drawTable(id) { try { var curTabData =tabData[id]; var rowsData = curTabData[0]; var rowsDataLength = rowsData.length; var tableClass = curTabData[1]; var tableStyle = curTabData[2]; var tableCellspacing = curTabData[3]; var tableCellpadding = curTabData[4]; var html =""; for (var i=0; i < rowsDataLength;i++) { var rowData = rowsData[i][0]; var rowDataLength = rowData.length; var trClass = rowsData[i][1]; var trStyle = rowsData[i][2]; var trOnMouseOver = rowsData[i][3]; var trOnMouseOut = rowsData[i][4]; if (trClass=="it1" || trClass=="it2") { trClass = (i%2==0?"it2":"it1"); } var mouseAction=""; if (i>0) mouseAction = "onmouseover='this.style.background=\"#EEE\";' onmouseout='this.style.background=\"\";'"; if (trOnMouseOver!= null && trOnMouseOver != "") mouseAction = "onmouseover='"+trOnMouseOver+"' onmouseout='"+trOnMouseOut+"' "; html+="<tr class='"+trClass+"' " +mouseAction +">"; for (var j=0; j < rowDataLength;j++) { var cellInnerHTML = rowData[j][0]; var cellSortText = rowData[j][1]; var cellClass = rowData[j][2]; var tdWidth = rowData[j][3]; var tdAlign = rowData[j][4]; var colspan = rowData[j][5]; var inner = cellInnerHTML; if (i==0) { var isCurSortedCol = curTabData[5]==j; var isSortetDesc = curTabData[5]==j&&curTabData[6]!=false; var defaultFirstSortDirDesc = false; if (curTabData[0][1]!=null && isFinite ( (curTabData[0][1][0][j][1]+"").replace(/[.,%\(\)+]/g,"") ) && curTabData[0][1][0][j][1] !== "" && curTabData[0][1][0][j][1] !== null) defaultFirstSortDirDesc = true; if (defaultFirstSortDirDesc && curTabData[5]!=j) isSortetDesc= true; inner = "<a onclick='sortTable(\""+id+"\","+j+","+(isSortetDesc?"false":"true")+");'>"+inner+""+(isCurSortedCol?(isSortetDesc?"&darr;":"&uarr;"):"&nbsp;&nbsp;")+"</a>"; } html+="<td class='"+cellClass+"' "+(tdWidth!=""?"width='"+tdWidth+"'":"")+" "+(tdAlign!=""?"align='"+tdAlign+"'":"")+" "+(colspan>1?"colspan='"+colspan+"'":"")+">"+inner+"</td>"; if (colspan>1) j+=colspan-1; } html+="</tr>"; } try { var tableDiv =document.getElementById(id+"Div"); if (tableDiv) tableDiv.innerHTML = "<table id='"+id+"' " + (curTabData[1]!=""?"class='"+curTabData[1]+"' ":"") + (curTabData[2]!=""?"style='"+curTabData[2]+"' ":"") + (curTabData[3]!=""?"cellspacing='"+curTabData[3]+"' ":"") + (curTabData[4]!=""?"cellpadding='"+curTabData[4]+"' ":"") + " >"+html+"</table>"; else document.getElementById(id).innerHTML = html; } catch (e) { if ( ! isMSIE) scriptErrors[0] = "Tabellenfunktionsfehler.Err.4 (ie). Die Sortierung ist dadurch nicht möglich.."; } }catch (e) { scriptErrors[0] = "Tabellenfunktionsfehler.Err.3. Die Sortierung ist dadurch nicht möglich.."; } } var selectAllowed=false;var pressedA = null;function onmousedownHandler(event){ if (! noSelectInited) return ; var tag = event.target.tagName; var tagParent=null; if (event.target.parentNode != null) tagParent = event.target.parentNode.tagName; tag = tag.toLowerCase(); if ( tagParent!=null) tagParent= tagParent.toLowerCase(); else tagParent=""; if ( tag=="input" ) selectAllowed=true; if ( tag=="textarea" ) selectAllowed=true; if ( tag=="iframe" ) selectAllowed=true; if ( tag=="select" ) selectAllowed=true; if ( tag=="a" ) { pressedA = event.target; Element.addClassName(pressedA, "pressed"); } if ( tagParent=="a" ) { pressedA = event.target.parentNode; Element.addClassName(pressedA, "pressed"); } if ( tag=="option" )selectAllowed=true; if (! selectAllowed) { dummyButton.focus(); } if (selectAllowed) {selectAllowed=false;return true;} else return false;}function onmouseupHandler() { if (pressedA !== null ) { Element.removeClassName(pressedA, "pressed"); pressedA = null; } }onmousedown = onmousedownHandler; onmouseup = onmouseupHandler;function allowSelect() { selectAllowed=true; } var dummyButton=null; var noSelectInited = false; function initNoSelect() { document.write("<input style='display:none' id='dummyButton' />"); dummyButton = document.getElementById('dummyButton'); noSelectInited = true; } function zdInsert(fx,fy,tx,ty,sp,dt){ var pst = "izd=1&fx="+fx+"&fy="+fy+"&tx="+tx+"&ty="+ty+"&sp="+sp+"&dt="+dt+"&"+sectok; new Ajax.Request(zdurl, {method:'post', postBody:pst });} var dunkelabDivs = null; function closeDunkelab() { if ( dunkelabDivs != null) for (var i = 0; i < dunkelabDivs.length;i++) Element.remove( dunkelabDivs[i]) ; dunkelabDivs = null; }function dunkelab( divid ){ var div = $(divid); var pos = Element.cumulativeOffset(div); if (preDunkelAbShadowDiv !=null) { if (preDunkelAbShadowDiv) Element.remove( preDunkelAbShadowDiv ); if (preDunkelAbShadowDivAni) Element.remove( preDunkelAbShadowDivAni ); preDunkelAbShadowDiv = null; preDunkelAbShadowDivAni = null; } var divCopy = document.createElement("div"); divCopy.innerHTML = div.innerHTML; divCopy.style.cssText = div.style.cssText; var shadowDiv = document.createElement("div"); shadowDiv.style.cssText="position:absolute;left:0;top:0;width:100%;height:1000px;background:black;z-index:100;"; if (isMSIE) shadowDiv.style.filter="Alpha(opacity=50)"; else shadowDiv.style.opacity="0.5"; divCopy.style.zIndex="101"; divCopy.style.position="absolute"; divCopy.style.left = pos[0]+"px"; divCopy.style.top = pos[1]+"px"; divCopy.style.margin = "0"; div.style.display="none"; divCopy.style.display="block"; var closerDiv = document.createElement("div"); closerDiv.style.cssText="position:absolute;right:1px;top:1px;cursor:pointer;"; closerDiv.innerHTML="<img src='"+BASE_DIR+"img/close.png' />"; shadowDiv.onclick = closeDunkelab; closerDiv.onclick = closeDunkelab; divCopy.appendChild(closerDiv); document.body.appendChild(shadowDiv); document.body.appendChild(divCopy); dunkelabDivs = [ shadowDiv, divCopy ];}var preDunkelAbShadowDiv = null;function preDunkelAb(){ preDunkelAbShadowDiv = document.createElement("div"); preDunkelAbShadowDivAni = document.createElement("div"); preDunkelAbShadowDiv.style.cssText="position:absolute;left:0;top:0;width:100%;height:1000px;background:black;z-index:100;"; preDunkelAbShadowDivAni.style.cssText="position:absolute;left:0;top:0;width:100%;height:1000px;z-index:101;"; if (isMSIE) preDunkelAbShadowDiv.style.filter="Alpha(opacity=50)"; else preDunkelAbShadowDiv.style.opacity="0.5"; document.body.appendChild(preDunkelAbShadowDiv); document.body.appendChild(preDunkelAbShadowDivAni); preDunkelAbAnimation(1);}var antiFloodServer = 0;var sessionTimeout=1000*(60*60*4.0 + antiFloodServer);function refreshSessionCookie(){ var noticeDiv = document.createElement("div"); noticeDiv.id = "sessionTimeoutID"; noticeDiv.style.cssText="top:200px;left:50%;position:absolute;margin-left:-150px;width:300px;hei2ght:200px;background:#EEE;border:1px outset #EEE;"; var title = "Sicherheitshinweis"; var text = "Die Gültigkeit der aktuellen Seite läuft in wenigen Minuten ab. " + "<br />Aus Sicherheitsgründen sind geschützte Seiten und Formulare nur eine begrenzte Zeit lang gültig.<br /><br />Zum Erneuern der Session einfach Seite neuladen."; var reloadText = "Ok - Neuladen"; var closeText = "Ignorieren"; if (site_lang!='de') { title = "Security notice"; text = "Page session expires in a few minutes.<br />For security all forms and sites expires after a few hours.<br /><br />To renew your session just reload."; reloadText = "OK - reload"; closeText = "Ignore"; } noticeDiv.innerHTML="<div style='font-size:18px;font-weight:bold;color:white;background:blue;padding:6px;text-align:center;'>"+title+"</div>" +"<div style='padding:8px;'>"+text + "<br />" + "<input onclick='location.href=location.href+\"\"' style='padding:3px 10px;margin:8px;' type='submit' value='"+reloadText+"' />" + "<input onclick='closeDunkelab();' style='padding:3px 10px;margin:8px;' type='submit' value='"+closeText+"' />" +"</div>" ; document.body.appendChild(noticeDiv); setTimeout('dunkelab( "sessionTimeoutID" );',100);}if (typeof sessionTimeoutable != "undefined")if(sessionTimeoutable) setTimeout("refreshSessionCookie();",sessionTimeout);function preDunkelAbAnimation( step ){ if ( preDunkelAbShadowDivAni == null) return; var html = ""; var flot = "left"; var max_steps = 25; var cur_steps = step; if (step>max_steps) { flot="right"; cur_steps = max_steps*2-step; } if (cur_steps == 0) cur_steps = 1; for (var i=0; i < cur_steps; i++) html+="<div style='float:"+flot+";width:8px;height:18px;border:1px outset green;background:green;margin:1px;'></div>"; html = "<div style='position:absolute;left:60%;top:240px;margin-left:-200px;width:300px;padding:2px;hei2ght:20px;" + "border:1px outset #DDD;background:#DDD;'>"+html+"</div>"; preDunkelAbShadowDivAni.innerHTML = html; step = step%(max_steps*2); step++; setTimeout("preDunkelAbAnimation("+(step)+");",60);}function openWorldChooser(){ openWorldChooserAjax();} function openWorldChooserAjaxSuccess( t ) { $("weltWechselDivInner").innerHTML = t.responseText; openWorldChooserAjaxShow(); } function openWorldChooserAjaxShow() { $("weltWechselDiv").style.display="block"; dunkelab("weltWechselDiv"); } var weltWechselLoaded = false;function openWorldChooserAjax( ){ var url = wwurl; var mode = wwmode; document.documentElement.scrollTop = 0; var pst ='mode='+mode+"&"+sectok; if ( ! weltWechselLoaded) { preDunkelAb();new Ajax.Request(url, {method:'post',postBody: pst, onSuccess: openWorldChooserAjaxSuccess }); } else openWorldChooserAjaxShow(); weltWechselLoaded = true; } function secViolation(){ var text = ""; if (site_lang=="de") text = "Sicherheitsprotokoll\n\n" + "Die Gültigkeit der aktuellen Seite ist abgelaufen. Die letzte Aktion wurde daher nicht ausgeführt. Lade die Seite neu und versuche es nocheinmal." + "\n\nDrücke OK um die Seite neuzuladen"; else text = "Security protocol\n\n" + "Your Page-Session has expired. Your last action was dropped. Please reload the page and try again. " + "\n\nPress OK to reload the Page"; if (confirm(text)) location.href = location.href+""; } function getTZOffset(d,m){ var dat = new Date(); dat.setDate(d); dat.setMonth( m ); dat.setFullYear(2009); dat.setHours( 12 ); dat.setMinutes(0); dat.setSeconds(0); dat.setMilliseconds(0); return dat.getTimezoneOffset();}function check_timezone(diff_jan,diff_jun){ if ( diff_jan != getTZOffset(1,0) || diff_jun != getTZOffset(1,5)) { detect_timezone(); }}function detect_timezone(){ var pst="checkTimeZones=1"; for (var d=1;d <= 28;d++) for (var m=0; m < 12; m++) { pst+="&mons["+m+"]["+d+"]=" + getTZOffset(d,m); } new Ajax.Request(location.href+'',{method:'post', postBody: pst});}function saveScrollAndSubmit( id ){ var form = $(id); var inp = document.createElement("input"); inp.type="hidden"; inp.name="scrollToY"; inp.value=document.documentElement.scrollTop; form.appendChild(inp); setTimeout("$('"+id+"').submit();",10);}function dge(id){ return document.getElementById(id);}function toggleDisplay( id ){ var obj = dge(id); if ( ! obj ) return; if ( obj.style.display == "block" ) obj.style.display = "none"; else obj.style.display = "block";}function setDisplay( id, onoff){ var obj = dge(id); if ( ! obj ) return; if ( ! onoff ) obj.style.display = "none"; else obj.style.display = "block";}} catch (e) { alert("Warnung! Fehler im Seiten-Script"); }