  function IsHomePage()
  {
  	// test for the "homepage" class name in the <BODY> tag
  	var bodyLinks = document.getElementsByTagName("BODY");
  	if ((bodyLinks != undefined) && (bodyLinks != null) && (bodyLinks.length > 0))
  	{
  		var classStr = bodyLinks[0].className;
 		if ((classStr != undefined) && (classStr != null) && (classStr.indexOf("homepage") != -1))
  		{
  			return(true);
  		}
  	}
  	return(false);
  }
  
  function CheckRedirects()
  {
  	if (IsHomePage())	// only run this code on the home page
  	{
  		// get the path from the current URL, 
  		// convert it to lowercase and remove the leading slash
  		var path = window.location.pathname.toLowerCase().substr(1);
  		
 		var newURL = vanityTable[path];		// look it up in our table
  		
  		// if we found it in the table && newURL is different than where we are
  		if ((newURL != undefined) && (newURL != window.location))
  		{
 		 window.location = newURL;		// go to the new URL
  		}
  	}
  }



rightClickWarning = "All photos are property of Marc Langille Photography. All rights reserved. Unauthorized use is prohibited."; 

slideDuration = 4;

function createSWF( w, h, params) {
  var args = "";
  for (var i in params) {
    args += i + "=" + params[i] + "&amp;";
  }
document.writeln('<object width="100%" height="100%" align="middle">'+ '<param name="movie" value="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'"/>'+ '<param name="wmode" value="transparent" />'+ '<embed src="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'" wmode="transparent" width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all"/></object>');
return 1;
}
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}


function ModifyText ()
{
  if (YD.hasClass(document.body, "gallery_3641962"))
  {
    var objElement = YD.get("comment")
    if (objElement != null)
    {
      var str = new String(objElement.innerHTML);
      str = str.replace(/\gallery/gi, 'Guestbook');
      objElement.innerHTML = str;
    }
  }
}

YE.onAvailable("comment", ModifyText);
