nCurrentMessage=0;
var overImage=0;
aClickMessages = new Array();
aClickMessages[0] = '';
aClickMessages[1] = 'This image is copyright of the Glenbow Archives';
aClickMessages[2] = 'This image is copyright of the Provincial Archives';
aClickMessages[3] = 'This image is copyright of the Provincial Museum of Alberta';
aClickMessages[4] = 'This image is copyright of the Red Deer and District Archives';
aClickMessages[5] = 'This image is copyright of the Wetaskiwin and District Museum';
aClickMessages[6] = 'This image is copyright of the Sundre Pioneer Village Museum';
aClickMessages[7] = 'This image is copyright of the Alix Wagon Wheel Museum';
aClickMessages[8] = 'This image is copyright of the Famous 5 Foundation';
aClickMessages[9] = 'This image is copyright of the Nordegg Historical Society';
aClickMessages[10] = 'This image is copyright of the Wheels of Time Museum';
aClickMessages[11] = 'This image is copyright of the Historic Markerville Creamery Museum';
aClickMessages[12] = 'This image is copyright of the Canadian University College';
aClickMessages[13] = 'This image is copyright of the Provincial Museum of Alberta Folklife Collection';
aClickMessages[14] = 'This image is copyright of the National Archives of Canada';
aClickMessages[15] = 'This image is copyright of the United Church of Canada Archives, source: Herbert Simpson';
aClickMessages[16] = 'This image is copyright of the Provincial Museum of Alberta Folklife Collection/ Canadian Union College Archives';
aClickMessages[17] = 'This image is copyright of the Canadian Union College Archives';
aClickMessages[18] = 'This image is copyright of the Provincial Archives of Alberta';
aClickMessages[19] = 'This image is copyright of the Aurora Borealis, Canadian Union College Yearbook';
aClickMessages[20] = 'This image is copyright of the Presbyterian Church Archives';
aClickMessages[21] = 'This image is copyright of Ernest Nix';
aClickMessages[22] = 'This image is copyright of Howard Thompson';
aClickMessages[23] = 'This image is copyright of Gerald Hutchinson';
aClickMessages[24] = 'This image is copyright of the Alberta Historical Society';
aClickMessages[25] = 'This image is copyright of the Estate of James Agrell Smith';
aClickMessages[26] = 'This image is copyright of the Village of Breton';
aClickMessages[27] = 'This image is copyright of the Camrose and District Centennial Museum';
aClickMessages[28] = 'This image is copyright of the Millet and District Historical Society';
aClickMessages[29] = 'This image is courtesy of Wayne Farnham';
aClickMessages[30] = 'This image is copyright of NeWest Press';
aClickMessages[31] = 'This image is courtesy of Pat and Dale Miquelon';
aClickMessages[32] = 'This image is copyright of Stettler Town and Country Museum';
aClickMessages[33] = 'This image is copyright of Alberta Museums Review';
aClickMessages[34] = 'This image is copyright of Nose Creek Valley Museum';
aClickMessages[35] = 'This image is copyright of Bentley Museum';
aClickMessages[36] = 'This image is copyright of Bowden Pioneer Museum';
aClickMessages[37] = 'This image is copyright of Breton and District Historical Museum';
aClickMessages[38] = 'This image is copyright of Roulston Museum';
aClickMessages[39] = 'This image is copyright of Anthony Henday Museum';
aClickMessages[40] = 'This image is copyright of Canadian Petroleum Interpretive Center';
aClickMessages[41] = 'This image is copyright of Dickson Store Museum';
aClickMessages[42] = 'This image is copyright of Donalda and District Museum';
aClickMessages[43] = 'This image is copyright of Hobbema';
aClickMessages[44] = 'This image is copyright of Innisfail Historical Village';
aClickMessages[45] = 'This image is copyright of Michener House Museum';
aClickMessages[46] = 'This image is copyright of Mirror and District Museum';
aClickMessages[47] = 'This image is copyright of Nordegg Interpretive Center';
aClickMessages[48] = 'This image is copyright of Mountain View Museum';
aClickMessages[49] = 'This image is copyright of Alberta Sports Hall of Fame';
aClickMessages[50] = 'This image is copyright of Rimbey Museum and Pas-Ka-Poo Park';
aClickMessages[51] = 'This image is copyright of Rocky Mountain House Museum';
aClickMessages[52] = 'This image is copyright of Yester Year Artifacts Museum';
aClickMessages[53] = 'This image is copyright of the town, Sylvan Lake';
aClickMessages[54] = 'This image is copyright of Kneehill Historical Museum';
aClickMessages[55] = 'This image is copyright of Trochu and District Museum';
aClickMessages[56] = 'This image is courtesy of the Wetaskiwin and District Museum';
aClickMessages[57] = 'This image is courtesy of the Alix Wagon Wheel Museum';
aClickMessages[58] = 'This image is courtesy of Hazel and Morris Flewwelling';
aClickMessages[59] = 'This image is courtesy of the City of Wetaskiwin Archives';
aClickMessages[60] = 'This image is copyright of \'Sod Shacks and Wagon Trucks\', Big Pine Ridge Historical Society, 1987';
aClickMessages[61] = 'This image is copyright Lacombe Museum';
aClickMessages[62] = 'This image is courtesy of Lorene Anne Frere';

