function clearform(which){if(which.value==" Search site")
which.value=''
}
function clearform2(which){if(which.value==" Your e-mail")
which.value=''
}

function preload_img()
{
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null)
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i]     = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  }
}

function change_img_src(name, nsdoc, rpath, preload)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  }
}

function restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  }
}

function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
    toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
    

function openPictureWindow(imgName,aa,bb,imgCaption,cc,dd) {imgWidth=0
imgHeight=0
textColor="white"
bgColor="navy"
	if(imgWidth<=100)imgWidth=300
		if(imgHeight<=100)imgHeight=300
		winHeight=imgHeight+20;
		legwidth=
		w = window.open('','ImageWindow','toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,copyhistory=no,width='+imgWidth+',height='+winHeight);
		w.document.write( "<html><head><title>"+imgCaption+"</title>" );
		w.document.write( "<STYLE TYPE='text/css'>" );
		w.document.write( "A {font-family: verdana; font-size: 10px; color: "+textColor+"; text-decoration : none;}" );
		w.document.write( "A:Visited {font-family: verdana;font-size: 10px; color: "+textColor+"; }" );
		w.document.write( "A:Active { font-family: verdana; font-size: 10px; color: "+textColor+"; }" );
		w.document.write( "A:Hover { font-family: verdana; font-size: 10px; color: 'yellow'; }" );
		w.document.write( "IMG {border-color : "+textColor+";}" );
		w.document.write( "BODY { font-family: verdana; font-size : 10px; font-weight: normal; color : "+textColor+"; background-color : "+bgColor+"; }" );
		w.document.write( "</STYLE>" );
		w.document.write( "<script language='JavaScript'>\n");
		w.document.write( "IE5=NN4=NN6=false\n");
		w.document.write( "if(document.all)IE5=true;\n");
		w.document.write( "else if(document.getElementById)NN6=true\n");
		w.document.write( "else if(document.layers)NN4=true\n");
		w.document.write( "function autoSize() {\n");
		w.document.write( "	if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+74)\n");
		w.document.write( "	else if(NN6) self.sizeToContent()\n");
		w.document.write( "	else top.window.resizeTo(document.images[0].width,document.images[0].height+51)\n");
		w.document.write( "	self.focus()\n");
		w.document.write( "}\n</scr");
		w.document.write( "ipt>\n");
		w.document.write( "</head><body bgcolor="+bgColor+" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad=" );
		w.document.write( "'javascript:autoSize();self.focus();' >" );
		w.document.write("<p align='center'><font size=2 face=Verdana color=white>  Loading ...</font></p>");
		w.document.write("<span style='left: 0; top: 0; position: absolute; z-index: 1'>");
		w.document.write( "<table cellpadding=0 cellspacing=0 border=0 bgcolor="+bgColor+"><tr><td colspan=3><img src='"+imgName+"' border=0 alt='"+imgCaption+"'></td></tr>" );
		w.document.write( "<tr><td align='left' width='20%'>&nbsp;<a>&copy; STXM</a></td>" );
		w.document.write( "<td align='center' width='*'><font color='#90CCFD'><a>"+imgCaption+"</a></font></td>" );
		w.document.write( "<td align='right' width='15%'><a href='javascript:top.window.close();'>Close</a>&nbsp;</td></tr>" );
		w.document.write( "</table></body></html>" );
		w.document.close();
}

function Validate(form ){if(form.realname.value=="" ){alert("Please enter a name" )
form.NAME.focus()
return false
}
if(form.email.value=="" ){alert("You must enter an e-mail address" )
form.EMAIL.focus()
return false
}
else if(form.email.value.indexOf("@",1 )==-1||form.email.value.indexOf(".",3 )==-1 ){alert("Invalid e-mail address" )
form.email.focus()
form.email.select()
return false
}
}


IE4plus = (document.all) ? true : false;
NS4 = (document.layers) ? true : false;

function clickIE()
{
    return false;
}

function clickNS(e)
{
	if (e.which==2 || e.which==3) 
     {
       return false;
     }
}
if (!IE4plus) 
{
   document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
   document.onmousedown=clickNS;
   document.onmouseup= clickNS;
   document.oncontextmenu=clickIE; // For NS 6+
} 
else 
{
   document.onmouseup= clickIE;
   document.oncontextmenu=clickIE;
}


//Function to show last update in footer



function initArray() {
this.length = initArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = initArray.arguments[i]
}


function showlastupdate() {
var DOWArray = new initArray("Sunday","Monday","Tuesday","Wednesday",
"Thursday","Friday","Saturday");
var MOYArray = new initArray("Jan","Feb","Mar","Apr",
"May","Jun","Jul","Aug","Sep",
"Oct","Nov","Dec");
var LastModDate = new Date(document.lastModified);
document.write("Copyright © 2008 STX Canada Marine Inc.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
document.write("Last updated on ");
document.write(DOWArray[(LastModDate.getDay()+1)]," ");
document.write(MOYArray[(LastModDate.getMonth()+1)]," ");
document.write(LastModDate.getDate(),", ",(LastModDate.getUTCFullYear()));
}



// Script Source: CodeLifter.com
// IMAGE POPUP
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 820;
defaultHeight = 620;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=120-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}




function formHandler(form){var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;}

