//========== Error Handler ============
	window.onerror = abort;
	
function abort(msg){
  var msgTxt;
  if(msg){msgTxt = msg}
	else{msgTxt = 'The Astronomy Place'}
 /*  window.status = msgTxt; */
  return true
}

var d = document, dt = d.title;

// sets dtt = doc <title> tag (loads before doc.title)
if(d.getElementsByTagName('title')[0]) { 
	var dtt = d.getElementsByTagName('title')[0].innerHTML;
	}

//load external google analytics file
function loadScript(url){ document.write('<script src="', url, '" type="text/javascript"></script>');}
loadScript("http://www.google-analytics.com/urchin.js");

	
/* =========================================
	   CSS
=========================================*/
var navCSS = (d.URL.indexOf('navbar')>-1)?'leftnav':'pc';
d.write("<LINK REL='Stylesheet' HREF='"+myRoot+"css/"+navCSS+".css'>");


//::::::: Style Object  ::::::::
/* cross-browser function to get an object's style object given its id */

function getStyleObject(objID) {
	if(d.getElementById && d.getElementById(objID)) { // W3C DOM
	  return d.getElementById(objID).style;
	} else if (d.all && d.all(objID)) { // MSIE 4 DOM
	  return d.all(objID).style;
	} else if (d.layers && d.layers[objID]) { // NN 4 DOM, no nested layers
	  return d.layers[objID];
      } else { return false; }
}

function doStyle(objID,prop,val) {
  var s = getStyleObject(objID);
  if(s) {s[prop]=val}
}

/* =========================================
	   GENERAL
=========================================*/



var fWin = null;

function openFlashcards(url) { 
  if (!fWin || fWin.closed) {
    fWin = window.open(url, 'Flashcards', 'toolbar=0,location=0,status=0,menubar=0,scrollbars=auto,resizable=1,width=580,height=500');
   } else {
     fWin.location = url;
     fWin.focus();
}}

function openHint(hinturl)
{
var hintWindow = window.open(hinturl, 'Hint', 'height=400,width=500,toolbar=no,resizable=yes,scrollbars=yes');
if(hintWindow.opener == null) hintWindow.opener = window;
hintWindow.focus();
}

/* ====== WPS REDIRECT CODE (from Christian Lee) ===old version=== 
/*****************new code swright 2/22/06*******************/

function resolvePath(myURL,qURL) {
    // Pull the relative URL out from within the quotes of the link tag
    var urlStartIdx = myURL.indexOf('"');
    var urlEndIdx = myURL.indexOf('"', urlStartIdx + 1);
    var myLink = myURL.substring(urlStartIdx + 1, urlEndIdx);
	//alert(myLink);
	 myRedirect(myLink,qURL);
    return(myLink,qURL);
}

function myRedirect(myLocat,qURL) {self.location.href=myLocat+qURL;}



//=============================================
//=-=-=-=-=-= onLoad event handler =-=-=-=-=-=

window.onload = runJS;

function runJS(){
	if((d.URL.indexOf('toolbar')>-1) || (self==top.frames['toolbar']))
		{  
		   hideExtraRows("topnav_links_above");
		   adjustTopNav();
		}
	else if((d.URL.indexOf('navbar')>-1) || (self==top.frames['navcont'].frames['navbar']))
		{  
		   hideExtraRows("left_nav_vspace");
		   gbLinks();
		   resizeSeparator();
		}
	else if((d.URL.indexOf('content')>-1) || (self==top.frames['navcont'].frames['CONTENT']))
		{
		   hideExtraRows("breadcrumb_above","breadcrumb_below");
		   doNavBar(dt);
	       if(dt=='Overview')  {tweakGrid();}
		   else if(dt=="Movies") {initMov();}
		}
}

//LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
//NNNNNNNNNNNNNNNN   LEFTNAV  NNNNNNNNNNNNNNNN

if(d.URL.indexOf('navbar')>-1)
	{ putOnHat(); }

