/* plunderer: Patrick Boyle */
/* original creation date: 13/01/01 */

function breakframe(){
   if (window != window.top) top.location.href = location.href;
}

/*Source: John Pollock
  Location: The Web Design Resource @ http://www.pageresource.com
  Switching .gifs*/
<!--Begin
if (document.images)
 {
     pic1on= new Image(180,40);
     pic1on.src="images/YS1Homeborc.gif";
	 pic1off= new Image(180,40);
     pic1off.src="images/YS1Homebo.gif";
     pic2on= new Image(180,40);
     pic2on.src="images/YS2Terrapinborc.gif";
	 pic2off= new Image(180,40);
     pic2off.src="images/YS2Terrapinbo.gif";
     pic3on= new Image(180,40);
     pic3on.src="images/YS3KeyFactorsborc.gif";
	 pic3off= new Image(180,40);
     pic3off.src="images/YS3KeyFactorsbo.gif";
     pic4on= new Image(180,40);
     pic4on.src="images/YS4Designsborc.gif";
	 pic4off= new Image(180,40);
     pic4off.src="images/YS4Designsbo.gif";	 
     pic5on= new Image(180,40);
     pic5on.src="images/YS5Contactsborc.gif";
	 pic5off= new Image(180,40);
     pic5off.src="images/YS5Contactsbo.gif";
     pic6on= new Image(180,40);
     pic6on.src="images/YS6GuestBborc.gif";
	 pic6off= new Image(180,40);
     pic6off.src="images/YS6GuestBbo.gif";
     pic7on= new Image(180,40);
     pic7on.src="images/YS7Linksborc.gif";
	 pic7off= new Image(180,40);
     pic7off.src="images/YS7Linksbo.gif";
/*      pic2aon= new Image(180,40);
     pic2aon.src="images/YS2KeyFactorsborc.gif";	 
	 pic2aoff= new Image(180,40);
     pic2aoff.src="images/YS2KeyFactorsbo.gif";
     pic3aon= new Image(180,40);
     pic3aon.src="images/YS3HullFormborc.gif";
	 pic3aoff= new Image(180,40);
     pic3aoff.src="images/YS3HullFormbo.gif";
     pic4aon= new Image(180,40);
     pic4aon.src="images/YS4Motorborc.gif";
	 pic4aoff= new Image(180,40);
     pic4aoff.src="images/YS4Motorbo.gif";	 
     pic5aon= new Image(180,40);
     pic5aon.src="images/YS5Batteriesborc.gif";
	 pic5aoff= new Image(180,40);
     pic5aoff.src="images/YS5Batteriesbo.gif";
     pic6aon= new Image(180,40);
     pic6aon.src="images/YS6Otherborc.gif";
	 pic6aoff= new Image(180,40);
     pic6aoff.src="images/YS6Otherbo.gif";
    pic7aon= new Image(180,40);
     pic7aon.src="images/YS7Batteriesborc.gif";
	 pic7aoff= new Image(180,40);
     pic7aoff.src="images/YS7Batteriesbo.gif";
     pic8aon= new Image(180,40);
     pic8aon.src="images/YS8Otherborc.gif";
	 pic8aoff= new Image(180,40);
     pic8aoff.src="images/YS8Otherbo.gif"; */	 	 
   } 
function lightup(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
    }
 } 
function turnoff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
    }
 }
// End -->
 
/* Original: Randy Bennett (rbennett@thezone.net)
Web Site: http://home.thezone.net/~rbennett/sitemap.htm
with mods. by Patrick Boyle to turn the N6-compatible 'brand'
script into a 'menu' script - works in IE5, N6.2 & N4.
Sticky .gifs*/
<!-- Begin
function setVariables() {
   if (navigator.appName == "Netscape") {
      v=".top=";h=".left=";dS="document.";sD="";
      y="window.pageYOffset";x="window.pageXOffset";iW="window.innerWidth";
      iH="window.innerHeight"
   }
   else {
      h=".pixelLeft=";v=".pixelTop=";dS="";sD=".style";
      y="document.body.scrollTop";x="document.body.scrollLeft";
      iW="document.body.clientWidth";iH="document.body.clientHeight"
   }
   xyz=500;
   object="logo";
   checkLocationA()
}
movex=0,movey=0,xdiff=0,ydiff=0,ystart=0,xstart=0
function checkLocation() {
   //innerX=eval(iW)-115;   // place to the right
   innerX=eval(iW)-90;
   // innerX=20;             // controls the horizontal from the left side of the page
   //innerY=eval(iH)-55;     // place at the bottom
   innerY=eval(iH)-80;
   // innerY=20;             // controls the vertical from the top of the page
   if (document.layers){innerY-=10;innerX-=10}
   yy=eval(y);
   xx=eval(x);
   ydiff=ystart-yy;
   xdiff=xstart-xx;
   if ((ydiff<(-1))||(ydiff>(1))) movey=Math.round(ydiff/10),ystart-=movey
   if ((xdiff<(-1))||(xdiff>(1))) movex=Math.round(xdiff/10),xstart-=movex
   N=(document.layers)?1:0
   V=(N) ? 4:5
   if (V==4) {
      eval(dS+object+sD+v+(ystart+innerY));
      eval(dS+object+sD+h+(xstart+innerX));
      //eval(dS + objectX + sD + v + y);
   }
   else {
      object=document.getElementById('logo');
      object.style.top=ystart+innerY-30;
      object.style.left=xstart+innerX-30;
   }
   setTimeout("checkLocation()",10)
}

