function SetupContact(website_description, counter)
{
	if (counter == 1)
	{
		document.write("<a href=\"mailto:info@heritagecommunityfdn.org?Subject="+website_description+" Web Site\" title=\"Contact us by Email\">Contact us by Email</a>");
	}
	else if (counter == 2) // French
	{
		document.write("<a href=\"mailto:info@heritagecommunityfdn.org?Subject="+website_description+" Web Site\" title=\"Nous Rejoindre\">Nous Rejoindre</a>");
	}
}

//function that swaps pictures
function Switch(imgName,imgObjName) 
{
  if (document.images) 
  {
   document.images[imgName].src = eval(imgObjName + ".src");
  }
}

//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 to pop up windows for images.
function ImgPop(zeTitle, zeDescription, zeCopyright, zeSource, level)
{
    popTitle = zeTitle;
	popDescription = zeDescription;
    popCopyright = zeCopyright;
    popSource = zeSource;

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

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

    if(level==0)
        openWin("popup.html",width,height);
    
    else if(level==1)
        openWin("../popup.html",width,height);

    else if(level==2)
        openWin("../../popup.html",width,height);
}

//Function to pop up windows for images (french).
function ImgPopFr(zeTitle, zeDescription, zeCopyright, zeSource, level)
{
    popTitle = zeTitle;
	popDescription = zeDescription;
    popCopyright = zeCopyright;
    popSource = zeSource;

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

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

    if(level==0)
        openWin("popup_fr.html",width,height);
    
    else if(level==1)
        openWin("../popup_fr.html",width,height);

    else if(level==2)
        openWin("../../popup_fr.html",width,height);
}

//Function taken from old St. Vincent site.
function openHeritageTrail(theURL) {
  var winName ='HeritageTrails' ;
  var features = 'scrollbars=yes,resizable=yes,width=350,height=420';
  window.open(theURL,winName,features);
}

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();
}