// HB4 JS


//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");

////////////////////////////////////////////////// SITE REQUIREMENTS//////////

function spawnWin(a,b,c){
	var abcWin = window.open(a,b,c);
}
	
var minWidth=1024, minHeight=768;

function screenRes(){
	document.write(minWidth+' x '+minHeight+' screen resolution')
}

function openpopup(popurl){
var winpops=window.open(popurl,"","width=680,height=480,scrollbars,resizable")
}


//############################# eTutors and Discovery Videos start #######################
var imgETUT = 'http://media.pearsoncmg.com/bc/bc_campbell_essentials_3/img/etutor.gif';
var	ComeSoon = 'http://media.pearsoncmg.com/bc/bc_campbell_essentials_3/code/comingsoon.gif';

var etut = new Array();
etut["Animal"] 			= ["Tour of an Animal Cell - Now Available!","etutors.htm?hb4animal"]
etut["Respiration"] 	= ["Cellular Respiration - Now Available!","etutors.htm?hb4respiration"]
etut["Photosynthesis"]	= ["Photosynthesis - Now Available!","etutors.htm?hb4photosynthesis"]
etut["Mitosis"] 		= ["Mitosis","../code/comingsoon.gif"]
etut["Meiosis"] 		= ["Meiosis","../code/comingsoon.gif"]
etut["Protein"] 		= ["Protein Synthesis","../code/comingsoon.gif"]
etut["Neurons"] 		= ["How Neurons Work","../code/comingsoon.gif"]
etut["Plant"] 			= ["Tour of a Plant Cell","../code/comingsoon.gif"]

//	listETUT (list link with image in chapter guides and feedback)
var etutString = 'menubar=0,toolbar=0,location=0,status=0,scrollbars=0,resizable=1,width=1004,height=728,screenX=100,screenY=100,left=100,top=100';

function listETUT(etutID) {
	var grabETUT = etut[etutID];
	var ETUTtitle = grabETUT[0];
	var etpath = grabETUT[1];
	document.write("<img src='" + imgETUT + "' alt='eTutor' border='0' width='20' height='16' align='absmiddle' /><a href='javascript:void(0);' onclick=\"openETUT('" + etpath + "');\" class='mp3'>BioFlix: " + ETUTtitle + "</a>");
	}
	
function openETUT(etpath) {
	var msloc = "http://media.pearsoncmg.com/bc/bc_campbell_essentials_3/etutors/";
	var etutWin = window.open(msloc+etpath,'etutWin',etutString);
	etutWin.focus()	}

function tocETUT(etutID) {
	var grabETUT = etut[etutID];
	var ETUTtitle = grabETUT[0];
	var etpath = grabETUT[1];
	document.write("<a href='javascript:void(0);' onclick=\"openETUT('" + etpath + "');\" class='mp3'>BioFlix: " + ETUTtitle + "</a>");
	}
