//Dynamic frameset - if any frame page is loaded outside the frameset this page will automatically load the frameset 
if (top == self) {location.replace("http://www3.telus.net/r.simms/dynamic-frameset.html?" + self.location)}
//if (top == self) {location.replace("dynamic-frameset.html?" + self.location)}


//Google Urchin Tracker for Google Analytics
/* document.write('<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">' +
'</script>' +
'<script type="text/javascript">'+
'_uacct = "UA-1272045-1";' +
'urchinTracker();' +
'</script>');
 */
function openImage(imagename, iWidth, iHeight)
{
	if (!iWidth) iWidth=800;
	if (!iHeight) iHeight=600;
// commented out line if displaying image directly - cannot add any other info
//	window.open(imagename, 'Imageview', 'resizable, top=50, left=50, scrollbars=yes, width='+iWidth+', height='+iHeight);
	window.open('../../../imageview.htm?imagepath='+imagename, 'Imageview', 'resizable, fullscreen=yes, status=yes, top=50, left=50, scrollbars=yes, width='+iWidth+', height='+iHeight);

}

function copyright(){ 
	document.writeln('<center>');
	document.writeln('<p><hr><small>All contents &copy; 2005, Richard Simms. All rights reserved.</small>');
	document.writeln('<br><A HREF="mailto:r.simms@telus.net"><small>Contact</small></A></p>');
	document.writeln('</center>');
}

function backToTop(){ 
	document.writeln('<div align="right"><a href="#top"><small>Back to top</small></a></div>');
}



function writeIncludes(){ 
	document.write('<script LANGUAGE="JavaScript" src="../../../browserSniffer.js"></script>');
	document.write('<script language="JavaScript">var pathOffset = "../../";</script>');
	document.write('<script language="JavaScript" src="../../cascade.js"/>');
	document.write('<script language ="JavaScript">metainfo()</script>');
}


function popupInfo() {
	document.writeln('<a href="#"	onMouseOut="MM_swapImgRestore()" onClick="MM_showHideLayers(\'information\',\'\',\'show\');return false;"><img name ="showText1" src="..\/..\/..\/images\/graphics\/About24.gif" border="0" onLoad=""><\/a>');
	document.writeln('<div id="information" style="position:absolute; width:451px; z-index:1; visibility: hidden; left: 38px;"> ');
	document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0" class="FloatingCodeExample">');
	document.writeln('<tr> ');
	document.writeln('	<td valign="top"> ');
	document.writeln('	Click on the photo for a larger image');
	document.writeln('	<\/td>');
	document.writeln('	<td valign="top"> ');
	document.writeln('	<div align="right"><img src="..\/..\/..\/images\/graphics\/closeButton.gif" width="16" height="14" onMouseDown="MM_showHideLayers(\'information\',\'\',\'hide\')" alt="Close" name="Close"><\/div>');
	document.writeln('	<\/td>');
	document.writeln('<\/tr>');
	document.writeln('<\/table>');
	document.writeln('<\/div>');
}


function header(tabClassName){ 
	//document.writeln('<div id="menuLayer" style="background-color:#0099FF;position:absolute;width:140px;height:100%;"></div>');
/* 	if (is.ie) {
		document.writeln('<div id="menuLayer" style="background-color:#0099FF;position:absolute;width:140px;height:100%;"></div>');
	} else {
		document.writeln('<div id="menuLayer" class="menuLayer"></div>');
	} */
	
	//If page is not loaded in a frame then redirect to the main frame page
	if (parent.frames.length != 0) {
	  // loaded in frames
	} else {
		//location.href="/";
		//location.href="http://www3.telus.net/r.simms";
		document.writeln("<div style='color:red;'>*** <strong>Note: </strong>This site is best viewed using frames, please go to <a href='http://www3.telus.net/r.simms/'>http://www3.telus.net/r.simms</a>.</div>");
		//location.href="http://rsimms_p4.creo.com/Myweb/index.html";
	  // not loaded frames
	}

	
	//document.writeln('<center>');
	//document.writeln('<table border="0" cellpadding="0" cellspacing="0" width="80%" style="margin-left:150;">');
	
	document.writeln('<table border="0" cellpadding="0" cellspacing="0" width="90%" style="margin-left:20;margin-top:10;">');
	document.writeln('<tr valign="top">');
	//document.writeln('<td colspan="2">&nbsp;</td>');
	//document.writeln('<td colspan="5">');
	document.writeln('<td>');
	if (is.ie) {top.topFrame.document.body.className =tabClassName;}
}

function footer(){ 
	document.writeln("</td></tr>");
	document.writeln('<tr></tr>');
	//document.writeln('<tr><hr></tr>');
	//document.writeln('<tr valign="middle">');
	document.writeln('<tr>');
	//document.writeln('<td> </td>');
	//document.writeln('<td colspan="8"><center>');
	
	document.writeln('<td><center>');
	//document.writeln("Visitor count since Nov 28, 2000 <!--#exec cgi='/cgi-bin/counter-ord'-->");
	
	document.writeln('<p><hr><small>All contents &copy; 2005, <a href="mailto:r.simms@telus.net"><small>Richard Simms</small></a>. All rights reserved.</small>');
	//document.writeln('<br><small>Contact</small></p>');
	document.writeln('</td></tr>');
	document.writeln('<tr><td></td></tr></table>');
}

function metainfo(){ 
	document.writeln('<meta http-equiv="Content-Type" CONTENT="text/html; charset=iso-8859-1">');
	//document.writeln('<meta name="Resource-type" CONTENT="Document">');
	document.writeln('<meta name="Keywords"  CONTENT="photography,underwater,stock,blue,links,tutorial,whaling,bequia,caribbean,red,sea,philippines,pacific,nikon,close-up,photographer, photograph,clownfish,seahorse,manta,kelp,whale,camera,humpback,diver,octopus,equipment,tutorial,underwater photography,silhouette,photography underwater,diving,dive,scuba">');
	document.writeln('<meta name="Description"  CONTENT="Underwater photography of Richard Simms">');
	document.writeln('<meta name="Title"  CONTENT="Underwater photography of Richard Simms">');
	document.writeln('<meta name="Subject"  CONTENT="Underwater photography of Richard Simms">');
	//document.writeln('<meta name="Distribution"  CONTENT="Global">');
	//document.writeln('<meta name="Rating" CONTENT="General">');
	//document.writeln('<meta name="Revisit-after" CONTENT="7 days">');
	document.writeln('<meta name="Author" CONTENT="Richard Simms">');
	document.writeln('<meta name="Copyright" CONTENT="2005 Richard Simms">');
	//document.writeln('<meta http-equiv="ROBOTS" content="ALL">');
	
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_setTextOfLayer(objName,x,newText) { //v3.0
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (navigator.appName=='Netscape') {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

//new
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

