addDOMLoadEvent=(function(){var e=[],t,s,n,i,o,d=document,w=window,r="readyState",c="onreadystatechange",x=function(){n=1;clearInterval(t);while(i=e.shift()){i();}if(s){s[c]="";}};return function(f){if(n){return f();}if(!e[0]){d.addEventListener&&d.addEventListener("DOMContentLoaded",x,false);
/*@cc_on@*/
/*@if(@_win32)d.write("<script id=__ie_onload defer src=//0><\/scr"+"ipt>");s=d.getElementById("__ie_onload");s[c]=function(){s[r]=="complete"&&x()};/*@end@*/
if(/WebKit/i.test(navigator.userAgent)){t=setInterval(function(){/loaded|complete/.test(d[r])&&x();},10);}o=w.onload;w.onload=function(){x();o&&o();};}e.push(f);};})();function setEnv(envType){switch(envType){case"dev":MYACCOUNT_HOST="https://myaccountqa.scholastic.com";SPS_HOST="https://spsqa.scholastic.com";CHB_HOST="http://homepageqa.scholastic.com";SSO_STORES_HOST="https://storesqanew.scholastic.com";PRINTABLES_HTML_HOST="http://printablesqa.scholastic.com";MINIBOOKS_HOST="http://minibooksqa.scholastic.com";CONTENT_HOST="http://contentqa.scholastic.com";TBW_CONTENT_HOST="http://bookwizardqa.scholastic.com";TCOOL_HOST="http://cooltestwas.scholastic.com";WCS_STORES_HOST="https://storesqa561.scholastic.com";DOTCOM_HOST="http://www.dev.scholastic.com";TEACHER_HOST="http://teacher.dev.scholastic.com";SCHWS_HOST="http://devwas08.scholastic.net";break;case"qa":MYACCOUNT_HOST="https://myaccountqa.scholastic.com";SPS_HOST="https://spsqa.scholastic.com";CHB_HOST="http://homepageqa.scholastic.com";SSO_STORES_HOST="https://storesqanew.scholastic.com";PRINTABLES_HTML_HOST="http://printables.qa.scholastic.com";MINIBOOKS_HOST="http://minibooks.qa.scholastic.com";CONTENT_HOST="http://www2.qa.scholastic.com";TBW_CONTENT_HOST="http://bookwizard.qa.scholastic.com";TCOOL_HOST="http://cooltestwas.scholastic.com";WCS_STORES_HOST="https://storesqa561.scholastic.com";DOTCOM_HOST="http://www.qa.scholastic.com";TEACHER_HOST="http://teacher.qa.scholastic.com";SCHWS_HOST="https://esvcsqa.scholastic.com";break;case"intprod":MYACCOUNT_HOST="https://myaccount.scholastic.com";SPS_HOST="https://my.scholastic.com";CHB_HOST="http://homepage.scholastic.com";SSO_STORES_HOST="https://stgstore.scholastic.com";PRINTABLES_HTML_HOST="http://stage30.scholastic.com";MINIBOOKS_HOST="http://stage30.scholastic.com";CONTENT_HOST="http://stage30.scholastic.com";TBW_CONTENT_HOST="http://bookwizardstg.scholastic.com";TCOOL_HOST="http://clubs.scholastic.com";WCS_STORES_HOST="https://sstaging.scholastic.com";DOTCOM_HOST="http://www.scholastic.com";TEACHER_HOST="http://teacher.scholastic.com";SCHWS_HOST="https://esvcs.scholastic.com";break;case"ebooksdev":MYACCOUNT_HOST="https://devwas05.scholastic.net";SPS_HOST="https://devwas01.scholastic.net";CHB_HOST="http://chbtest.scholastic.net";SSO_STORES_HOST="https://devwas03.scholastic.net";PRINTABLES_HTML_HOST="http://devweb01.scholastic.net";MINIBOOKS_HOST="http://devweb01.scholastic.net";CONTENT_HOST="http://devweb01.scholastic.net";TBW_CONTENT_HOST="http://devweb01.scholastic.net";TCOOL_HOST="http://devaix12.scholastic.net";WCS_STORES_HOST="https://devwas02.scholastic.net";DOTCOM_HOST="http://comdev2.scholastic.net";TEACHER_HOST="http://teacherdev.scholastic.net";SCHWS_HOST="http://devwas08.scholastic.net";break;case"ebooksqa":MYACCOUNT_HOST="https://scewriaps18.scholastic.net";SPS_HOST="https://spsqa.scholastic.com";CHB_HOST="http://homepageqa.scholastic.com";SSO_STORES_HOST="https://storesqanew.scholastic.com";PRINTABLES_HTML_HOST="http://printablesqa.scholastic.com";MINIBOOKS_HOST="http://minibooksqa.scholastic.com";CONTENT_HOST="http://contentqa.scholastic.com";TBW_CONTENT_HOST="http://bookwizardqa.scholastic.com";TCOOL_HOST="http://cooltestwas.scholastic.com";WCS_STORES_HOST="https://storesqa561.scholastic.com";DOTCOM_HOST="http://comqual2.scholastic.net";TEACHER_HOST="http://teacherqual.scholastic.net";SCHWS_HOST="https://esvcsqa.scholastic.com";break;case"ssodev":MYACCOUNT_HOST="https://myaccountdev.scholastic.net";SPS_HOST="https://devwas05.scholastic.net";CHB_HOST="http://chbtest.scholastic.net";SSO_STORES_HOST="https://devwas03.scholastic.net";PRINTABLES_HTML_HOST="http://devweb01.scholastic.net";MINIBOOKS_HOST="http://devweb01.scholastic.net";CONTENT_HOST="http://devweb01.scholastic.net";TBW_CONTENT_HOST="http://devweb01.scholastic.net";TCOOL_HOST="http://devaix12.scholastic.net";WCS_STORES_HOST="https://devwas02.scholastic.net";DOTCOM_HOST="http://comdev2.scholastic.net";TEACHER_HOST="http://teacherdev.scholastic.net";SCHWS_HOST="http://devwas08.scholastic.net";break;case"ssoqa":MYACCOUNT_HOST="https://myaccountqa.scholastic.com";SPS_HOST="https://spsqa.scholastic.com";CHB_HOST="http://homepageqa.scholastic.com";SSO_STORES_HOST="https://storesqanew.scholastic.com";PRINTABLES_HTML_HOST="http://printablesqa.scholastic.com";MINIBOOKS_HOST="http://minibooksqa.scholastic.com";CONTENT_HOST="http://contentqa.scholastic.com";TBW_CONTENT_HOST="http://bookwizardqa.scholastic.com";TCOOL_HOST="http://cooltestwas.scholastic.com";WCS_STORES_HOST="https://storesqa561.scholastic.com";DOTCOM_HOST="http://comqual2.scholastic.net";TEACHER_HOST="http://teacherqual.scholastic.net";SCHWS_HOST="https://esvcsqa.scholastic.com";break;case"prod":default:MYACCOUNT_HOST="https://myaccount.scholastic.com";SPS_HOST="https://my.scholastic.com";CHB_HOST="http://homepage.scholastic.com";SSO_STORES_HOST="https://store.scholastic.com";PRINTABLES_HTML_HOST="http://printables.scholastic.com";MINIBOOKS_HOST="http://minibooks.scholastic.com";CONTENT_HOST="http://www2.scholastic.com";TBW_CONTENT_HOST="http://bookwizard.scholastic.com";TCOOL_HOST="http://clubs.scholastic.com";WCS_STORES_HOST="https://shop.scholastic.com";DOTCOM_HOST="http://www.scholastic.com";TEACHER_HOST="http://teacher.scholastic.com";break;}}var unav_scripts=document.getElementsByTagName("script"),unav_script=unav_scripts[unav_scripts.length-1],unav_queryString=unav_script.src.replace(/^[^\?]+\??/,""),unav_params=parseQuery(unav_queryString);function parseQuery(query){var Params=new Object();if(!query){return Params;}var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split("=");if(!KeyVal||KeyVal.length!=2){continue;}var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g," ");Params[key]=val;}return Params;}if(typeof envType=="undefined"){if(typeof unav_params.envType!="undefined"){envType=unav_params.envType;}else{switch(document.location.hostname){case"dotcom.dev.scholastic.com":case"www.dev.scholastic.com":case"teacher.dev.scholastic.com":envType="dev";break;case"www.qa.scholastic.com":case"teacher.qa.scholastic.com":envType="qa";break;default:envType="prod";break;}}}setEnv(envType);function require(plugin){document.writeln('<script type="text/javascript" src="'+plugin+'"><\/script>');}var UNAV=function(env){this.env=env;this.HOST={dev:"www.dev.scholastic.com",qa:"www.qa.scholastic.com",prod:"www.scholastic.com"};this.protocol=("https:"==document.location.protocol)?"https://":"http://";this.path="/global_resources/universal/header/3.0/";this.imgPath=this.path+"images/";this.beta=(readCookie("schl%5Fversion")==null||readCookie("schl%5Fversion")!="4")?"?schl3o":"?schl4o";this.srcRoot=function(){return this.protocol+this.HOST[this.env]+this.path;};this.imgRoot=function(){return this.protocol+this.HOST[this.env]+this.imgPath;};this.loadCSS=function(){link=document.createElement("link");link.href=this.srcRoot()+"universal.css"+this.beta;link.rel="stylesheet";link.type="text/css";document.getElementsByTagName("head")[0].appendChild(link);};this.loadJS=function(file){var script=document.createElement("script");script.src=this.srcRoot()+file;script.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(script);};};var schlUNAV=new UNAV(envType);schlUNAV.loadCSS();if(typeof jPlugin!="undefined"&&jPlugin){if(jPlugin instanceof Array){for(var i=0;i<jPlugin.length;i++){require(jQueryPlugin[i]);}}else{require(jPlugin);}}if((typeof schljq=="undefined"||schljq!=false)&&typeof jQuery=="undefined"){document.write(unescape("%3Cscript src='"+schlUNAV.srcRoot()+"jquery.js' type='text/javascript'%3E%3C/script%3E"));}String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"");};var logoLink=CONTENT_HOST;var header=readCookie("header");if(header!=null){switch(header){case"teacherDefault":logoLink=DOTCOM_HOST+"/teachers";break;case"parents":logoLink=CONTENT_HOST+"/browse/parentsHome.jsp";break;case"kids":logoLink=DOTCOM_HOST+"/kids/";break;case"littleKids":logoLink=DOTCOM_HOST+"/parents/play/";break;case"bigKids":logoLink=DOTCOM_HOST+"/kids/stacks/";break;case"administrators":logoLink=DOTCOM_HOST+"/administrator/";break;case"librarians":logoLink=DOTCOM_HOST+"/librarians/";break;default:break;}}logoLink="http://www.scholastic.com/home/";var personal=readCookie("SPS_UD");if(personal){var temp=unescape(personal).split("|");var temp2=temp[2].trim();if(temp2.length<=15){personalText=temp2;}else{personalText=temp[2].substring(0,15);}}else{personalText="";}var style='<style type="text/css">.unMain-dis{visibility:hidden;}</style>';document.writeln(style);var strUNAV4o='<div id="universal4o">';strUNAV4o+='<div id="universal">';strUNAV4o+='<a href="'+logoLink+'"><img src="http://www.scholastic.com/global_resources/universal/layout/images/corp_logo.gif" alt="Scholastic | Read Every Day. Lead a Better Life." border="0" class="uLogo" /></a>';strUNAV4o+='<ul class="uNav">';strUNAV4o+='<li class="uNav-item1"><a title="Teachers" href="'+DOTCOM_HOST+"/teachers\" onclick=\"saveCookie('header','teacherDefault');\"><span>Teachers</span></a></li>";strUNAV4o+='<li class="uNav-item2"><a title="Parents" href="'+DOTCOM_HOST+"/parents\" onclick=\"saveCookie('header','parents');\"><span>Parents</span></a></li>";strUNAV4o+='<li class="uNav-item3"><a title="Kids" href="#"><span>Kids</span></a></li>';strUNAV4o+='<li class="uNav-item4"><a title="Administrators" href="'+DOTCOM_HOST+"/administrator/\" onclick=\"saveCookie('header','administrators');\"><span>Administrators</span></a></li>";strUNAV4o+='<li class="uNav-item5"><a title="Librarians" href="'+DOTCOM_HOST+"/librarians/\" onclick=\"saveCookie('header','librarians');\"><span>Librarians</span></a></li>";strUNAV4o+='<li class="uNav-item6"><a title="Book Clubs" href="'+TCOOL_HOST+'"><span>Book Clubs</span></a></li>';strUNAV4o+="</ul>";strUNAV4o+='<div id="universal-personalized"></div>';strUNAV4o+='<div id="universal-account"><div id="universal-signInOut"></div><div id="universal-myAccount"></div></div>';strUNAV4o+="</div>";strUNAV4o+="</div>";strUNAV4o+='<div id="universal4o-dd"></div>';if(unav_params.nodisplay=="undefined"||unav_params.nodisplay!="y"){document.writeln(strUNAV4o);addDOMLoadEvent(setUpUNAVdd);}function setUpUNAVdd(){displayPersonal();displaySignInOut();var universal4o_dd={"Kids":'<ul><li><a href="'+DOTCOM_HOST+"/kids/stacks/\" onclick=\"saveCookie('header','bigKids');\">The STACKS (Ages 8-12)</a></li><li><a href=\""+DOTCOM_HOST+'/parents/play/">Family Playground (Ages 3-7)</a></li></ul>',"Book Clubs":'<ul><li><a href="#">For Teachers</a></li><li><a href="#">For Parents</a></li></ul>'},$universalDD=jQuery("#universal4o-dd");jQuery("#universal4o .uNav a").filter("[title=Kids]").hover(function(){$universalDD.html(universal4o_dd[jQuery(this).attr("title")]).css({top:jQuery(this).offset().top+18,left:jQuery(this).offset().left}).show();},function(){$universalDD.hide();});$universalDD.bind("mouseenter",function(){jQuery(this).show();}).bind("mouseleave",function(){jQuery(this).hide();});}function displayPersonal(){var personalText="";if(personal){var temp=unescape(personal).split("|");personalText=(temp[2].substring(0,15));}if(document.getElementById("universal-personalized")){document.getElementById("universal-personalized").innerHTML=personalText;}}function updatePersonal(which){var personalText="";if(which=="lo"){personalText="";}else{if(readCookie("SPS_UD")!=null&&readCookie("SPS_UD")!=""){var temp=unescape(readCookie("SPS_UD")).split("|");var temp2=temp[2];if(temp2.length<=15){personalText=temp2;}else{personalText=temp[2].substring(0,15);}}}if(document.getElementById("universal-personalized")){document.getElementById("universal-personalized").innerHTML=personalText;}}function displaySignInOut(){if(location.href.indexOf("/sps_my_account/accmgmt/GenericSignin.jsp")!=-1||personal==null){if(document.getElementById("universal-signInOut")){document.getElementById("universal-signInOut").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp" onclick="return MA_showLogin();">Sign in</a>';document.getElementById("universal-myAccount").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp" onclick="return RP_show();">Register</a>';}}else{if(personal!=null&&personal!=""){if(document.getElementById("universal-signInOut")){document.getElementById("universal-signInOut").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp?finalSuccessURL=http://www.scholastic.com" onclick="maLogOut();return false;">Sign Out</a>';document.getElementById("universal-myAccount").innerHTML='<a class="my-account" onclick="return MA_show();" href="'+MYACCOUNT_HOST+'/com.scholastic.myaccount.MyAccount/MyAccount.html">My Account</a>';}}else{if((typeof schlKids=="undefined")||!schlKids){signinURL=SPS_HOST+"/sps_my_account/accmgmt/GenericSignin.jsp?finalSuccessURL="+location.href;}else{signinURL=DOTCOM_HOST+"/kidslogin";}if(document.getElementById("universal-signInOut")){document.getElementById("universal-signInOut").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp" onclick="return MA_showLogin();">Sign in</a>';document.getElementById("universal-myAccount").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp" onclick="return RP_show();">Register</a>';}}}}function maLogOut(){kookies=["SPS_TSP","SPS_SESSION","SPS_UD","lithiumSSO:scholastic","prefCTR:scholastic","PR_SUB","SPS_BUS","XUS_EI"];for(var i=0;i<kookies.length;i++){kookie(kookies[i],"",-1);}if(document.getElementById("universal-signInOut")){document.getElementById("universal-signInOut").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp"  onclick="return MA_showLogin();">Sign in</a>';}if(document.getElementById("universal-myAccount")){document.getElementById("universal-myAccount").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp" onclick="return RP_show();">Register</a>';}updatePersonal("lo");if(onSignOutHook!=null){onSignOutHook();}}function chkLS(){if(location.href.indexOf("/sps_my_account/accmgmt/GenericSignin.jsp")!=-1||readCookie("SPS_UD")==null){if(document.getElementById("universal-signInOut")){document.getElementById("universal-signInOut").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp" onclick="return MA_showLogin();">Sign in</a>';document.getElementById("universal-myAccount").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp" onclick="return RP_show();">Register</a>';}}else{if(readCookie("SPS_UD")!=null&&readCookie("SPS_UD")!=""){if(document.getElementById("universal-signInOut")){document.getElementById("universal-signInOut").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp?finalSuccessURL=http://www.scholastic.com" onclick="maLogOut();return false;">Sign Out</a>';document.getElementById("universal-myAccount").innerHTML='<a class="my-account" onclick="return MA_show();" href="'+MYACCOUNT_HOST+'/com.scholastic.myaccount.MyAccount/MyAccount.html">My Account</a>';}}else{if((typeof schlKids=="undefined")||!schlKids){signinURL=SPS_HOST+"/sps_my_account/accmgmt/GenericSignin.jsp?finalSuccessURL="+location.href;}else{signinURL=DOTCOM_HOST+"/kidslogin";}if(document.getElementById("universal-signInOut")){document.getElementById("universal-signInOut").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp" onclick="return MA_showLogin();">Sign in</a>';document.getElementById("universal-myAccount").innerHTML='<a href="'+SPS_HOST+'/sps_my_account/accmgmt/GenericSignin.jsp" onclick="return RP_show();">Register</a>';}}}updatePersonal();}function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else{var expires="";}document.cookie=name+"="+value+expires+"; domain=scholastic."+document.domain.split(".").pop()+"; path=/";}function saveCookie(name,value){var date=new Date();date.setTime(date.getTime()+(365*100*24*60*60*1000));var expires="; expires="+date.toGMTString();document.cookie=name+"="+value+expires+"; domain=scholastic."+document.domain.split(".").pop()+"; path=/";}function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);}}return null;}function eraseCookie(name){createCookie(name,"",-1);}function deleteCookie(name){saveCookie(name,"",-1);}function kookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(365*100*24*60*60*1000));var expires="; expires="+date.toGMTString();}else{var expires="";}document.cookie=name+"="+value+expires+"; domain=scholastic."+document.domain.split(".").pop()+"; path=/";}var GB_DONE=false,GB_HEIGHT=707,GB_WIDTH=400,GB_TOP=132;var maActiveTab,maDefaultStore,oc=(typeof oc!="undefined")?encodeURIComponent(oc):"";var rpType=(typeof srt!="undefined")?srt:"";var sur="";var redirectFn="";var myAccoutCloseHook,onSignOutHook,onSuccessRegistration,shopForEbooksHook,shopForGradeEBooksHook,aboutUsHook,viewEBookDetailsHook;function GB_show(url,height,width){GB_HEIGHT=height||400;GB_WIDTH=width||400;if(!GB_DONE){jQuery(document.body).append("<div id='GB_overlay'></div><div id='ma_wrapper'></div>");GB_DONE=true;}hideSelectBoxes();maOverlay();jQuery("#GB_overlay").show();jQuery("#GB_frame").remove();jQuery("#ma_wrapper").append("<iframe id='GB_frame' name='GB_frame' frameborder='0' scrolling='no' allowtransparency='true' width='943' height='709' src='"+url+"'></iframe>");GB_position();jQuery("#ma_wrapper").show();}function MA_show(){if(document.domain.indexOf("scholastic")!=-1){document.domain="scholastic."+document.domain.split(".").pop();}var url=MYACCOUNT_HOST+"/com.scholastic.myaccount.MyAccount/MyAccount.html";if(typeof maDefaultStore!="undefined"){url+=maDefaultStore;}if(typeof rpType!=""){if(url.indexOf("?")!=-1){url+="&amp;t="+rpType;}else{url+="?t="+rpType;}}if(typeof oc!=""){if(url.indexOf("?")!=-1){url+="&amp;oc="+oc;}else{url+="?oc="+oc;}}if(typeof maActiveTab!="undefined"){url+=maActiveTab;}if(typeof sur!=""){if(url.indexOf("?")!=-1){url+="&amp;sur="+sur;}else{url+="?sur="+sur;}}GB_show(url,614,943);return false;}function MA_showLogin(){if(document.domain.indexOf("scholastic")!=-1){document.domain="scholastic."+document.domain.split(".").pop();}var url=MYACCOUNT_HOST+"/com.scholastic.myaccount.MyAccount/MyAccount.html?t=lo&amp;oc="+oc;GB_show(url,614,943);return false;}function RP_show(){if(document.domain.indexOf("scholastic")!=-1){document.domain="scholastic."+document.domain.split(".").pop();}var url=(typeof rpType!="undefined"&&rpType!="")?"/com.scholastic.registration.Registration/Registration.html?t="+rpType+"&amp;oc="+oc:"/com.scholastic.registration.Registration/Registration.html?oc="+oc;url=(typeof sur!="undefined"&&sur!="")?url+"&amp;sur="+sur:url;var uri=MYACCOUNT_HOST+url;GB_show(uri,614,943);return false;}function setActiveTab(tabName){maActiveTab="#"+tabName;}function setDefaultStore(storeID){maDefaultStore="?"+storeID;}function setRegistrationType(type){rpType=type;}function setMyAccountCloseHook(hook){myAccoutCloseHook=hook;}function setOnSignOutHook(hook){onSignOutHook=hook;}function setOnSuccessRegistration(hook){onSuccessRegistration=hook;}function setShopForEBooksHook(hook){shopForEbooksHook=hook;}function GB_hide(){jQuery("#ma_wrapper,#GB_overlay").hide();showSelectBoxes();jQuery("#GB_frame").remove();if(typeof nodisplay=="undefined"){chkLS();}if(myAccoutCloseHook!=null){myAccoutCloseHook();}}function setSSORegistrationComplete(){if(sur!=""){setRedirectFunction();}}function PostRegRedirect(){jQuery("#ma_wrapper,#GB_overlay").hide();showSelectBoxes();jQuery("#GB_frame").remove();if(onSuccessRegistration!=null){onSuccessRegistration();}}function RP_hide(){GB_hide();}function maOverlay(){var arrayPageSize=getPageSize();var arrayPageScroll=getPageScroll();var h=arrayPageSize[1]+arrayPageScroll[1];if(h<(GB_HEIGHT+GB_TOP)){h=GB_HEIGHT+GB_TOP+10;}jQuery("#GB_overlay").css({height:h+"px"});}function GB_position(){var de=document.documentElement;var w=self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;jQuery("#ma_wrapper").css({width:GB_WIDTH+"px",height:GB_HEIGHT+"px",left:"22px",top:GB_TOP+"px"});}function getPageScroll(){var yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;}else{if(document.body){yScroll=document.body.scrollTop;}}}var arrayPageScroll=new Array("",yScroll);return arrayPageScroll;}function getPageSize(){var pageHeight,pageWidth,xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}else{if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}}var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else{if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}}}if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}var arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;}function showSelectBoxes(){var selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){selects[i].style.visibility="visible";}}function hideSelectBoxes(){var selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){selects[i].style.visibility="hidden";}}function shopForEBooks1(){alert("there");if(shopForEbooksHook!=null){shopForEbooksHook();}else{window.location=SCHWS_HOST+"/SchWS/link2COOL.jsp";}}function shopForEBooks(){if(shopForEbooksHook!=null){shopForEbooksHook();}else{window.location=SCHWS_HOST+"/SchWS/link2COOL.jsp";}}function setShopForGradeEBooksHook(hook){shopForGradeEBooksHook=hook;}function setAboutUsHook(hook){aboutUsHook=hook;}function setViewEBookDetailsHook(hook){viewEBookDetailsHook=hook;}function resetSuccessRegistration(){sur="";}function setSuccessRegistration(){sur="sur";}function getSuccessRegistration(){return sur;}function getRedirectFunction(){return redirectFn;}function setRedirectFunction(){redirectFn="sso";}function resetRedirectFunction(){redirectFn="";}function MA_showLoginForSSO(){if(document.domain.indexOf("scholastic")!=-1){document.domain="scholastic."+document.domain.split(".").pop();}var url=MYACCOUNT_HOST+"/com.scholastic.myaccount.MyAccount/MyAccount.html?sul=losso";if(typeof rpType!=""){if(url.indexOf("?")!=-1){url+="&amp;t="+rpType;}else{url+="?t="+rpType;}}if(typeof oc!=""){if(url.indexOf("?")!=-1){url+="&amp;oc="+oc;}else{url+="?oc="+oc;}}if(typeof sur!=""){if(url.indexOf("?")!=-1){url+="&amp;sur="+sur;}else{url+="?sur="+sur;}}GB_show(url,614,943);return false;}function MA_showLoginForSSON(){if(document.domain.indexOf("scholastic")!=-1){document.domain="scholastic."+document.domain.split(".").pop();}var url=MYACCOUNT_HOST+"/com.scholastic.myaccount.MyAccount/MyAccount.html";if(typeof rpType!=""){if(url.indexOf("?")!=-1){url+="&amp;t="+rpType;}else{url+="?t="+rpType;}}if(typeof oc!=""){if(url.indexOf("?")!=-1){url+="&amp;oc="+oc;}else{url+="?oc="+oc;}}if(typeof sur!=""){if(url.indexOf("?")!=-1){url+="&amp;sur="+sur;}else{url+="?sur="+sur;}}GB_show(url,614,943);return false;}function shopForGradeEBooks(grade){if(shopForGradeEBooksHook!=null){shopForGradeEBooksHook(grade);}else{window.location=SCHWS_HOST+"/SchWS/link2COOL.jsp";}}function AboutUs(){if(aboutUsHook!=null){aboutUsHook();}else{window.location=SCHWS_HOST+"/SchWS/link2COOL.jsp";}}function viewEBookDetails(isbn){if(viewEBookDetailsHook!=null){viewEBookDetailsHook(isbn);}else{window.location=SCHWS_HOST+"/SchWS/link2COOL.jsp";}}
