/*========================================================*/
/*== remove print from right mouse click on slide show  ==*/
/*========================================================*/

function insertSlideshowNoClick(width, height, parms, transparency)
{
	var isClickURL = false;
	var gifHeight = height;
	var gifWidth = width;
	
	// it appears that the default for showThumbs is true
	if ((!parms.showThumbs) || ((parms.showThumbs == "true") && (height > 100)))
	{
		gifHeight -= 87;
	}
	// can't support the startButton because it will never get clicked
	if (parms.showStartButton)
	{
		delete parms.showStartButton;
	}
	// can't support the buttons because they will never get clicked
	if (parms.showButtons)
	{
		parms.showButtons = "false";		
	}
	document.write('<div id="slideshowContainerWrapper" style="position:relative;">\n');
	if (parms.clickUrl && (parms.clickUrl != "blank") && (parms.clickUrl != "false"))
	{
		isClickURL = true;
		var newWindowText = "";
		if (parms.newWindow && (parms.newWindow == "true"))
		{
			newWindowText = ' target="_blank" ';
		}
		document.write('<a href="' + parms.clickUrl + '"' + newWindowText + '>');
	}
	document.write('<img src="/img/spacer.gif" border="0" style="position:absolute;" height="' + gifHeight + '" width="' + gifWidth + '" oncontextmenu="return false;">\n');
	if (isClickURL)
	{
		document.write('</a>');
	}
	SM.flash.insertSlideshow(width, height, parms, transparency);
	document.write("</div>");
}



/*==========================*/
/*==    Recent Gallery    ==*/
/*==========================*/


 function showRecent(days)
{
   endDate = new Date();
   oneDay = 1000*60*60*24;
   startDate = new Date(endDate.getTime() - (parseInt(days) * oneDay));
   sUrl = "/date/";
   sUrl += startDate.getFullYear() + "-" + padDate(startDate.getMonth() + 1) + "-" + padDate(startDate.getDate());
   sUrl += "/";
   sUrl += endDate.getFullYear() + "-" + padDate(endDate.getMonth() + 1) + "-" + padDate(endDate.getDate());
    window.location = sUrl;
}

function padDate(datePart)
{
   if (datePart.toString().length != 1)
     return datePart
   return "0" + datePart;
}



/*==========================*/
/*== Freatured Galleries  ==*/
/*==========================*/

function hasPath(sPath) {
  re = new RegExp("\/" + sPath + "(\/|$)");
  return re.test(window.location)
}

YE.onAvailable('featuredTitle', function() {YD.get('featuredTitle').innerHTML = "Featured Galleries............"});


/*======= email =======*/

function writeEMail(pLinkText, pSubject)
{
 var v2="RTJMTEJIFUC32SYFRDUHWJET";
 var v7=unescape("63%3D%3D%3C*%3E%26%21%27%22CZ*%19%3F3%2C%3A%27y%29*9")
 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='+'\'">'+'email</a>');
}

/*======= no click on photo in contact =======*/
function doOnLoad()
{
if (window.AlbumID && window.AlbumID == "1383043") //
{
removeLinkFromImg();
}
}

function removeLinkFromImg()
{
var links = document.getElementsByTagName("A");
for (var i = 0; i < links.length; i++)
{
var link = links[i];
var divElm = link.parentNode;
if (!divElm) continue;
if (divElm.className.indexOf("photo")<0) continue;
link.href = "javascript:void(0);";
}
}
/*=============================================*/