// URL redirection
function redirectPath() {
re = /(ddan.smugmug.com)/;
tmp = window.location.href;
if (re.test(tmp)) {
tmp = tmp.replace(re, 'www.dansracephotos.com');
window.location.href = tmp;
}
}
redirectPath();

// On IE/FF set the title before the Document OnLoad takes place
document.title = "DansRacePhotos";
addEvent( window, "load", CustomizeTitle );

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 writeEMail(pLinkText, pSubject)
{
    /* myemail@myhost.com  */
var v2="UNDI6ZJHT2K4JN4XG3AHU2";
var v7=unescape("1/*%09R%3B%24%3B%26S%28Q%3A%26%5B%2C%28@o+%3A_");
 
    var v5=v2.length;var v1="";
    for(var v4=0;v4<v5;v4++)
    {
        v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
    }
    document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject='+escape(pSubject)+'\'">'+pLinkText+'</a>');
}

function ModifyText ()
{
  if (YD.hasClass(document.body, "gallery_3819290"))
  {
    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);