/**
*  Skript Drg
*
*  Copyright (c) TheGetter 2012
*  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: 22.02.2012 17:44:52
*  Checksum: a4f0ea0ff915c5edf66f5ce64db42c2b
*/

try {var 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 = ""; dge(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 (dge(inputID)) dge(inputID).value=gal+"|"+x+"|"+y+"|"+pla; if (dge(inputID+"X")) dge(inputID+"X").value=x; if (dge(inputID+"Y")) dge(inputID+"Y").value=y; if (dge(inputID+"G")) dge(inputID+"G").value=gal; if (dge(inputID+"P")) dge(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 (dge(inputID)) dge(inputID).value=x+"|"+y; if (dge(inputID+"X")) dge(inputID+"X").value=x; if (dge(inputID+"Y")) dge(inputID+"Y").value=y; if (tp_inputID!="") dge(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; var travLinkHref = TRAVIAN_SERVER+"/karte.php?z="+getTravKoords(x,y); if ( TRAVIAN_V4 ) travLinkHref = TRAVIAN_SERVER+"/karte.php?x="+x+"&amp;y="+y; 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='"+travLinkHref+"' 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(data){}function setAttOkX(id, stat){ var url = "TravianTools2.php?m=groups&gid="+GID; var pst = "action="+stat+"&id="+id+"&"+sectok; $.post(url, pst, setAttOkXRequest); }function saveAlarmMins(val){ var url = "TravianTools2.php?m=groups"; var pst = "action=option_alarm_mins&alarm_mins="+val+"&"+sectok; $.post(url, pst, setAttOkXRequest);}function switchAlarmActive(){ var url = "TravianTools2.php?m=groups"; var pst = ""; alarmIsOn = dge('alarm_options').style.display == "none"; dge('alarm_options').style.display = alarmIsOn ? "block" : "none"; pst = "action=option_alarm_" + ( alarmIsOn ? "on" : "off"); dge('alarmSwitchBut_on').style.display = alarmIsOn ? "none" : "block"; dge('alarmSwitchBut_off').style.display = alarmIsOn ? "block" : "none"; pst+= "&"+sectok; $.post(url, pst, setAttOkXRequest);}var ShoutBox = { updateFailedFallBackTime : 60 * 60, updateTimerId : 0, refreshButtonOriginal : null, timerStep : 5, updateTime : 0, hasShoutedAndShouldFocus : false, shoutUpdateIn : null, latestTimeUNIX : -1, init : function() { try { if (dge('shoutRefreshBut') == null) return; ShoutBox.refreshButtonOriginal = dge('shoutRefreshBut').innerHTML; if (ShoutBox.updateTime == null) ShoutBox.updateTime = ShoutBox.updateFailedFallBackTime; if (ShoutBox.shoutUpdateIn == null) ShoutBox.shoutUpdateIn = ShoutBox.updateTime; ShoutBox.updateTimer(); if (dge("shoutInput")) dge("shoutInput").setAttribute("autocomplete", "off"); } catch (e) { alert("Fehler im Schreikasten"); } }, openSmileBox : function() { dge("shoutSmileBox").style.display = dge("shoutSmileBox").style.display != "block" ? "block" : "none"; }, addShoutIcon : function(iconText) { dge('shoutInput').value += iconText; dge("shoutSmileBox").style.display = "none"; dge('shoutInput').focus(); }, addShout : function() { dge('shoutRefreshBut').innerHTML = "Lade ... "; url = "TravianTools2.php?m=groups&gid=" + GID; var text = dge('shoutInput').value; if (!text) return false; dge('shoutInput').value = ""; ShoutBox.hasShoutedAndShouldFocus = true; var pst = "action=addshout&text=" + encodeURIComponent(text) + "&" + sectok; $.post(url, pst, ShoutBox.updateShoutRequest); }, updateTimer : function() { clearTimeout(ShoutBox.updateTimerId); ShoutBox.shoutUpdateIn -= ShoutBox.timerStep; var timetext = ShoutBox.shoutUpdateIn > 60 ? Math.ceil(ShoutBox.shoutUpdateIn / 60) + "m" : ShoutBox.shoutUpdateIn + "s"; dge('shoutRefreshBut').innerHTML = ShoutBox.refreshButtonOriginal + " <span style='color:#555' onmouseover='Tip(\"Shout-Box wird automatisch aktualisiert in " + timetext + ".\");'>(" + timetext + ")</span>"; if ( ShoutBox.shoutUpdateIn <= 0) { ShoutBox.updateShout(); ShoutBox.shoutUpdateIn = ShoutBox.updateTime; } else ShoutBox.updateTimerId = setTimeout("ShoutBox.updateTimer();", 1000 * ShoutBox.timerStep); }, shoutBoxSize : function (size) { dge('shout').className = "shoutBox " + (size == 0 ? "shoutBoxSizeNorm" : "shoutBoxSizeBig"); dge('shoutLinkBigger').style.display = size == 0 ? 'inline' : "none"; dge('shoutLinkSmaller').style.display = size == 0 ? 'none' : "inline"; ShoutBox.updateShoutScroll(); }, updateShout : function () { dge('shoutRefreshBut').innerHTML = (site_lang == "de" ? "Lade ... " : "..."); var url = "TravianTools2.php?m=groups&gid=" + GID + "&getShoutBox&second=2"; var method = 'POST'; var pst = "myStandTime=" + ShoutBox.latestTimeUNIX + "&" + sectok; $.post(url, pst, ShoutBox.updateShoutRequest); ShoutBox.shoutUpdateIn = ShoutBox.updateTime; clearTimeout(ShoutBox.updateTimerId); }, updateShoutScroll : function () { var objDiv = dge("shoutText"); objDiv.scrollTop = isMSIE ? 10000 : objDiv.scrollHeight; }, updateShoutRequest : function(shoutHTML) { shoutHTML = shoutHTML.replace(/<span class='weg'>[^<>]+<\/span>/g, ""); var n = 0; while (erg = shoutHTML.match(/<TIME (\d+) (\d)>/)) { var time = erg[1] * 1; var time_model = erg[2] * 1; var date = new Date(); time += TIME_OFFSET * 1; time -= -date.getTimezoneOffset() * 60; date.setTime(time * 1000); var hours = date.getHours(); var minutes = date.getMinutes(); if (minutes < 10) minutes = "0" + minutes; var hours_ampm = hours; if (hours_ampm > 12) hours_ampm -= 12; var ampm = "am"; if (hours >= 12) ampm = "pm"; if (hours == 0 ) hours_ampm = 12; var time_str = TIME_TIME_HOURS_MINS .replace(/G/,hours) .replace(/g/,hours_ampm) .replace(/a/,ampm) .replace(/i/i,minutes) ; var month = date.getMonth()+1; if ( month < 10 ) month = "0"+month; var time_str2 = TIME_DATE_SHORT .replace(/j/,date.getDate() ) .replace(/d/,date.getDate()<10?"0"+date.getDate():date.getDate() ) .replace(/[m]/i,month) .replace(/[Y]/,date.getFullYear()) .replace(/[y]/,(date.getFullYear()+"").replace(/20/,"")) ; if (time_model != 1) time_str = time_str2 + " - " + time_str; shoutHTML = shoutHTML.replace(erg[0], time_str); n++; if (n > 10000) break; } if (shoutHTML.indexOf('##X##') >= 0) { var pos = shoutHTML.indexOf('##X##'); ShoutBox.shoutUpdateIn = parseInt(shoutHTML.substring(0, pos)); shoutHTML = shoutHTML.substring(pos + 5); } if (!isFinite(ShoutBox.shoutUpdateIn)) ShoutBox.shoutUpdateIn = ShoutBox.updateFailedFallBackTime; else if (ShoutBox.shoutUpdateIn <= 0) ShoutBox.shoutUpdateIn = ShoutBox.updateFailedFallBackTime; else if (ShoutBox.shoutUpdateIn < 10) ShoutBox.shoutUpdateIn = 10; if (shoutHTML.indexOf('##X##') >= 0) { var pos = shoutHTML.indexOf('##X##'); var newOnlineList = shoutHTML.substring(0, pos); shoutHTML = shoutHTML.substring(pos + 5); if (dge('shoutBoxOnlineList')) dge('shoutBoxOnlineList').innerHTML = newOnlineList; } if (shoutHTML.indexOf('##X##') >= 0) { var pos = shoutHTML.indexOf('##X##'); ShoutBox.latestTimeUNIX = parseInt(shoutHTML.substring(0, pos)); shoutHTML = shoutHTML.substring(pos + 5); } if (shoutHTML != "NO_UPDATE") dge('shoutText').innerHTML = shoutHTML; var scroller = dge('scroller'); ShoutBox.updateTimer(); setTimeout("ShoutBox.updateShoutScroll();", 1); if (ShoutBox.hasShoutedAndShouldFocus) { dge('shoutInput').focus(); ShoutBox.hasShoutedAndShouldFocus = false; } }};onBodyLoad[onBodyLoad.length] = ShoutBox.init;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 tblCache = [];function ldTbl(id, pos, howMany){ if (pos < 0) return; if (tblCache[id+"_"+pos] != null) return dge(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; $.post(url, pst, function(data){tblCache[id+"_"+pos]=data;dge(id).innerHTML=data;});}var al = false;var fades = new Array();function betrag(z){ return z >= 0 ? z : -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)+")"; fades[i].style.display = isMSIE && op==0 ? 'none' : '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 = dge(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; dge('fade'+i)!=null;i++) fades[i] = dge('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 = dge('wikiIFrame'); var url = wikiIFrame.src; try { url = wikiIFrame.contentDocument.location.href; } catch (e) { } window.open(url); closeWiki();}function closeWiki(){ $(iFrameDiv).remove(); $(dunkel).remove(); $(shadow).remove(); $(shadow2).remove(); iFrameDiv = null; dunkel = null; shadow = null; 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 = dge('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 = dge(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 = dge(did); div.innerHTML="<iframe frameborder=0 src='" +BASE_DIR+"TravianTools2.php?m=embeddedMap&semb&suid="+uid+"' width=470 height=359></iframe>";}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"; 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' />"; item.appendChild(helpDiv); } } } } catch(e) { }}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; 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 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 = dge(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; var 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 = dge(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) && sortableEntry !== ""&& sortableEntry !== null) sortableEntry = sortableEntry * 1; else if ( sortableEntry == "-" ) sortableEntry = 0; 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 =dge(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 dge(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.."; }}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; $.post(zdurl,pst);}var dunkelabDivs = null;function closeDunkelab(){ if ( dunkelabDivs != null) for (var i = 0; i < dunkelabDivs.length;i++) $( dunkelabDivs[i]).remove() ; dunkelabDivs = null;}function dunkelab( divid ){ var div = dge(divid); var jpos = $(div).offset(); var pos = [jpos.left,jpos.top]; if (preDunkelAbShadowDiv !=null) { if (preDunkelAbShadowDiv) $( preDunkelAbShadowDiv ).remove(); if (preDunkelAbShadowDivAni) $( preDunkelAbShadowDivAni ).remove(); 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( data ){ dge("weltWechselDivInner").innerHTML = data; setTimeout('dge("worldQuickSuche2").select();',1000); openWorldChooserAjaxShow();}function openWorldChooserAjaxShow(){ dge("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(); $.post(url,pst,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); $.post(location.href+'', pst );} function saveScrollAndSubmit( id ){ var form = dge(id); var inp = document.createElement("input"); inp.type="hidden"; inp.name="scrollToY"; inp.value=document.documentElement.scrollTop; form.appendChild(inp); setTimeout("dge('"+id+"').submit();",10);}function dge(id){ return document.getElementById(id);}function toggleDisplay( id ){ var obj = dge(id); if ( obj ) obj.style.display = obj.style.display == "block"?"none":"block";}function setDisplay( id, onoff){ var obj = dge(id); if ( ! obj ) return; obj.style.display = onoff?"block":"none";}function submitPost( dataArr, url ){ if ( ! url ) url = ""; var form = null; if ( dge("genform") ) form = dge("genform"); else { form = document.createElement("form"); form.method = "post"; } form.action = url ; for ( var i = 0; i < dataArr.length; i++) { var inp = document.createElement("input"); inp.type = "hidden"; inp.name = dataArr[i][0]; inp.value = dataArr[i][1]; form.appendChild( inp ); } document.body.appendChild( form ); form.submit();}function starFilter(postId, val){ if ( ! postId ) postId = ""; $("#archivWorlds"+postId).show(); $("#archiWorldsA"+postId).hide(); if ( val === null ) val = ($("#worldQuickSuche"+postId)[0].value+"").toLowerCase(); var found = 0; $("#worldTable"+postId+" span.nowrap").each( function(i,e){ if ( e.innerHTML.replace(/<[^>]+>/g,"").toLowerCase().indexOf(val)== -1 ) $(e).hide().removeClass("match"); else {found++;$(e).show().addClass("match");} }); if ( ! found ) $("#worldQuickSuche"+postId).addClass("error"); else $("#worldQuickSuche"+postId).removeClass("error"); $("#worldTable"+postId+" tr .nowrap").parents("tr").hide(); $("#worldTable"+postId+" tr .nowrap").filter(".match").parents("tr").show();}function getArrJSON(data){ var vals = []; for ( var j=0; j < data.length; j++) { var val = data[j]; if ( typeof val == "object" ) val = getArrJSON(val); else if ( typeof val == "string" ) val = "\"" + val.replace("\n","\\n").replace("\"","").replace("'","") + "\""; else if ( typeof val == "number" ); else if ( typeof val == "boolean" ) val=val?"true":"false"; else return alert("Unknown type: " + typeof val); vals.push(val); } return "["+vals.join(",")+"]";}var Ajax = {Request : function(url, data, func){ var arr = {}; $.post(url,data.postBody); }};} catch (e) { alert("Warnung! Fehler im Seiten-Script"); }
