
var ELO={loaded:false,timer:null,functionsToCallOnload:[],init:function(){if(ELO.loaded)return;ELO.loaded=true;ELO.load();},load:function(){if(this.timer){clearInterval(this.timer);}
for(var i=0;i<this.functionsToCallOnload.length;i++){try{eval(this.functionsToCallOnload[i]);}
catch(e){}}}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",ELO.init,false);}
if(navigator.userAgent.search(/WebKit/i)!=-1){ELO.timer=setInterval(function(){if(document.readyState.search(/loaded|complete/i)!=-1){ELO.init();}},10);}
window.onload=ELO.init;var DOMAssistant={methodsToAdd:[],init:function(){this.applyMethod.call(window,"$",this.$);window.DOMAssistant=this;this.addBaseMethods();},addBaseMethods:function(){document.getElementsByClassName=this.getElementsByClassName;document.getElementsByAttribute=this.getElementsByAttribute;if(typeof HTMLElement=="function"){HTMLElement.prototype.getElementsByClassName=this.getElementsByClassName;HTMLElement.prototype.getElementsByAttribute=this.getElementsByAttribute;}
this.methodsToAdd.push(["getElementsByClassName",this.getElementsByClassName]);this.methodsToAdd.push(["getElementsByAttribute",this.getElementsByAttribute]);},applyMethod:function(method,func){if(typeof this[method]!="function"){this[method]=func;}},addMethods:function(elm){if(elm){var elms=(elm.constructor==Array)?elm:[elm];for(var i=0;i<elms.length;i++){for(var j=0;j<this.methodsToAdd.length;j++){this.applyMethod.call(elms[i],this.methodsToAdd[j][0],this.methodsToAdd[j][1]);}}}},$:function(){var elm=null;if(document.getElementById){elm=(arguments.length>1)?[]:null;var current;for(var i=0;i<arguments.length;i++){current=arguments[i];if(typeof current!="object"){current=document.getElementById(current);}
if(arguments.length>1){elm.push(current);}
else{elm=current;}}
DOMAssistant.addMethods(elm);}
return elm;},getElementsByClassName:function(className,tag){var elms=((!tag||tag=="*")&&this.all)?this.all:this.getElementsByTagName(tag||"*");var returnElms=[];var className=className.replace(/\-/g,"\\-");var regExp=new RegExp("(^|\\s)"+className+"(\\s|$)");var elm;for(var i=0;i<elms.length;i++){elm=elms[i];if(regExp.test(elm.className)){returnElms.push(elm);}}
return(returnElms);},getElementsByAttribute:function(attr,attrVal,tag){var elms=((!tag||tag=="*")&&this.all)?this.all:this.getElementsByTagName(tag||"*");var returnElms=[];if(typeof attrVal!="undefined"){var attrVal=new RegExp("(^|\\s)"+attrVal+"(\\s|$)");}
var current;var currentAttr;for(var i=0;i<elms.length;i++){current=elms[i];currentAttr=current.getAttribute(attr);if(typeof currentAttr=="string"&&currentAttr.length>0){if(typeof attrVal=="undefined"||(attrVal&&attrVal.test(currentAttr))){returnElms.push(current);}}}
return returnElms;}}
DOMAssistant.init();DOMAssistant.initCSS=function(){this.addCSSMethods();};DOMAssistant.addCSSMethods=function(){if(typeof HTMLElement=="function"){HTMLElement.prototype.addClass=this.addClass;HTMLElement.prototype.removeClass=this.removeClass;HTMLElement.prototype.hasClass=this.hasClass;HTMLElement.prototype.getStyle=this.getStyle;}
this.methodsToAdd.push(["addClass",this.addClass]);this.methodsToAdd.push(["removeClass",this.removeClass]);this.methodsToAdd.push(["hasClass",this.hasClass]);this.methodsToAdd.push(["getStyle",this.getStyle]);};DOMAssistant.addClass=function(className){var currentClass=this.className;if(!new RegExp(("(^|\\s)"+className+"(\\s|$)"),"i").test(currentClass)){this.className=currentClass+((currentClass.length>0)?" ":"")+className;}
return this.className;};DOMAssistant.removeClass=function(className){var classToRemove=new RegExp(("(^|\\s)"+className+"(\\s|$)"),"i");this.className=this.className.replace(classToRemove,"").replace(/^\s+|\s+$/g,"");return this.className;},DOMAssistant.hasClass=function(className){return new RegExp(("(^|\\s)"+className+"(\\s|$)"),"i").test(this.className);};DOMAssistant.getStyle=function(cssRule){var cssVal="";if(document.defaultView&&document.defaultView.getComputedStyle){cssVal=document.defaultView.getComputedStyle(this,"").getPropertyValue(cssRule);}
else if(this.currentStyle){cssVal=cssRule.replace(/\-(\w)/g,function(match,p1){return p1.toUpperCase();});cssVal=this.currentStyle[cssVal];}
return cssVal;};DOMAssistant.initCSS();DOMAssistant.initEvents=function(){this.addEventMethods();};DOMAssistant.addEventMethods=function(){if(typeof HTMLElement=="function"){HTMLElement.prototype.addEvent=DOMAssistant.addEvent;HTMLElement.prototype.handleEvent=DOMAssistant.handleEvent;HTMLElement.prototype.removeEvent=DOMAssistant.removeEvent;}
this.methodsToAdd.push(["addEvent",this.addEvent]);this.methodsToAdd.push(["handleEvent",this.handleEvent]);this.methodsToAdd.push(["removeEvent",this.removeEvent]);};DOMAssistant.addEvent=function(evt,func){if(this.addEventListener){this.addEventListener(evt,func,false);}
else{if(!this.events){this.events={};}
if(!this.events[evt]){this.events[evt]=[];}
this.events[evt].push(func);this["on"+evt]=DOMAssistant.handleEvent;if(typeof this.window=="object"){this.window["on"+evt]=DOMAssistant.handleEvent;}}
return true;};DOMAssistant.handleEvent=function(evt){var evt=evt||event;var eventType=evt.type;var eventColl=this.events[eventType];for(var i=0;i<eventColl.length;i++){eventColl[i].call(this,evt);}};DOMAssistant.removeEvent=function(evt,func){if(this.removeEventListener){this.removeEventListener(evt,func,false);}
else if(this.events){var eventColl=this.events[evt];for(var i=0;i<eventColl.length;i++){if(eventColl[i]==func){delete eventColl[i]
eventColl.splice(i,1);}}}};DOMAssistant.preventDefault=function(evt){if(evt&&evt.preventDefault){evt.preventDefault();}
else{event.returnValue=false;}};DOMAssistant.cancelBubble=function(evt){if(evt&&evt.stopPropagation){evt.stopPropagation();}
else{event.cancelBubble=true;}};DOMAssistant.initEvents();var ajax={xmlHttp:null,functionToCall:null,response:null,init:function(){if(!this.xmlHttp){if(typeof XMLHttpRequest!="undefined"){this.xmlHttp=new XMLHttpRequest();}
else if(typeof window.ActiveXObject!="undefined"){try{this.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP.4.0");}
catch(e){try{this.xmlHttp=new ActiveXObject("MSXML2.XMLHTTP");}
catch(e){try{this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){this.xmlHttp=null;}}}}}
return this.xmlHttp;},getContent:function(url,functionToCall){if(this.init()){if(typeof functionToCall!="undefined"){this.functionToCall=functionToCall;}
this.xmlHttp.onreadystatechange=function(){};this.xmlHttp.abort();this.xmlHttp.open("GET",url,true);this.xmlHttp.onreadystatechange=ajax.contentReady;this.xmlHttp.send(null);}},contentReady:function(){if(ajax.xmlHttp&&ajax.xmlHttp.readyState==4){ajax.callFunction();}},callFunction:function(){this.response=this.xmlHttp.responseText;if(this.functionToCall){if(typeof this.functionToCall=="function"){this.functionToCall();}
else if(typeof this.functionToCall=="string"){eval(this.functionToCall);}}}};var FaT={overlayId:"fat-dim-overlay",clickOverlayToClearFocus:false,clickDocumentToClearFocus:false,useClearFocusHelpText:false,useKeyToClearFocus:false,clearFocusHelpText:"",defaultEvent:"click",defaultFocusClass:"fat-focused-elm",originalFadeLevel:0.5,elmOriginalFadeLevel:1,fadeIncrement:0.1,timeForFadeIncrement:200,timeForElmFadeIncrement:20,timeBeforeFocus:500,timer:null,focusElements:null,currentElm:null,strIdParam:null,fadeInParam:null,fadeOutParam:null,forceClearFocusParam:null,functionToCall:"setFocus()",overlay:null,focusEvent:"",forceClearFocus:false,specificElmFocus:false,currentFadeLevel:0.5,fadeSpecificElm:false,fadeTimer:null,fadeOutAfterFadeIn:false,fadeTimeIncrementToUse:this.timeForFadeIncrement,focusCount:0,currentFocusCount:0,functionToCallWhenClearFocus:null,init:function(){if(document.getElementById){this.overlay=$(this.overlayId);if(this.overlay){this.focusElements=document.getElementsByClassName("fat","*");this.applyEvents();this.useMSFilter=typeof this.overlay.style.filter!="undefined";}}},applyEvents:function(){var oElm;switch(this.defaultEvent){case"click":for(var i=0;i<this.focusElements.length;i++){oElm=this.focusElements[i];oElm.onclick=FaT.clickElm;}
break;case"mouseover":for(var i=0;i<this.focusElements.length;i++){oElm=this.focusElements[i];oElm.onmouseover=FaT.mouseOverElm;oElm.onmouseout=FaT.mouseOutElm;}
break;}
if(this.clickOverlayToClearFocus){this.overlay.onclick=function(){FaT.clearFocus();};}
if(this.clickDocumentToClearFocus){$(this).addEvent("click",FaT.clearFocus);}},clickElm:function(oEvent){var oEvent=(typeof oEvent!="undefined")?oEvent:event;FaT.startTimer(oEvent,this);},mouseOverElm:function(oEvent){var oEvent=(typeof oEvent!="undefined")?oEvent:event;FaT.startTimer(oEvent,this);},mouseOutElm:function(oEvent){var oEvent=(typeof oEvent!="undefined")?oEvent:event;FaT.clearFocus(oEvent);},startTimer:function(oEvent,oElm){if(this.currentElm&&this.currentElm!=oElm){this.clearFadeAndFocus();}
this.currentElm=oElm;this.focusEvent=oEvent.type;this.functionToCall=(this.currentElm.className.search(/fat-only-this/)!=-1)?"FaT.setFocusToElm()":"FaT.setFocus()";this.timer=setTimeout(FaT.functionToCall,FaT.timeBeforeFocus);},stopTimer:function(oElm){clearTimeout(FaT.timer);},setOverlaySize:function(){var overlay=FaT.overlay;if(overlay){var oDimBackground=overlay.style;var arrWinSizeAndScroll=FaT.getWinSizeAndScroll();oDimBackground.width=arrWinSizeAndScroll[0]+arrWinSizeAndScroll[2]+"px";oDimBackground.height=arrWinSizeAndScroll[1]+arrWinSizeAndScroll[3]+"px";}},setFocus:function(strId,fadeIn,fadeOut,forceClearFocus){var oElm=(typeof strId!="undefined")?$(strId):null;if(this.currentElm&&oElm&&this.currentElm!=oElm){this.clearFadeAndFocus();}
this.currentElm=(typeof strId!="undefined")?$(strId):this.currentElm;var oElm=this.currentElm;if(oElm){this.strIdParam=(typeof strId!="undefined")?strId:null;this.fadeInParam=(typeof strId!="undefined")?fadeIn:null;this.fadeOutParam=(typeof strId!="undefined")?fadeOut:null;this.forceClearFocusParam=(typeof strId!="undefined")?forceClearFocus:null;var strClassName=oElm.className;if(strClassName.search(this.defaultFocusClass)==-1){var strCustomClass="";if(strClassName.search(/fat-custom-[\w\d]+[\s$]?/i)!=-1){strCustomClass=strClassName.replace(/.*fat-custom-([\w\d\-]+).*/i,"$1");}
oElm.className=((strClassName.length>0)?(strClassName+" "):"")+this.defaultFocusClass+((strCustomClass.length>0)?" ":"")+strCustomClass;}
if(strClassName.search(/fat-multiple-\d+/)!=-1){this.focusCount=parseInt(strClassName.replace(/.*fat-multiple-([\d]+).*/i,"$1"),10);this.currentFocusCount++;if(this.currentFocusCount==this.focusCount){this.focusCount=0;this.currentFocusCount=0;}}
if(!this.specificElmFocus){this.setOverlaySize();var agt=navigator.userAgent.toLowerCase();if(agt.indexOf("safari")!=-1){return false;}else{this.overlay.style.display="block";}}
if(forceClearFocus){this.forceClearFocus=true;}
this.fadeSpecificElm=this.specificElmFocus&&(fadeIn||fadeOut);this.fadeTimeIncrementToUse=(this.fadeSpecificElm)?this.timeForElmFadeIncrement:this.timeForFadeIncrement;if(fadeIn){this.currentFadeLevel=0;this.fadeOutAfterFadeIn=fadeOut;this.fadeIn();}
else if(fadeOut){this.fadeOutAndClearFocus();if(this.specificElmFocus){this.currentFadeLevel=this.elmOriginalFadeLevel;}}
else if(forceClearFocus){this.clearFocus();}
if(this.useClearFocusHelpText&&this.focusEvent.search(/mouseover/i)==-1){oElm.setAttribute("title",this.clearFocusHelpText);this.overlay.setAttribute("title",this.clearFocusHelpText);}
var intOffsetTop=oElm.offsetTop;var intOffsetElmBottom=intOffsetTop+oElm.offsetHeight;var arrWinSizeAndScroll=this.getWinSizeAndScroll();if(intOffsetElmBottom>(arrWinSizeAndScroll[1]+arrWinSizeAndScroll[3])||intOffsetTop<arrWinSizeAndScroll[3]){window.scrollTo(arrWinSizeAndScroll[2],intOffsetTop);}
if(this.specificElmFocus){this.specificElmFocus=false;}}},setFocusToElm:function(strId,fadeIn,fadeOut,forceClearFocus){this.specificElmFocus=true;this.functionToCall="setFocusToElm()";this.setFocus(strId,fadeIn,fadeOut,forceClearFocus);},clearFocus:function(oEvent,forceClearFocus){this.stopTimer();if((typeof forceClearFocus=="undefined"||!forceClearFocus)&&this.focusCount>0&&this.currentFocusCount<this.focusCount){return(this.functionToCall.search(/setFocusToElm/)!=-1)?this.setFocusToElm(this.strIdParam,this.fadeInParam,this.fadeOutParam,this.forceClearFocusParam):this.setFocus(this.strIdParam,this.fadeInParam,this.fadeOutParam,this.forceClearFocusParam);}
var oElm=this.currentElm;if(oElm){var bIsChildOfCurrentElm=false;if(typeof oEvent!="undefined"&&typeof oEvent=="object"){var oEventTarget=(typeof oEvent.relatedTarget!="undefined")?oEvent.relatedTarget:oEvent.toElement;if(oEventTarget){while(!bIsChildOfCurrentElm&&oEventTarget&&oEventTarget.nodeName&&oEventTarget.nodeName.search(/body/i)==-1){if(oEventTarget==oElm){bIsChildOfCurrentElm=true;break;}
oEventTarget=oEventTarget.parentNode;}}}
if(!bIsChildOfCurrentElm){var strClassName=oElm.className;var oRegExp=new RegExp(("\\s?"+this.defaultFocusClass),"gi");var strRegularClass=strClassName.replace(oRegExp,"");if(strClassName.search(/fat-custom-[\w\d]+[\s$]?/i)!=-1){var strCustomClass=strClassName.replace(/.*fat-custom-([\w\d\-]+).*/i,"$1");oRegExp=new RegExp("\\s"+strCustomClass+"$","i");strRegularClass=strRegularClass.replace(oRegExp,"");}
oElm.className=strRegularClass;this.currentElm=null;this.overlay.style.display="none";if(this.useClearFocusHelpText){oElm.removeAttribute("title");this.overlay.removeAttribute("title");}
this.focusCount=0;this.currentFocusCount=0;if(this.functionToCallWhenClearFocus){eval(this.functionToCallWhenClearFocus);}}}},fadeIn:function(fadeOut){this.currentFadeLevel=this.currentFadeLevel+this.fadeIncrement;var intEndFadeLevel=(this.fadeSpecificElm)?this.elmOriginalFadeLevel:this.originalFadeLevel;if(this.currentFadeLevel<intEndFadeLevel){this.fadeTimer=setTimeout("FaT.fadeIn()",FaT.fadeTimeIncrementToUse);}
else if(this.fadeOutAfterFadeIn){this.fadeOutAndClearFocus();var intEndFadeLevel=(this.fadeSpecificElm)?this.elmOriginalFadeLevel:this.originalFadeLevel;}
else if(this.focusCount>0&&this.currentFocusCount<this.focusCount){this.currentFadeLevel=0;return(this.functionToCall.search(/setFocusToElm/)!=-1)?this.setFocusToElm(this.strIdParam,this.fadeInParam,this.fadeOutParam,this.forceClearFocusParam):this.setFocus(this.strIdParam,this.fadeInParam,this.fadeOutParam,this.forceClearFocusParam);}
else{this.currentFadeLevel=intEndFadeLevel;clearTimeout(this.fadeTimer);if(this.forceClearFocus){this.clearFocus();this.forceClearFocus=false;}}
this.setFade();},fadeOutAndClearFocus:function(){this.currentFadeLevel=this.currentFadeLevel-this.fadeIncrement;if(this.currentFadeLevel>0){this.fadeTimer=setTimeout("FaT.fadeOutAndClearFocus()",FaT.fadeTimeIncrementToUse);}
else{if(this.fadeSpecificElm){this.currentFadeLevel=this.elmOriginalFadeLevel;this.setFade();}
this.currentFadeLevel=this.originalFadeLevel;this.clearFocus();}
this.setFade();},clearFadeAndFocus:function(){if(this.fadeSpecificElm){this.currentFadeLevel=this.elmOriginalFadeLevel;this.setFade();}
this.currentFadeLevel=this.originalFadeLevel;this.clearFocus(false,true);clearTimeout(this.fadeTimer);},setFade:function(){this.currentFadeLevel=Math.round(this.currentFadeLevel*10)/10;var oElm=(this.fadeSpecificElm)?this.currentElm:this.overlay;if(oElm){if(this.useMSFilter){oElm.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+(this.currentFadeLevel*100)+")";}
else{oElm.style.opacity=this.currentFadeLevel;}}},getWinSizeAndScroll:function(){var intWidth=document.body.offsetWidth;var intHeight=(typeof window.innerHeight!="undefined")?window.innerHeight:(document.documentElement&&document.documentElement.clientHeight>0)?document.documentElement.clientHeight:document.body.clientHeight;var intXScroll=(typeof window.pageXOffset!="undefined")?window.pageXOffset:document.body.scrollLeft;var intYScroll=(typeof window.window.pageYOffset!="undefined")?window.pageYOffset:(document.documentElement&&document.documentElement.scrollTop>0)?document.documentElement.scrollTop:document.body.scrollTop;return[intWidth,intHeight,intXScroll,intYScroll];},captureKeyPressed:function(oEvent){if(FaT.useKeyToClearFocus){var intKey=oEvent.keyCode;if(intKey==27){FaT.clearFocus();}}},closeSession:function(oEvent){this.removeEvent("scroll",FaT.setOverlaySize);this.removeEvent("resize",FaT.setOverlaySize);$(document).removeEvent("keydown",FaT.captureKeyPressed);FaT=null;delete FaT;}};ELO.functionsToCallOnload.push("FaT.init()");$(window);window.addEvent("unload",FaT.closeSession);window.addEvent("scroll",FaT.setOverlaySize);window.addEvent("resize",FaT.setOverlaySize);window.addEvent("keydown",FaT.captureKeyPressed);if(typeof Array.prototype.push!="function"){Array.prototype.push=ArrayPush;function ArrayPush(value){this[this.length]=value;}}
ELO.functionsToCallOnload.push("gnuf.init()");var links=new Array();var gnuf={init:function(){if(document.getElementById){$(document);this.applyShowHideScriptDependantEvents();this.applyQuickItemEvents();this.applyQuickItemNoToggleEvents();this.applyPopUpEvents();this.applyShowHiddenEvents();this.applyHideEvents();this.applyToggleEvents();this.applyTabHandling();this.applyHistorylist();this.applyTournamentlist("all");this.applyConfirmationEvents();}},applyShowHideScriptDependantEvents:function(){var elmsToHide=document.getElementsByClassName("script-hide","*");for(var i=0;i<elmsToHide.length;i++){$(elmsToHide[i]).addClass("display-none");}
var elmsToShow=document.getElementsByClassName("script-show","*");var elm;var nodeName;var displayClass;for(var j=0;j<elmsToShow.length;j++){elm=$(elmsToShow[j]);nodeName=elm.nodeName;if(/div|p|ul/i.test(nodeName)){displayClass="display-block";}
else if(/tr/i.test(nodeName)){displayClass="display-table-row";}
else{displayClass="display-inline";}
elm.addClass(displayClass);}},applyQuickItemEvents:function(){var scrollHeight=$("scroll-height");var scrollMinus=$("scroll-minus");var height=230;if(scrollHeight&&scrollMinus){var height=2+scrollHeight.clientHeight-scrollMinus.clientHeight;}
var scrolls=document.getElementsByClassName("scroll")
for(var i=0;i<scrolls.length;i++){item=$(scrolls[i]);item.style.height=height+'px';}
var startpageBullets=$("start-page-bullets");var quickItems=null;if(startpageBullets){quickItems=startpageBullets.getElementsByClassName("quick-item","div");var quickItemsIcons=startpageBullets.getElementsByClassName("quick-item-icon","div");var imgTopPos=0;for(var i=0;i<quickItemsIcons.length;i++){item=$(quickItemsIcons[i]);item.style.background=("url(/images/pages/startpage/start-page-bullets.gif) no-repeat 0px "+imgTopPos+"px");imgTopPos-=29;}}
else{quickItems=document.getElementsByClassName("quick-item","div");}
var item;var title;var img;for(var i=0;i<quickItems.length;i++){item=$(quickItems[i]);var tmp_links=item.getElementsByAttribute("href");links[i]=tmp_links[0];item.addEvent("mouseover",gnuf.hoverList);item.addEvent("mouseout",gnuf.hoverList);if(/icon/i.test(item.className)){img=document.createElement("img");img.setAttribute("src",item.className.replace(/.*icon-/i,""));img.setAttribute("alt","");item.insertBefore(img,item.firstChild);}}},applyQuickItemNoToggleEvents:function(){var quickItems=document.getElementsByClassName("quick-item-no-toggle","div");var item;for(var i=0;i<quickItems.length;i++){item=$(quickItems[i]);item.addEvent("mouseover",gnuf.hoverList);item.addEvent("mouseout",gnuf.hoverList);}},applyPopUpEvents:function(){var popupLinks=document.getElementsByClassName("popup","a");for(var i=0;i<popupLinks.length;i++){$(popupLinks[i]).addEvent("click",gnuf.showPopUp);}},applyShowHiddenEvents:function(){var links=document.getElementsByClassName("show-hidden","a");for(var i=0;i<links.length;i++){$(links[i]).addEvent("click",gnuf.showHiddenElm);}},applyHideEvents:function(){var links=document.getElementsByClassName("hide-element","a");for(var i=0;i<links.length;i++){$(links[i]).addEvent("click",gnuf.hideElm);}},applyToggleEvents:function(){var links=document.getElementsByClassName("toggle","a");for(var i=0;i<links.length;i++){$(links[i]).addEvent("click",gnuf.toggle);}},applyTabHandling:function(){var links=document.getElementsByClassName("tab-link","a");var linkElm;var firefoxMacFontFix=/mac/i.test(navigator.userAgent)&&/firefox/i.test(navigator.userAgent);for(var i=0;i<links.length;i++){linkElm=$(links[i]);if(firefoxMacFontFix){linkElm.style.lineHeight="0.7em";}
linkElm.addClass(("index-"+i));linkElm.addEvent("click",gnuf.tabHandle);}},applyHistorylist:function(strTableID){if(strTableID){var table=document.getElementById(strTableID);if(table){var tbody=table.getElementsByTagName("tbody");for(var i=0;i<tbody.length;i++){var rows=tbody[i].getElementsByTagName("tr");for(var j=0;j<rows.length;j++){rows[j].onmouseover=gnuf.HistoryList;rows[j].onmouseout=gnuf.HistoryList;}}}}},applyTournamentlist:function(strTableID){gnuf.applyHistorylist(strTableID);},applyConfirmationEvents:function(){var confirmationLinks=document.getElementsByClassName("confirm-choice","a");for(var i=0;i<confirmationLinks.length;i++){$(confirmationLinks[i]).addEvent("click",gnuf.confirmAction);}},showPopUp:function(evt){DOMAssistant.preventDefault(evt||event);var className=this.className;if(/play-bingo/i.test(className)&&typeof openGameWindow=="function"){if(typeof ajax!="undefined"){ajax.getContent("/ajax/bingo-login.php","gnuf.openBingoWindow()")}}
else{var winWidth=500;var winHeight=500;var targetBlank=false;var scrollAble=/scrollable/i.test(className);var noResize=/noresize/i.test(className);var winName=(/win-name/i.test(className))?this.className.replace(/.*win-name-([\w-_]+).*/i,"$1"):null;if(/open-win/i.test(className)){winWidth=className.replace(/.*open-win-(\d+).*/,"$1");winHeight=className.replace(/.*open-win-\d+-(\d+).*/,"$1");}
else{targetBlank=true;}
gnuf.Popup(this.getAttribute("href"),winWidth,winHeight,targetBlank,scrollAble,noResize,winName);this.blur();if(/extra-help-info/i.test(className)){var helpWin=gnuf.Popup("/images/pages/online-casino/startpage/en/casino_help.gif",460,259,targetBlank,scrollAble,noResize,"casinoHelp");try{helpWin.focus();}
catch(e){}}}
return false;},openBingoWindow:function(){if(ajax.response!="NOK"){eval("bingoValues = "+ajax.response);openGameWindow(bingoValues.organisation,bingoValues.gameType,bingoValues.token,bingoValues.serverId);}},confirmAction:function(){var confirmText=document.getElementsByClassName("confirm-choice-text","span",this.parentNode);if(confirmText.length>0){confirmText=confirmText[0].innerHTML;}
return confirm(confirmText);},showHiddenElm:function(evt){var elmToShowId=this.className.replace(/.*element-to-show-([\w\d-_]+)(\b|$).*/,"$1");var elmToShow=$(elmToShowId);if(/elements-to-hide/i.test(this.className)){gnuf.hideElms(evt,this);}
if(elmToShow){elmToShow.addClass("display-block");if(/show-container/i.test(this.className)){var containerToShowId=this.className.replace(/.*show-container-([\w\d-_]+)(\b|$).*/,"$1");var containerToShow=$(containerToShowId);if(containerToShow){containerToShow.addClass("display-block");}}
if(/show-overlay/i.test(this.className)){var showOverlayForElmId=this.className.replace(/.*show-overlay-([\w\d-_]+)(\b|$).*/,"$1");FaT.setFocus(showOverlayForElmId);}
if(/hide-static-focus/i.test(this.className)){var elmToHide=$("static-dim-overlay");if(elmToHide){elmToHide.addClass("display-none");}}}
if(/element-to-hide/i.test(this.className)){gnuf.hideElm(evt,this);}
if(/deselected-tabs/i.test(this.className)){var elmToUnMarkId=this.className.replace(/.*\bdeselected-tabs-([\w\d-_]+)(\b|$).*/,"$1");$("tournament-all").removeClass("tab-selected");$("tournament-regular").removeClass("tab-selected");$("tournament-freerolls").removeClass("tab-selected");$("tournament-satellites").removeClass("tab-selected");$("tournament-specials").removeClass("tab-selected");}
if(/tournament-paging-reset/i.test(this.className)){var elmToShowId=this.className.replace(/.*tournament-paging-reset-([\w\d-_]+)(\b|$).*/,"$1");var table=$(elmToShowId);if(table){var tbody=table.getElementsByTagName("tbody");for(var i=0;i<tbody.length;i++){$(tbody[i]).addClass("display-none");}}
gnuf.applyTournamentlist(table.id);}
if(/tournament-paging-showfirst/i.test(this.className)){var elmToShowId=this.className.replace(/.*tournament-paging-showfirst-([\w\d-_]+)(\b|$).*/,"$1");var tbody=$(elmToShowId);if(tbody){tbody.removeClass("display-none");}}
if(/tournament-paging-hide/i.test(this.className)){if(/tournament-paging-table/i.test(this.className)){var elmToShowId=this.className.replace(/.*tournament-paging-table-([\w\d-_]+)(\b|$).*/,"$1");var table=$(elmToShowId);if(table){var tbody=table.getElementsByTagName("tbody");for(var i=0;i<tbody.length;i++){$(tbody[i]).addClass("display-none");}}}}
if(/tournament-paging-show/i.test(this.className)){var elmToShowId=this.className.replace(/.*tournament-paging-show-([\w\d-_]+)(\b|$).*/,"$1");var elmToShow=$(elmToShowId);if(elmToShow){elmToShow.removeClass("display-none");}}
if(/tournament-paging-links-remove/i.test(this.className)){var elmToShowId=this.className.replace(/.*tournament-paging-links-remove-([\w\d-_]+)(\b|$).*/,"$1");var table=$(elmToShowId);if(table){var links=table.getElementsByTagName("a");for(var i=0;i<links.length;i++){$(links[i]).removeClass("selected");}}}
if(/tournament-paging-links-show/i.test(this.className)){var elmToShowId=this.className.replace(/.*tournament-paging-links-show-([\w\d-_]+)(\b|$).*/,"$1");var elmToShow=$(elmToShowId);if(elmToShow){elmToShow.addClass("selected");}}
if(/selected-tab/i.test(this.className)){var elmToMarkId=this.className.replace(/.*\bselected-tab-([\w\d-_]+)(\b|$).*/,"$1");var elmToMark=$(elmToMarkId);if(elmToMark){elmToMark.addClass("tab-selected");}}
if(/selecteds-tab/i.test(this.className)){var elmToMarkId=this.className.replace(/.*\bselecteds-tab-([\w\d-_]+)(\b|$).*/,"$1");var elmToMark=$(elmToMarkId);if(elmToMark){elmToMark.addClass("selected");}}
if(/deselected-tab/i.test(this.className)){var elmToUnMarkId=this.className.replace(/.*\bdeselected-tab-([\w\d-_]+)(\b|$).*/,"$1");var elmToUnMark=$(elmToUnMarkId);if(elmToUnMark){elmToUnMark.removeClass("tab-selected");}}
DOMAssistant.preventDefault(evt);return false;},hideElms:function(evt,elm){var elm=(typeof elm!="undefined")?elm:this;var elmToHideId=elm.className.replace(/.*element-to-hide-([\w\d-_]+)(\b|$).*/,"$1");$("tournament-all-block").removeClass("display-block");$("tournament-regular-block").removeClass("display-block");$("tournament-freerolls-block").removeClass("display-block");$("tournament-satellites-block").removeClass("display-block");$("tournament-specials-block").removeClass("display-block");},hideElm:function(evt,elm){var elm=(typeof elm!="undefined")?elm:this;var elmToHideId=elm.className.replace(/.*element-to-hide-([\w\d-_]+)(\b|$).*/,"$1");var elmToHide=$(elmToHideId);if(elmToHide){elmToHide.removeClass("display-block");if(/hide-container/i.test(elm.className)){var containerToHideId=elm.className.replace(/.*hide-container-([\w\d-_]+)(\b|$).*/,"$1");var containerToHide=$(containerToHideId);if(containerToHide){containerToHide.removeClass("display-block");}}
FaT.clearFocus();if(/show-overlay/i.test(elm.className)){var showOverlayForElmId=elm.className.replace(/.*show-overlay-([\w\d-_]+)(\b|$).*/,"$1");FaT.setFocus(showOverlayForElmId);}}
DOMAssistant.preventDefault(evt);return false;},toggle:function(evt){var evt=(typeof evt!="undefined")?evt:event;var className=this.className;var show=true;if(/toggle-id|toggle-next-elm|toggle-next-container-elm/i.test(className)){if(/toggle-id/i.test(className)){var idToToggle=className.replace(/.*toggle-id-([\w-]+).*/,"$1");var elmToToggle=$(idToToggle);}
else{elmToToggle=null;var container=this;if(/toggle-next-container-elm/i.test(className)){while(container.parentNode&&!/div/i.test(container.nodeName)){container=container.parentNode;}}
var nextElm=container.nextSibling;while(nextElm){if(nextElm.nodeType==1){elmToToggle=nextElm;break;}
else{nextElm=nextElm.nextSibling;continue;}}}
if(elmToToggle){if(!/display-block/i.test(elmToToggle.className)){$(elmToToggle).addClass("display-block");}
else{elmToToggle.removeClass("display-block");show=false;}}}
else if(/toggle-next-row/i.test(className)){var tableRow=this;while(tableRow.parentNode&&!/tr/i.test(tableRow.nodeName)){tableRow=tableRow.parentNode;}
var rowIndex=tableRow.rowIndex+1;var table=tableRow;while(table.parentNode&&!/table/i.test(table.nodeName)){table=table.parentNode;}
if(rowIndex<table.rows.length){var nextRow=table.rows[rowIndex];if(nextRow){if(!/display-table-row/i.test(nextRow.className)){$(nextRow).addClass("display-table-row");}
else{$(nextRow).removeClass("display-table-row");show=false;}}}}
var parentDisplay=this;while(parentDisplay.parentNode&&parentDisplay.className&&!/parent-display/i.test(parentDisplay.className)){parentDisplay=parentDisplay.parentNode;}
parentDisplay=$(parentDisplay);if(/parent-display/i.test(parentDisplay.className)){if(show){parentDisplay.addClass("toggle-show");}
else{parentDisplay.removeClass("toggle-show");}}
var imgDisplay=document.getElementsByClassName("img-display","img",this);if(imgDisplay.length>0){var image=imgDisplay[0];var imgSrc=image.getAttribute("src");if(show){imgSrc=imgSrc.replace(/(\.[a-z]{3})/i,"-expanded$1");}
else{imgSrc=imgSrc.replace(/-expanded/i,"");}
image.setAttribute("src",imgSrc);}
DOMAssistant.preventDefault(evt);DOMAssistant.cancelBubble(evt);},tabHandle:function(evt){var className=this.className;var tabIndex=className.replace(/.*index-(\d+).*/g,"$1");var tabContentContainer=this;while(tabContentContainer.parentNode&&!/body/i.test(tabContentContainer.parentNode.nodeName)){if(/tab-content-container/i.test(tabContentContainer.className)){break;}
else{tabContentContainer=tabContentContainer.parentNode;}}
var tabParents=document.getElementsByClassName("tab-parent","*",tabContentContainer);var tabParent;for(var i=0;i<tabParents.length;i++){tabParent=$(tabParents[i]);tabParent.removeClass("selected");if(i==tabIndex){tabParent.addClass("selected");}}
var tabContentItems=document.getElementsByClassName("tab-content","div",tabContentContainer);var tabContent;for(var j=0;j<tabContentItems.length;j++){tabContent=$(tabContentItems[j]);tabContent.removeClass("display-block");if(j==tabIndex){tabContent.addClass("display-block");}}
if(/change-content-link/i.test(className)){gnuf.changeContent(tabIndex);}
if(/flash-call/i.test(className)){var movieName=className.replace(/.*movie-([\w-]+).*/i,"$1");if(movieName.length>0){gnuf.callFlashMovie(movieName,++tabIndex);}}
DOMAssistant.preventDefault(evt);return false;},callFlashMovie:function(movieName,tabIndex){var movie=$(movieName);if(movie){try{movie.asFunc(tabIndex);}
catch(e){}}},callFromFlashMovie:function(index){var tabsChangeableFromFlash=document.getElementsByClassName("change-tabs-from-flash","ul");var tabLinks;var tabLink;var tabIndex;for(var i=0;i<tabsChangeableFromFlash.length;i++){tabLinks=document.getElementsByClassName("tab-link","a",tabsChangeableFromFlash[i]);for(var j=0;j<tabLinks.length;j++){if(j==index){gnuf.tabHandle.call(tabLinks[j]);}}}
gnuf.changeContent(index);},changeContent:function(index){var contentChangeableFromFlash=document.getElementsByClassName("change-content-container","div");var contentItems;var contentItem;for(var k=0;k<contentChangeableFromFlash.length;k++){contentItems=document.getElementsByClassName("change-content","div",contentChangeableFromFlash[k]);for(var l=0;l<contentItems.length;l++){contentItem=$(contentItems[l]);if(l==index){contentItem.addClass("display-block");}
else{contentItem.removeClass("display-block");}}}},HistoryList:function(evt){var evt=(typeof evt!="undefined")?evt:event;var className=this.className;if(/history-list/i.test(this.className)){$(this).removeClass("history-list");}
else{$(this).addClass("history-list");}},StartpageLists:function(evt){var evt=(typeof evt!="undefined")?evt:event;var className=this.className;if(/startpage-lists/i.test(this.className)){$(this).removeClass("startpage-lists");}
else{$(this).addClass("startpage-lists");}},hoverList:function(evt){var evt=(typeof evt!="undefined")?evt:event;if(/mouseover/i.test(evt.type)){$(this).addClass("quick-item-hover");}
else{$(this).removeClass("quick-item-hover");}},Popup:function(strURL,intWidth,intHeight,targetBlank,scrollAble,noResize,winName){if(targetBlank){GnufWin=window.open(strURL);}
else{GnufWin=window.open(strURL,(winName||"gnufpopup"),"toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars="+((scrollAble)?"yes":"no")+",resizable="+((noResize)?"no":"yes")+",copyhistory=no,width="+intWidth+",height="+intHeight);}}}
function flashVar(index){gnuf.callFromFlashMovie(--index);}
var gnufFormControll=new GnufFormController();ELO.functionsToCallOnload.push("gnufFormControll.init()");function GnufFormController(){this.counter=0;this.forms=[];this.staticDimOverlayId="static-dim-overlay";this.staticDimOverlay=null;this.errorDialog=null;}
GnufFormController.prototype.init=function(){if(document.getElementById){var forms=document.getElementsByClassName("gnuf-form","form");var form;var counter;var advancedMode;var advancedModeDialog;for(var i=0;i<forms.length;i++){form=forms[i];if(/gnuf-form/i.test(form.className)&&!/no-form-controller/i.test(form.className)){advancedMode=/advanced-mode/i.test(form.className);advancedModeDialog=/advanced-mode-dialog/i.test(form.className);counter=this.counter++;eval("gnufForm"+counter+" = new GnufForm(form, counter, advancedMode, advancedModeDialog)");}}
this.staticDimOverlay=$(this.staticDimOverlayId);if(this.staticDimOverlay){this.setAndShowStaticOverlay();}
this.errorDialog=$("error-dialog");if(this.errorDialog){$(this).addEvent("click",function(){gnufFormControll.errorDialog.style.display="none";});}}};GnufFormController.prototype.setAndShowStaticOverlay=function(){var obj=gnufFormControll;if(obj.staticDimOverlay){var oDimBackground=obj.staticDimOverlay.style;var arrWinSizeAndScroll=obj.getWinSizeAndScroll();oDimBackground.width=arrWinSizeAndScroll[0]+arrWinSizeAndScroll[2]+"px";oDimBackground.height=arrWinSizeAndScroll[1]+arrWinSizeAndScroll[3]+"px";var mainContentArea=$("main-content-area");if(!/webkit/i.test(navigator.userAgent)){if(mainContentArea){if(!/no-static-focus/i.test(mainContentArea.className)){mainContentArea.addClass("static-focus");}}
obj.staticDimOverlay.addClass("display-block");}}};GnufFormController.prototype.getWinSizeAndScroll=function(){var intWidth=document.body.offsetWidth;var intHeight=(typeof window.innerHeight!="undefined")?window.innerHeight:(document.documentElement&&document.documentElement.clientHeight>0)?document.documentElement.clientHeight:document.body.clientHeight;var intXScroll=(typeof window.pageXOffset!="undefined")?window.pageXOffset:document.body.scrollLeft;var intYScroll=(typeof window.window.pageYOffset!="undefined")?window.pageYOffset:(document.documentElement&&document.documentElement.scrollTop>0)?document.documentElement.scrollTop:document.body.scrollTop;return[intWidth,intHeight,intXScroll,intYScroll];};GnufFormController.prototype.closeSession=function(oEvent){this.removeEvent("scroll",gnufFormControll.setAndShowStaticOverlay);this.removeEvent("resize",gnufFormControll.setAndShowStaticOverlay);for(var i=(gnufFormControll.forms.length-1);i>0;i--){gnufFormControll.forms[i]=null;delete gnufFormControll.forms[i];}
gnufFormControll.forms=null;delete gnufFormControll.forms;};$(window);window.addEvent("scroll",gnufFormControll.setAndShowStaticOverlay);window.addEvent("resize",gnufFormControll.setAndShowStaticOverlay);window.addEvent("unload",gnufFormControll.closeSession);function GnufForm(form,counter,advancedMode,advancedModeDialog){if(advancedMode){this.showHelp=true;this.showErrors=true;this.showErrorDialog=false;}
else{this.showHelp=false;this.showErrors=false;this.showErrorDialog=true;}
this.advancedModeDialog=advancedModeDialog;this.form=$(form);this.name="gnufForm"+counter;this.elements=[];this.mandatoryElements=[];this.currentElm=null;this.currentInfoElm=null;this.validateElements=true;this.validElm=true;this.forceSubmit=false;this.setFocusAtInit=true;this.calculateHelpPos=true;this.helpDisplayElm=null;this.helpIsVisible=false;this.useFadeForErrors=true;this.errors=[];this.numberOfErrors=0;this.errorDisplayElm=null;this.errorListElm=null;this.yourFormHasErrorsText="Your form has ";this.errorsText=" errors";this.errorText=" error";this.notChosenText="No";this.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];this.dateNames=["1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th","11th","12th","13th","14th","15th","16th","17th","18th","19th","20th","21st","22nd","23rd","24th","25th","26th","27th","28th","29th","30th","31st"];this.displayPasswordEncryptionLevel=true;this.passwordEncryptionLevels=[];this.severalItemsCurrentElm=null;this.errorDialogTimer=null;gnufFormControll.forms.push(this);this.init();}
GnufForm.prototype.init=function(){this.form.addClass(("obj-"+this.name));this.getElements();this.getMandatoryElements();if(this.showHelp){this.helpDisplayElm=$("form-help");}
if(this.showErrors){this.errorDisplayElm=$("form-errors");this.errorListElm=$("form-errors-list");}
if(this.displayPasswordEncryptionLevel){var encryptionLevelElm=$("password-encryption-level-container");if(encryptionLevelElm){this.passwordEncryptionLevels=encryptionLevelElm.getElementsByClassName("password-encryption-level","span");}}
this.form.onsubmit=this.submit;if($("confirm-and-edit-step")){this.useFadeForErrors=false;}
if(this.setFocusAtInit){this.setFocusToElmAtInit();}};GnufForm.prototype.getElements=function(){var elements=this.form.getElementsByTagName("*");var elm;for(var i=0;i<elements.length;i++){elm=elements[i];if(/input|select|textarea/i.test(elm.nodeName)&&!/image|button|submit/i.test(elm.getAttribute("type"))){this.elements.push(elm);if(this.showErrors){this.errors.push([elm,false,null,elm.getAttribute("id")]);}
if(this.showHelp&&!/no-help-info/i.test(elm.className)){elm.onfocus=this.getHelpInfo;}
else if(/check-encryption-level/i.test(elm.className)){elm.onfocus=this.showPasswordEncryptionLevel;}}
if(/submit-form-automatically/i.test(elm.className)){elm.onchange=this.forceSubmission;}
if(/validate-form/i.test(elm.className)){elm.onclick=this.validateAndClose;}
else if(/force-submit/i.test(elm.className)){elm.onclick=this.forceSubmission;}
if(/show-element-based-on-value/i.test(elm.className)){elm.onchange=this.showElementBasedOnValue;elm.onkeypress=elm.onchange;}}};GnufForm.prototype.getMandatoryElements=function(){var elm;for(var i=0;i<this.elements.length;i++){elm=this.elements[i];if(!/non-mandatory/i.test(elm.className)&&!/submit|hidden/i.test(elm.getAttribute("type"))){this.mandatoryElements.push(elm);if(this.validateElements||this.showErrors){elm.onblur=this.validateThis;}
else{elm.onblur=this.hideHelpInfo;}}
else if(this.showHelp){elm.onblur=this.hideHelpInfo;}
if(/check-encryption-level/i.test(elm.className)){elm.onkeyup=this.showPasswordEncryptionLevel;}}};GnufForm.prototype.setFocusToElmAtInit=function(){var elm;for(var i=0;i<this.elements.length;i++){elm=this.elements[i];if(/set-focus-at-init/i.test(elm.className)){if(/function|object/i.test(typeof elm.focus)){elm.focus();break;}}}};GnufForm.prototype.validateAndClose=function(evt){var formToDisplayUpdatesForId=this.className.replace(/.*validate-form-([\w-]+(\b|$))/i,"$1");var formToDisplayUpdatesFor=$(formToDisplayUpdatesForId);var objIndex=formToDisplayUpdatesFor.form.className.replace(/.*obj-\w+(\d+).*/,"$1");if(objIndex.length>0){var obj=gnufFormControll.forms[objIndex];var isValid=obj.validateForm();if(isValid){var evt=(typeof evt!="undefined")?evt:event;if(/hide-element/i.test(this.className)){gnuf.hideElm(evt,this);}
if(formToDisplayUpdatesFor){obj.displayUpdatedInfoSummary(formToDisplayUpdatesForId);}}}
return false;};GnufForm.prototype.forceSubmission=function(){var objIndex=this.form.className.replace(/.*obj-\w+(\d+).*/,"$1");if(objIndex.length>0){gnufFormControll.forms[objIndex].forceSubmit=true;if(/submit-form-automatically/i.test(this.className)){this.form.submit();}}}
GnufForm.prototype.showElementBasedOnValue=function(){var className=this.className;var selectedClass=this.options[this.selectedIndex].className;if(/show-element-based-on-value/i.test(className)){var elmIdToShow=className.replace(/.*show-element-based-on-value-([\w-]+).*/i,"$1")
var elmToShow=$(elmIdToShow);if(elmToShow){if(/show/i.test(selectedClass)){elmToShow.addClass("display-table-row");}
else{elmToShow.removeClass("display-table-row")}}}
if(/country-selection/i.test(className)){var value=this.options[this.selectedIndex].value;var objIndex=this.form.className.replace(/.*obj-\w+(\d+).*/,"$1");if(typeof ajax!="undefined"&&objIndex.length>0){var obj=gnufFormControll.forms[objIndex];ajax.getContent(("/signup/get_country_data.php?country="+value),(obj.name+".changeCountrySelectionValues()"));}}}
GnufForm.prototype.changeCountrySelectionValues=function(){if(ajax.response){eval("countryValues = "+ajax.response);var countryCode=countryValues.countryCode;var phoneCountryCode=$("phone-country-code");if(phoneCountryCode){var phoneOptions=phoneCountryCode.options;var option;for(var i=0;i<phoneOptions.length;i++){option=phoneOptions[i];if(option.value==countryCode){option.selected=true;break;}}}
var mobileCountryCode=$("mobile-country-code");if(mobileCountryCode){var mobileOptions=mobileCountryCode.options;var option;for(var j=0;j<mobileOptions.length;j++){option=mobileOptions[j];if(option.value==countryCode){option.selected=true;break;}}}}}
GnufForm.prototype.submit=function(){var className=this.className;var objIndex=className.replace(/.*obj-\w+(\d+).*/,"$1");if(objIndex.length>0){var obj=gnufFormControll.forms[objIndex];var okToSubmit=(obj.forceSubmit)?true:obj.validateForm();if(!okToSubmit){var editingArea=$("gnuf-form-editing-area");if(editingArea){editingArea.addClass("display-block");}
if(!obj.showErrorDialog&&!obj.advancedModeDialog){FaT.setFocusToElm("form-errors",true,false,true);}}
else{if(/submit-to-new-win/i.test(className)){var gnufWin=window.open("","gnufFormWin");this.setAttribute("target","gnufFormWin");}
if(/redirect/i.test(className)){location.href=className.replace(/.*redirect-([\w\/-]+).*/,"$1");}}}
return okToSubmit;};GnufForm.prototype.validateForm=function(){var returnValue=true;var elm;var valid;if(returnValue){for(var i=0;i<this.mandatoryElements.length;i++){elm=this.mandatoryElements[i];valid=this.validateElm(elm,true);if(!valid){returnValue=false;if(this.showErrorDialog||this.advancedModeDialog){break;}}}}
return returnValue;};GnufForm.prototype.validateThis=function(blurEvent){var objIndex=this.form.className.replace(/.*obj-\w+(\d+).*/,"$1");if(objIndex.length>0){var obj=gnufFormControll.forms[objIndex];var isEmpty=(/^\s*$/.test(this.value)&&typeof this.selectedIndex=="undefined")||this.selectedIndex==0;if(!isEmpty){obj.validateElm(this,false);}
if(obj.showHelp){obj.hideHelpInfo();}}};GnufForm.prototype.validateElm=function(elm,validateEntireForm){this.currentElm=elm;var className=this.currentElm.className;var parent=$(this.currentElm.parentNode.parentNode);this.validElm=true;var isEmpty=false;if(/several-items-to-check/i.test(className)&&!validateEntireForm){this.severalItemsCurrentElm=this.currentElm;this.currentElm=null;return setTimeout((this.name+".severalItemsCheck()"),50);}
else if(!/optional/i.test(className)&&((/^\s*$/.test(this.currentElm.value)&&typeof this.currentElm.selectedIndex=="undefined")||this.currentElm.selectedIndex==0)){this.validElm=false;for(var i=0;i<this.errors.length;i++){if(this.errors[i][0]==this.currentElm){this.errors[i][2]=false;}}}
else if(/radio/i.test(this.currentElm.getAttribute("type"))&&!this.currentElm.checked){var radioButtons=parent.getElementsByClassName("several-items-to-check","*");this.validElm=false;if(radioButtons.length>0&&this.currentElm==radioButtons[0]){for(var j=0;j<radioButtons.length;j++){if(radioButtons[j].checked){this.validElm=true;}}}
else{return true;}}
else if(/validate-type/i.test(className)){this.validElm=this.validateType();}
if(this.validElm){if(/hide-hidden-functionality/i.test(className)){parent.removeClass("display-table-row");}
if(/validate-type-comparepassword/i.test(className)){var encryptionLevelElm=$("password-encryption-level-container");if(encryptionLevelElm){encryptionLevelElm.removeClass("display-table-row");}}}
if(!this.validElm&&this.showErrors&&this.useFadeForErrors&&!this.advancedModeDialog&&(typeof validateEntireForm=="undefined"||!validateEntireForm)){FaT.setFocusToElm("form-errors",true,false,true);}
if(this.showErrorDialog){this.displayErrorDialog();}
else{this.displayValidness();}
return this.validElm;};GnufForm.prototype.severalItemsCheck=function(){if(!this.currentElm||this.currentElm!=this.severalItemsCurrentElm){var validate=true;if(this.severalItemsCurrentElm){if(this.currentElm){var parent=this.currentElm.parentNode.parentNode;var severalItemsBlurParent=$(this.severalItemsCurrentElm.parentNode.parentNode);validate=(parent!=severalItemsBlurParent)?true:false;}
if(validate){var severalItemsBlurParent=$(this.severalItemsCurrentElm.parentNode.parentNode);var itemsToCheck=severalItemsBlurParent.getElementsByClassName("several-items-to-check","*");var item;var isValid=true;if(/radio/i.test(this.severalItemsCurrentElm.getAttribute("type"))){isValid=false;for(var i=0;i<itemsToCheck.length;i++){if(itemsToCheck[i].checked){isValid=true;}}
severalItemsBlurParent.removeClass("focus-elm");if(isValid){this.currentElm=this.severalItemsCurrentElm;this.displayValidness();}
else{this.markAsInvalid(itemsToCheck[0],false);}}
else{for(var j=0;j<itemsToCheck.length;j++){item=itemsToCheck[j];isValid=item.selectedIndex>0;this.updateErrorList(isValid,item);if((item.selectedIndex==0)){this.validElm=false;}}
this.currentElm=this.severalItemsCurrentElm;this.displayValidness();severalItemsBlurParent.removeClass("focus-elm");}}
this.currentElm=null;}
if(this.calculateHelpPos){this.helpDisplayElm.style.top=this.errorDisplayElm.offsetHeight+20+"px";}}
this.severalItemsCurrentElm=null;};GnufForm.prototype.validateType=function(){var valid=true;var elm=this.currentElm;var className=elm.className;var typeToValidate=className.replace(/.*validate-type-(\w+).*/,"$1");var value=elm.value.replace(/^\s*|\s*$/g,"");switch(typeToValidate){case"email":if(!/^[\w%_-]+(\.[\w%_-]+)*@([\w%_-]+\.)+[a-z]{2,4}$/i.test(value)){valid=false;for(var i=0;i<this.errors.length;i++){if(this.errors[i][0]==elm){this.errors[i][2]=false;}}}
else if(!/dont-check-availability/i.test(className)){this.checkIfAvailable();}
break;case"comparepassword":if(/compare-value-with/i.test(className)){var elmToCompareWith=$(className.replace(/.*compare-value-with-([\w-]+).*/,"$1"));if(elmToCompareWith){var compareValue=elmToCompareWith.value;if(compareValue.length>0&&value!=compareValue){valid=false;this.markAsInvalid(elm);}}}
else{valid=false;}
break;case"passwordemail":var emailValue=$("email-address").value;var minLength=4;if(value==emailValue||value.length<minLength){valid=false;}
else if(/[^\w]+/i.test(value)){valid=false;}
else{var elmToCompareWith=$(className.replace(/.*compare-value-with-([\w-]+).*/,"$1"));if(elmToCompareWith){var compareValue=elmToCompareWith.value;if(compareValue.length>0&&value!=compareValue){valid=false;this.markAsInvalid(elm);}}}
break;case"passwordlenght":var minLenght=4;if(value.length<minLenght){valid=false;}
break;case"textonly":var illegalChars=/[0-9]/;if(value.match(illegalChars)){valid=false;}
break;case"length":var maxLength=parseInt(elm.getAttribute("maxlength"),10);if(value.length!=maxLength){valid=false;}
break;case"length-mixed":var maxLength=parseInt(elm.getAttribute("maxlength"),10);if(value.length!=maxLength){valid=false;}
break;case"terms":var termsBox=$("terms-conditions");if(termsBox.checked==true){valid=true;}else{valid=false;}
break;case"phonenumber":if(!/^\d[/\-\s\d]*\d$/i.test(value)){valid=false;}
break;case"textonly":var illegalChars=/[0-9]/;if(value.match(illegalChars)){valid=false;}
break;case"digits":case"amount":case"withdraw":case"numberspan":if(/\D/.test(value)){valid=false;break;}
else{switch(typeToValidate){case"numberspan":var minVal=parseInt(className.replace(/.*span-(\d+).*/,"$1"),10);var maxVal=parseInt(className.replace(/.*span-\d+-(\d+).*/,"$1"),10);if(value.length<minVal||value.length>maxVal){valid=false;}
break;case"amount":var minAmount=parseInt(className.replace(/.*validate-type-amount-(\d+).*/,"$1"),10);var maxAmount=parseInt(className.replace(/.*validate-type-amount-\d+-(\d+).*/,"$1"),10);if(value>maxAmount||value<minAmount){valid=false;}
else if(/calculate-bonus/i.test(className)){if(typeof ajax!="undefined"){this.elementToCheck=this.currentElm;var currency=$('bonus-currency');ajax.getContent(("/bonus/bonus.php?amount="+this.elementToCheck.value+"&currency="+currency.value),(this.name+".showDepositBonus()"));}}
break;case"withdraw":var totalSum=parseInt($("total-allowed-sum").innerHTML/100,10);var totalAllowedSum=parseInt($("total-allowed-sum").className.replace(/prefilled-(\d+).*/i,"$1")/100,10);var sum=0;var rowSum=0;var parent=$(elm.parentNode.parentNode);var sumUpElements=$(this.form).getElementsByClassName("sum-up","*");var sumElm;var sumElmValue;var value;for(var i=0;i<sumUpElements.length;i++){sumElm=sumUpElements[i];sumElmValue=(typeof sumElm.value!="undefined")?sumElm.value:sumElm.innerHTML;value=(sumElmValue.length>0)?parseInt(sumElmValue,10):0;sum+=value;if(sumUpElements[i].parentNode.parentNode==parent){rowSum+=value;}}
if(sum>totalSum){valid=false;}
else{var rowSumUp=parent.getElementsByClassName("row-sum-up","span");if(rowSumUp.length>0){rowSumUp[0].innerHTML=rowSum;}
$("remaining").innerHTML=(totalSum-sum);$("sum-up").innerHTML=sum;}
break;}}}
return valid;};GnufForm.prototype.showDepositBonus=function(){bonusElm=$("bonus");if(ajax.response!="false"){bonusElm.innerHTML=ajax.response;}};GnufForm.prototype.checkIfAvailable=function(){if(typeof ajax!="undefined"){this.elementToCheck=this.currentElm;ajax.getContent(("/validations/validate.php?email="+this.elementToCheck.value),(this.name+".showIfAvailable()"));}};GnufForm.prototype.showIfAvailable=function(){if(ajax.response=="false"){setTimeout(this.name+".markAsInvalid("+this.name+".elementToCheck)",1);}};GnufForm.prototype.showPasswordEncryptionLevel=function(value){var encryptionLevelElm=$("password-encryption-level-container");if(encryptionLevelElm){value=(typeof value=="string")?value:this.value;encryptionLevelElm.addClass("display-table-row");var objIndex=this.form.className.replace(/.*obj-\w+(\d+).*/,"$1");if(objIndex.length>0){gnufFormControll.forms[objIndex].checkEncryptionLevel(value);}}};GnufForm.prototype.checkEncryptionLevel=function(value){if(this.passwordEncryptionLevels.length==4){var encryptionLevel=0;for(var i=0;i<this.passwordEncryptionLevels.length;i++){$(this.passwordEncryptionLevels[i]).removeClass("display-block");}
if(value.length>5){if(/\d+/.test(value)&&/[A-Z]+/.test(value)&&/[a-z]+/.test(value)){encryptionLevel=3;}
else if((!/\d+/.test(value)&&/[A-Z]+/.test(value)&&/[a-z]+/.test(value))||(/\d+/.test(value)&&(/[A-Z]+/.test(value)||/[a-z]+/.test(value)))){encryptionLevel=2;}
else if((/\d+/.test(value)&&!/[A-Z]+/i.test(value))||(!/\d+/.test(value)&&/[A-Z]+/i.test(value))){encryptionLevel=1;}}
$(this.passwordEncryptionLevels[encryptionLevel]).addClass("display-block");}};GnufForm.prototype.displayValidImage=function(){var isValidImg=$(this.currentElm.parentNode.parentNode).getElementsByClassName("is-valid-img","img");if(isValidImg.length>0){var img=$(isValidImg[0]);var imgSrc=img.getAttribute("src");imgSrc=(this.validElm)?imgSrc.replace(/(\/)invalid/i,"$1valid"):imgSrc.replace(/(\/)valid/i,"$1invalid");img.setAttribute("src",imgSrc);img.addClass("is-valid-img-show");}};GnufForm.prototype.displayValidness=function(){if(this.validateElements){this.displayValidImage();var parent=$(this.currentElm.parentNode.parentNode);if(this.validElm){parent.removeClass("invalid-elm");}
else{parent.addClass("invalid-elm");}}
if(this.showErrors){if(this.advancedModeDialog){this.displayErrorDialog();}
else{this.displayErrors();}}
else{this.currentElm=null;}};GnufForm.prototype.markAsInvalid=function(elm,specificErrorText){var parentElm=$(elm.parentNode.parentNode);var isValidImg=parentElm.getElementsByClassName("is-valid-img","img");if(isValidImg.length>0){var img=$(isValidImg[0]);var imgSrc=img.getAttribute("src").replace(/(\/)valid/i,"$1invalid");;img.setAttribute("src",imgSrc);img.addClass("is-valid-img-show");}
parentElm.addClass("invalid-elm");parentElm.removeClass("valid-form-item");if(typeof specificErrorText=="undefined"){specificErrorText=true;}
this.displayErrors(false,elm,specificErrorText);if(this.helpIsVisible){var offsetFromTop=this.currentElm.parentNode.parentNode.offsetTop;if(this.showErrors){if(this.errorDisplayElm.offsetHeight>offsetFromTop){offsetFromTop=this.errorDisplayElm.offsetHeight+20;}}
this.helpDisplayElm.style.top=offsetFromTop+"px";}};GnufForm.prototype.updateErrorList=function(isValid,elm,useSpecialText){var numberOfErrors=0;var elmToCheck=(typeof elm!="undefined")?elm:this.currentElm;var index;for(var i=0;i<this.errors.length;i++){if(this.errors[i][0]==elmToCheck){this.errors[i][1]=(isValid)?false:true;if(useSpecialText){this.errors[i][2]=useSpecialText;}}
if(this.errors[i][1]){numberOfErrors++;}}
this.numberOfErrors=numberOfErrors;};GnufForm.prototype.getHelpInfo=function(){var objIndex=this.form.className.replace(/.*obj-\w+(\d+).*/,"$1");if(objIndex.length>0){gnufFormControll.forms[objIndex].displayHelpInfo(this);}};GnufForm.prototype.displayHelpInfo=function(elm,setFocus){this.currentElm=elm;if(setFocus){if(/function|object/i.test(typeof this.currentElm.focus)){this.currentElm.focus();}}
if(/extended-hidden-functionality/i.test(this.currentElm.className)){var row=this.currentElm.parentNode.parentNode;var rowIndex=row.rowIndex+1;var table=row.parentNode.parentNode;if(table.rows.length>rowIndex){var nextRow=table.rows[rowIndex];while(nextRow&&!/hidden-functionality/i.test(nextRow.className)&&rowIndex<table.rows.length){nextRow=table.rows[++rowIndex];}
$(nextRow).addClass("display-table-row");}}
if(/check-encryption-level/i.test(this.currentElm.className)){this.showPasswordEncryptionLevel(this.currentElm.value);}
var parent=$(this.currentElm.parentNode.parentNode);var fieldTitle=parent.getElementsByClassName("field-title","span");if(fieldTitle.length>0){var formHelpHeading=$("form-help-heading");if(formHelpHeading){formHelpHeading.innerHTML=fieldTitle[0].innerHTML;}}
var fieldHelp=parent.getElementsByClassName("field-help","span");if(fieldHelp.length>0){var helpIndex=0;if(/several-items-to-check/i.test(this.currentElm.className)){var itemsToCheck=parent.getElementsByClassName("several-items-to-check","*");var item;for(var i=0;i<itemsToCheck.length;i++){item=itemsToCheck[i];if(item==this.currentElm){helpIndex=i;}}}
$("form-help-text").innerHTML=fieldHelp[helpIndex].innerHTML;}
if(this.calculateHelpPos){var offsetFromTop=this.currentElm.parentNode.parentNode.offsetTop;if(this.showErrors){if(this.errorDisplayElm&&this.errorDisplayElm.offsetHeight>offsetFromTop){offsetFromTop=this.errorDisplayElm.offsetHeight+20;}}
if(this.helpDisplayElm){this.helpDisplayElm.style.top=offsetFromTop+"px";}}
parent.addClass("focus-elm");if(this.helpDisplayElm){this.helpDisplayElm.addClass("form-help-show");}
this.helpIsVisible=true;};GnufForm.prototype.hideHelpInfo=function(){var objIndex=this.form.className.replace(/.*obj-\w+(\d+).*/,"$1");if(objIndex.length>0){var obj=gnufFormControll.forms[objIndex];if(obj.currentElm){var parent=$(obj.currentElm.parentNode.parentNode);parent.removeClass("focus-elm");}
if(obj.helpDisplayElm){obj.helpDisplayElm.removeClass("form-help-show");}
obj.helpIsVisible=false;}};GnufForm.prototype.displayErrors=function(invalid,specificElm,useSpecialText){var isValid=(typeof invalid!="undefined")?invalid:this.validElm;var elmToCheck=(typeof specificElm!="undefined")?specificElm:this.currentElm;if(/several-items-to-check/i.test(elmToCheck.className)&&elmToCheck.selectedIndex>0){isValid=true;}
this.updateErrorList(isValid,elmToCheck,useSpecialText);if(this.showErrors&&this.numberOfErrors>0){this.errorDisplayElm.addClass("form-errors-show");for(var i=(this.errorListElm.childNodes.length-1);i>=0;i--){this.errorListElm.childNodes[i].parentNode.removeChild(this.errorListElm.childNodes[i]);}
var elm;var listItem;var arrElementTexts;var parent;var fieldTitle;var fieldError;var errorIndex;var itemsToCheck;var item;for(var j=0;j<this.errors.length;j++){elm=this.errors[j];if(elm[1]){listItem=document.createElement("li");parent=$(elm[0].parentNode.parentNode);fieldTitle=parent.getElementsByClassName("field-title","span");fieldTitle=(fieldTitle.length>0)?fieldTitle[0].innerHTML:"";if(elm[2]){fieldError=parent.getElementsByClassName("field-error-specific","span");}
else{fieldError=parent.getElementsByClassName("field-error","span");}
if(fieldError.length>0){errorIndex=0;if(/several-items-to-check/i.test(elm[0].className)){itemsToCheck=parent.getElementsByClassName("several-items-to-check","*");item;for(var k=0;k<itemsToCheck.length;k++){item=itemsToCheck[k];if(item==elm[0]){errorIndex=k;}}}
listItem.innerHTML=fieldError[errorIndex].innerHTML;}
this.errorListElm.appendChild(listItem);}}
$("form-errors-heading").innerHTML=(this.numberOfErrors>1)?(this.yourFormHasErrorsText+this.numberOfErrors+this.errorsText):(fieldTitle+this.errorText);if(this.helpIsVisible){var offsetFromTop=this.currentElm.parentNode.parentNode.offsetTop;if(this.showErrors){if(this.errorDisplayElm.offsetHeight>offsetFromTop){offsetFromTop=this.errorDisplayElm.offsetHeight+20;}}
this.helpDisplayElm.style.top=offsetFromTop+"px";}}
else{this.errorDisplayElm.removeClass("form-errors-show");}};GnufForm.prototype.displayUpdatedInfoSummary=function(elmToLookIn){var elmToLookIn=$(elmToLookIn);if(elmToLookIn){var elements=elmToLookIn.getElementsByTagName("*");var elm;var isRadioButton;var id;var displayElm;var displayValue;var displayValueToAdd;for(var i=0;i<elements.length;i++){elm=elements[i];if(/input|textarea|select/i.test(elm.nodeName)&&!/image|button|submit/i.test(elm.getAttribute("type"))){isRadioButton=(/radio/i.test(elm.getAttribute("type")))?true:false;if(isRadioButton&&!elm.checked){continue;}
id=((isRadioButton)?elm.getAttribute("name"):elm.getAttribute("id"))+"-display";displayElm=$(id);if(displayElm){if(/several-items-to-check/i.test(elm.className)&&!/radio/i.test(elm.getAttribute("type"))){var parent=$(elm.parentNode.parentNode);var itemsToCheck=parent.getElementsByClassName("several-items-to-check","*");displayValue="";var item;for(var j=0;j<itemsToCheck.length;j++){item=itemsToCheck[j];if(/date-of-birth-month/i.test(item.getAttribute("id"))){displayValueToAdd=this.monthNames[item.selectedIndex-1];}
else if(/date-of-birth-date/i.test(item.getAttribute("id"))){displayValueToAdd=this.dateNames[item.selectedIndex-1];}
else{displayValueToAdd=((/select/i.test(item.nodeName))?item.options[item.selectedIndex].value:item.value);}
displayValue+=displayValueToAdd+" ";}}
else if(/select/i.test(elm.nodeName)){displayValue=elm.options[elm.selectedIndex].text;}
else if(/password/i.test(elm.getAttribute("id"))){displayValue=elm.value.replace(/./g,"*");}
else if(/checkbox/i.test(elm.getAttribute("type"))){displayValue=(elm.checked)?elm.value:this.notChosenText;}
else{displayValue=elm.value;}
displayElm.innerHTML=displayValue;}}}}};GnufForm.prototype.displayErrorDialog=function(){var errorDialog=gnufFormControll.errorDialog;if(errorDialog){if(this.validElm){errorDialog.style.display="none";}
else{var parent=$(this.currentElm.parentNode.parentNode);var fieldTitle=parent.getElementsByClassName("error-title","span");$("error-dialog-heading").innerHTML=(fieldTitle.length>0)?fieldTitle[0].innerHTML:"";var fieldError=parent.getElementsByClassName("error-text","span");$("error-dialog-text").innerHTML=(fieldError.length>0)?fieldError[0].innerHTML:"";var offset=this.getOffsetFromWindow(this.currentElm);errorDialog.style.left=offset[0]+"px";errorDialog.style.display="block";FaT.setFocusToElm(gnufFormControll.errorDialog.getAttribute("id"),true);errorDialog.style.top=(offset[1]-errorDialog.offsetHeight)+"px";clearTimeout(this.errorDialogTimer);this.errorDialogTimer=setTimeout((this.name+".fadeOutErrorDialog()"),4000);}}};GnufForm.prototype.fadeOutErrorDialog=function(){var errorDialog=gnufFormControll.errorDialog;if(errorDialog){FaT.functionToCallWhenClearFocus=this.name+".hideErrorDialog()";FaT.setFocusToElm(gnufFormControll.errorDialog.getAttribute("id"),false,true);}};GnufForm.prototype.hideErrorDialog=function(){var errorDialog=gnufFormControll.errorDialog;if(errorDialog){errorDialog.style.display="none";}};GnufForm.prototype.getOffsetFromWindow=function(elm){var offsetLeft=0;var offsetTop=0;var tempOffsetTop;while(elm.offsetParent){offsetLeft+=elm.offsetLeft;offsetTop+=elm.offsetTop;if(elm.scrollTop>0){offsetTop-=elm.scrollTop;}
elm=elm.offsetParent;}
return[offsetLeft,offsetTop];};var FlashReplace={elmToReplace:null,flashIsInstalled:null,defaultFlashVersion:7,replace:function(elmToReplace,src,id,width,height,version,params){this.elmToReplace=document.getElementById(elmToReplace);this.flashIsInstalled=this.checkForFlash(version||this.defaultFlashVersion);if(this.elmToReplace&&this.flashIsInstalled){var obj='<object'+((window.ActiveXObject)?' id="'+id+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" data="'+src+'"':'');obj+=' width="'+width+'"';obj+=' height="'+height+'"';obj+='>';param='<param';param+=' name="movie"';param+=' value="'+src+'"';param+='>';param+='';var extraParams='';var extraAttributes='';for(var i in params){extraParams+='<param name="'+i+'" value="'+params[i]+'">';extraAttributes+=' '+i+'="'+params[i]+'"';}
var embed='<embed id="'+id+'" src="'+src+'" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"';var embedEnd=extraAttributes+'></embed>';var objEnd='</object>';this.elmToReplace.innerHTML=obj+param+extraParams+embed+embedEnd+objEnd;}},checkForFlash:function(version){this.flashIsInstalled=false;if(window.ActiveXObject){try{var flash=new ActiveXObject(("ShockwaveFlash.ShockwaveFlash."+version));this.flashIsInstalled=true;}
catch(e){}}
else if(navigator.plugins&&navigator.mimeTypes.length>0){var flash=navigator.plugins["Shockwave Flash"];if(flash){var flashVersion=navigator.plugins["Shockwave Flash"].description.replace(/.*(\d+\.\d+).*/,"$1");if(flashVersion>=version){this.flashIsInstalled=true;}}}
return this.flashIsInstalled;}};var gnufPreload={images:["/images/header-bg.jpg"],init:function(){for(var i=0;i<this.images.length;i++){new Image().src=this.images[i];}}}
var GLT={titleClassName:"glt-elm",topImagePath:"/images/tooltip-rounded-top.png",bottomImagePath:"/images/tooltip-rounded-bottom.png",suppressAltTooltipsInIE:true,timeBeforeShow:500,titleOffsetX:30,titleOffsetY:0,fadeInTitle:true,fadeOutTitle:true,fadeStartLevel:0.5,originalFadeLevel:0.9,fadeIncrement:0.1,timePerFadeStep:50,titleElm:null,titleTextElm:null,titleTopImage:null,titleBottomImage:null,elementsWithTitles:null,currentElm:null,currentTitle:"",currentFadeLevel:0,fadeTimer:null,imagesAreEnabled:true,init:function(){if(document.getElementById){this.elementsWithTitles=getElementsByAttribute(document,"*","title");if(this.elementsWithTitles.length>0){this.titleElm=document.createElement("div");this.titleElm.className=this.titleClassName;if(this.topImagePath){this.titleTopImage=document.createElement("img");this.titleTopImage.setAttribute("src",this.topImagePath);this.titleElm.appendChild(this.titleTopImage);}
this.titleTextElm=document.createElement("p");this.titleElm.appendChild(this.titleTextElm);if(this.bottomImagePath){this.titleBottomImage=document.createElement("img");this.titleBottomImage.setAttribute("src",this.bottomImagePath);this.titleElm.appendChild(this.titleBottomImage);}
document.body.appendChild(this.titleElm);this.useMSFilter=typeof this.titleElm.style.filter!="undefined";var images=document.getElementsByTagName("img");if(images.length>0&&typeof images[0].readyState!="undefined"){if(images[0].readyState!="complete"){GLT.imagesAreEnabled=false;}}
this.applyEvents();}}},applyEvents:function(){var oElm;var strClassName;var images;if(this.imagesAreEnabled){for(var i=0;i<this.elementsWithTitles.length;i++){oElm=this.elementsWithTitles[i];if(this.suppressAltTooltipsInIE){oElm.setAttribute("alt","");images=oElm.getElementsByTagName("img");if(images.length>0&&typeof images[0].readyState!="undefined"){for(var j=0;j<images.length;j++){images[j].setAttribute("alt","");}}}
oElm.onmouseover=GLT.mouseOverElm;oElm.onmouseout=GLT.mouseOutElm;}
if(this.clickDocumentToClearFocus){this.addEvent(document,"click",function(){FaT.clearFocus();},false);}}},mouseOverElm:function(oEvent){},mouseOutElm:function(oEvent){var oEvent=(typeof oEvent!="undefined")?oEvent:event;if(typeof GLT!="undefined"){GLT.hideTitle(this,oEvent);}},startTimer:function(oElm,oEvent){if(!this.currentElm||this.currentElm!=oElm||this.fadeTimer>0){if(this.fadeTimer){clearTimeout(this.fadeTimer);}
if(this.currentElm){this.hideTitle(null,false,true);}
this.currentElm=oElm;this.currentTitle=this.currentElm.getAttribute("title");this.currentElm.setAttribute("title","");this.currentX=oEvent.clientX;this.currentY=oEvent.clientY;this.fadeTimer=setTimeout("GLT.showTitle()",GLT.timeBeforeShow);}},stopTimer:function(oElm){clearTimeout(GLT.fadeTimer);},showTitle:function(){},hideTitle:function(oElm,oEvent,forceHide){if(this.currentElm&&(oElm||forceHide)){var bIsChildOfCurrentElm=false;if(typeof oEvent!="undefined"&&typeof oEvent=="object"){var oEventTarget=(typeof oEvent.relatedTarget!="undefined")?oEvent.relatedTarget:oEvent.toElement;if(oEventTarget){while(!bIsChildOfCurrentElm&&oEventTarget&&oEventTarget.nodeName&&oEventTarget.nodeName.search(/body/i)==-1){if(oEventTarget==oElm){bIsChildOfCurrentElm=true;break;}
oEventTarget=oEventTarget.parentNode;}}}
if(!bIsChildOfCurrentElm){this.stopTimer();if(this.fadeOutTitle&&(typeof forceHide=="undefined"||!forceHide)){this.fadeOut();}
else{clearTimeout(this.fadeTimer);this.currentElm.setAttribute("title",this.currentTitle);this.currentElm=null;this.titleElm.style.visibility="hidden";}}}},setTitlePos:function(){var arrScroll=this.getWinSizeAndScroll();var intTitleElmWidthAndPos=this.titleElm.offsetWidth+this.currentX+this.titleOffsetX;var intDiff=intTitleElmWidthAndPos-arrScroll[0];var intX=(intDiff>0)?(this.currentX-intDiff):(this.currentX+this.titleOffsetX);this.titleElm.style.left=intX+arrScroll[2]+"px";this.titleElm.style.top=this.currentY+arrScroll[3]+this.titleOffsetY+"px";},fadeIn:function(fadeOut){this.currentFadeLevel=this.currentFadeLevel+this.fadeIncrement;if(this.currentFadeLevel<this.originalFadeLevel){this.fadeTimer=setTimeout("GLT.fadeIn()",GLT.timePerFadeStep);}
else{this.currentFadeLevel=this.originalFadeLevel;clearTimeout(this.fadeTimer);}
this.setFade();},fadeOut:function(){this.currentFadeLevel=this.currentFadeLevel-this.fadeIncrement;if(this.currentFadeLevel>this.fadeStartLevel){this.fadeTimer=setTimeout("GLT.fadeOut()",GLT.timePerFadeStep);}
else{this.currentFadeLevel=this.originalFadeLevel;this.hideTitle(null,false,true);}
this.setFade();},setFade:function(){this.currentFadeLevel=Math.round(this.currentFadeLevel*10)/10;if(this.titleElm){if(this.useMSFilter){this.titleElm.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+(this.currentFadeLevel*100)+")";}
else{this.titleElm.style.opacity=this.currentFadeLevel;}}},getWinSizeAndScroll:function(){var intWidth=document.body.offsetWidth;var intHeight=(typeof window.innerHeight!="undefined")?window.innerHeight:(document.documentElement&&document.documentElement.clientHeight>0)?document.documentElement.clientHeight:document.body.clientHeight;var intXScroll=(typeof window.pageXOffset!="undefined")?window.pageXOffset:document.body.scrollLeft;var intYScroll=(typeof window.window.pageYOffset!="undefined")?window.window.pageYOffset:(document.documentElement&&document.documentElement.scrollTop>0)?document.documentElement.scrollTop:document.body.scrollTop;return[intWidth,intHeight,intXScroll,intYScroll];},closeSession:function(oEvent){this.removeEvent(window,"load",function(){GLT.init();},false);GLT=null;delete GLT;}};ELO.functionsToCallOnload.push("GLT.init()");function getElementsByAttribute(oElm,strTagName,strAttributeName,strAttributeValue){var arrElements=(strTagName=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(strTagName);var arrReturnElements=new Array();var oAttributeValue=(typeof strAttributeValue!="undefined")?new RegExp("(^|\\s)"+strAttributeValue+"(\\s|$)"):null;var oCurrent;var oAttribute;for(var i=0;i<arrElements.length;i++){oCurrent=arrElements[i];oAttribute=oCurrent.getAttribute&&oCurrent.getAttribute(strAttributeName);if(typeof oAttribute=="string"&&oAttribute.length>0){if(typeof strAttributeValue=="undefined"||(oAttributeValue&&oAttributeValue.test(oAttribute))){arrReturnElements.push(oCurrent);}}}
return arrReturnElements;}
if(typeof Array.prototype.push!="function"){Array.prototype.push=ArrayPush;function ArrayPush(value){this[this.length]=value;}}