JS_HELPOFF=false;DOM=(document.getElementById)?1:0;NS4=(document.layers)?1:0;IE4=(document.all)?1:0;OPERA=(navigator.userAgent.indexOf("Opera 5")>-1||navigator.userAgent.indexOf("Opera/5")>-1||navigator.userAgent.indexOf("Opera 6")>-1||navigator.userAgent.indexOf("Opera/6")>-1)?1:0;function insertTag(obj,stag,etag)
{if(navigator.userAgent.indexOf("MSIE")>-1&&!OPERA){insertTagIE(obj,stag,etag);}
else{insertTagNS(obj,stag,etag);}}
function insertTagNS(obj,stag,etag)
{obj.value=obj.value+stag+etag;}
function insertTagIE(obj,stag,etag)
{r=document.selection.createRange();if(document.selection.type=='Text'&&(obj.value.indexOf(r.text)!=-1)){a=r.text;r.text=stag+r.text+etag;if(obj.value.indexOf(document.selection.createRange().text)==-1){document.selection.createRange().text=a;}}
else insertAtCaret(obj,stag+etag);}
function dialogTag(obj,qst,def,stag,etag)
{var q;q=prompt(qst,def);if(!q)return;stag=stag.replace(/%s/i,q);insertTag(obj,stag,etag);}
function url_insert()
{if(check_selection())
dialogTag(document.post_form.msg_body,'Location:','http://','[url=%s]','[/url]');else
dialogTag(document.post_form.msg_body,'Location:','http://','[url]%s[/url]','');}
function check_selection()
{var rn;var sel;if(document.layers)return 0;if(navigator.userAgent.indexOf("MSIE")<0)return 0;r=document.selection.createRange();if(r.text.length&&(document.post_form.msg_body.value.indexOf(r.text)!=-1)){a=document.selection.createRange().text;rn=Math.random();r.text=r.text+' '+rn;if(document.post_form.msg_body.value.indexOf(rn)!=-1){sel=1;}else{sel=0;}
document.selection.createRange().text=a;}
return sel;}
function storeCaret(textEl)
{if(textEl.createTextRange)textEl.caretPos=document.selection.createRange().duplicate();}
function insertAtCaret(textEl,text)
{if(textEl.createTextRange&&textEl.caretPos)
{var caretPos=textEl.caretPos;caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==' '?text+' ':text;}
else
textEl.value=textEl.value+text;}
function email_insert()
{if(check_selection()){dialogTag(document.post_form.msg_body,'Email:','','[url=mailto:%s]','[/url]');}
else
dialogTag(document.post_form.msg_body,'Email:','','[email]%s[/email]','');}
function image_insert()
{dialogTag(document.post_form.msg_body,'Image URL:','http://','[img]%s[/img]','');}
function insertParentTagIE(stag,etag)
{r=window.opener.document.selection.createRange();obj=window.opener.document.post_form.msg_body;if(window.opener.document.selection.type=='Text'&&(obj.value.indexOf(r.text)!=-1)){a=r.text;r.text=stag+r.text+etag;if(obj.value.indexOf(window.opener.document.selection.createRange().text)==-1){window.opener.document.selection.createRange().text=a;}}
else insertAtCaret(obj,stag+etag);}
function insertParentTagNS(stag,etag)
{window.opener.document.post_form.msg_body.value=window.opener.document.post_form.msg_body.value+stag+etag;}
function insertParentTag(stag,etag)
{if(document.all)
insertParentTagIE(stag,etag);else
insertParentTagNS(stag,etag);}
function window_open_options(url,winName,width,height,more)
{xpos=(screen.width-width)/2;ypos=(screen.height-height)/2;options="scrollbars=1,width="+width+",height="+height+",left="+xpos+",top="+ypos+"position:absolute"+(more==""?"":","+more);window.open(url,winName,options);}
function window_open(url,winName,width,height)
{window_open_options(url,winName,width,height,"");}
function gotoURL(url)
{window.location=url;}
function putFocus(formInst,elementInst)
{if(document.forms.length>0)
{document.forms[formInst].elements[elementInst].focus();}}
function forceSubmit(form,action)
{form.action=action;form.submit();}
function layerVis(layer,on)
{if(on){if(DOM)
document.getElementById(layer).style.visibility="visible";else if(NS4)
document.layers[layer].visibility="show";else if(IE4)
document.all[layer].style.visibility="visible";}else{if(DOM)
document.getElementById(layer).style.visibility="hidden";else if(NS4)
document.layers[layer].visibility="hide";else if(IE4)
document.all[layer].style.visibility="hidden";}}
function showHide(elementID,show)
{el=document.getElementById(elementID);if(el!=null)
{if(show)
el.style.display="";else
el.style.display="none";}}
function isShown(item)
{el=document.getElementById(item);if(el!=null)
return(el.style.display!="none");}
function displayAdd(user,site)
{var str;str='<a class="GenLink" href=\"';str+='mail';str+='to:'+user+'@';str+=site+'\">';str+=user;str+='@';str+=site;str+='</a>';document.write(str);}
function displayAddWithBody(user,site,body)
{var str;str='<a class="GenLink" href=\"';str+='mail';str+='to:'+user+'@';str+=site+'\">';str+=body;str+='</a>';document.write(str);}
function startPostForm(enctype)
{var str;str='<fo';str+='rm metho';str+='d="POST"';if(enctype!='')
{str+='enctype="'+enctype+'"';}
str+='>';document.write(str);}
function endPostForm()
{str='</fo';str+='rm>';document.write(str);}
function setText(id,txt)
{el=document.getElementById(id);if(el!=null)
{el.innerHTML=txt;}}
function getText(id,txt)
{el=document.getElementById(id);if(el!=null)
{return el.innerHTML;}
else
{return null;}}
function setBox(selBoxID,isOn)
{el=document.getElementById(selBoxID);if(el!=null)
{el.checked=isOn;}}
function isOn(selBoxID)
{el=document.getElementById(selBoxID);if(el!=null)
{return el.checked;}
else
{return false;}}
function formatNumber(val)
{val=Math.round(val*100.0)/100.0;str=val.toString();if(str.match(/^[0-9\-]+$/))
{str=str+".00";}
else if(str.match(/^[0-9\-]+\.\d$/))
{str=str+"0";}
return str;}
function round00(val)
{return Math.round(val*100.0)/100.0;}
var replacement_imageLoaded=false;var replacement_enddocument=false;var replacement_testURL="";if(window.location.toString().match(/^https:.*/))
{replacement_testURL="/lang/english/images/replacement_test.png";}
else
{replacement_testURL="http://static1.daysofwonder.com/lang/english/images/replacement_test.png";}
function Map(){this.map=new Object();this.add=function(k,o){this.map[k]=o;}
this.remove=function(k){delete this.map[k];}
this.get=function(k){return k==null?null:this.map[k];}
this.first=function(){return this.get(this.nextKey());}
this.next=function(k){return this.get(this.nextKey(k));}
this.nextKey=function(k){for(i in this.map){if(!k)return i;if(k==i)k=null;}
return null;}}
function Mutex(cmdObject,methodName)
{if(!Mutex.Wait)Mutex.Wait=new Map();Mutex.SLICE=function(cmdID,startID){Mutex.Wait.get(cmdID).attempt(Mutex.Wait.get(startID));}
this.attempt=function(start){for(var j=start;j;j=Mutex.Wait.next(j.c.id)){if(j.enter||(j.number&&(j.number<this.number||(j.number==this.number&&j.c.id<this.c.id))))
return setTimeout("Mutex.SLICE("+this.c.id+","+j.c.id+")",10);}
this.c[this.methodID]();this.number=0;Mutex.Wait.remove(this.c.id);}
this.c=cmdObject;this.methodID=methodName;Mutex.Wait.add(this.c.id,this);this.enter=true;this.number=(new Date()).getTime();this.enter=false;this.attempt(Mutex.Wait.first());}
function replacementFooterLaunch(){new Mutex(new replacementFooterCmd(),"go");}
function replacementImageLaunch(){new Mutex(new replacementImageCmd(),"go");}
var NEXT_CMD_ID=0;function replacementFooterCmd()
{this.id=++NEXT_CMD_ID;this.go=function()
{replacement();}}
function replacementImageCmd()
{this.id=++NEXT_CMD_ID;this.go=function()
{replacement();}}
function replacement()
{var items;var foundList=null;var file_location="";if(window.location.toString().match(/^https:.*/))
{file_location="https://www.daysofwonder.com/en/heading/";}
else
{file_location="http://www.daysofwonder.com/en/heading/";}
replaceSelector("default_title",file_location,false);replaceSelector("default_bigtitle",file_location,false);replaceSelector("_title",file_location,false);replaceSelector("games_title",file_location,false);replaceSelector("commu_title",file_location,false);replaceSelector("store_title",file_location,false);replaceSelector("play_title",file_location,false);replaceSelector("company_title",file_location,false);replaceSelector("backoffice_title",file_location,false);replaceSelector("welcome_title",file_location,false);replaceSelector("account_title",file_location,false);replaceSelector("userpages_title",file_location,false);replaceSelector("special",file_location,false);function replaceSelector(selector,url,wordwrap)
{if(typeof items=="undefined")
items=new Array();regexp=new RegExp('\\b'+selector+'\\b');items[items.length]={selector:selector,url:url,wordwrap:wordwrap,regexp:regexp};}
function traverse(el,tagName)
{html_nodes=el.getElementsByTagName(tagName);for(var i=0;i<html_nodes.length;i++)
{elem=html_nodes[i];for(var j=0;j<items.length;j++)
{if(items[j].regexp.test(elem.className))
{foundList[foundList.length]=elem;break;}}}}
function replacement_fast()
{foundList=new Array();traverse(document,'h1');traverse(document,'span');for(var i=0;i<foundList.length;i++)
{var element=foundList[i];if(element)
{var item=null;for(var j=0;j<items.length;j++)
{if(items[j].regexp.test(element.className))
{item=items[j];break;}}
if(item)
{var text=extractText(element);if(text!='')
{while(element.hasChildNodes())element.removeChild(element.firstChild);var tokens=item.wordwrap?text.split(' '):[text];for(var k=0;k<tokens.length;k++)
{var url;if(item.wordwrap)
url=item.url+"?text="+encodeURIComponent(tokens[k]+' ')+"&selector=."+encodeURIComponent(item.selector);else
url=item.url+"?text="+encodeURIComponent(tokens[k])+"&selector=."+encodeURIComponent(item.selector);var image=document.createElement("img");image.className="replacement";image.alt=tokens[k];image.src=url;element.appendChild(image);}}}}}}
function extractText(element)
{if(typeof element=="string")
return element;else if(typeof element=="undefined")
return element;else if(element.innerText)
return element.innerText;var text="";var kids=element.childNodes;for(var i=0;i<kids.length;i++)
{if(kids[i].nodeType==1)
text+=extractText(kids[i]);else if(kids[i].nodeType==3)
text+=kids[i].nodeValue;}
return text;}
replacement_fast();}
function trigger_replacement(){if(typeof replacement_timeout!="undefined"){var replacement_timeout=0;}
if(document.createElement&&document.getElementsByTagName&&!navigator.userAgent.match(/opera\/?6/i)){replacement_enddocument=true;if(replacement_imageLoaded&&replacement_timeout>0){setTimeout("replacement();",replacement_timeout);}else{replacement();}}}
var test=new Image();test.onload=function(){replacement_imageLoaded=true;if(replacement_enddocument)replacement();};test.src=replacement_testURL;