/* ----- NEW SLIDESHOW CODE BEGINS HERE ----- */
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;
}
/* ----- END NEW SLIDESHOW CODE HERE ----- */


/* ----- THIS SECTION FOR THE GALLERIES PAGE (STEP I) - FROM THE TUTORIAL ----- */
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}
/* ----- END GALLERIES PAGE SECTION ----- */

/* ----- THE FOLLOWING ITEMS PERFORM SOME GENERAL CHANGES ----- */ 
/* ----- This is for Right click prevention ----- */
rightClickWarning = "All photos are © Copyright Roger Busico and property of Roger Busico, unless otherwise noted. All rights reserved. Unauthorized use or reproduction is prohibited.";


/* ----- This gets rid of the mouse over bubble text when viewing galleries ----- */
function delHover() 
{
    oLst = YD.getElementsBy(function(el) {return (YD.hasClass(el,'imgBorder') || YD.hasClass(el,'imgBorderOn'))},'img');
    for (i=0; i < oLst.length ; i++) 
    {
        if (oLst[i].title && oLst[i].title != '') oLst[i].title = '';
        if (oLst[i].alt && oLst[i].alt != '') oLst[i].alt = '';
    }
}
YE.onContentReady('bodyWrapper', function() {if (!YD.hasClass(document.body, 'smugmug_ajax')) delHover()});
onPhotoShow.subscribe(function(){YE.onAvailable('mainImage', delHover)});


/* ----- Changes GALLERY COMMENTS to GUESTBOOK COMMENTS ----- */
function ModifyText ()
{
  if (YD.hasClass(document.body, "gallery_3844518"))
  {
    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);


/* ----- Makes SmugMug in footer a referral link with my code ----- */
function AddReferralCode() {
var links = this.getElementsByTagName("A");
if (links && (links.length != 0)) {
var smugLink = links.item(0);
smugLink.href = "http://www.smugmug.com/?referrer=I8NQ4jce88gxQ";
}
}
YE.onAvailable('footer', AddReferralCode);