function putOnHat(){ 
	var tblTop = d.getElementsByTagName('table')[0];
	if(tblTop){
	  var leftNavHat = d.createElement("IMG")
		  leftNavHat.id = "leftNavHat"
		  leftNavHat.src = myRoot + "leftnav_hat.gif"
		  tblTop.parentNode.insertBefore(leftNavHat,tblTop);
	} else {setTimeout('putOnHat()',100);}
}

function resizeSeparator() {
	var sepImg = d.images['Separator']
	if(sepImg){
	sepImg.className='separatorImg';
}}

var orange1 = '#FFC018', orange2 = '#ECB247';
var blue1 = '#658EA6';

// convert leftnav gradebook buttons to text links

function gbLinks(){
	var n = ["cm","ci","gb","rr","jac"];
	var nTxt = ["Class Manager","Class Info","Gradebook","Results Reporter","Join a Class"]
	for(i=0;i<n.length; i++){
		if(d.images[n[i]]){
			var img = d.images[n[i]];
				img.style.display = "none"
			var txt = nTxt[i];
		  var tn = d.createTextNode(txt);
		  var gbLink = img.parentNode;
				gbLink.className='gbLink';
			var gbID = 'gbLink'+i; gbLink.setAttribute('id',gbID);
				gbLink.onmouseover='javascript:doNavStyle("'+gbID+'",1.1)'
				gbLink.onmouseout='javascript:doNavStyle("'+gbID+'",0.1)'
		  gbLink.insertBefore(tn,img);
		} else {continue}
	}
}

	
//=-=-=-=-=-= Set leftnav selected button =-=-=-=-=-=

var ff=0;

function doNavBar(mod){
	var nav = parent.frames['navbar']
		if(nav){
			nav.setNav(mod);
		}else{ff++; if(ff<8){doNavBar(mod);}}
}

function setNav(mod) {
	if(mod=='Astronomy Place Movies')
			{mod = 'Movies'}
	var navDoc = parent.frames['navbar'].document
	if(navDoc){		  
	  for(i=0;i<navDoc.links.length;i++) {
		  var dl = navDoc.links[i];
		  var nodeTxt = dl.firstChild.nodeValue;
		  if((dl.id.indexOf('gbLink')>-1)||(!nodeTxt)) {continue}
		  var newID = 'navLink'+i;
			  dl.setAttribute('id',newID);
		  doNavStyle(newID,0);
			  dl.setAttribute('onmouseover','javascript:doNavStyle("'+newID+'",1)')
			  dl.setAttribute('onmouseout','javascript:doNavStyle("'+newID+'",0)')
		  if(nodeTxt==mod){ 	  //compare navlink with CONTENT title
			  doNavStyle(newID,1);
			  dl.setAttribute('onmouseover','')
			  dl.setAttribute('onmouseout','')
		  } else {continue}
	  }}
}

function doNavStyle(id,swch){
	if(swch==1){doStyle(id,'backgroundColor',blue1);}
	else if(swch==0){
		doStyle(id,'backgroundColor','');}
	else if(swch==0.1){
		doStyle(id,'backgroundColor','');
		doStyle(id,'color',orange1);}
	else if(swch==1.1){     // highlight for navbar gradebook links
		doStyle(id,'backgroundColor',orange1);
		doStyle(id,'color','#fff');} 
}


function reloadNavBar() {return true}  // safeguard against stray old function calls


//TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
//NNNNNNNNNNNNN  TOPNAV / Toolbar  NNNNNNNNNNNN

function adjustTopNav(){
	for(i=0;i<d.images.length;i++){
		var di = d.images[i];
		var dp = di.parentNode;
			// convert account summary img to text node
		if(di.src.indexOf('top_account') > -1){
			di.setAttribute("id","acctSumImg")
			dp.className = 'leftnav';
			dp.setAttribute('id','acctSumTxt')
			var acctSumTxt = d.createTextNode("Account Summary");
			dp.replaceChild(acctSumTxt,di);}
		  else if(di.src.indexOf('right_arrow.gif') > -1) {continue}
		  else {di.style.display = 'none';} // hides extra spacer imgs
	}
	setTimeout('insertTopCurves()',25)
}

