<!--
// *************************************************************************************
// Description: Low library routines for NSCME maritime site
//      Author: Roger Bray roger@Speciffix.com
// SCRIPT STRUCTURE IS COPYRIGHT - Speciffix Solutions Ltd - ALL RIGHTS RESERVED
// *************************************************************************************


// -------------------------------------------------------------------------------------
// functions for browser ID
// -------------------------------------------------------------------------------------

function getApp() {
 appname = navigator.appName;
 appversion = navigator.appVersion;
 majorver = appversion.substring(0, 1); 
 if ( (appname == "Netscape") && ( majorver >= 3 ) ){ return 1;}
 if ( (appname == "Microsoft Internet Explorer") && (majorver >= 4) ){ return 2;}
 else {return 0;}
}


// -------------------------------------------------------------------------------------
// functions for image swap areas
// -------------------------------------------------------------------------------------
 
 imgfile = new Array();
 imgfile[0] = "blank.gif";
 imgfile[1] = "nscme.gif";
 imgfile[2] = "nbyc.gif";
 imgfile[3] = "nbsww.gif";
 imgfile[4] = "ncce.gif";
 imgfile[5] = "sket.gif";
 imgfile[6] = "nzww.gif";
 imgfile[7] = "blank.gif";
 imgfile[8] = "blank.gif";
 imgfile[9] = "blank.gif";
 imgfile[10] = "blank.gif";
 imgfile[11] = "braynetpad.gif";
 imgfile[12] = "speciffixpad.gif";
 
if (getApp()) {
 img = new Array();
 for (x=0;x<imgfile.length;x++) {
  img[x]=new Image();
  img[x].src=imgfile[x];
 }
}

function img_swap(imgArea,index) {
 if (getApp()) {
  try {
    document[imgArea].src = img[index].src
  }
  catch(e) {
    return 0;    
  }
 }
}


// -------------------------------------------------------------------------------------
// functions for web host content & copyright notice
// -------------------------------------------------------------------------------------
HostQuote = '"'; 

HostDisplay = '<FONT COLOR=#D18345>bray</FONT><FONT COLOR=#128312>net</FONT><FONT COLOR=#000000>nz</FONT>';
HostLogoName = '../braynetsml.gif';
HostLogoSize ='WIDTH=64 HEIGHT=30'
HostURLName = 'www.bray.net.nz';
HostHREF = '<A HREF=' + HostQuote + 'http://' + HostURLName + HostQuote + '>'; 

AuthDisplay = '<FONT COLOR=#AA00AA>Specif</FONT><FONT COLOR=#BBAA00>fix</FONT><FONT COLOR=#00AA00> Solutions Ltd</FONT>';
AuthLogoName = '../speciffixt.gif';
AuthLogoSize ='WIDTH=70 HEIGHT=26'
AuthURLName = 'www.speciffix.com';
AuthHREF = '<A HREF=' + HostQuote + 'http://' + AuthURLName + HostQuote + '>'; 


function HostPaint(what) {
  try {
    document.write(what);
  }
  catch(e) {
    document.write(' ');
  }
}


function HostFull() {
  document.write(HostHREF + HostDisplay + '</A>');
}


function HostShort() {
  document.write(HostHREF + HostDisplay + '</A>');
}

function HostURL() {
  document.write(HostHREF + HostURLName + '</A>');
}


function AuthFull() {
  document.write(AuthHREF + AuthDisplay + '</A>');
}


function HostCopyRight() {
  document.write('<I>Site best viewed at 800px x 600px or higher</I>&nbsp;<BR>' +
  '&copy Web design Copyright<BR>');
  AuthFull();

}


function HostLogo() {
  HostString = 'img_swap(' + HostQuote + 'atCME'  + HostQuote + ',11)'; 
  document.write(HostHREF + '<IMG SRC=' + HostLogoName + ' ' + HostLogoSize + ' ALT=' + HostURLName + ' BORDER=0' +
                 ' onMouseOver=' + HostString);
  HostString = 'img_swap(' + HostQuote + 'atCME'  + HostQuote + ',0)'; 
  document.write(' onMouseOut=' +  HostString  + '></A>');
}

function AuthLogo() {
  AuthString = 'img_swap(' + HostQuote + 'atCME'  + HostQuote + ',12)'; 
  document.write(AuthHREF + '<IMG SRC=' + AuthLogoName + ' ' + AuthLogoSize + ' ALT=' + AuthURLName + ' BORDER=0' +
                 ' onMouseOver=' + AuthString);
  AuthString = 'img_swap(' + HostQuote + 'atCME'  + HostQuote + ',0)'; 
  document.write(' onMouseOut=' +  AuthString  + '></A>');
}

function HostCells() {
  document.write('<TD>');
  HostLogo();
  document.write('</TD><TD><SMALL><I>Brought<BR>to you by</I></SMALL></TD><TD> ');
  AuthLogo();
  document.write('</TD>');
}
// -------------------------------------------------------------------------------------


-->
