var books=new Array();

books["pb"]=new Array();
books["pb"][1]='Clifford has entered a contest to become America&rsquo;s Super Dog!  But he is competing against Champ.  Champ does everything perfectly.  He runs fast, jumps high, and is good at catching Frisbees. Champ may be a winner, but Clifford will prove he has good sportsmanship and a winning spirit!';
books["pb"][2]='<p>This is the story of young Liz, her father, and their strained relationship. Dad has been away at WWII for longer than she can remember, and they begin their journey of reconnection through a hunting shirt, cherry pie, tender conversation, and the crow call. This allegorical story shows how, like the birds gathering above, the relationship between the girl and her father is graced with the chance to fly.</p>';
books["pb"][3]='<p>Parents and children can never have enough ways to say &rdquo;I love you&rdquo;&ndash;and now, America&rsquo;s favorite dinosaurs are giving families a funny book, perfect for bedtime, storytime, anytime. Even when little dinosaurs are naughty, it&rsquo;s important to remind them that no matter what they do, they are always loved.</p>';
books["pb"][4]='<p>When a little boy loses a mitten in the snow, a passing squirrel finds it&rsquo;s the perfect place to warm his icy toes.  So he sqe-e-e-e-zes inside. But he&rsquo;s not the only animal with that idea. How many animals can fit inside a little boy&rsquo;s mitten?</p>';
books["pb"][5]='<p>A winter wonderland awaits a young polar bear cub that emerges from its den for the first time. As the cub sets out on a dramatic arctic journey, it worries whether it has the skills to survive. But a parent&rsquo;s abiding presence and simple, reassuring words instill confidence and love.</p>';
books["pb"][6]='<p>When Jackie Robinson retires from baseball and moves his family to Connecticut, the beautiful lake on their property is the center of everyone&rsquo;s fun. The neighborhood children join the Robinson  kids for swimming and boating. But oddly, Jackie never goes near the water.</p>';

books["er"]=new Array();
books["er"][1]='<p>Tom and Jamie can&rsquo;t believe their luck when they find a secret entrance to a prehistoric world filled with dinosaurs! They vow to have a new adventure every day.</p>';
books["er"][2]='<p>Freddy can&rsquo;t wait for all the toys, toys, toys he put on Christmas list! He&rsquo;s sure Santa will bring him everything he&rsquo;s wishing for. But when Freddy learns not every kid is as lucky as he is, he starts to wonder. Could giving presents be as much fun as getting them?</p>';
books["er"][3]='<p>This nonfiction easy reader has simple, rhyming text and close-up photography of polar bears, penguins, walruses, arctic foxes, seals, and more!   The text is written in easy-to-read rhymes and is illustrated with irresistible photographs. Three pages of fun learning activities are designed to both challenge and entertain new readers.</p>';

books["mg"]=new Array();
books["mg"][1]='<p>CHOCOLATE OR VANILLA? contains nine quizzes to share with three of your closest friends. It also has a super-special BFF quiz, just for you and your best friend, for a totally outrageous way to learn each other&rsquo;s secrets.</p>';
books["mg"][2]='<p>Zane has made an enemy for life in the evil scientist Dr. Gristle. Not only is Gristle angry at the damage Zane has done to his reputation, but he’s also extraordinarily jealous of Zane’s ability to use technology to talk to animals. </p>';
books["mg"][3]='<p>Thanks to global warming, it&rsquo;s a beautiful eighty-five degree winter morning. Fortunately for the Tardy Boys, The School With No Name has an indoor hockey rink. But when they show up for practice, the ice has been taken over by penguins. With everyone at school busy trying out for the American Super Mega Idol Star Search, only Leyton and Wade can save these creatures from becoming extinct.</p>';
books["mg"][4]='<p>When Polly joins the soccer team, her strange stepmom, Veronica, becomes her biggest fan &ndash; and the spookiest soccer mom Endsville has ever seen!</p>';
books["mg"][5]='<p>Eric can&rsquo;t wait to get a dog he can run around and play with, like his friend Parker&rsquo;s golden retriever. But Meatball the bulldog doesn&rsquo;t seem to be the run-around-and-play type ... Even when they go for a walk, Meatball sits down on the sidewalk! Can Eric get this stubborn bulldog to get up and go?</p>';
books["mg"][6]='<p>Sherlock Holmes&rsquo;s trusted assistants, a band of loyal street urchins called the Baker Street Irregulars, are back for their most puzzling mystery yet, in a case that involves murder, abduction, and the hunt for a lost treasure.</p>';
books["mg"][7]='<p>SWEET OR SPICY? contains nine more quizzes to share with three of your closest friends. It also has an all new super-special BFF quiz, just for you and your best friend. A fun way to find out all the juicy details you are afraid to ask about.</p>';

books["s"]=new Array();
books["s"][1]='<p>Each of the 300 records on pop culture, sports, science, and more has its own page that includes a full-color photograph and a detailed description of the record.</p>';

books["es"]=new Array();
books["es"][1]='<p>Los dinosaurios preferidos por todos est&#0225;n de vuelta. Los adorables y tiernos dinosaurios aprenden a decir &rdquo;Te quiero&rdquo; en cada una de las p&#0225;ginas de este libro. Al igual que en los libros anteriores, Yolen y Teague captan la naturaleza juguetona de los chicos por medio de rimas divertidas e ilustraciones maravillosas.</p>';