function insertTopCurves() {
	var tbl = d.getElementsByTagName("TABLE")
	  for(t=2;t<4;t++){
		tbl[t].className = 'toolbarTbl';
		if(tbl[t].rows[0].cells[1]){
		  tbl[t].rows[0].cells[1].className = 'clsMgrTD';
		}
	  }
	var leftTblLoc = tbl[2].rows[0].cells[0].firstChild;
	var leftCurveImg = d.createElement("IMG");
		leftCurveImg.id = "leftCurve";
		leftCurveImg.src = myRoot + "left-curve.gif";
		leftTblLoc.parentNode.insertBefore(leftCurveImg,leftTblLoc);
	
	var rightCurveImg = d.createElement("IMG");
		rightCurveImg.id = "rightCurve";
		rightCurveImg.src = myRoot + "right-curve.gif";
	
	var endPos = tbl[2].rows[0].cells[0]; var lastNode;
	
	for(j=endPos.childNodes.length-1;j>-1;j--){
		var x = endPos.childNodes[j]
		if(x.nodeName=='A'){
		   lastNode = x;
		   j=-1;
		} else {continue}
	}
		var rPos = lastNode.offsetLeft + lastNode.offsetWidth;
		rightCurveImg.style.left = rPos;
		leftTblLoc.parentNode.appendChild(rightCurveImg)
}



//=-=-=-=-=-= hide extra breadcrumbs rows =-=-=-=-=-=

var tds = d.getElementsByTagName("TD")

function hideExtraRows(classNames){
if(tds){
var args = hideExtraRows.arguments
for (i=0;i<tds.length;i++){
	var tc = (tds[i].className)?(tds[i].className):null;
	for(j=0;j<args.length;j++){
		if(tc==args[j]){tds[i].parentNode.style.display = 'none';}}
}}}


//OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
//=-=-=-=-=-= OVERVIEW GRIDS =-=-=-=-=-=

function tweakGrid(){
var tdTags = d.getElementsByTagName("TD")
for (i=0;i<tdTags.length;i++){
	if(tdTags[i].parentNode.className=="rowHead"){
		tdTags[i].setAttribute("id","gridCorner");
		var gc = tdTags[i];
		break;}}
var t3 = d.getElementsByTagName('table').item(2)
t3.parentNode.insertBefore(d.createElement('br'),t3)
}

/* =========================================
	   Movies - Chapter Guides
=========================================*/

function openMovie1(file) {
	var path = "http://media.pearsoncmg.com/aw/aw_bennett_ecp_4/videos/" + file;
	var animString = 'menubar=0,toolbar=0,location=0,status=1,scrollbars=0,resizable=1,width=430,height=450';
	var animWin = window.open(path,'animWin',animString);
	animWin.focus();
}

/* =========================================
	   Self-Guided Tutorials - Chapter Guides
=========================================*/

function openTutorial2(file) {
	var path = "http://media.pearsoncmg.com/aw/aw_bennett_ecp_4/ngb_tutorials/" + file;
	var tString = 'width=800,height=600,toolbar=0,resizable=1,scrollbars=auto';
	var tWin = window.open(path,'tWin',tString);
	tWin.focus();
}

/* =========================================
	   Interactive Figures - Chapter Guides
=========================================*/

function ViewImage3(file) {
	var path = "http://media.pearsoncmg.com/aw/aw_0media_astro/if/if.html?" + file;
	var iString = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=1,width=600,height=600';
	var iWin = window.open(path,'iWin',iString);
	iWin.focus();
}

function ViewImage4(file) {
	var path = "http://media.pearsoncmg.com/aw/aw_0media_astro/if/thumbs/" + file;
	document.write("<img src="+path+" border=0>"); 
	}


//TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
//=-=-=-=-=-= TUTORIALS =-=-=-=-=-=

var tWinProps = 'width=800,height=600,toolbar=0,resizable=1,scrollbars=auto';

