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 ModifyText ()
{
  if (YD.hasClass(document.body, "gallery_4324535"))
  {
    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);

function doOnLoad() {
  if (window.AlbumID && (window.AlbumID == "4324535")) //
  removeLinkFromImg();
}

function removeLinkFromImg() {
  oList = YD.getElementsByClassName("photo", "div");

  for (i=0; i < oList.length ; i++) {
    if (oList[i].childNodes) {
      oList[i].firstChild.removeAttribute("href");
      oList[i].firstChild.firstChild.removeAttribute("alt");
      oList[i].firstChild.firstChild.removeAttribute("title");
    }
  }
}

/*==============================*/
/* the subCategory descriptions */
/*==============================*/
function addSubCatDescription() {
  var SubCatDescription = {
      "Plantmad_Plants"  : "This area is under ongoing construction, lots more galleries will be added as time allows.",
      "subcategory2"  : "This is a test."
  };

  if (YD.hasClass(document.body, "subcategory"))
  {
    re = /subcategory_(\S+)/i;
    re.exec(document.body.className);

    albumtitle = YD.get("subCatGalleryTitle");
    if (albumtitle && SubCatDescription[RegExp.$1]) {
      divTag = document.createElement("div");
      divTag.className = "SubCatDescription";
      divTag.appendChild(document.createTextNode(SubCatDescription[RegExp.$1]));
      albumtitle.parentNode.insertBefore(divTag, albumtitle.nextSibling);
    }
  }
  if (!YD.hasClass(document.body, "homepage")) {
    re = /\>([\w\-]+)<\/a>/i;

    divTag = YD.get("galleriesBox");
    if (divTag) {
      divTags = YD.getElementsByClassName("subCatGalleryTitle", "p", divTag);

      for (i=0; i<divTags.length; i++)  {
        re.exec(divTags[i].innerHTML);
        if (SubCatDescription[RegExp.$1] != undefined) {
        pTag = document.createElement("p");
        pTag.className = "SubCatDescription";
        pTag.appendChild(document.createTextNode(SubCatDescription[RegExp.$1]));
        divTags[i].parentNode.insertBefore(pTag, divTags[i].nextSibling);
        }
      }
    }
  }
}

YE.addListener(window, "load", addSubCatDescription);

function removeKeywords() {

 var aKeywords = ['mahonia','bambusoides'];

 var oBox = YD.get('keywordsBox');
 oKeywords = YD.getElementsByClassName('keyword', 'a', oBox);

 for (i=0; i<oKeywords.length; i++) {
   for (j=0; j<aKeywords.length; j++) {
     if (aKeywords[j] == oKeywords[i].innerHTML) {
       try {
         oKeywords[i].parentNode.removeChild(oKeywords[i].previousSibling);
       } catch(e){}
       try {
         oKeywords[i].parentNode.removeChild(oKeywords[i].nextSibling);
       } catch(e){}
       try {
         oKeywords[i].parentNode.removeChild(oKeywords[i].nextSibling);
       } catch(e){}
       try {
         oKeywords[i].parentNode.removeChild(oKeywords[i]);
       } catch(e){}
       break;
     }
   }
 }
}