var formErrors=new Array();var popuperror="Ein Fenster wurde geblockt!\n\nDas Spiel wollte ein Fenster ffnen, \ndas Fenster wurde von deinem Popupblocker geblockt.\n\nDeaktiviere den Popupblocker um die gewnschte Information angezeigt zu bekommen.";function checkPopup(a){if(!a){alert(popuperror)}}function writeGame(a,b){$(b).innerHTML=a}function setLang(b){var c=/.*(\?|~|&|\.html).*/;var d=/(.*id_lang=)(\d+)(.*)/;var a=(c.exec(top.location.href))?"&=&":"?";var f=self.location.href.match(d);if(f){self.location.href=RegExp.$1+b+RegExp.$3}else{self.location.href+=a+"id_lang="+b}}function setCurr(a){var c=/.*(\?|~|&|\.html).*/;var b=/(.*id_curr=)(\d+)(.*)/;var d=(c.exec(top.location.href))?"&=&":"?";var f=self.location.href.match(b);if(f){self.location.href=RegExp.$1+a+RegExp.$3}else{self.location.href+=d+"id_curr="+a}}function openWindow(g,d,j,c,h,b,a){if(!isNaN(j)){a=b;b=h;h=c;c=j;j=null}if(!b){b=Math.round((screen.width-c-10)/2)}if(!a){a=Math.round((screen.height-h-30)/2)}if(b<0){b=0}if(a<0){a=0}j=(j)?j+",":"";j+=(c)?"width="+c+",left="+b+",":"";j+=(h)?"height="+h+",top="+a:"";d=(d)?d:"_blank";Popup=window.open(g,d,j);if(Popup){Popup.focus()}return Popup}function popupWindow(a,b,c){return function(d){ct=d.currentTarget||d.srcElement||d.target;a=(a)?a:new Number(getParameter("x",ct.getAttribute("href")));b=(b)?b:new Number(getParameter("y",ct.getAttribute("href")));checkPopup(openWindow(ct.getAttribute("href"),ct.getAttribute("target")||"_blank",c,a,b));if(d.preventDefault){d.preventDefault()}else{d.returnValue=false}}}function popupWindowNew(b,c,d,a){b=(b)?b:new Number(getParameter("x",a.getAttribute("href")));c=(c)?c:new Number(getParameter("y",a.getAttribute("href")));checkPopup(openWindow(a.getAttribute("href"),a.getAttribute("target")||"_blank",d,b,c))}function gameWindow(a){ct=a.currentTarget||a.srcElement||a.target;width=new Number(getParameter("width",ct.getAttribute("href")));height=new Number(getParameter("height",ct.getAttribute("href")));height+=80;openWindow(ct.getAttribute("href"),ct.getAttribute("target")||"_blank",width,height);if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}}function gameWindowNew(a){href=decodeURIComponent(escape(a.getAttribute("href")));width=new Number(getParameter("width",a.getAttribute("href"))?getParameter("width",a.getAttribute("href")):780);height=new Number(getParameter("height",a.getAttribute("href"))?getParameter("height",a.getAttribute("href")):460);if(getParameter("id_game",a.getAttribute("href"))!=21){height+=95}openWindow(href,a.getAttribute("target")||"_blank",width,height)}function gameWindowFun(a){width=new Number(getParameter("width",a.getAttribute("href"))?getParameter("width",a.getAttribute("href")):780);height=new Number(getParameter("height",a.getAttribute("href"))?getParameter("height",a.getAttribute("href")):560);if((getParameter("gameid",a.getAttribute("href"))==21)||(getParameter("id_game",a.getAttribute("href"))==21)){height+=95}openWindow(a.getAttribute("href"),a.getAttribute("target")||"_blank",width,height)}function loadOpener(a){console.log(a);console.log(this);ct=a.currentTarget||a.srcElement;target=self;while(target.top.opener){target=target.top.opener}target.location.href=ct.getAttribute("href");if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}if($(ct).hasClass("close")&&target!=self){target.focus();top.close()}}function loadOpenerNew(a){var b=top;if(!(top.opener&&!top.opener.closed)){b.top.opener=null}while(b.opener){b=b.opener}b.location.href=a.getAttribute("href");b.focus();if($(a).hasClass("close")&&b!=top){top.close()}}function focusInput(){if(document.forms.length>0){var a=(getElem("fnRegister")||getElem("fnLogin"))||document.forms[0];for(i=0;i<a.elements.length;i++){if(a.elements[i].value==""&&a.elements[i].type!="hidden"){a.elements[i].focus();break}}}}function disableInput(a){ct=a.currentTarget;setTimeout("ct.disabled = true",0)}function clearInput(a){ct=a.currentTarget;if(ct.value==ct.defaultValue){ct.value=""}else{if(ct.value==""){ct.value=ct.defaultValue}}}function linkMail(a){location.href="mailto:"+Mail(a)}function Mail(a){tmp=new String();for(i=0;i<a.length;i++){tmp+=String.fromCharCode(a.charCodeAt(i)-3)}return tmp}function writeMail(a){a=Mail(a);document.open();document.write('<a href="mailto:'+a+'">'+a+"</a>");document.close()}function getParameter(c,b){if(!b){b=window.location.href}var a=b.indexOf("?");if(a!=-1){var f=b.substr(a+1);var d=f.indexOf(c);if(d!=-1){paramToEnd=f.substr(d+c.length+1);var g=paramToEnd.indexOf("&");if(g==-1){return paramToEnd}else{return paramToEnd.substr(0,g)}}}}function getParameters(){var g=new Array();var c=window.location.href;var a=c.indexOf("?");var f=true;if(a!=-1){var h=c.substr(a+1);var g=h.split("&");for(var b=0;b<g.length;b++){var d=g[b].split("=");if(d.length==2){g[d[0]]=d[1]}}return g}return null}var weakPass=[];function checkPass(c){var a=new Array(/[a-z].*[a-z]/,/[A-Z].*[A-Z]/,/\d.*\d/,/\W.*\W/,/\d/,/\W/);var b=0;if(c.length>=5){b++}if(c.length>=8){b++;if(a[0].test(c)&&a[1].test(c)){b++}if(a[2].test(c)){b++}if(a[3].test(c)){b++}if((!a[2].test(c)&&!a[3].test(c))&&(a[4].test(c)&&a[5].test(c))){b++}}for(i=0;i<weakPass.length;i++){if(weakPass[i].indexOf(c.toLowerCase())!=-1){b=1}}return b}function checkVar(b){var a=false;if(reg.exec(b)){a=true}return a}function checkValue(a){var c=true;if(a.toString().indexOf(",")!=-1){var b=a.toString().indexOf(",");a=a.toString().substring(0,b)+"."+a.toString().substring(b+1)}if(parseFloat(a)<minMoney){c=false}else{if(isNaN(a)){c=false}if(parseFloat(a)>maxMoney){c=false}if(parseFloat(a)==0){c=false}}return c}function doWindow(c,a){var b=document.getElementById(a).value;if(isitPopup==0){c.target="_self"}else{if(checkVar(b)&&checkValue(b)){c.target="PayPop";PayPop=openWindow("/xsl_gamebase/html/payment_start.htm","PayPop","scrollbars=yes",800,700)}else{c.target="_self"}}}function deactivate(a){document.getElementById(a).disabled=true;document.frm1.submit()}function checkUser(a){var a=document.fn;a.res.value=screen.width+"x"+screen.height+"x"+screen.colorDepth;a.java.value=navigator.javaEnabled();a.useragent.value=navigator.userAgent}try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}function checkNewsletter(a,b){if(a.checked){b.setProperty("value","1")}else{b.setProperty("value","0")}};var IE6,IE7,IE8,IE,BODY,WINDOW;var COOKIEDOMAIN=/^[^.]*(\.[^.]*(?:\.\w{2,3})?\.[^.]*)$/.exec(location.hostname);COOKIEDOMAIN=(COOKIEDOMAIN!=null)?COOKIEDOMAIN[1]:location.hostname;window.addEvent("domready",function(){var a=$(window);initGameAlarm()});function initLanguages(){if($(document.body).hasClass("small")||!$("languages")){return}var a=$("languages");a.inject("header");var b=a.getElement("li").getStyle("height").toInt();var e=a.getSize().y;var f=(a.getElements("li").length)*b+e+13;var c=new Fx.Tween(a,{link:"cancel",duration:"normal",transition:Fx.Transitions.Circ.easeOut});var d;a.addEvent("mouseenter",function(g){$clear(d);c.start("height",f)});a.addEvent("mouseleave",function(g){d=(function(){c.start("height",e)}).delay(1000)})}function smoothScroll(){BODY=$(document.body);$$(".backToTop a").addEvent("click",function(a){a.preventDefault();var b=new Fx.Scroll(BODY);b.toTop()})}function initGameAlarm(){initLanguages();smoothScroll();IE6=(Browser.Engine.trident4)?true:false;IE7=(Browser.Engine.trident5)?true:false;IE8=(Browser.Engine.trident6&&Browser.version==8)?true:false;IE=(Browser.Engine.trident)?true:false;if(IE6||IE7||IE8){$$("table.listTable tbody > tr:nth-child(even), table.formTable tbody > tr:nth-child(even)").addClass("even");$$("table.listTable tbody > tr:nth-child(odd), table.formTable tbody > tr:nth-child(odd)").addClass("odd")}if(IE6||IE7||IE8){$$("table.listTable td:first-child,.formTable td:first-child, table.listTable thead td:first-child, table.listTable thead th:first-child, table.formTable tfoot td:first-child").addClass("first");$$("table.listTable td:last-child,.formTable td:last-child, table.listTable thead td:last-child, table.listTable thead th:last-child, table.formTable tfoot td:last-child").addClass("last")}}window.addEvent("load",function(){formErrors.each(function(a,c){var b=(document.getElement("input[id="+a+"]"))?document.getElement("input[id="+a+"]"):$(a);$(b).getParent("li")?$(b).getParent("li").addClass("formError"):$(b).getParent("td").addClass("formError");if(b.type=="checkbox"&&b.getParent("tr")){b.getParent("tr").addClass("error")}})});var USE_CUFON=false;var formErrors=[];var GTStepsText={prevLink:"vorherige Seite",nextLink:"n�chste Seite",page:"Seite #",showAll:"alle anzeigen<br>"};window.addEvent("load",function(){formErrors.each(function(a,c){var b=(document.getElement("input[id="+a+"]"))?document.getElement("input[id="+a+"]"):$(a);$(b).getParent("li")?$(b).getParent("li").addClass("formError"):$(b).getParent("td").addClass("formError")})});var XSLFOLDER="http://static1.greentube.com/xsl_gamebase/_gametwist_2010";var DATASERVER="http://static1.greentube.com";var CDNSERVER="http://static77.greentube.com";var CDNFOLDER="http://static77.greentube.com/xsl_gamebase/_gametwist_2010";var DOTNETAPPFOLDER="/web";var gameInfoSo1="zur Spielinfo";var gameInfoTo1="zu den Turnierdetails";