function openTutorial(tUrl) {
	var tWin = window.open(tUrl, 'TUTORIAL', tWinProps);
}
function loadTutorial(path){
	var tPath = 'http://media.pearsoncmg.com/aw/aw_bennett_cosmic_3/tutorials/'+path;
	var tWin = window.open(tPath,'TUTORIAL',tWinProps)
}

//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
//=-=-=-=-=-= MOVIES =-=-=-=-=-=

function initMov(){
	var ln = location.href
	var q = ln.substring((ln.indexOf('?')+1),ln.length)
	playMov(q,1);
}
		  
/* function playMacIE5(){ */
/* 	var msMov = "http://media.pearsoncmg.com/bc/bc_bennett_cosmicpers_2/medialib/movies/index.html" */
/* 	location.href = msMov; */
/* }	 */

/* =-=-= display module header with movie title =-=-= */

function showMovHeader(mX,pX){ 
	var mTitle = d.createTextNode(movTitle[mX])
	for (i=0;i<tds.length;i++){
		if(tds[i].className=="content_hdr2"){
			tds[i].innerHTML = '';
			tds[i].appendChild(mTitle);
		}}
    // make PartNav span below header
	var partSpan = d.getElementById('partSpan'); var partSpanHTML = '';
	for(j=1;j<movParts[mX]+1;j++){
		var idSwitch = (j==pX)?'On':'Off';
		partSpanHTML += '<A HREF="javascript:playMov('+mX+','+j+');" class=pLink id=pLink'+idSwitch+'>Part '+j+'</a>'
	}
	partSpan.innerHTML = partSpanHTML;
}

function showMov(xmlLink,movNum){
	/* if(isMacIE5) {playMacIE5();} */
	resolvePath(xmlLink,('?'+movNum))
}

var mX=0, pX=0;
var movTitle = new Array("Astronomy Place Movies","From the Big Bang to Galaxies","Time and Seasons","The Celestial Sphere","Orbits in the Solar System","History of the Solar System","The Sun","Lives of Stars","Double Stars","The Milky Way Galaxy","The Search for Extraterrestrial Life");
var movParts = new Array(0,5,4,5,3,4,5,6,4,3,4);

function playMov(m,p) {
	mX=m; pX=p; if(m<10){m="0"+m}; if(p<10){p="0"+p}; // adds leading 0
	showMovHeader(mX,pX);
 // variable URL to .mov file
	var newSrc = medialibPath + "movies/lect_"+m+"_"+p+".mov"
	var viewPort = d.getElementById('viewPort')
		viewPort.innerHTML = '';
// newSpan Movie title for page header
	var hasParts = ', Part&nbsp;'+pX;	
	var newSpan = '<span id=movTitle>'+movTitle[mX]+hasParts+'<\/span><br><br>';
		viewPort.innerHTML = newSpan;
// new viewer Div
	// vwrDIV is the main DIV for the Movie viewer	
	var vwrDIV = d.createElement('DIV')
		vwrDIV.id = "viewer"
		viewPort.appendChild(vwrDIV);
	var vwrHTML = buildViewer(mX,pX,newSrc)
		vwrDIV.innerHTML = vwrHTML
}


function buildViewer(mX,pX,newSrc) {
// partNav section builds Prev and Next buttons	
	var prevOn = (pX > 1)?true:false
	var nextOn = (pX < movParts[mX])?true:false
	var pHref = "javascript:playMov("+mX+","+(pX-1)+")"
	var nHref = "javascript:playMov("+mX+","+(pX+1)+")"
	var voidHref = "javascript:void(0);"
	var aPrev = '<a class=pNav'+((prevOn==true)?'':'Dys')+ ' id=pn_Prev href="'+(prevOn?pHref:voidHref)+'">&lt;&lt; Prev<\/a>'
	var aNext = '<a class=pNav'+((nextOn==true)?'':'Dys')+ ' id=pn_Next href="'+(nextOn?nHref:voidHref)+'">Next &gt;&gt;<\/a>'
	var partNav = '<span id=pNavSpan>'+aPrev+aNext+'<\span>'
	
	var objTag = '<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="256" HEIGHT="270" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">'
	var objChildNodes = '<param name="SRC" value="'+newSrc+'">'	
		objChildNodes += '<param name="AUTOPLAY" value="true">'	
		objChildNodes += '<param name="CONTROLLER" value="true">'	
		objChildNodes += '<embed src="'+newSrc+'" width="256" height="270" align="center" AUTOPLAY="true" CONTROLLER="true" PLUGINSPAGE="http://www.apple.com/quicktime/download/"><\embed><\object><br>'
	
	var vwrHTML = objTag + objChildNodes + partNav
	return vwrHTML
}


