//to check for standard browser
var stdBrowser = true
function chkBv() {
stdBrowser = (document.getElementById) ? true : false
}
//==============================
//statements relevant to thesis chapters etc.
var ptr = " "
function setItem1(ptr) {
document.getElementById(ptr).className="pointer1";
}
function setItem2(ptr) {
document.getElementById(ptr).className="pointer2";
}
function setBtn1(ptr) {
document.getElementById(ptr).className="btn1";
}
function setBtn2(ptr) {
document.getElementById(ptr).className="btn2";
}
//====================================
// next re. pages with printer button
function preLoadptr(){
//create "on" array and populate with Image objects
onImgArray = new Array()
onImgArray[0] = new Image(60,60)
//set URLs for "on" images
onImgArray[0].src = "printer2.gif"
//create "off" array and populate with Image objects
offImgArray = new Array()
offImgArray[0] = new Image(60,60)
//set URLs for "off" images
offImgArray[0].src = "printer1.gif"
}
//===========================================
// To return to Table of Contents
function showTOC() {
parent.left.location="thesisleft.htm";
parent.mid.location="thesistoc.htm";
parent.right.location="thesisright.htm";
}
//===========================================
// To switch window to show plate as full screen
var plno=0
function showPlate(plno) {
plateHTM = "plate" + plno + ".htm";
parent.location=plateHTM
}
//===========================================
// To show text figures in new window
var tfno=0
function showTextfig(tfno) {
var tW = screen.width
textfigWin = "TextfigWin" + tfno;
textfigHTM = "txtfig" + tfno + ".htm";
if (tW > 1000) {
textfigWin = window.open(textfigHTM,textfigWin,'toolbar=0,status=0,scrollbars, resizable,top=0,left=0,width=1000,height=720'); textfigWin.focus()
}
else {
textfigWin = window.open(textfigHTM,textfigWin,'toolbar=0,status=0,scrollbars, resizable,top=0,left=0,width=780,height=540'); textfigWin.focus()
}
}
var legno=0
var legendWin
function showLeg(legno) {
legendWin = "LegWin" + legno;
legendHTM = "plate" + legno + "lgnd.htm";
legendWin=window.open(legendHTM,legendWin,
'toolbar=0,status=0,scrollbars,top0,left=0,width=400,height=250,resizable');legendWin.focus()
}
// next function relevant to all files
function setMsg(msg) {
window.status = msg
return true
}
//=======================================
//statements relevant to TOC, Intro, etc.
var browser = "other";
// check for 5.0 or later browsers
if (parseInt(navigator.appVersion) >= 5
|| navigator.appVersion.indexOf("MSIE 5") != -1) {
browser="DOM";
//if navigator.appVersion.indexOf("MSIE 6") != -1) {
browser="DOM";
}
var chap = " "
function setChapter0(chap) {
// if (browser=="DOM") document.getElementById(chap).className="item0";
document.getElementById(chap).className="item0";
}
function setChapter1(chap) {
// if (browser=="DOM") document.getElementById(chap).className="item1";
document.getElementById(chap).className="item1";
}
function imageOn(i) {
document.images[i].src = onImgArray[i].src
}
function imageOff(i) {
document.images[i].src = offImgArray[i].src
}
function setMsg(msg) {
window.status = msg
return true
}
var Txtfiles=new Array(15);
Txtfiles[0]="preface.htm";
Txtfiles[1]="chapter1.htm";
Txtfiles[2]="chapter2.htm";
Txtfiles[3]="chapter3.htm";
Txtfiles[4]="chapter4.htm";
var Txtno=0;
function showTxt(Txtno) {
parent.left.location="thesisbgleft.htm";
parent.mid.location=Txtfiles[Txtno];
parent.right.location="thesisbgright.htm";
}
var Lfiles=new Array(15);
Lfiles[0]="thesistocleft0.htm";
Lfiles[1]="thesistocleft1.htm";
Lfiles[2]="thesistocleft2.htm";
Lfiles[3]="thesistocleft3.htm";
Lfiles[4]="thesistocleft4.htm";
var Pict=new Array(15);
Pict[0]= "frontsmall.jpg";
Pict[1]= "frontsmall.jpg";
Pict[2]= "matmeth2.jpg";
Pict[3]= "plate3small.jpg";
Pict[4]= "plate42small.jpg";
var Lno=0;
function showList(Lno) {
if (Lno < 0 ) {
parent.left.location="thesisleft.htm";
parent.right.image0.src=Pict[0];
}
else {
parent.left.location=Lfiles[Lno];
parent.right.image0.src=Pict[Lno];
}
}
//-----------------------------------
//to link with print window or print frame
function printgo() {
var NS = (navigator.appName == "Netscape");
var VERSION = parseInt(navigator.appVersion);
if (VERSION > 3) { printit() }
else {alert("Sorry, your browser version can't do this.") }
}
//to print out a window...
/*
This script is written by Eric (Webcrawl@usa.net)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
function printit(){
if (window.print) {
window.print() ;
} else {
var WebBrowser = '';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box
WebBrowser1.outerHTML = "";
}
}
//to print out mid-frame of window...
/*
Based on the script above
*/
function printmid(){
if (parent.mid.print) {
parent.mid.print() ;
} else {
var WebBrowser = '';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = "";
}
}
//===============================================
//next function for pop-up scales on electron micrograph plates
function popUp(evt,currElem) {
Scale = (stdBrowser) ? document.getElementById(currElem).style : eval("document." + currElem)
if (document.all) {
Scale.pixelTop = parseInt(evt.clientY)+10
Scale.pixelLeft = Math.max(2,parseInt(evt.clientX)-125)
}
else {
if (stdBrowser) {
Scale.top = parseInt(evt.pageY)+20 + "px"
Scale.left = Math.max(2,parseInt(evt.pageX)-125) + "px"
}
else {
Scale.top = parseInt(evt.pageY)+20
Scale.left = Math.max(2,parseInt(evt.pageX)-125)
}
}
Scale.visibility = "visible"
}
function popDown(currElem) {
Scale = (stdBrowser) ? document.getElementById(currElem).style : eval("document." + currElem)
Scale.visibility = "hidden"
}
// and for scale bars on multi-e.m. plate
function setscale(sno) {
document.getElementById("popUp1").innerHTML=""
}