function over(n)
{
	overImage=n;
	
}
function disableclick(e) {

clickmessage = aClickMessages[nCurrentMessage];

if(nCurrentMessage != 0)
{
	
	if (document.all) {
		if (event.button>=2||event.button==3) {
			if (event.srcElement.tagName=="IMG"){
				alert(clickmessage);
				return false;
			}
		}
	}
	else if (document.layers) {
		if (e.which == 3) {
			if(overImage==1)
			{
			alert(clickmessage);
			return false;
			}
		}
	}
	else if (document.getElementById){
		if (e.which==3&&e.target.tagName=="IMG"){
			alert(clickmessage)
				return false;
		}
	}
}
}

function associateimages(){
	for(i=0;i<document.images.length;i++)
		document.images[i].onmousedown=disableclick;
}

function init(){
	nCurrentMessage=0;
	overImage=0;
}

if (document.all)
	document.onmousedown=disableclick
else if (document.getElementById)
{	//	document.onmouseup=disableclick
	window.captureEvents(Event.RIGHTCLICK);
	document.onclick = disableclick;
}	
else if (document.layers)
{
	//associateimages()
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=disableclick;
}
document.onmouseout=init

//Create French and English Links
frLink = window.location.href.replace('/eng/','/fr/');
frLink = '<map name="FPMap1"><area href="' + frLink + '" coords="584, 6, 639, 29" shape="rect" alt="English / Français" title="English / Français"></map>';

engLink = window.location.href.replace('/fr/','/eng/');
engLink = '<map name="FPMap1"><area href="' + engLink + '" coords="525, 6, 579, 29" shape="rect" alt="English / Français" title="English / Français"></map>';


//function that swaps pictures
function Switch(id,name)
{
if (document.images){
    if (document.images[id]){document.images[id].src=eval(name+".src");
    } else {
      if (document.layers){
        for (i=0; i < document.layers.length; i++) {
          if (document.layers[i].document.images[id]) {
          document.layers[i].document.images[id].src=eval(name+".src");
          break;
          }
        }
      }
    }
  }
}

//Function to open new windows
function openWin(URL, Width, Height)
{

aWindow=window.open(URL,"PopUp","width="+Width+",height="+Height+",resizable=yes,scrollbars=yes,left=100,top=60");
	
	aWindow.resizeTo(Width, Height);
	
	aWindow.focus();
	if(aWindow.opener == null)
	{
		aWindow.opener = window;
		aWindow.opener.name = "opener";
	}

}

//Function for Dynamic Pop Ups
function DynaPop(level, szImgSource,szDescription,nCopyrightNum)
{
	popSource = szImgSource;
	popDescription = szDescription;
	popCopyright = nCopyrightNum;

	if (popDescription == "description")
		popDescription = "";
	
	width=595;
	height=600;

	//If resolution is 640x480
	if(screen.width < 800)
		height=350;
	//If resolution is 800x600
	else if(screen.width < 1024)
		height=500;

	if(level == 1)
		openWin("dynapop.htm",width,height);
	else
		openWin("../dynapop.htm",width,height);
}