//========== generic functions ===============
//open a generic window 
function openWindow(URL,winName,myprops) { 
winName = window.open(URL,'winName',myprops);
}


//========= picture viewer =============

function ViewImage(URL){
var newWindow = window.open("","myIf","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=1,width=500,height=500");
newWindow.document.write(getProps(URL));
newWindow.document.close();
newWindow.focus();
}  

function getProps(URL) { 
var ifProps = "<html><head><title>Interactive Figure</title></head><body bgColor='#000000' marginwidth='0' marginheight='0' leftmargin='0' topmargin='0' onLoad='window.focus();'><center><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='100%' height='100%' id='movie' align=''><param name='movie' value='"+URL+"'><PARAM name='AUTOPLAY' VALUE='true'><embed src='"+URL+"' quality='high' width='100%' height='100%' name='movie' align='' autoplay='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object></center></body></html>";

return ifProps; 
 } 
 
 //for MS activities***************************
function openmsact(fileName) {
var newWindow = window.open("","myAct","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=1,width=800,height=600");
newWindow.document.write(getProps(fileName));
newWindow.document.close();
newWindow.focus();
}  

function getProps(fileName) { 
if (fileName.indexOf("dcr") != -1){
   var  properties = "<html><head><title>Tutorial</title></head><body bgColor='#ffffff' ><center><OBJECT CLASSID='clsid:166B1BCA-3F9C-11CF-8075-444553540000' CODEBASE='http://active.macromedia.com/director/cabs/sw.cab#version=6,0,0,0' width='750' height='550' NAME='"+fileName+"'><PARAM NAME='SRC' VALUE='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><PARAM name='ALIGN' VALUE='CENTER'><embed SRC='"+fileName+"' autoplay='true' width='750' height='550' NAME='"+fileName+"' align='center'></embed></OBJECT></center></body></html>";} 

else if (fileName.indexOf("DCR") != -1){
   var  properties = "<html><head><title>Tutorial</title></head><body bgColor='#ffffff' ><center><OBJECT CLASSID='clsid:166B1BCA-3F9C-11CF-8075-444553540000' CODEBASE='http://active.macromedia.com/director/cabs/sw.cab#version=6,0,0,0' width='750' height='550' NAME='"+fileName+"'><PARAM NAME='SRC' VALUE='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><PARAM name='ALIGN' VALUE='CENTER'><embed SRC='"+fileName+"' autoplay='true' width='750' height='550' NAME='"+fileName+"' align='center'></embed></OBJECT></center></body></html>";} 

else if (fileName.indexOf("swf") != -1){
   var  properties = "<html><head><title>Activity</title></head><body bgColor='#ffffff'><center><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='100%' height='100%' id='movie' align=''><param name='movie' value='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><embed src='"+fileName+"' quality='high' width='100%' height='100%' name='movie' align='' autoplay='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object></center></body></html>";}

else if (fileName.indexOf("SWF") != -1){
   var  properties = "<html><head><title>Activity</title></head><body bgColor='#ffffff' ><center><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='100%' height='100%' id='movie' align=''><param name='movie' value='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><embed src='"+fileName+"' quality='high' width='100%' height='100%' name='movie' align='' autoplay='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object></center></body></html>";}

else if (fileName.indexOf("mov") != -1){
   var  properties = "<html><head><title>Movie</title></head><body bgColor='#ffffff' ><center><OBJECT CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='100%' HEIGHT='100%' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab'><PARAM name='SRC' VALUE='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><PARAM name='CONTROLLER' VALUE='true'><EMBED SRC='"+fileName+"' WIDTH='100%' HEIGHT='100%' AUTOPLAY='true' CONTROLLER='true' PLUGINSPAGE='http://www.apple.com/quicktime/download/'></EMBED></OBJECT></center></body></html>";}

else if (fileName.indexOf("MOV") != -1){
   var  properties = "<html><head><title>Movie</title></head><body bgColor='#ffffff' ><center><OBJECT CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='100%' HEIGHT='100%' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab'><PARAM name='SRC' VALUE='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><PARAM name='CONTROLLER' VALUE='true'><EMBED SRC='"+fileName+"' WIDTH='100%' HEIGHT='100%' AUTOPLAY='true' CONTROLLER='true' PLUGINSPAGE='http://www.apple.com/quicktime/download/'></EMBED></OBJECT></center></body></html>";}

else if (fileName.indexOf("htm") != -1){
   var  properties = "<html><head><body bgColor='#ffffff' ><script language='JavaScript'>document.location.href='"+fileName+"';</script></body></html>";}

else if (fileName.indexOf("HTM") != -1){
   var  properties = "<html><head><body bgColor='#ffffff' ><script language='JavaScript'>document.location.href='"+fileName+"';</script></body></html>";}

else if (fileName.indexOf("html") != -1){
   var  properties = "<html><head><body bgColor='#ffffff' ><script language='JavaScript'>document.location.href='"+fileName+"';</script></body></html>";}

else if (fileName.indexOf("HTML") != -1){
   var  properties = "<html><head><body bgColor='#ffffff' ><script language='JavaScript'>document.location.href='"+fileName+"';</script></body></html>";}

else {
   var  properties = "<html><head><body bgColor='#ffffff' leftmargin='0' topmargin='0' marginheight='0' marginwidth='0'><script language='JavaScript'>document.location.href='"+fileName+"';</script></body></html>";}

return properties; 
 } 