function checkLocationA(){ystart=eval(y);xstart=eval(x);}

function switchLogo(abc) {
   if (abc == "menu") {
      N=(document.layers)?1:0
      V=(N) ? 4:5
      if (V==4) {
         object=abc;
         eval(dS+object+sD+v+(ystart+innerY));
         eval(dS+object+sD+h+(xstart+innerX));
      }
     else {
        object=document.getElementById(abc);
        object.style.top=ystart+innerY-30;
        object.style.left=xstart+innerX-30;
     }
   }
   else xyz = setTimeout("delayLogo()", 1000)
}

function delayLogo() {
   N=(document.layers)?1:0
   V=(N) ? 4:5
   if (V==4) {
      object = 'menu';
      eval(dS+object+sD+v+(-200));
      eval(dS+object+sD+h+0);

      object = 'logo';
      eval(dS+object+sD+v+(ystart+innerY));
      eval(dS+object+sD+h+(xstart+innerX));
   }
   else {
      object=document.getElementById('menu');
      object.style.top=-200;
      object.style.left=0;

      object=document.getElementById('logo');
      object.style.top=ystart+innerY-30;
      object.style.left=xstart+innerX-30;
   }
}
// End -->

/* The JavaScript Source!! http://javascript.internet.com
	Date Last Updated*/
<!-- Begin
function takeYear(theDate)
{
x = theDate.getYear();
var y = x % 100;
y += (y < 38) ? 2000 : 1900;
return y;
}
function lastupdated()
{
var days = new Array(8);
days[1] = "Sunday";
days[2] = "Monday";
days[3] = "Tuesday";
days[4] = "Wednesday";
days[5] = "Thursday";
days[6] = "Friday";
days[7] = "Saturday";
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var dateObj = new Date(document.lastModified);
var wday = days[dateObj.getDay() + 1];
var lmonth = months[dateObj.getMonth() + 1];
var date = dateObj.getDate();
fyear = takeYear(dateObj);
/*var fyear = dateObj.getYear();
if (fyear < 2000); 
fyear = fyear + 1900;*/
document.write(lmonth + " " + date + ", " + fyear);
}
// End -->

/*Source: Peter-Paul Koch's Javascript pages */
<!-- Begin
function openWindow(jpg,winName,heightJ,widthJ)
{

	heightJ=heightJ+6;
	heightW=480;
	if (heightJ<heightW) {heightW=heightJ+8};
	widthW=widthJ+10;
	url='foto.html';
	var newindow = '';
	if (newindow.location && !newindow.closed)
	{
		newindow.location.href = url;
	}
	else
	{
 		if (navigator.appVersion.indexOf('4') != -1) 
 		{
 			// Vars for centering the new window on Version 4+ Browsers
 			xTop=(screen.width/2)-(widthW/2);
 			yTop=(screen.height/2)-(heightW/2);
			newindow=window.open('',winName,'resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,height='+heightW+',width='+widthW+',left='+xTop+',top='+yTop+'');
		}
 		else 
 		{
 			newindow=window.open('',winName,'resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,height='+heightW+',width='+widthW+',left=0,top=0');
		}
	if (!newindow.opener) newindow.opener = self;
	}
	newindow.document.write('<HTML><HEAD><TITLE>');
	newindow.document.write(winName);
	newindow.document.write('</TITLE>');
	newindow.document.write('<meta HTTP-EQUIV="imagetoolbar" CONTENT="no">');	
	newindow.document.write('<meta name="MSSmartTagsPreventParsing" content="TRUE">');
	//newindow.document.write('<LINK REL="stylesheet" HREF="all.css">');
	newindow.document.write('</HEAD><BODY background="images/background.gif" bgproperties="fixed" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
	newindow.document.write('<table align="center" border="3" cellpadding="0" cellspacing="0">');
	newindow.document.write('<tr><td><a href="javascript:self.close()"><img src='+jpg+' width='+widthJ+' height='+heightJ+' border="0" title="Click to close"></a>');
	newindow.document.write('</td></tr></table>');
	newindow.document.write('</BODY></HTML>');
	newindow.document.close();
	if (window.focus) newindow.focus();
}

// End -->
