//  DocumentWrite shortcut
function dw(n) {document.write(n,'\n');}
//*******************************************************************



//*******************************************************************
//  Random Image generator for masthead
function banner() {

//  writes image tag and link for masthead banner
//  anchored at top of page

var imgNumber = 13 ;
var bannerImg = new Array
var randomnumber = Math.random() ;
var rand1 = Math.round( imgNumber * randomnumber) ;

bannerImg[0] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/stitch00897a.jpg&w=1600&h=0515\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>88kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/stitch00897a.jpg" id="bannerImg"></A>';

bannerImg[1] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/stitch01120a.jpg&w=1600&h=0383\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>69kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/stitch01120a.jpg" id="bannerImg"></A>';

bannerImg[2] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/stitch01155a.jpg&w=1600&h=0207\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>51kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/stitch01155a.jpg" id="bannerImg"></A>';

bannerImg[3] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/horizon.jpg&w=2646&h=0153\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>82kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/lighthouse.jpg" id="bannerImg"></A>';

bannerImg[4] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/stitch01322.jpg&w=1600&h=0422\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>88kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/stitch01322.jpg" id="bannerImg"></A>';

bannerImg[5] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/stitch1563a.jpg&w=1600&h=0542\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>138kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/stitch1563a.jpg" id="bannerImg"></A>';

bannerImg[6] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/stitch1598a.jpg&w=1600&h=0391\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>118kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/stitch1598a.jpg" id="bannerImg"></A>';

bannerImg[7] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/stitch1767.jpg&w=1600&h=0473\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>122kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/stitch1767.jpg" id="bannerImg"></A>';

bannerImg[8] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/stitch1767.jpg&w=1600&h=0473\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>122kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/stitch1767.jpg" id="bannerImg"></A>';

bannerImg[9] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/dsc06002a.jpg&w=1920&h=0586\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>143kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/dsc06002a.jpg" id="bannerImg"></A>';

bannerImg[10] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/landfall-capetip2.jpg&w=0877&h=0144\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'Long Point Light was originally built in 1826, however the tower was rebuilt in 1875. This lighthouse is accessible by boat shuttle or a strenuous hike \(inquire locally for further details\).<br>82kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/landfall-capetip2.jpg" id="bannerImg"></A>';

bannerImg[11] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/horizon.jpg&w=2646&h=0153\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>82kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/lighthouse.jpg" id="bannerImg"></A>';

bannerImg[12] = '<a href="javascript:opWin(\'/img/imgPopup.htm?i=/img/landfall-capetip2.jpg&w=0877&h=0144\', \'imgPopupWin\', \'toolbar=no,menubar=no,status=no,left=5,top=0,width=\'+(screen.availWidth-20)+\',height=\'+(screen.availHeight-100)+\',scrollbars=yes,resizable=yes\');" onmouseout="return nd();" onmouseover="return overlib(\'the shadows and light around me<br>82kB<br> &nbsp; '+ rand1 +'\',CAPTION,\'click=fullsize\');"><img width="100%" height="100%" src="/img/landfall-capetip2.jpg" id="bannerImg"></A>';

//var everyString = bannerImg[rand1] ;
var everyString = bannerImg[8] ;

dw(everyString);
//  for testing
//dw(randomnumber + ' &nbsp; ' + rand1);

if(everyString=="undefined" || everyString==null || everyString==""){
window.location.href = top.location.href;}

}
//  END banner
//*******************************************************************



//*******************************************************************
// Pop-up window opener
function opWin(theURL,winName,features) //v2.0
{ 	if (window.archiveWin&&window.archiveWin.closed==false) 
	{
		if (navigator.userAgent.indexOf("MSIE 3")==-1) 
		{ window.archiveWin.focus(); }
	}else{ archiveWin=window.open(theURL,winName,features);
	}
}
//  END pop-up window opener
//*******************************************************************



//*******************************************************************
// NEW dynamic image resizer by burgwinkel.com : consume freely
	var imgW = null;
	var imgH = null;
	var cw = null;
	var ch = null;
	var altTag = null;
function imgRsz(w,h,pct,imgFile,imgRL,altTxt)
{
if (document.documentElement && document.documentElement.clientWidth){
  cw = document.documentElement.clientWidth;
  ch = document.documentElement.clientHeight;
}else{
  cw = document.body.clientWidth;
  ch = document.body.clientHeight;
}
//if (navigator.userAgent.indexOf("MSIE ") == -1){
//  cw = (screen.availWidth * 0.66);
//  ch = (screen.availHeight * 0.66);
//}
	if (pct==0){
imgW = w;
imgH = h;
  }else{
imgW = parseInt(cw*(pct/100));
imgH = parseInt(imgW*(h/w));
	}
	if (altTxt=="" || altTxt==0){
altTag = "";
  }else{
altTag = altTxt;
  }
document.write("<img class='" +imgRL+ "' src='" +imgFile+ "' border='0' width='" +imgW+ "' height='" +imgH+ "' " +altTag+ ">");
// for testing...
// document.write("&lt;img class='" +imgRL+ "' src='" +imgFile+ "' border='0' width='" +imgW+ "' height='" +imgH+ "' " +altTag+ "&gt;");
}

//  END NEW dynamic image resizer
//*******************************************************************