books["home"]=new Array();
books["home"][1]=books["mg"][2];
books["home"][2]=books["er"][3];
books["home"][3]=books["mg"][6];

function displayPopup(n, arr, dir) {
	if(typeof(dir) == "undefined") dir="";
	var tipTool=document.getElementById("pointy");
	var tipToolContent=document.getElementById("pContent");
	var tipToolArrow=document.getElementById("pointyArr");
	var bookLayer=document.getElementById(n);

	tipTool.style.display="block";
	tipToolArrow.style.display="block";

	tipToolContent.innerHTML=books[arr][n];

	hx=bookLayer.offsetHeight;
	hp=tipTool.offsetHeight;
	wp=tipTool.offsetWidth;
	h=hx - hp;
	
	if(dir == "left") {
		l=getposOffset(bookLayer, "left") - wp - 5;
		t=getposOffset(bookLayer, "top") + h;

		arrowLeft=l + wp - 1;
		arrowTop=t + parseInt(hp / 2) - 12;

		tipToolArrow.innerHTML='<img src="images/pointyRight.gif" width="26" height="25">';

	}
	else {
		l=getposOffset(bookLayer, "left") + 185;
		if(arr == "home") l += - 40;
		t=getposOffset(bookLayer, "top") + h;
		//t=getposOffset(bookLayer, "top") + hx - 20 - parseInt(hp / 2);

		arrowLeft=l - 25;
		arrowTop=t + parseInt(hp / 2) - 12;

		tipToolArrow.innerHTML='<img src="images/pointyLeft.gif" width="26" height="25">';

	}

	tipTool.style.left=l + "px";
	tipTool.style.top=t + "px";
	tipToolArrow.style.left=arrowLeft + "px";
	tipToolArrow.style.top=arrowTop + "px";	
}



function hidePopup() {
	document.getElementById("pointy").style.display="none";
	document.getElementById("pointyArr").style.display="none";
}


function getposOffset(overlay, offsettype){
	var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
	var parentEl=overlay.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}



/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array();
menu1[0]='<a href="newreleases_picture.htm">Picture Books</a>';
menu1[1]='<a href="newreleases_earlyreader.htm">Early Readers</a>';
menu1[2]='<a href="newreleases_middle.htm">Middle Grade/YA</a>';
menu1[3]='<a href="newreleases_series.htm">Nonfiction &amp; Reference</a>';
menu1[4]='<a href="newreleases_espanol.htm">Scholastic en Espanol</a>';

var menu2=new Array();
menu2[menu2.length]='<a href="http://www.scholastic.com/titles/abbyhayes">Abby Hayes</a>';  
menu2[menu2.length]='<a href="http://alliefinkle.scholastic.com/">Allie Finkle</a>'; 
menu2[menu2.length]='<a href="http://www.scholastic.com/bone/">Bone</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/canyouseewhatisee/index_stacks.htm">Can You See What I See?</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/captainunderpants/">Captain Underpants</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/charliebone/">Charlie Bone</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/titles/childrenofthelamp/">Children of the Lamp</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/titles/deardumbdiary/index.htm">Dear Dumb Diary</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/deltora/">Deltora</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/dinosaurcove/">Dinosaur Cove</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/elliotspark/">Elliot’s Park</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/titles/geronimostilton/index.htm">Geronimo Stilton</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/goosebumps/">Goosebumps</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/graphix/">Graphix</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/harrypotter/">Harry Potter</a>';
menu2[menu2.length]='<a href="http://scholastic.com/kids/middleschoolsurvival/">How I Survived Middle School</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/thehungergames/">Hunger Games</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/julianrodriguez/">Julian Rodriguez</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/titles/keys/">Keys to the Kingdom</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/elyon/">Land of Elyon</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/mainstreet/">Main Street</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/andygriffiths/">Schooling Around</a>';
menu2[menu2.length]='<a href="http://www.scholastic.com/skeletoncreek/">Skeleton Creek</a>';

	
var menuwidth='143' //default menu width
var menubgcolor='#E9F6DC'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
var layerId;

var platform=navigator.platform.indexOf("Mac");


/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all


//if (ie4||ns6)
//	document.write('<div id="' + layerId + '" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth + "px";
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth : window.pageXOffset+window.innerWidth
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
if(ie4 && platform != -1) edgeoffset += - 15
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight : window.pageYOffset+window.innerHeight
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
if(ie4 && platform != -1) edgeoffset +=  - 15
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6) {
	if(layerId == "homeSeriesDropDown") menuwidth=menuwidth; else menuwidth="143";
	what='<table border="0" cellpadding="0" cellspacing="0" width="' + menuwidth + '"><tr><td>' + what.join("") + '</td></tr></table>';
//dropmenuobj.innerHTML=what.join("")
dropmenuobj.innerHTML=what;
}
}


function dropdownmenu(obj, e, menucontents, mwidth){

if (mwidth == "143")
{
	layerId="homeDropDown";
}
else {
	layerId="homeSeriesDropDown";
	menuwidth = mwidth;
}

if (window.event) event.cancelBubble=true;
else if (e.stopPropagation) e.stopPropagation();
clearhidemenu();
dropmenuobj=document.getElementById? document.getElementById(layerId) : layerId;
populatemenu(menucontents);

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", mwidth)
dropmenuobj.x=getposOffset(obj, "left") + 2
if(ie4) dropmenuobj.y=getposOffset(obj, "top")
else dropmenuobj.y=getposOffset(obj, "top") - 2
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b=b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu