// Used in Workshop2004.html


/*
This code is from Dynamic Web Coding
at http://www.dyn-web.com/
Copyright 2001-3 by Sharon Paine
See Terms of Use at http://www.dyn-web.com/bus/terms.html
Permission granted to use this code
as long as this entire notice is included.
*/

// resize fix for ns4
var origWidth, origHeight;
if (document.layers) {
  origWidth = window.innerWidth; origHeight = window.innerHeight;
  window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

var page_loaded;  // set true onload (avoid errors onmouseover/out before page loaded)
function initInfoLyr() {
  page_loaded = true;
  writeToLayer('infoDiv', origMsg); // write first message onload
}

function writeToLayer(id, sHTML) {
  if (page_loaded) {
    var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getLyrRef(id,document): null;
    var cntnt = '<div class="info">' + sHTML + '</div>';
    if (typeof el.innerHTML!="undefined") {
        el.innerHTML = cntnt;
    } else if (document.layers) {
        el.document.write(cntnt);
        el.document.close();
    }
  }
}

// get reference to nested layer for ns4
// from dhtmllib.js by Mike Hall of www.brainjar.com
function getLyrRef(lyr,doc) {
  if (document.layers) {
    var theLyr;
    for (var i=0; i<doc.layers.length; i++) {
      theLyr = doc.layers[i];
      if (theLyr.name == lyr) return theLyr;
      else if (theLyr.document.layers.length > 0)
        if ((theLyr = getLyrRef(lyr,theLyr.document)) != null)
          return theLyr;
    }
    return null;
  }
}

// content to write to layer
var origMsg = 'Please move your mouse over an image to display the caption. Please click on the image to it enlarged.';
var msg014a	= 'Participants meet on the first evening.';
var msg91 = 'Susanne Buiter with convenors Gianreto Manatschal and Garry Karner.';
var msg92 = 'Gianreto Manatschal introduces the first field trip.';
var msg93 = 'Participants at the start of the trip to the Tasna nappe.'
var msg32	= 'An outcrop of the Lower Tasna Detachment.';
var msg94 = 'Crossing snow on the way to inspecting basalt flows over exhumed mantle.';
var msg95 = 'Some modellers find time for a discussion in the field (left to right: Ritske Huismans, Luc Lavier, Stephen Clark, Marta Perez-Gussinye and John Hopper).';
var msg96 = 'Gianreto Manatschal introduces the second field trip.';
var msg97 = 'A mountainside of serpentinized peridotite near Piz d&acute;Err.';
var msg98 = 'Participants at 3000 m above sea-level viewing the Err Detachment.';
var msg99 = 'Othmar Muentener introducing participants to the deeper mysteries of the Tethyan margins.';
var msg100 = 'Evgueni Burov and Roger Buck find time to work with a laptop computer in the field.';
var msg101 = 'Distant view of the Err Detachment.';
var msg85a = 'Othmar Muentener providing an explanation in the field';
var msg102 = 'Close up of slickensides on an outcrop of serpentinized peridotite.';
var msg1 = 'An outcrop showing pelagic sediments lying directly over cataclastically deformed serpentinized peridotite.';
var msg102a	= 'Group photo of 44 of the 46 participants (absent Brian Tucholke and Scott Dyksterhuis).';
var msg108a	= 'Time to say good-bye as participants depart Pontresina.';
var msg126a	= 'There are sunsets in the mountains too!';
var msg2    = 'The view looking north from Pontresina';



