// Leith ocal History Society JavaScript functions

function changeColor(back)
{
back.style.background='#DDDDFF';
}

function changeBack(back)
{
back.style.background='#EEEEFF';
}

function setBack()
{
document.getElementById('menu' + pageNum).innerHTML = ">" + document.getElementById('menu' + pageNum).innerHTML;
document.getElementById('menu' + pageNum).style.color='#FF0000';
//document.getElementById('menu' + pageNum).style.textIndent='7px';
//document.getElementById('menu' + pageNum).style.fontStyle='italic';
}

function showImage(photo, title)
{
imageWindow2 = window.open("", "newWin2", "resizable=yes, scrollbars=yes, width=810, height=600");
imageWindow2.document.write("<html><head><title>Image Window<\/title><link rel='stylesheet' href='leith.css' type='text/css'><\/head><body bgcolor='#EEEEFF'><\/body><\/html>");
imageWindow2.document.write("<a href='javascript:window.close();'><img src='" + photo + "' alt='enlarged photo' title='click to close this window' \/><\/a>");
// transparent gif to hinder copying
// imageWindow2.document.write("<div id='Layer1' style='position:absolute; left:0px; top:0px; width:800px; height:600px; z-index:10'><img src='images/image.gif' width='100%' height='100%'></div>");
imageWindow2.document.write("<div align='CENTER' class='smalltext'><a href='copyright.htm' target='_parent' class='greentext'>&copy; Leith Local History Society, 2005<\/a><\/div><br \/>");
imageWindow2.document.write("<div class='menu1'>" + title + "<\/div><br \/>");
imageWindow2.document.write("<div align='center'><input type='button' value='Close window' onclick='javascript:window.close();'><\/input><\/div>");
imageWindow2.document.close(); 
} 

// stop right click working

/* disable 
var message="Please Respect Our Copyright";

function clickIE4()
{
  if (event.button==2)
  {
    alert(message);
    return false;
  }
}

function clickNS4(e)
{
  if (document.layers||document.getElementById&&!document.all)
  {
    if (e.which==2||e.which==3)
    {
      alert(message);
      return false;
    }
  }
}

if (document.layers)
{
  document.captureEvents(Event.MOUSEDOWN);
  document.onmousedown=clickNS4;
}
  else if (document.all&&!document.getElementById){
  document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message); return false")

*/
