var minCreatorHeight=592;var maxCreatorHeight=700;function wizardCreatorComplete(){var b=document.getElementById("theForm");if(b){updateToken(b);b.submit()}}function getFormValue(b){var c=document.getElementById(b);if(c){return c.value}else{return null}}function setFormValue(b,c){var d=document.getElementById(b);if(d){document.getElementById(b).value=c}else{Tapestry.error(b+" is not a valid hidden input.")}}function reportAnalytics(b){}function renderWizardCreator(d){var e="";var g=staticJavaScriptRoot;var b=staticJavaScriptRoot;if(kiFlashEnabled&&d!=null){if(kiIsBackend){g=staticJavaScriptRoot}var k=g+"/themes/wizardCreator/common/flash/WizardCreator.swf?bn="+bn;if(d.wcPath){k=d.wcPath}var j=d.transparent;var c="950px";var h="100%";var f=flashSettings.length;flashSettings.push(d);e+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+c+'" height="'+h+'" id="wizardCreator" align="center" valign="top">';e+='<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" />';e+='<param name="FlashVars" value="staticFileRoot='+g+"&currentTheme="+currentTheme+"&id="+f+"&usingCDN="+kiCdnEnabled+"&staticJavascript="+b+"&wrapper="+wrapperTemplate+"&isMac="+isMac+'" />';e+='<param name="movie" value="'+k+'" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="bgcolor" value="#000000" />';if(j){e+='<param name="wmode" value="transparent" />'}e+='<embed src="'+k+'"';if(j){e+=' wmode="transparent"'}e+=' FlashVars="staticFileRoot='+g+"&currentTheme="+currentTheme+"&id="+f+"&usingCDN="+kiCdnEnabled+"&staticJavascript="+b+"&wrapper="+wrapperTemplate+"&isMac="+isMac+'" quality="high" scale="noscale" width="'+c+'" height="'+h+'" name="wizardCreator" align="center" valign="top" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" bgcolor="#000000"/></object>'}else{if(d.noFlashURL){if(!isFF){window.top.location=d.noFlashURL}else{setTimeout("window.top.location = '"+d.noFlashURL+"'",1)}}else{e+='<div><table width="100%" cellspacing="0" cellpadding="0" border="0" id="contentBoxTable" class="contentbox"><tbody><tr><td class="emptybox_text">';e+='<div style="position: absolute; margin:100px 0 0 321px;text-align:center;">';e+='<a href="/user/registration/wizardcreator/start/start"><img src="'+staticFileRoot+'/themes/global/images/spacer.gif" onmouseover="this.src=\''+staticFileRoot+"/themes/wizardCreator/common/images/play_over.png';\" onmouseout=\"this.src='"+staticFileRoot+'/themes/global/images/spacer.gif\';" border="0" width="190" height="190"/></a>';e+="</div>";e+='<div style="position: absolute; z-index: 100;background-color:#fff;width:400px;padding:10px 0;margin:336px 0 0 211px;text-align:center;border:solid 2px Red;"><span style="font-size:24px;font-weight:bold;">This content requires Flash</span><br/><a href="http://get.adobe.com/flashplayer/">Download the free Flash Player now!</a></div>';e+='<div style="position: absolute; z-index: 5;" id="logoContainer"><a href="'+d.homepageLink+'"><img src="'+g+'/themes/wizardCreator/common/images/splashlogo.gif" id="logo"/></a></div>';e+='<table cellspacing="0" cellpadding="0" border="0" style="margin: 500px 0pt 0pt 281px; position: absolute; z-index: 5;">';e+="<tr>";e+='<td align="center" style="vertical-align: middle;width:58px;"><img align="center" style="width: 15px; height: 15px;" src="'+g+'/themes/wizardCreator/common/images/stardivider.gif"/></td>';e+='<td align="right"><a class="splashtext_homepage" onmouseout=this.className="splashtext_homepage" onmouseover=this.className="splashtext_homepageHover" target="_blank" href="'+d.homepageLink+'"><div>&nbsp;</div></a></td>';e+='<td align="center" style="vertical-align: middle;width:58px;"><img align="center" style="width: 15px; height: 15px;" src="'+g+'/themes/wizardCreator/common/images/stardivider.gif"/></td>';e+='<td align="left"><a class="splashtext_login" onmouseout=this.className="splashtext_login" onmouseover=this.className="splashtext_loginHover" target="_blank" href="'+d.loginLink+'"><div>&nbsp;</div></a></td>';e+='<td align="center" style="vertical-align: middle;width:58px;"><img align="center" style="width: 15px; height: 15px;" src="'+g+'/themes/wizardCreator/common/images/stardivider.gif"/></td>';e+="</tr><tr>";e+="<td>&nbsp;</td>";e+="</tr><tr>";e+='<td align="center" colspan="5"><a style="color: rgb(64, 67, 75);margin-right:20px;" onmouseout=this.style.color="#40434b" onmouseover=this.style.color="#a2bcd4" target="_blank" href="'+d.splashLinkURL[0]+'">Terms of Use</a><a style="color: rgb(64, 67, 75);" onmouseout=this.style.color="#40434b" onmouseover=this.style.color="#a2bcd4" target="_blank" href="'+d.splashLinkURL[1]+'">Parents</a></td>';e+="</tr><tr>";e+='<td align="center" style="padding: 5px 0pt 0pt; color: rgb(64, 67, 75); font-size: 11px;" colspan="5">� KingsIsle Entertainment, Inc. All Rights Reserved</td>';e+="</tr></table>";e+='<img align="center" id="merleOffice" style="margin: 30px 0pt 0pt 50px; width: 771px; height: 496px;" src="'+g+'/themes/wizardCreator/common/images/splashpage.jpg"/>';e+="</td></tr></tbody></table></div>"}}return e}function sizeWizardCreator(){var f=viewportHeight()-5;if(f<minCreatorHeight){f=minCreatorHeight}if(f>maxCreatorHeight){f=maxCreatorHeight}var e=document.getElementById("pageContentContainer");if(e){var d=e.offsetHeight;if(d>f){f=d}}var g=document.getElementById("parchmentContainer");if(g){var c=styleToInt(g.style.height)+styleToInt(g.style.top);if(c>f){f=c}}var b=document.getElementById("wizardCreatorContainer");if(b){b.style.height=f+"px"}document.getElementById("mainLayout").style.height=f+"px"}function findStartingPoint(){var e=String(window.location.href).split("?");if(e.length>1){var d=e[1].split("&");if(d.length>0){for(var c=0;c<d.length;c++){var b=d[c].split("=");if(b[0]=="startingPage"){return b[1]}}}}return""}var soundPlayerLoaded=false;var soundLoaded=false;var waitingToShowText=false;var pageSound="";var pageText="";var removeTextAfterDelay=false;var removeTextDelay=7;function renderStartSoundPlayer(b){var c=renderSoundPlayer("soundPlayerLoadComplete");document.getElementById(b).innerHTML=c}function soundPlayerLoadComplete(){soundPlayerLoaded=true;soundPlayerLoadSounds()}function soundPlayerLoadSounds(){var b=flashMovie("flashSoundPlayer");if(b.loadSounds!=undefined){b.loadSounds([pageSound],"soundLoadComplete")}else{setTimeout("soundPlayerLoadSounds()",250)}}function soundLoadComplete(){soundLoaded=true;if(waitingToShowText){displaySpeechBubble()}}function startSpeech(b){if(getCookie("lastSound")!=pageSound){if(kiFlashEnabled){waitingToShowText=true;renderStartSoundPlayer(b)}else{displaySpeechBubble()}}}function displaySpeechBubble(){document.getElementById("speechBubbleText").innerHTML=pageSpeechText;document.getElementById("speechBubbleText").style.visibility="hidden";document.getElementById("speechBubbleText").style.display="block";new Effect.Fade("speechBubble",{duration:0.5,from:0,to:1,afterSetup:function(){document.getElementById("speechBubble").style.display="block"},afterFinish:speechBubbleDisplayComplete})}function speechBubbleDisplayComplete(){document.getElementById("speechBubbleText").style.visibility="visible";if(removeTextAfterDelay){setTimeout("speechBubbleRemove()",removeTextDelay*1000)}if(kiFlashEnabled){if(soundLoaded){setCookie("lastSound",pageSound,0);var b=flashMovie("flashSoundPlayer");b.playSound(pageSound)}}}function speechBubbleRemove(){new Effect.Fade("speechBubble",{duration:0.5,from:1,to:0})}function deleteSoundCookie(){deleteCookie("lastSound")}var flashLoaded=new Array();var flashSettings=new Array();var flashIds=new Array();var javascriptSlideshows=new Array();function flashTest(b){alert(b)}function isBodyLoaded(){return bodyLoaded}function setFlashLoaded(b){b=Number(b);flashLoaded[b]=true}function checkMoviePlay(){if(popupOpen){return false}else{return true}}function toggleVideo(d){var c=true;if(d=="play"){c=false}if(flashIds.length>0){for(var b=0;b<flashIds.length;b++){if(flashLoaded[b]){flashMovie(flashIds[b]).playToggle(c)}}}if(javascriptSlideshows.length>0){for(b=0;b<javascriptSlideshows.length;b++){javascriptSlideshows[b].playToggle(c)}}}function getFlashSettings(b){return flashSettings[b]}function filmstripLink(d,b){var e="[";for(var c=0;c<b.length;c++){e+="'"+b[c]+"',"}e+="]";document.write('<a href="#" onClick="rewriteSlideshow('+e+');return false;">'+d+"</a>")}function rewriteSlideshow(l,b){var n;var f;var m;var k;var e;var c=false;if(flashIds.length>0){var j=flashIds.length-1;var d="videoPlayer_"+String(j);var g=document.getElementById("flashPlayerContainer_"+j);k=g.parentNode;var h=flashMovie(d);f=h.width;m=h.height;var p=staticJavaScriptRoot+"/themes/global/flash/slideshow.swf?bn="+bn;n=flashSettings[j];flashSettings.splice(flashSettings.length-1,1);flashIds.splice(flashIds.length-1,1)}else{if(javascriptSlideshows.length>0){c=true;var o=javascriptSlideshows[javascriptSlideshows.length-1];n=o.originalSettings;f=n.width;m=n.height;k=o.rootNode.parentNode;javascriptSlideshows.splice(javascriptSlideshows.length-1,1)}}e=n.staticImage;n.files.splice(0,n.files.length);n.files=l;if(b){n.flow=b}if(!c){k.innerHTML=renderFlashDisplay(n,e,f,m,p)}else{var o=new Slideshow(n);javascriptSlideshows.push(o);k.innerHTML=o.getHTML()}}function renderHomeSlide(e,f,b,d){path=staticJavaScriptRoot+"/themes/global/flash/slideshow.swf?bn="+bn;var g=false;if(!kiFlashEnabled){if(isChrome||isIpad||isIphone||(isSafari&&isMac)){g=true}}if(!g){e.themePath=staticJavaScriptRoot+"/themes/wizard101A/home2/flash/SlideshowElements.swf?bn="+bn;document.write(renderFlashDisplay(e,f,b,d,path))}else{e.javascriptThemePath=staticJavaScriptRoot+"/themes/wizard101A/home2/javascript/slideshowElements.js?bn="+bn;e.cssPath=staticJavaScriptRoot+"/themes/wizard101A/common/css/slideshow.css?bn="+bn;if(b==undefined){b=642}if(d==undefined){d=360}e.width=b;e.height=d;e.staticImage=f;var c=new Slideshow(e);javascriptSlideshows.push(c);document.write(c.getHTML())}}function renderFlashMap(d,e,b,c){path=staticJavaScriptRoot+"/themes/global/flash/marker.swf?bn="+bn;d.themePath=staticJavaScriptRoot+"/themes/wizard101A/home2/flash/MarkerElements.swf?bn="+bn;document.write(renderFlashDisplay(d,e,b,c,path))}function renderFlashDisplay(g,e,p,k,t){var l="";if(g){g.staticImage=e}if(kiFlashEnabled&&g!=null){var q=0;var f=0;var s=0;var j=0;var n=1;var o=staticFileRoot;var b=staticJavaScriptRoot;if(kiIsBackend){o=staticJavaScriptRoot}if(g.leftPadding){q=g.leftPadding;n++}if(g.rightPadding){f=g.rightPadding;n++}if(g.topPadding){s=g.topPadding}if(g.bottomPadding){j=g.bottomPadding}var m=flashIds.length;var d="videoPlayer_"+String(m);var c=p;var r=k;if(c==undefined){c=642}if(r==undefined){r=360}flashIds.push(d);flashLoaded.push(false);flashSettings.push(g);l+='<table cellpadding="0" cellspacing="0" border="0" id="flashPlayerContainer_'+String(m)+'" style="width:'+(parseInt(c)+parseInt(q)+parseInt(f))+"px;height:"+(parseInt(r)+parseInt(s)+parseInt(j))+'px;">';if(s){l+='<tr><td colspan="'+n+'" style="height:'+s+';">&nbsp;</td></tr>'}l+="<tr>";if(q){l+='<td width="'+q+'">&nbsp;</td>'}l+='<td width="'+c+'">';l+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+c+'" height="'+r+'" id="'+d+'" align="left" valign="top">';l+='<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" />';l+='<param name="FlashVars" value="staticFileRoot='+o+"&currentTheme="+currentTheme+"&id="+m+"&usingCDN="+kiCdnEnabled+"&staticJavascript="+b+"&wrapper="+wrapperTemplate+'" />';l+='<param name="movie" value="'+t+'" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#000000" />';l+='<embed src="'+t+'" FlashVars="staticFileRoot='+o+"&currentTheme="+currentTheme+"&id="+m+"&usingCDN="+kiCdnEnabled+"&staticJavascript="+b+"&wrapper="+wrapperTemplate+'" quality="high" wmode="transparent" scale="noscale" width="'+c+'" height="'+r+'" name="'+d+'" align="left" valign="top" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" /></object>';l+="</td>";if(f){l+='<td width="'+f+'">&nbsp;</td>'}l+="</tr>";if(j){l+='<tr><td colspan="'+n+'" style="height:'+j+';">&nbsp;</td></tr>'}l+="</table>"}else{if(e!=null){l+='<img src="'+e+'" alt="Welcome To Wizard School" />'}else{l+="<!-- settings="+g+" staticImage="+e+" -->"}l+='<p style="background-image:url('+staticFileRoot+'/themes/wizard101A/common/images/error_background.jpg);border: 2px solid #ff0000;margin:4px;" align="center"><span style="font-size:13px;">In order to view this content correctly you need to have Adobe Flash Player installed.</span><br /> <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Download Adobe Flash Player</a></p>'}if(isOpera){l+='<br clear="all" />'}return l}function renderFlash(e,d,c,b){if(kiFlashEnabled){document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+d+'" height="'+c+'" id="KingsIsle" align="middle">');document.write('<param name="allowScriptAccess" value="sameDomain" />');document.write('<param name="movie" value="'+e+'" />');document.write('<param name="loop" value="false" /><param name="quality" value="high" />');document.write('<param name="wmode" value="transparent" />');document.write('<param name="bgcolor" value="#ffffff" />');document.write('<embed src="'+e+'" loop="false" quality="high" wmode="transparent" bgcolor="#ffffff" width="'+d+'" height="'+c+'" name="KingsIsle" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" /></object>')}else{document.write('<img src="'+b+'" width="'+d+'" height="'+c+'" />')}}function showHideDiv(b){var c=document.getElementById(b);if(c.style.display=="none"){c.style.display="block";setCookie(b,"block","","/")}else{c.style.display="none";setCookie(b,"none","","/")}}function toggleDiv(b){var c=document.getElementById(b);if(c.style.display=="none"){c.style.display="block"}else{c.style.display="none"}}function changeDiv(b,d){var c=document.getElementById(b);if(c!=null){if(d==1){c.style.display="block"}else{if(d==0){c.style.display="none"}}}}function showHideDivImg(b,d){var c=document.getElementById(b);var e=document.getElementById(d);if(c.style.display=="none"){c.style.display="block";e.src=staticFileRoot+"/themes/wizard101A/common/form/images/minimize.gif"}else{c.style.display="none";e.src=staticFileRoot+"/themes/wizard101A/common/form/images/maximize.gif"}}function formElementExists(formElement){statement="var element = String(formElement)";eval(statement);if((element!="undefined")&&(element!="null")){return true}else{return false}}function toggleCheckboxes(d,b){if(formElementExists(d)){var g=false;if(b.checked){g=true}if(d){var f=d.length;if(f>0){for(var c=0;c<d.length;c++){d[c].checked=g}}else{var e=String(d.checked);if(e!="undefined"){d.checked=g}}}}}String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"")};function ensureSecure(){if(String(window.location.href).indexOf("http://")>-1){var f=String(window.location.href).replace("http://","https://");var e=new Array();var b=new Array();e=f.split("/");if(e[2].indexOf(":")>-1){b=e[2].split(":");e[2]=b[0];var c="";for(var d=0;d<e.length;d++){if(d+1<e.length){c+=e[d]+"/"}else{c+=e[d]}}f=c}window.location.href=f;return true}else{return false}}function fixDate(c){var d=new Date(0);var b=d.getTime();if(b>0){c.setTime(c.getTime()-b)}}function isItemChecked(c){var d=false;if(formElementExists(c)){var e=c.length;if(e>1){for(var b=0;b<c.length;b++){if(c[b].checked){d=true;break}}}else{if(c.checked){d=true}}}return d}function listenEnter(c){var b;if(window.event){b=c.keyCode}else{if(c.which){b=c.which}}if(b==13){return true}}function blockKeyPresses(d,c){var b;if(window.event){b=event.keyCode}else{b=d.which}if(b==c){return false}}function onlyAlphaKeys(d){var b;if(window.event){b=event.keyCode}else{b=d.which}var c=String.fromCharCode(b);if(b==8||b==9||b==46||b==39||b==37||b==32||b==189){return true}else{return/[A-Za-z\-\s\b]/.test(c)}}function clearClickBlocker(){var b=window.document.getElementById("backHolderOverlay");if(b){if(b.className=="preventButtonClicks"){b.className="";b.style.height="1px";b.style.width="1px"}}}function blockRightClicks(b){if(b){var d=new Array();d=b.childNodes;if(d.length>0){for(var c=0;c<d.length;c++){blockRightClicks(d[c]);if(d[c].nodeName=="A"||d[c].nodeName=="INPUT"){d[c].oncontextmenu=function(){return false}}}}}}function triggerFocus(f){var e=document.activeElement;if(f&&typeof f=="string"){var d=document.getElementById(f);if(d){var b=new Array();b=findTabbable(d);for(var c=0;c<b.length;c++){if(typeof b[c].focus=="function"){b[c].focus()}}if(e){e.focus()}else{for(c=0;c<b.length;c++){if(typeof b[c].focus=="function"){b[c].focus();c=b.length}}}}}}function breakText(k,b){var c;if(typeof(k)=="string"){var h=document.getElementById(k);if(h){c=h}}else{if(typeof(k)=="object"){c=k}}if(c&&c.innerHTML){var l=c.innerHTML;if(l.length>b){var j=l.split(" ");var m=0;var g="";for(var f=0;f<j.length;f++){m+=j[f].length;if(m>b){if(j[f].length>b){var d=forceBreak(j[f],b);var e=d.split("<br />");if(f>0){g+="<br />"}g+=d+" ";m=e[e.length-1].length}else{g+="<br />"+j[f]+" ";m=j[f].length}}else{g+=" "+j[f]}c.innerHTML=g}}}}function forceBreak(f,d){var b=f.slice(0,d)+"<br />";var e=b;var c=f.slice(d,f.length);if(c.length>d){e+=forceBreak(c,d)}else{e+=c}return e}function findSpaces(d){var b=new Array();var c=0;while(c!=-1){c=d.indexOf(" ",c+1);if(c!=-1){b.push(c)}}return b}function disableObjectsById(c,b){if(c=="disable"){for(i=0;i<b.length;i++){document.getElementById(b[i]).disabled=true}}else{if(c=="enable"){for(i=0;i<b.length;i++){document.getElementById(b[i]).disabled=false}}}}function disableObjectsByName(c,b){if(c=="disable"){for(i=0;i<b.length;i++){var d=document.getElementsByName(b[i]);for(a=0;a<d.length;a++){d[a].disabled=true}}}else{if(c=="enable"){for(i=0;i<b.length;i++){var d=document.getElementsByName(b[i]);for(a=0;a<d.length;a++){d[a].disabled=false}}}}}function disableElements(d,c){if(d){for(var b=0;b<d.length;b++){d[b].disabled=c}}}function hideObjectsById(f,e,d){if(f=="hide"){for(var c=0;c<e.length;c++){var b=document.getElementById(e[c]);if(b){b.style.display="none";if(d){disableElements(findFormElements(b),true)}}}}else{if(f=="show"){for(var c=0;c<e.length;c++){var b=document.getElementById(e[c]);if(b){b.style.display="block";if(d){disableElements(findFormElements(b),false)}}}}}}function leapyear(b){if(((b%4==0)&&(b%100!=0))||(b%400==0)){return true}else{return false}}function getAge(f,e,c){var d=-1;var b="valid";if((e<1)||(e>12)||(c<1)||(c>31)||(f<1)||(e=="")||(c=="")||(f=="")||(isNaN(f))){b="Invalid"}else{if(((e==4)||(e==6)||(e==9)||(e==11))&&(c>30)){b="Invalid"}else{if(e==2){if(c>29){b="Invalid"}else{if((c>28)&&(!leapyear(f))){b="Invalid"}}}else{if((f>9999)||(f<0)){b="Invalid"}else{b=b}}}}if(b=="valid"){days=new Date();gdate=days.getDate();gmonth=days.getMonth();gyear=days.getFullYear();d=gyear-f;if((e==(gmonth+1))&&(c<=parseInt(gdate))){d=d}else{if(e<=(gmonth)){d=d}else{d=d-1}}if(d==0){d=d}}else{if(isNaN(f)||f==""){d=undefined}}return d}function textCounter(f,d,b){var e=document.getElementById(f);var c=document.getElementById("counterText"+b);if(e.value.length>d){e.value=e.value.substring(0,d)}else{c.value=d-e.value.length}}function activeXInstallPageRender(c){if(!kiIsBackend){if(isIE){var b=window.document.getElementById("activeXShell");if(b){b.innerHTML='<div><OBJECT ID="activexGameLaunch" Name="activexGameLaunch" width="0" height="0" style="margin-left:46px;" CLASSID="CLSID:75A6AEA3-F26E-4608-AE9B-8DA78C87576E" codebase="'+staticFileRoot+'/themes/wizard101A/activex/Wizard101GameLauncher.CAB"></object></div>'}}else{}setTimeout("checkLaunchGame('"+c+"',false)",1000)}}function activeXRegistrationFinishRender(c,d){if(isIE){var b=window.document.getElementById("activeXShell");if(b){b.innerHTML='<div><OBJECT ID="activexGameLaunch" Name="activexGameLaunch" width="0" height="0" style="margin-left:46px;" CLASSID="CLSID:75A6AEA3-F26E-4608-AE9B-8DA78C87576E" codebase="'+staticFileRoot+'/themes/wizard101A/activex/Wizard101GameLauncher.CAB"></object></div>'}}if(d){setTimeout("checkLaunchGame('"+c+"',"+d+")",100)}else{setTimeout("checkLaunchGame('"+c+"',"+d+")",1000)}}function renderActiveX(c,d){if(isIE&&kiLoggedIn){var b=window.document.getElementById("activeXShell");if(b){b.innerHTML='<div><OBJECT ID="activexGameLaunch" Name="activexGameLaunch" width="0" height="0" style="margin-left:46px;" CLASSID="CLSID:75A6AEA3-F26E-4608-AE9B-8DA78C87576E" codebase="'+staticFileRoot+'/themes/wizard101A/activex/Wizard101GameLauncher.CAB"></object></div>'}}if(d){setTimeout("checkLaunchGame('"+c+"',"+d+")",100)}else{setTimeout("checkLaunchGame('"+c+"',"+d+")",1000)}}function checkLaunchGame(c,d){if(isIE){var b=window.document.getElementById("activeXShell");if(b&&d){setTimeout("launchGame('"+c+"')",100)}else{if(d){window.location=c}else{setTimeout("checkLoaded('"+c+"')",1000)}}}else{if(d){window.location=c}}}function checkLoaded(b){if(window.document.activexGameLaunch){if(typeof window.document.activexGameLaunch.noOperation!="undefined"){var c=window.document.activexGameLaunch.callGame();if(!c){window.location=b}}else{setTimeout("checkLoaded('"+b+"')",1000)}}}function launchGame(b){if(window.document.activexGameLaunch){if(typeof window.document.activexGameLaunch.noOperation!="undefined"){var c=window.document.activexGameLaunch.callGame();if(!c){window.location=b}}else{window.location=b}}else{window.location=b}}var kiPopup;function scrollToPopup(){var b=window.top.document.getElementById("jPopFrame").style.top;if(b){window.top.scrollTo(0,parseInt(b)-10)}}function resizeFrame(h,g,c){var b="";var d="";var e=true;if(isIE){if(h&&window.top.document.frames[0].document.getElementById(g)){b=window.top.document.frames[0].document.getElementById(g).offsetWidth;d=window.top.document.frames[0].document.getElementById(g).offsetHeight+30;if(b>0){h.style.width=b;h.style.height=d}else{e=false;setTimeout("initializePopup()",100)}}}else{if(h){if(h.contentDocument.getElementById(g)){b=h.contentDocument.getElementById(g).offsetWidth;d=h.contentDocument.getElementById(g).offsetHeight+20;h.style.width=b;h.style.height=d}if(isChrome){if(h.getWidth()==0){e=false;setTimeout("initializePopup()",10)}}}}if(e){var f=document.getElementById("jPopFrame");if(f){f.style.visibility="visible";kiPopup.refreshSize(g);checkPopupHeight();kiPopup.refreshPosition()}}}function checkPopupHeight(){if(kiPopup){var c=document.getElementById("jPopFrame").offsetHeight;var b=document.getElementById("mainLayout");if(b.offsetHeight<c){b.style.height=c;document.getElementById("overlay_modal").style.height=c}}}function initializePopup(){window.top.resizeFrame(window.top.document.getElementById("jPopFrame_content"),"formtable",true);window.top.scrollToPopup()}function updatePopupSize(){if(kiPopup){window.top.resizeFrame(window.top.document.getElementById("jPopFrame_content"),"formtable",true)}else{if(window.self!=window.top){window.top.updatePopupSize()}}}function restoreFromPopup(){popupOpen=false;toggleVideo("play")}function prepareForPopup(){var b=document.getElementById("htmlPopup");if(!b){document.getElementById("jPopFrame").style.left=0;document.getElementById("jPopFrame").style.visibility="hidden"}stopFlashForPopup()}function stopFlashForPopup(){toggleVideo("stop")}function openIframePopup(b){if(!popupOpen){kiPopup=new Window("jPopFrame",{url:b,minimizable:false,maximizable:false,draggable:false,showEffect:Element.show,hideEffect:Element.hide,onBeforeShow:prepareForPopup,onClose:restoreFromPopup});popupOpen=true;kiPopup.showCenter(true,document.body.scrollTop);setTimeout("refreshIframeSrc()",1000)}}function openIframeSecure(b){openIframePopup(b)}function openHtmlPopup(b){if(!popupOpen){kiPopup=new Window({className:"dialog",minimizable:false,maximizable:false,draggable:false,showEffect:Element.show,hideEffect:Element.hide,onBeforeShow:prepareForPopup,onClose:restoreFromPopup});kiPopup.getContent().innerHTML=b.innerHTML;kiPopup.setSize(b.firstChild.style.width,0);popupOpen=true;kiPopup.showCenter(true,document.body.scrollTop)}}var kiPopupImageLoaded=false;function openImagePopup(b){if(!popupOpen){popupOpen=true;kiPopupImageLoaded=false;kiPopup=new Window({closable:true,minimizable:false,maximizable:false,draggable:false,showEffect:Element.show,hideEffect:Element.hide,onBeforeShow:stopFlashForPopup,onClose:restoreFromPopup,onShow:imagePopupShow});kiPopup.getContent().innerHTML="<img src='"+b+"' id='popupImage' style='display:none;' onload='imageSizePopup(this)' /><img src='"+staticFileRoot+"themes/wizard101A/common/images/popupImageLoader.gif' id='popupImageLoader' width='150px' height='150px' style='width:150px;height:150px;' />";kiPopup.setSize(150,150);kiPopup.showCenter(true,document.body.scrollTop)}}function imageSizePopup(c){kiPopupImageLoaded=true;if(popupOpen){if(kiPopup){if(c){var b=document.getElementById("popupImageLoader");b.style.display="none";c.style.display="block";kiPopup.setSize(c.width,c.height);kiPopup.refreshPosition()}else{Tapestry.error("master.js imageSizePopup: function getting called from an image without 'popupImage' as the id")}}}}function imagePopupShow(){if(kiPopupImageLoaded){var c=document.getElementById("popupImage");if(c.style.display!="block"){c.style.display="block";var b=document.getElementById("popupImageLoader");b.style.display="none"}kiPopup.setSize(c.width,c.height);kiPopup.refreshPosition()}}function backendPopup(b){if(!popupOpen){kiPopup=new Window("jPopFrame",{url:b,minimizable:false,maximizable:false,draggable:false,showEffect:Element.show,hideEffect:Element.hide,onBeforeShow:prepareForPopup,onClose:restoreFromPopup});popupOpen=true;kiPopup.showCenter(true,document.body.scrollTop);setTimeout("refreshIframeSrc()",1000)}}function refreshIframeSrc(){if(isFF){var b;var g=window.frames;for(var c=0;c<g.length;c++){try{if(g[c].name=="jPopFrame_content"){b=g[c]}}catch(f){}}if(b){var d=document.getElementById("jPopFrame_content");if(d){if(b.location.href!=d.src&&b.location.href!="about:blank"){b.location.href=d.src}}}}}function invokeReset(){if(window.top.location.href.indexOf(contextPath+"/jforum.ftl")>-1){window.top.kiActionLinkClicked=false;window.top.clearClickBlocker();setTimeout("window.top.Windows.closeAll()",10);return}if(window.top.location.href.indexOf("reset")<0){if(window.top.location.href.indexOf("?")==-1){var b=window.top.location.href;if(b.indexOf("#")>-1){b=b.slice(0,b.indexOf("#"))}b+="?reset=1";window.top.location.href=b}else{window.top.location.href=window.top.location.href+"&reset=1"}}else{window.top.location.reload(true)}}var pageLoaded=false;document.observe("dom:loaded",function(){windowWidth=viewportWidth();windowHeight=viewportHeight();pageLoaded=true;sizeWizardCreator();window.onload=setBodyLoad});var preloadImageArray=new Array();var preloadFolder=staticFileRoot+"/themes/wizardCreator/common/images/";preloadImageArray.push(preloadFolder+"background.jpg",preloadFolder+"button_spriteSheet.png",preloadFolder+"logo.png",preloadFolder+"page_bottom.jpg",preloadFolder+"progressBar.png",preloadFolder+"progressStars_spriteSheet.png",preloadFolder+"rodTop.png");preloadImageArray.push(preloadFolder+"merle_01.png",preloadFolder+"merle_02.png",preloadFolder+"merle_03.png",preloadFolder+"merle_04.png",preloadFolder+"merle_05.png",preloadFolder+"merle_06.png");preloadImageArray.push(preloadFolder+"crystalBall_01.png",preloadFolder+"crystalBall_02.png",preloadFolder+"crystalBall_03.png");preloadImageArray.push(preloadFolder+"parchment_back.jpg",preloadFolder+"parchment_bottom.png",preloadFolder+"parchment_corners.png",preloadFolder+"parchment_hEdge.png",preloadFolder+"parchment_subCorners.png",preloadFolder+"parchment_vEdge.png",preloadFolder+"parchment_vEdgeStart.png");preloadImageArray.push(preloadFolder+"speechbubble_bottomleft.gif",preloadFolder+"speechbubble_bottommiddle1.gif",preloadFolder+"speechbubble_bottommiddle2.gif",preloadFolder+"speechbubble_bottomright.gif",preloadFolder+"speechbubble_middleleft.gif",preloadFolder+"speechbubble_middleright.gif",preloadFolder+"speechbubble_topleft.gif",preloadFolder+"speechbubble_topmiddle1.gif",preloadFolder+"speechbubble_topmiddle2.gif",preloadFolder+"speechbubble_topright.gif");function preloadStaticImages(){if(preloadImageArray.length>0){for(var b=0;b<preloadImageArray.length;b++){var c=new Image();c.src=preloadImageArray[b]}}};
