var key=null;if(location.href.indexOf("https:")>-1){if(location.href.match("wizard101.com")){key="ABQIAAAAVUMzuLBNrME5HAM7rbAM0BTTuZJEdS9COQDOI-hmeOsg9OinwBT5BaC__LH7XbbI2-A0Fk9UB1Ym2w"}else{if(location.href.match("kingsisle.com")){key="ABQIAAAAVUMzuLBNrME5HAM7rbAM0BRkxwSlfom3CxS-eKKLkAg3LqzkEBQ7nC1JF2DaM4nofmsD1yIo_setkw"}}}else{if(location.href.match("wizard101.com")){key="ABQIAAAAVUMzuLBNrME5HAM7rbAM0BSmUVwrE7e-d2uuDh1B0HPvBk6QyxRlL7__gETpUs7Kah6SGdfLMGYpHQ"}else{if(location.href.match("kingsisle.com")){key="ABQIAAAAxaGg0-TU0iTWduLeqhyWDRS7Eth01uhu3yl7ZTpP-1pNM9MEixQ96-Ohz21hf4E2yjebmcrJ3uiGYQ"}}}var html="";if(location.href.indexOf("https:")>-1){html='<script src="https://www.google.com/jsapi?key='+key+'" type="text/javascript"><\/script>'}else{html='<script src="http://www.google.com/jsapi?key='+key+'" type="text/javascript"><\/script>'}document.write(html);function endScript(){return"<\/script>"}var resizeTimer;function checkHome(A){if(!popupOpen){window.location=A}}function callBackgroundOverlay(E,G){var B=window.top.document.getElementById("mainLayout").style.height;var C=window.top.document.getElementById("mainLayout").style.width;if(B>windowHeight){var A=B}else{var A=windowHeight}if(C>windowWidth){var H=C}else{var H=windowWidth}if(!document.getElementById("backHolderOverlayImage")){var D="<img id='backHolderOverlayImage' src='"+staticFileRoot+"/themes/global/images/backHolderOverlay.gif' width='"+H+"' height='"+(A-5)+'\'onClick=\'document.getElementById("backHolderOverlay").innerHTML = "";'+E+"' />";document.getElementById("backHolderOverlay").style.zIndex=G;document.getElementById("backHolderOverlay").innerHTML=D}else{var F=document.getElementById("backHolderOverlayImage")}}var flashLoaded=new Array();var flashSettings=new Array();var flashIds=new Array();function flashTest(A){alert(A)}function isBodyLoaded(){return bodyLoaded}function setFlashLoaded(A){A=Number(A);flashLoaded[A]=true}function checkMoviePlay(){if(popupOpen){return false}else{return true}}function toggleVideo(B){if(flashIds.length>0){for(var A=0;A<flashIds.length;A++){if(flashLoaded[A]){flashMovie(flashIds[A]).playToggle(B)}}}}function getFlashSettings(A){return flashSettings[A]}function filmstripLink(C,A){var D="[";for(var B=0;B<A.length;B++){D+="'"+A[B]+"',"}D+="]";document.write('<a href="#" onClick="rewriteSlideshow('+D+');return false;">'+C+"</a>")}function rewriteSlideshow(G){var E=flashIds.length-1;var A="videoPlayer_"+String(E);var C=document.getElementById("flashPlayerContainer_"+E);var F=C.parentNode;var D=flashMovie(A);var B=D.width;var H=D.height;var J=staticJavaScriptRoot+"/themes/global/flash/slideshow.swf";var I=flashSettings[E];I.files.splice(0,I.files.length);I.files=G;F.innerHTML=renderFlashDisplay(I,I.staticImage,B,H,J)}function renderHomeSlide(C,D,A,B){path=staticJavaScriptRoot+"/themes/global/flash/slideshow.swf";document.write(renderFlashDisplay(C,D,A,B,path))}function renderFlashDisplay(F,D,M,H,Q){var I="";if(kiFlashEnabled&&F!=null){var N=0;var E=0;var P=0;var G=0;var K=1;var L=staticFileRoot;var A=staticJavaScriptRoot;if(kiIsBackend){L=staticJavaScriptRoot}F.staticImage=D;if(F.leftPadding){N=F.leftPadding;K++}if(F.rightPadding){E=F.rightPadding;K++}if(F.topPadding){P=F.topPadding}if(F.bottomPadding){G=F.bottomPadding}var J=flashIds.length;var C="videoPlayer_"+String(J);var B=M;var O=H;if(B==undefined){B=642}if(O==undefined){O=360}flashIds.push(C);flashLoaded.push(false);flashSettings.push(F);I+='<table cellpadding="0" cellspacing="0" border="0" id="flashPlayerContainer_'+String(J)+'" style="width:'+(parseInt(B)+parseInt(N)+parseInt(E))+"px;height:"+(parseInt(O)+parseInt(P)+parseInt(G))+'px;">';if(P){I+='<tr><td colspan="'+K+'" style="height:'+P+';">&nbsp;</td></tr>'}I+="<tr>";if(N){I+='<td width="'+N+'">&nbsp;</td>'}I+='<td width="'+B+'">';I+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+B+'" height="'+O+'" id="'+C+'" align="left" valign="top">';I+='<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" />';I+='<param name="FlashVars" value="staticFileRoot='+L+"&currentTheme="+currentTheme+"&id="+J+"&usingCDN="+kiCdnEnabled+"&staticJavascript="+A+"&wrapper="+wrapperTemplate+'" />';I+='<param name="movie" value="'+Q+'" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#000000" />';I+='<embed src="'+Q+'" FlashVars="staticFileRoot='+L+"&currentTheme="+currentTheme+"&id="+J+"&usingCDN="+kiCdnEnabled+"&staticJavascript="+A+"&wrapper="+wrapperTemplate+'" quality="high" wmode="transparent" scale="noscale" width="'+B+'" height="'+O+'" name="'+C+'" align="left" valign="top" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" /></object>';I+="</td>";if(E){I+='<td width="'+E+'">&nbsp;</td>'}I+="</tr>";if(G){I+='<tr><td colspan="'+K+'" style="height:'+G+';">&nbsp;</td></tr>'}I+="</table>"}else{if(D!=null){I+='<img src="'+D+'" alt="Welcome To Wizard School" />';I+='<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>'}else{I+="<!-- settings="+F+" staticImage="+D+" -->"}}if(isOpera){I+='<br clear="all" />'}return I}function renderFlash(D,C,B,A){if(kiFlashEnabled){document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+C+'" height="'+B+'" id="KingsIsle" align="middle">');document.write('<param name="allowScriptAccess" value="sameDomain" />');document.write('<param name="movie" value="'+D+'" />');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="'+D+'" loop="false" quality="high" wmode="transparent" bgcolor="#ffffff" width="'+C+'" height="'+B+'" name="KingsIsle" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" /></object>')}else{document.write('<img src="'+A+'" width="'+C+'" height="'+B+'" />')}}var musicPlayerToScroll="";function renderMusicPlayer(D,I,E){path=staticJavaScriptRoot+"/themes/global/flash/MusicPlayer.swf";var F="";if(kiFlashEnabled){if(D!=null){var H=staticFileRoot;var A=staticJavaScriptRoot;if(kiIsBackend){H=staticJavaScriptRoot}var G=flashIds.length;var C="musicPlayer_"+String(G);var B=I;var J=E;flashIds.push(C);flashLoaded.push(false);flashSettings.push(D);F+='<div id="flashPlayerContainer_'+String(G)+'" style="width:'+B+"px;height:"+J+'px;">';F+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+B+'" height="'+J+'" id="'+C+'" align="left" valign="top">';F+='<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" />';F+='<param name="FlashVars" value="staticFileRoot='+H+"&currentTheme="+currentTheme+"&id="+G+"&usingCDN="+kiCdnEnabled+"&staticJavascript="+A+"&wrapper="+wrapperTemplate+'" />';F+='<param name="movie" value="'+path+'" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#000000" />';F+='<embed src="'+path+'" FlashVars="staticFileRoot='+H+"&currentTheme="+currentTheme+"&id="+G+"&usingCDN="+kiCdnEnabled+"&staticJavascript="+A+"&wrapper="+wrapperTemplate+'" quality="high" wmode="transparent" scale="noscale" width="'+B+'" height="'+J+'" name="'+C+'" align="left" valign="top" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" /></object>';F+="</div>"}else{Tapestry.Error("No settings passed in for Music Player.")}}else{F+='<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 music player 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>'}document.write(F)}function musicPlayerMouseScroll(A){musicPlayerToScroll="musicPlayer_"+A;Event.observe(document,"mousewheel",scrollMusicPlayer,false);Event.observe(document,"DOMMouseScroll",scrollMusicPlayer,false)}function stopMusicPlayerMouseScroll(){Event.stopObserving(document,"mousewheel");Event.stopObserving(document,"DOMMouseScroll")}function scrollMusicPlayer(B){if(!B){B=window.event}var C=0;if(B.wheelDelta){C=B.wheelDelta/120}else{if(B.detail){C=-B.detail/3}}C=Math.round(C);var A=flashMovie(musicPlayerToScroll);if(A.scrollSongList!=undefined){A.scrollSongList(C)}return false}var DDSPEED=4;var DDTIMER=15;function ddMenuInt(){for(var B=1;B<10;B++){if(document.getElementById(B+"-ddcontent")){var A=document.getElementById(B+"-ddcontent");var D=document.getElementById(B+"-lastSubMenuItem");var C=A.firstChild.offsetWidth;A.style.width=C;D.style.width=C;A.style.display="none";A.style.visibility="visible"}else{break}}}function ddMenu(H,E,C){var G=document.getElementById(H+"-ddheader");var A=document.getElementById(H+"-ddcontent");if(A){var F=A.parentNode.parentNode;clearInterval(A.timer);if(E==1){clearTimeout(G.timer);if(A.className==""){if(A.maxh&&A.maxh<=A.offsetHeight){return }else{if(!A.maxh||A.maxh){A.style.display="block";A.style.height="auto";A.maxh=A.offsetHeight;A.style.height="1px"}}}A.timer=setInterval(function(){ddSlide(A,1)},DDTIMER)}else{if(C){G.timer=setTimeout(function(){ddCollapse(A)},500)}else{G.timer=setTimeout(function(){ddCollapse(A)},50)}}if(F.nodeName=="TD"){var D=String(F.offsetWidth/2-A.offsetWidth/2);var B=D.replace(/-/,"");if(F.offsetWidth<=A.offsetWidth){A.style.marginLeft="-"+B+"px"}if(F.offsetWidth>=A.offsetWidth){A.style.marginLeft=B+"px"}}}}function ddCollapse(A){A.timer=setInterval(function(){ddSlide(A,-1)},DDTIMER)}function cancelHide(C){var B=document.getElementById(C+"-ddheader");var A=document.getElementById(C+"-ddcontent");clearTimeout(B.timer);clearInterval(A.timer);if(A.offsetHeight<A.maxh){A.timer=setInterval(function(){ddSlide(A,1)},DDTIMER)}}function ddSlide(A,D){var C=A.offsetHeight;var B;if(D==1){B=(Math.round((A.maxh-C)/DDSPEED))}else{B=(Math.round(C/DDSPEED))}if(B<=1&&D==1){B=1}A.style.height=C+(B*D)+"px";A.className="menuMoving";if((C<5&&D!=1)||(C>(A.maxh-2)&&D==1)){if(D==-1){A.style.height="0px";A.style.display="none";A.className=""}clearInterval(A.timer)}}var pageLoaded=false;document.observe("dom:loaded",function(){windowWidth=viewportWidth();windowHeight=viewportHeight();ddMenuInt();pageLoaded=true;window.onload=setBodyLoad});var hideInt=0;var passPath="";function SearchLoad(){var C=new google.search.SearchControl();var A=new GwebSearch();var B=new GsearcherOptions();B.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);A.setUserDefinedLabel("Kingsisle.com");A.setUserDefinedClassSuffix("siteSearch");A.setSiteRestriction("http://kingsisle.com");C.addSearcher(A,B);C.draw(document.getElementById("searchcontrol"));styleSearchBox();C.execute("")}function showSearch(A){clearInterval(hideInt);if(document.getElementById("searchImageDiv").style.background!="url("+A+"search_on.gif)"){document.getElementById("searchImageDiv").style.background="url("+A+"search_on.gif)"}document.getElementById("searchPopup").style.display="block";document.getElementById("searchcontrol").style.display="block";callBackgroundOverlay('hideSearchDivs("'+A+'");',100)}function hideSearch(A){passPath=A;clearInterval(hideInt);if(document.forms[0].elements[0].value==""){hideInt=setInterval(hideSearchDivs,1480,A)}}function hideSearchDivs(A){clearInterval(hideInt);document.getElementById("searchImageDiv").style.background="url("+passPath+"search_out.gif)";document.getElementById("searchPopup").style.display="none";document.getElementById("searchcontrol").style.display="none";document.getElementById("backHolderOverlay").innerHTML=""}function styleSearchBox(){var A=document.getElementById("searchcontrol");var B=findElementWithClass(A,"gsc-control");if(B){B.style.width="auto"}}function makeFakeMap(){if(document.getElementById("map")){document.getElementById("map").innerHTML='<img src="'+staticJavaScriptRoot+'/themes/corporate/common/images/noMap.jpg"/>';document.getElementById("map2").innerHTML='<img src="'+staticJavaScriptRoot+'/themes/corporate/common/images/noMap.jpg"/>'}}function makeMap(B,D,C,F,E){var G=new google.maps.Map2(document.getElementById(E));G.setCenter(new google.maps.LatLng(B,D),15);var A=new GLatLng(C,F);G.addOverlay(new GMarker(A));G.zoomOut();G.zoomOut()}function callMakeMap(){makeMap(30.401801,-97.724447,30.401801,-97.724447,"map");makeMap(33.03655,-96.830063,33.03655,-96.83035,"map2")}function initMaps(){google.load("maps","2");google.setOnLoadCallback(callMakeMap)}var preloadImageArray=new Array();preloadImageArray.push(staticFileRoot+"/themes/corporate/common/datePicker/images/arrow_back.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/arrow_forward.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/arrow_next.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/arrow_prev.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/calendar.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/search_bottomleft.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/search_bottomleft.png",staticFileRoot+"/themes/corporate/common/datePicker/images/search_bottommiddle.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/search_bottommiddle.png",staticFileRoot+"/themes/corporate/common/datePicker/images/search_bottomright.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/search_bottomright.png",staticFileRoot+"/themes/corporate/common/datePicker/images/search_sideleft.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/search_sideleft.png",staticFileRoot+"/themes/corporate/common/datePicker/images/search_sideright.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/search_sideright.png",staticFileRoot+"/themes/corporate/common/datePicker/images/search_topleft.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/search_topleft.png",staticFileRoot+"/themes/corporate/common/datePicker/images/search_topmiddle.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/search_topmiddle.png",staticFileRoot+"/themes/corporate/common/datePicker/images/search_topright.gif",staticFileRoot+"/themes/corporate/common/datePicker/images/search_topright.png",staticFileRoot+"/themes/corporate/common/topMenu/images/dropdownmenu_bottomleft.png",staticFileRoot+"/themes/corporate/common/topMenu/images/dropdownmenu_bottomleft.gif",staticFileRoot+"/themes/corporate/common/topMenu/images/dropdownmenu_bottomright.png",staticFileRoot+"/themes/corporate/common/topMenu/images/dropdownmenu_bottomright.gif",staticFileRoot+"/themes/corporate/common/topMenu/images/dropdownmenu_bottommiddle.png",staticFileRoot+"/themes/corporate/common/topMenu/images/dropdownmenu_cover.gif",staticFileRoot+"/themes/corporate/common/topMenu/images/dropdownmenu_middle.png",staticFileRoot+"/themes/corporate/common/topMenu/images/topmenu.png",staticFileRoot+"/themes/corporate/common/topMenu/images/topmenu_rollover.gif",staticFileRoot+"/themes/corporate/common/search/images/search_off.gif",staticFileRoot+"/themes/corporate/common/search/images/search_on.gif",staticFileRoot+"/themes/corporate/common/search/images/search_out.gif");if(preloadImageArray.length>0){for(var i=0;i<preloadImageArray.length;i++){var newImage=new Image();newImage.src=preloadImageArray[i]}};