//*************************** 

function myebookpg()
{
document.write("<p>The myeBook for <i>The Essential Cosmic Perspective</i>, Fifth Edition will be available March 2009.</p>");
}

//**** Chapter Guides - myeBook links 
var ebkImg = "http://media.pearsoncmg.com/aw/aw_bennett_ecp_5/img/ebk.gif"
var ebkURL = ""

var ebk = new Array()
ebk["0100"] = ["01", "1", "Chapter 1: Our Place in the Universe"]
ebk["0101"] = ["0101", "2", "1.1 Our Modern View of The Universe"]
ebk["0102"] = ["0102", "10", "1.2 The Scale of The Universe"]
ebk["0103"] = ["0103", "15", "1.3 Spaceship Earth"]
ebk["0200"] = ["02", "26", "Chapter 2: Discovering the Universe for Yourself"]
ebk["0201"] = ["0201", "27", "2.1 Patterns in the Night Sky"]
ebk["0202"] = ["0202", "34", "2.2 The Reason for Seasons"]
ebk["0203"] = ["0203", "42", "2.3 The Moon, Our Constant Companion"]
ebk["0204"] = ["0204", "48", "2.4 The Ancient Mystery of the Planets"]
ebk["0300"] = ["03", "56", "Chapter 3: The Science of Astronomy"]
ebk["0301"] = ["0301", "57", "3.1 The Ancient Roots of Science"]
ebk["0302"] = ["0302", "61", "3.2 Ancient Greek Science"]
ebk["0303"] = ["0303", "64", "3.3 The Copernican Revolution"]
ebk["0304"] = ["0304", "70", "3.4 The Nature of Science"]
ebk["0400"] = ["04", "84", "Chapter 4: Making Sense of the Universe: Understanding Motion, Energy, and Gravity"]
ebk["0401"] = ["0401", "85", "4.1 Describing Motion: Examples From Daily Life"]
ebk["0402"] = ["0402", "89", "4.2 Newton's Laws of Motion"]
ebk["0403"] = ["0403", "92", "4.3 Conservation Laws in Astronomy"]
ebk["0404"] = ["0404", "98", "4.4 The Force of Gravity"]
ebk["0500"] = ["05", "110", "Chapter 5: Light: The Cosmic Messenger"]
ebk["0501"] = ["0501", "111", "5.1 Basic Properties of Light and Matter"]
ebk["0502"] = ["0502", "117", "5.2 Learning from Light"]
ebk["0503"] = ["0503", "125", "5.3 Collecting Light with Telescopes"]
ebk["0600"] = ["06", "142", "Chapter 6: Formation of Planetary Systems: Our Solar System and Beyond"]
ebk["0601"] = ["0601", "143", "6.1 A Brief Tour of the Solar System"]
ebk["0602"] = ["0602", "157", "6.2 Clues to the Formation of Our Solar System"]
ebk["0603"] = ["0603", "160", "6.3 The Birth of the Solar System"]
ebk["0604"] = ["0604", "164", "6.4 The Formation of Planets"]
ebk["0605"] = ["0605", "173", "6.5 Other Planetary Systems"]
ebk["0700"] = ["07", "188", "Chapter 7: Earth and the Terrestrial Worlds"]
ebk["0701"] = ["0701", "189", "7.1 Earth as a Planet"]
ebk["0702"] = ["0702", "200", "7.2 The Moon and Mercury: Geologically Dead"]
ebk["0703"] = ["0703", "203", "7.3 Mars: A Victim of Planetary Freeze-Drying"]
ebk["0704"] = ["0704", "211", "7.4 Venus: A Hothouse World"]
ebk["0705"] = ["0705", "216", "7.5 Earth as a Living Planet"]
ebk["0800"] = ["08", "232", "Chapter 8: Jovian Planet Systems"]
ebk["0801"] = ["0801", "233", "8.1 A Different Kind of Planet"]
ebk["0802"] = ["0802", "241", "8.2 A Wealth of Worlds: Satellites of Ice and Rock"]
ebk["0803"] = ["0803", "250", "8.3 Jovian Planet Rings"]
ebk["0900"] = ["09", "258", "Chapter 9: Asteroids, Comets, and Dwarf Planets: Their Nature, Orbits, and Impacts"]
ebk["0901"] = ["0901", "259", "9.1 Asteroids and Meteorites"]
ebk["0902"] = ["0902", "263", "9.2 Comets"]
ebk["0903"] = ["0903", "268", "9.3 Pluto: Lone Dog No More"]
ebk["0904"] = ["0904", "272", "9.4 Cosmic Collisions: Small Bodies Versus the Planets"]
ebk["1000"] = ["10", "284", "Chapter 10: Our Star"]
ebk["1001"] = ["1001", "285", "10.1 A Closer Look at the Sun"]
ebk["1002"] = ["1002", "289", "10.2 Nuclear Fusion in the Sun"]
ebk["1003"] = ["1003", "295", "10.3 The Sun-Earth Connection"]
ebk["1100"] = ["11", "306", "Chapter 11: Surveying the Stars"]
ebk["1101"] = ["1101", "307", "11.1 Properties of Stars"]
ebk["1102"] = ["1102", "315", "11.2 Patterns Among Stars"]
ebk["1103"] = ["1103", "323", "11.3 Star Clusters"]
ebk["1200"] = ["12", "331", "Chapter 12: Star Stuff"]
ebk["1201"] = ["1201", "332", "12.1 Star Birth"]
ebk["1202"] = ["1202", "339", "12.2 Life as A Low-Mass Star"]
ebk["1203"] = ["1203", "346", "12.3 Life as A High-Mass Star"]
ebk["1204"] = ["1204", "352", "12.4 Summary of Stellar Lives"]
ebk["1300"] = ["13", "361", "Chapter 13: The Bizarre Stellar Graveyard"]
ebk["1301"] = ["1301", "362", "13.1 White Dwarfs"]
ebk["1302"] = ["1302", "367", "13.2 Neutron Stars"]
ebk["1303"] = ["1303", "371", "13.3 Black Holes: Gravity's Ultimate Victory"]
ebk["1304"] = ["1304", "377", "13.4 The Origin of Gamma-Ray Bursts"]
ebk["1400"] = ["14", "386", "Chapter 14: Our Galaxy"]
ebk["1401"] = ["1401", "387", "14.1 The Milky Way Revealed"]
ebk["1402"] = ["1402", "391", "14.2 Galactic Recycling"]
ebk["1403"] = ["1403", "401", "14.3 The History of the Milky Way"]
ebk["1404"] = ["1404", "404", "14.4 The Mysterious Galactic Center"]
ebk["1500"] = ["15", "410", "Chapter 15: Galaxies and the Foundation of Modern Cosmology"]
ebk["1501"] = ["1501", "411", "15.1 Islands of Stars"]
ebk["1502"] = ["1502", "416", "15.2 Distances of Galaxies"]
ebk["1503"] = ["1503", "426", "15.3 Galaxy Evolution"]
ebk["1504"] = ["1504", "431", "15.4 Quasars and Other Active Galactic Nuclei"]
ebk["1600"] = ["16", "443", "Chapter 16: Dark Matter, Dark Energy, and the Fate of the Universe"]
ebk["1601"] = ["1601", "444", "16.1 Unseen Influences in the Cosmos"]
ebk["1602"] = ["1602", "446", "16.2 Evidence for Dark Matter"]
ebk["1603"] = ["1603", "455", "16.3 Structure Formation"]
ebk["1604"] = ["1604", "458", "16.4 The Universe's Fate"]
ebk["1700"] = ["17", "470", "Chapter 17: The Beginning of Time"]
ebk["1701"] = ["1701", "471", "17.1 The Big Bang"]
ebk["1702"] = ["1702", "480", "17.2 Evidence for the Big Bang"]
ebk["1703"] = ["1703", "485", "17.3 The Big Bang and Inflation"]
ebk["1704"] = ["1704", "490", "17.4 Observing the Big Bang for Yourself"]
ebk["1800"] = ["18", "500", "Chapter 18: Life in the Universe"]
ebk["1801"] = ["1801", "501", "18.1 Life on Earth"]
ebk["1802"] = ["1802", "510", "18.2 Life in the Solar System"]
ebk["1803"] = ["1803", "513", "18.3 Life Around Other Stars"]
ebk["1804"] = ["1804", "519", "18.4 The Search for Extraterrestrial Intelligence"]
ebk["1805"] = ["1805", "524", "18.5 Interstellar Travel and Its Implications to Civilization"]


