
function stringReverse(textString) {
   if (!textString) return '';
   var revString='';
   for (i = textString.length-1; i>=0; i--)
       revString+=textString.charAt(i)
   return revString;
}

function showEM(userName,emServer) {
/* The showEM() function displays a link to the user's e-mail address.  The username and e-mail server name are entered in reverse order to thwart e-mail harvesting programs.
*/
	userName = stringReverse(userName); // undo the reversed username
	emServer = stringReverse(emServer); // Undo the reversed server name
	var emLink = userName+"@"+emServer; // combine the username and server name as defined in the function
	document.write("<a class=\"emailUs\" href='mailto:"+emLink+"'>"); // recreates the link
	//document.write(emLink); // writes the link so it is visible
	document.write('Email us'); // writes Email Us so it is visible
	document.write("</a>"); // close the a element.
	
}

/**this goes in the HTML <script type="text/javascript">showEM("lesllim","ten.labolgcbs");</script>
*/

//script to print copyright year

function printYear() {
var today=new Date();
document.write(today.getFullYear());
}

//Poptastic pop up window - tested in IE7 and works

//Add height and width ,'height=750,width=750'
var newwindow; 
function poptastic(url) {
	newwindow=window.open(url,'name');
	if (window.focus) {newwindow.focus()}
}
	
//slideshow2

function slideshow2() {
	window.addEvent('domready', function(){
	    var data = {	
	      '2.jpg': { caption: 'Photography by Cara Weston.' }, 
	      '3.jpg': { caption: 'Photography by Cara Weston.' },
	      '16.jpg': { caption: 'Photography by Cara Weston.' },
	      '5.jpg': { caption: 'Photography by Cara Weston.' },
	      '6.jpg': { caption: 'Photography by Cara Weston.' },
	      '7.jpg': { caption: 'Photography by Cara Weston.' },
	      '8.jpg': { caption: 'Photography by Cara Weston.' },
	      '9.jpg': { caption: 'Photography by Cara Weston.' },
	      '10.jpg': { caption: 'Photography by Cara Weston.' },
	      '13.jpg': { caption: 'Photography by Cara Weston.' },
	      '12.jpg': { caption: 'Photography by Cara Weston.' },
	      '11.jpg': { caption: 'Photography by Cara Weston.' },
	      '15.jpg': { caption: 'Photography by Cara Weston.' }
	    };
	    var myShow = new Slideshow('show', data, {controller: true, height: 440, hu: 'slideshow/images/', thumbnails: false, width: 840});
	  });


}