//used for opening articles
function openArticle(URL)
{
	nHeight = 450;

	if(screen.width<800)
		nHeight = 350;

	articles=window.open(URL,"Articles","width=610,height="+nHeight+",resizable=yes,scrollbars=yes,left=30,top=30");

	articles.focus();
}

function openDocs()
{
	nHeight = 550;
	nWidth = 680;

	if(screen.width<800)
	{
		nHeight = 350;
		nWidth = 550;
	}

	popup=window.open("documents.html","FlashPopUp","width=" + nWidth + ",height="+nHeight+",scrollbars=yes,left=10,top=10");

	popup.focus();
}

function openMemoirs()
{
	nHeight = 550;
	nWidth = 680;

	if(screen.width<800)
	{
		nHeight = 350;
		nWidth = 550;
	}

	popup=window.open("memoirs.html","FlashPopUp","width=" + nWidth + ",height="+nHeight+",scrollbars=yes,left=10,top=10");

	popup.focus();
}

function openRegionPics(URL)
{
	nHeight = 550;
	nWidth = 680;

	if(screen.width<800)
	{
		nHeight = 350;
		nWidth = 550;
	}

	popup=window.open("focus_materials/" + URL,"FlashPopUp","width=" + nWidth + ",height="+nHeight+",scrollbars=yes,left=10,top=10");

	popup.focus();
}

function openArticles()
{
	nHeight = 550;
	nWidth = 680;

	if(screen.width<800)
	{
		nHeight = 350;
		nWidth = 550;
	}

	popup=window.open("articles.html","FlashPopUp","width=" + nWidth + ",height="+nHeight+",scrollbars=yes,left=10,top=10");


	popup.focus();
}

//used for opening articles
function openMem(URL)
{
	nHeight = 450;

	if(screen.width<800)
		nHeight = 350;

	Memoirs=window.open(URL,"Memoirs","width=610,height="+nHeight+",resizable=yes,scrollbars=yes,left=30,top=30");

	Memoirs.focus();
}

//Function for Flash Regions Movie
function openRegion(URL)
{
	nHeight = 450;

	if(screen.width<800)
		nHeight = 350;

	URL="../../flash/eng/regions/" + URL;

	regions=window.open(URL,"Regions","width=610,height="+nHeight+",resizable=yes,scrollbars=yes,left=30,top=30");

	regions.focus();
}

function openRegion_fr(URL)
{
	nHeight = 450;

	if(screen.width<800)
		nHeight = 350;

	URL="../../flash/fr/regions/" + URL;

	regions=window.open(URL,"Regions","width=610,height="+nHeight+",resizable=yes,scrollbars=yes,left=30,top=30");

	regions.focus();
}

//This is so NetSCape 4 doesn't sketch out when resized
function WM_netscapeCssFix()
{
    // This part was inspired by Matthew_Baird@wayfarer.com
    // It gets around another unfortunate bug whereby Netscape
    // fires a resize event when the scrollbars pop up. This
    // checks to make sure that the window's available size
    // has actually changed.

    if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth ||             document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight)
        {
        document.location = document.location;
        }
}

function WM_netscapeCssFixCheckIn()
{
    // This function checks to make sure the version of Netscape
    // in use contains the bug; if so, it records the window's
    // width and height and sets all resize events to be handled
    // by the WM_netscapeCssFix() function.

    if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4))
        {
        if (typeof document.WM == 'undefined')
            {
            document.WM = new Object;
            }

        if (typeof document.WM.WM_scaleFont == 'undefined')
            {
            document.WM.WM_netscapeCssFix = new Object;
            document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
            document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
            }

        window.onresize = WM_netscapeCssFix;
        }
}

WM_netscapeCssFixCheckIn()

function openFootnote(footnote) 
{
	var PopUpString =
         "width=350,height=150,left=100,top=100,scrollbars=yes";
	
	winFootnote = window.open('footnotes.html', "Footnote", PopUpString);
	
	if(winFootnote.opener == null)
	{
		winFootnote.opener = window;
		winFootnote.opener.name = "opener";
	}
	winFootnote.opener.footnote=footnote;
	winFootnote.location.reload();
	winFootnote.focus();
}

