	// Picture Viewer //

	function ShowPhoto (pIndex) {
		
		var xImg = document.getElementById('ViewerImage');
		xImg.src = 'images/Viewer/' + xFiles[pIndex-1];
		var xNo = document.getElementById('ViewerNo');
		xNo.innerHTML = pIndex.toString();
		var xOf = document.getElementById('ViewerOf');
		xOf.innerHTML = xFiles.length;
		
		var xDiv = document.getElementById('Viewer');
		xDiv.style.visibility = 'visible';
		xDiv.style.left = ((document.documentElement.clientWidth - 600) / 2).toString() + 'px';
		xDiv.style.top = (document.documentElement.scrollTop + 20).toString() + 'px';
		
	}
	
	function HidePhoto () {
		document.getElementById('Viewer').style.visibility = 'hidden';
		var xImg = document.getElementById('ViewerImage');
		xImg.src = 'images/Clear.gif';
	}
	
	function NextPhoto () {
		var xNo = parseInt(document.getElementById('ViewerNo').innerHTML) + 1;
		if (xNo > xFiles.length) {
			xNo = 1;
		}
		ShowPhoto(xNo);
	}

	function PreviousPhoto () {
		var xNo = parseInt(document.getElementById('ViewerNo').innerHTML) - 1;
		if (xNo < 1) {
			xNo = xFiles.length;
		}
		ShowPhoto(xNo);
	}
	
	// Email //

	function Contact(pIndex) {
	
	  document.write('<a href="About.htm" onmouseover="this.href=ContactLink(' + pIndex + ')">');
	
	  var x = '';
		   if (pIndex ==  1) {x = 'EMcarole.gif'}
	  else if (pIndex ==  2) {x = 'EMbwhitish.gif'}
	  else if (pIndex ==  3) {x = 'EMcsjs.gif'}
	  else if (pIndex ==  4) {x = 'EMcwidman.gif'}
	  else if (pIndex ==  5) {x = 'EMdbulat4883.gif'}
	  else if (pIndex ==  6) {x = 'EMmszymczak.gif'}
	  else if (pIndex ==  7) {x = 'EMpsoicca.gif'}
	  else if (pIndex ==  8) {x = 'EMsharingavision.gif'}
	  else if (pIndex ==  9) {x = 'EMsstreile.gif'}
	  else if (pIndex == 10) {x = 'EMemcarole.gif'};
	  document.write('<img border=0 align="top" src="images/' + x + '" align="top">');
	
	  document.write('</a>');
	
	};
	
	function ContactLink(pIndex) {
	
	  var x = '';
		   if (pIndex ==  1) {x = 'mai#ccarole#amacaronisoup#dcom'}
	  else if (pIndex ==  2) {x = 'mai#cbwhitish#aswtc#dedu'}
	  else if (pIndex ==  3) {x = 'mai#ccsjs#aeiu#dedu'}
	  else if (pIndex ==  4) {x = 'mai#ccwidman#aichd#dus'}
	  else if (pIndex ==  5) {x = 'mai#cdbulat4883#awowway#dcom'}
	  else if (pIndex ==  6) {x = 'mai#cmszymczak#acomcast#dnet'}
	  else if (pIndex ==  7) {x = 'mai#cpsoicca#asbcglobal#dnet'}
	  else if (pIndex ==  8) {x = 'mai#csharingavision#aaol#dcom'}
	  else if (pIndex ==  9) {x = 'mai#csstreile#asw.chasi#dorg'}
	  else if (pIndex == 10) {x = 'mai#ccarole#amacaronisoup#dcom'};
	
	  x = x.replace('#c', 'lto:');
	  x = x.replace('#a', '@');
	  x = x.replace('#d', '.');
	
	  return(x);
	
	}
	
	// Audio Player //
	
	function WriteAudioPlayer(pFile) {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
		document.write('width="50" height="25" id="SDAudio" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="movie" value="SDAudio.swf?thisFile=' + pFile + '" />');
		document.write('<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
		document.write('<embed src="SDAudio.swf?thisFile=' + pFile + '" quality="high" bgcolor="#ffffff" width="50" height="25" name="SDAudio" align="middle" allowScriptAccess="sameDomain" ');
		document.write('type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
	}
	
	// Video Player //
	
	function WriteVideoPlayer() {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"');
		document.write('width="320" height="280" id="thisPlayerIE" align="left">');
		document.write('<param name="allowScriptAccess" value="always" />');
		document.write('<param name="movie" value="MSVideoPlayer.swf" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="bgcolor" value="#ffe5f1" />');
		document.write('<embed src="MSVideoPlayer.swf" quality="high" bgcolor="#ffe5f1" width="320" height="280" id="thisPlayerNS" align="left" allowScriptAccess="always"');
		document.write('type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	}

	function PlayVideo(pURL) {
		var xx = (document.getElementById('thisPlayerNS') != null) ? 'thisPlayerNS' : 'thisPlayerIE';
		document.getElementById(xx).PlayVideo(pURL);
		}
		

