path = "../"  ;

var color1="#94AEC7" // top/bottom (was 999966)
var color2="#5B8484" // text boundary (was 5B8484)
var color3="#999999" // color for the > and | in links (was 999999)
var color4="#888888" // color for the time (was gray = 666666)
var color5="#5B8484" // color for text titles





function pageTitle(pTitle) {
if (pTitle) {document.write("<title>"+pTitle+"</title>");}
else {document.write ("<title>PET: Physics and Everyday Thinking</title>");}
}

// Main page:  headerStuff("Physics and Everyday Thinking","publisher");
// Otherwise: headerStuff("<page title>","");

function headerStuff(title,alertbox,section)
{

// The following code determines the image for the banner

arraydim = 6;
arraydim2 = 1;
homeIndex = 1;
array2d = new Array(arraydim);
if (arraydim2 > 1) {
   for (k=0; k<arraydim; k++) {
      array2d[k] = new Array(arraydim2);
    }
}

sectionsArray = new Array(arraydim);
titlesArray = new Array(arraydim);


sectionsArray[0] = "content";
sectionsArray[1] = "home";
sectionsArray[2] = "resources";
sectionsArray[3] = "pedagogy";
sectionsArray[4] = "people";
sectionsArray[5] = "eset";


nSection = homeIndex;

if (section) {imageSection=section;} else {imageSection="home";}

for (i=0; i<arraydim; i++) {
  if (sectionsArray[i] == imageSection) {nSection = i;}
}

imageFolder = sectionsArray[nSection] + "/";
if (nSection == homeIndex) {imageFolder = "";}

randy1 = Math.random();
randy2 = (arraydim2*randy1) - 0.5;
randy3 = randy2;
upperlim = arraydim2 - 0.5;
if (randy2 == -0.5) {randy3 = 0;}
if (randy2 == upperlim) {randy3 = arraydim2 - 1;}
randy2 = randy3;
randy = Math.round(randy2);

bannerImage = path + "images/" + imageFolder + sectionsArray[nSection] + randy + ".jpg";




// document.write("<body onmousemove='overhere()'>");
document.write("<body>");

document.write("<div id='frame'>");
document.write("<table width='860' border='0' cellpadding='0' cellspacing='0'>");
document.write("<tr><td colspan='2'>");
// ---- Banner - - - - - - - - - - - - - - - -  --

document.write("<div id='banner'>");

document.write("<table width='860' height='93' border='0' cellpadding='0' cellspacing='0'>");
document.write("<tr>");
document.write("<td width='209' height='93'>");
document.write("<a href='"+path+"index.html'>");
document.write("<img src='"+path+"images/pet_logo.gif' alt='PET Home' width='209' height='87' border='0' />");
document.write("</a>");
document.write("</td>");

document.write("<td width='16' height='93' valign='bottom'>");
document.write("<img src='"+path+"images/cornerTab.gif' width='16' height='93' align='bottom' />");
document.write("</td>");
document.write("<td width='635'>");
document.write("<div id='bannerRight'>");
document.write("<div id='bannerRightTop'>");
document.write("<img src='"+bannerImage+"' width='635' height='73' />");
document.write("</div>");
document.write("<div id='bannerRightTitleTab'>"+title+"</div>");	
document.write("</div>");	  
document.write("</td>");
document.write("</tr>");
document.write("</table>");
document.write("</div>");
	
document.write("<div id='colorBar'></div>");

document.write("</td></tr>");

document.write("<tr>");
document.write("<td id='contentleftBG' valign='top'>");

// -- ContentLeft column start - - - - - - - - - - - - - -  -->

document.write("<div id='contentleft'>");
document.write("<div id='sectionLinks'>");
document.write("<div id='aboveMenuBar'>	</div>");
document.write("<ul>");
document.write("<li><a href='"+path+"index.html'>Home</a></li>");
document.write("<li><a alt='Pedagogy' href='"+path+"pedagogy/pedagogy.html'>Pedagogy</a></li>");
document.write("<li><a alt='Physics Content' href='"+path+"content/content.html'>Content</a></li>");
document.write("<li><a alt='Resources for Faculty' href='"+path+"resources/resources.html'>Faculty Resources</a></li>");
document.write("<li><a href='"+path+"eset.html' alt='Elementary Science and Everyday Thinking'>ESET</a></li>");
document.write("<li><a alt='People Involved in Developing PET' href='"+path+"people/people.html'>People</a></li>");
document.write("</ul>");
document.write("</div>");

document.write("<div id='alerts'> <br />");

// -- End ContentLeft stuff --


// --  Contact publisher --
 
if (alertbox == "publisher") 
{

document.write("<p>Contact our publisher:<br />");
document.write("<a href='http://its-about-time.com'><strong>It's About Time, Inc.</strong></a><br />");
document.write("Toll-Free:<br />"); 
document.write("1-888-698-TIME<br />");

document.write("&nbsp;<br /><br />");
document.write("</p>");

}

else {
document.write("<p>&nbsp;</p>");
}

// -- End Contact Publisher --

document.write("</div>");
  
document.write("</div>");

document.write("</td>");
document.write("<td valign='top'>");

// Real End Content Left

document.write("<div id='contentcenter'>");


}

// -------- END headerStuff END --------
	


// Foot (bottom) of the web page--copyright notice and final end tags

function footerStuff()
{
document.write("<br /></div>");
document.write("<br clear='all' />");
// without this little <br /> NS6 and IE5PC do not stretch the frame div down 
// to encompass the content DIVs -->
document.write("</td></tr>");
document.write("<tr><td colspan='2'>");

// Bottom Bar Starts 

document.write("<div id='colorBar'>");
document.write("© 2007 PET Project. All rights reserved.");
document.write("</div></div>");
// document.write("<script language='Javascript' src='"+path+"wz_tooltip.js'></script>");
document.write("</td></tr>");
document.write("</table>");
document.write("</body>");
}









// ----- DreamWeaver Functions start here --------

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

// Popup window function

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// ----- End DreamWeaver Functions -----

//
// function openMovie(moviename,width,height) {
//    wdht = "width=" + width + ",height=" + height;
//    window.open(path+"movies/"+moviename,'MovieWindow',wdht);
// }





function writeTitle(title,period,type) {

document.write("<h1>");
acttype = "";
if (type) {
	if (type == "a") {acttype = "Applications"};
	if (type == "d") {acttype = "Development"};
	if (type == "l") {acttype = "Learning About Learning"};
	if (type == "n") {acttype = "Nature of Science"};
	document.write("<span class='superTitle'>"+acttype+"</span><br />");
	}
document.write(title);
if (period) {
	document.write("&nbsp;<span class='gray'>("+period+")</span>");
	}
document.write("</h1>");
}

// Popup window functions

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//
//
function openimage(imagename,ilocation,ititle,iheight,iwidth)
    {   
        OpenWindow=window.open("", "newwin", "height="+iheight+",width="+iwidth+",toolbar=no,scrollbars="+scroll+",menubar=no");
        OpenWindow.document.write("<TITLE>"+ititle+"</TITLE>")
        OpenWindow.document.write("<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 rightmargin=0>")
        OpenWindow.document.write("<BODY BGCOLOR=FFFFFF>")
        OpenWindow.document.write("<DIV align='center'><IMG SRC="+ilocation+imagename+" align='middle'></DIV>")
        OpenWindow.document.write("</HTML>")
         OpenWindow.document.close()
        self.name="main"
    }
//
//
function openMovie(moviename) {
    window.open(path+"Movies/"+moviename,'MovieWindow','width=260,height=260');
}
//
//



