//*-------------------------------------------------------------------------
//* Handle setting up of the preloading button images
//* This file includes the login form validation and some other misc functions.
//*-------------------------------------------------------------------------
   
//	pagelang = "e";
    
    var homepage = 0; // default to not the home page
    var homepg = 0; // This is checked in footer.js
    
// Dynamically get the file name of the displayed page.
// Hence the "file" argument is not needed.
    
	var dir = location.href.substring(0,location.href.lastIndexOf('/')+1);
	var filenm = location.href.substring(dir.length,location.href.length+1);
	var thefile = filenm;
	var DHTML = (document.getElementById || document.all || document.layers);
    var urlname = "www.mysouthmarkham.com";  //* Just used to set homepage flag.
   
// Have to use a slightly different page when it's the homepage since the index.html file
// is not in the /html directory.
//	alert(filenm.substring(0,5) )
    if (filenm.substring(0,5) == "index" || filenm == "" || filenm == "10.html" || filenm == urlname) homepage = 1;
 	if (homepage) {
 		homepg = 1;	
 	   imagedir = "../images";
 	   htmldir = "../en/";
 	   homedir = "";
 	}   
 	else {   
 	   homepg = 0;	
	   imagedir = "../images";
	   htmldir = "";
//	   htmldir = "../en/";   This breaks pagecolor option in milonic
	   homedir = "../../";
	} 
//	alert(htmldir)
//  alert(imagedir);

if(document.images){
  	bulletinon 	= new Image(); bulletinon.src= imagedir + "/b-abouton.gif";
 	bulletinoff	= new Image(); bulletinoff.src= imagedir + "/b-aboutoff.gif"; 	  	   	
 }