//*-------------------------------------------------------------------------
//* Handle setting up of the preloading button images
//* This file includes the login form validation and some other misc functions.
//*-------------------------------------------------------------------------
// Dynamically get the file name of the displayed page.
// Hence the "file" argument is not needed.
	var pagelang = "f";  // French.
    var homepage = 0; // default to not the home page
    var homepg = 0; // This is checked in footer-f.js to determine if prev page and top of page should be displayed
	var dir = location.href.substring(0,location.href.lastIndexOf('/')+1);
	var filenm = location.href.substring(dir.length,location.href.length+1);
	var DHTML = (document.getElementById || document.all || document.layers);
    urlname = "www.miramichi.org"
    testurl = "city.miramichi.org";
    
// Have to use a slightly different page when it's the homepage since the index.html file
// is not in the /html directory.
	
    if (filenm.substring(0,5) == "index" || filenm == "" || filenm == urlname) homepage = 1;
 	if (homepage) {
 		homepg = 1;	
 	   imagedir = "../assets";
 	   htmldir = "fr/";
 	}   
 	else {   
 	   homepg = 0;	
	   imagedir = "../assets";
	   htmldir = "../fr/";
	} 
//  alert(imagedir);
if(document.images){
  	homeon 		= new Image(); homeon.src= imagedir + "/b-homeon-f.gif";
 	homeoff		= new Image(); homeoff.src= imagedir + "/b-homeoff-f.gif";
  	searchon 	= new Image(); searchon.src= imagedir + "/b-searchon-f.gif";
 	searchoff	= new Image(); searchoff.src= imagedir + "/b-searchoff-f.gif";
  	langon 		= new Image(); langon.src= imagedir + "/b-englishon.gif";
 	langoff		= new Image(); langoff.src= imagedir + "/b-englishoff.gif"; 	 		 	 	 		 			 	
 }
 
//*-------------------------------------------------------------------------
//* Boilerplate Text variables for various forms.
//*-------------------------------------------------------------------------

//*** COMMON

var clearmessage = "Voulez-vous vraiment effacer toutes les données?"
var firstmessage="Veuillez donner l'information correcte :\n\n ";
var m_name = "Nom";
var m_addr = "Adresse";
var m_city = "Ville";
var m_country = "Pays";
var m_prov = "Province / État";
var m_postcode = "Code postal";
var m_tel = "Téléphone";
var m_fax = "Télécopieur";
var m_email = "Courriel";
var m_comments = "Commentaires";

//***  VISIT FEEDBACK (visit-feedbackform.js  visit-feedbackform-f.asp)

var m_VisitFeedbackSubject = "Miramichi: Visitor Feedback";

//*** REQUEST INFO (requestform.js  requestform-f.asp)

var m_RequestInfoSubject = "Miramichi: Request Tourist Info";

//*** CONTACT FEEDBACK (contact-feedbackform.js  contact-feedbackform-f.asp)

var m_ContactFeedbackSubject = "Miramichi: Website Feedback";

//*** BLOOM (bloomform.js  comm-bloomform-f.asp)

var m_category = "Category: Check at least one";
var m_puchaseTshirt = "Purchase T-Shirt(s)?";
var m_tshirtQty = "T-Shirt Total Quantity";
var m_tshirtS = "T-Shirt S Quantity";
var m_tshirtM = "T-Shirt M Quantity";
var m_tshirtL = "T-Shirt L Quantity";
var m_tshirtXL = "T-Shirt XL Quantity";
var m_BloomSubject = "Miramichi in Bloom - Entry";