var string_ebk = "menubar=0,toolbar=0,location=0,status=0,scrollbars=1,resizable=1,width=800,height=600,screenX=10,screenY=10,left=10,top=10"
function open_ebk(path) {var win_ebk = window.open(path,"win_ebk",string_ebk); win_ebk.focus()}

	function ebook(arrayID) {
	var thisArray = ebk[arrayID]
	var url = thisArray[1]
	var title = thisArray[2]
	//document.write("<img src="+ebkImg+">&nbsp;&nbsp;<a href='javascript:void(0)' onclick=\"open_ebk('"+ebkURL+url+"');\" class='ebklink' title='"+title+"'>"+title+"</a>"); 
	document.write("<img src="+ebkImg+">&nbsp;&nbsp;"+title); 
	}
	
	function chpTitle(arrayID) {
	var thisArray = ebk[arrayID]
	var url = thisArray[1]
	var title = thisArray[2]
	//document.write("<img src="+ebkImg+">&nbsp;&nbsp;<a href='javascript:void(0)' onclick=\"open_ebk('"+ebkURL+url+"');\" class='ebklink' title='"+title+"'>"+title+"</a>"); 
	document.write("<p class='chpTitle'>"+title+"</p>"); 
	}	
	
	
//////////////* Open Active Physics */

function apOpenWin(theURL) { 
var MSpath = "http://media.pearsoncmg.com/bc/aw_young_physics_11/";
window.open(MSpath+theURL,"apWin","toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=1,height=520,width=740");
}
