//global variables for gallery
var displayedCaption
var displayedPhoto

// Show today's date
function TodaysDate(){
	var mydate=new Date()
	var year=mydate.getYear()
	if (year < 1000)
	year+=1900
	var day=mydate.getDay()
	var month=mydate.getMonth()
	var daym=mydate.getDate()
	if (daym<10)
	daym="0"+daym
	var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	document.write(""+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"")
}

// random splash generator

function randomSplash()

{
var splashImage=new Array()

// location of images in this array
splashImage[1]="Images/tanks.jpg";
splashImage[2]="Images/invertgim.jpg";
//splashImage[2]="Images/Oscar.jpg";
splashImage[3]="Images/dillo1b.jpg";
splashImage[4]="Images/p_1564.jpg";
splashImage[5]="Images/planesim2.jpg";
splashImage[6]="Images/m1.jpg";
splashImage[7]="Images/Big-Ship.jpg";
splashImage[8]="Images/agail3s.jpg";
splashImage[8]="Images/cannes-2.jpg";
splashImage[9]="Images/stealth.jpg";
splashImage[10]="Images/mackpr1.jpg";
splashImage[11]="Images/lscad.jpg";

var splashCaption=new Array()

// captions
splashCaption[1]="Tanks from 'Windtalkers'";
splashCaption[2]="Inversion Gimble Rental";
//splashCaption[2]="And the winner is...<br \/>John Frazier<br \/>Best Visual Effects-Spiderman 2<br \/><a href=\"spideycrew.html\">Spiderman II Crew<\/a>";
splashCaption[3]="The Armadillo from 'Armageddon'";
splashCaption[4]="Hai Ping on tipping gimble<br \/>'Pirates 3 - At World's End'";
splashCaption[5]="Plane simulator from<br \/>'Pearl Harbor'";
splashCaption[6]="Custom tank fabricated for<br \/>'XXX2'";
splashCaption[7]="The Oklahoma rollover from<br \/>'Pearl Harbor'";
splashCaption[8]="The Andria Gail<br \/>from 'Perfect Storm'";
splashCaption[8]="Bumblebee in Cannes";
splashCaption[9]="Custom simulator from<br \/>'Stealth'";
splashCaption[10]="Custom Mack truck for<br \/>the Mack Convention";
splashCaption[11]="Cien from 'The Island'";

var getRan=Math.floor(Math.random()*splashImage.length)
if (getRan==0)
getRan=1

document.write('<img src=\"'+splashImage[getRan]+'\" alt=\"Images from Fxperts\" title=\"Images from Fxperts.\" width=\"300\" \/>');

document.write('<p>'+splashCaption[getRan]+'<br \/><\/p>');
document.write('<p>View more images in the <a href=\"gallery.html\">gallery<\/a><\/p>');
}


//-SLIDE SHOW- for Staff Shop

//*put in head*

var slideimages=new Array()
var slidelinks=new Array()
var slidecaptions=new Array()
var slideshowspeed=4000
var whichlink=0
var whichimage=0

slideshowimages("Images/Staff/bumbl.jpg","Images/Staff/mack23.jpg","Images/Staff/lexus052.jpg","Images/Staff/taxi049.jpg","Images/Staff/cad3.jpg","Images/Staff/skybike044.jpg","Images/Staff/copter012.jpg","Images/Staff/mb023.jpg","Images/Staff/lexus023s.jpg","Images/Staff/mack810.jpg");
slideshowlinks("xnf_s.html","mack_s.html","lexus_s.html","taxi_s.html","cad_s.html","skybike_s.html","copter.html","ship_s.html","lexus.html","mackpr_s.html");
//slideshowcaptions("Full scale Mack model from 'The Island'","lexus","taxi")
slidecaptions[0]="Full scale Bumblebee from 'Transformers'";
slidecaptions[1]="Full scale Mack model from 'The Island'";
slidecaptions[2]="Lexus model from 'The Island'";
slidecaptions[3]="Hover Taxi from 'The Island'";
slidecaptions[4]="Cadillac Cien from 'The Island'";
slidecaptions[5]="Skybike mold from 'The Island'";
slidecaptions[6]="Helicopter from 'XXX2'";
slidecaptions[7]="Scale model of a Tall Ship";
slidecaptions[8]="Custom Lexus for 'The Island'";
slidecaptions[9]="Custom Mack Truck built for the Mack Convention";

function slideshowimages(){
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=new Image()
slideimages[i].src=slideshowimages.arguments[i];
}
}

function slideshowlinks(){
for (i=0;i<slideshowlinks.arguments.length;i++)
slidelinks[i]=slideshowlinks.arguments[i];
}

//function slideshowcaptions(){
//for (i=0;i<slideshowcaptions.arguments.length;i++){
//slidecaptions[i]=slideshowcaptions.arguments[i]
//}
//}

function gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink];
winslide.focus();
}

//*put in body*


//configure the paths of the images, plus corresponding target links

function slideit(){
if (!document.images)
return
document.images.slide.src=slideimages[whichimage].src
var slidecap = document.getElementById("slidecaption");
slidecap.firstChild.nodeValue = slidecaptions[whichimage];
whichlink=whichimage
if (whichimage<slideimages.length-1)
whichimage++
else
whichimage=0
setTimeout("slideit()",slideshowspeed);
}


//Slide show - right coloumn project posters

var r_posterimages=new Array()
var r_posterspd=4000
var r_posternum=0

//location of posters

r_poster("Images/Posters/sevenpounds.jpg","Images/Posters/deja.jpg","Images/Posters/poseid.jpg","Images/Posters/island.jpg","Images/Posters/domino.jpg","Images/Posters/stealth.jpg","Images/Posters/x2.jpg","Images/Posters/x.jpg","Images/Posters/pearl.jpg","Images/Posters/storm.jpg","Images/Posters/cast.jpg","Images/Posters/spidey3.jpg","Images/Posters/spidey2.jpg","Images/Posters/spidey.jpg","Images/Posters/armag.jpg","Images/Posters/twist.jpg","Images/Posters/tears.jpg","Images/Posters/bb2.jpg","Images/Posters/wind.jpg","Images/Posters/apocalypse.jpg","Images/Posters/airplane.jpg","Images/Posters/space.jpg","Images/Posters/true.jpg","Images/Posters/speed.jpg");
//poster[0]="Images/Posters/armag.jpg";
//poster[1]="Images/Posters/poseid.jpg";
//poster[2]="Images/Posters/spidey2.jpg";
//poster[3]="Images/Posters/pearl.jpg";
//poster[4]="Images/Posters/stealth.jpg"; 

//configure the paths of the images

function r_poster(){
for (i=0;i<r_poster.arguments.length;i++){
r_posterimages[i]=new Image()
r_posterimages[i].src=r_poster.arguments[i];
}
}

function r_postit(){
if (!document.images)
return
document.images.r_postpnl.src=r_posterimages[r_posternum].src
if (r_posternum<r_posterimages.length-1)
r_posternum++
else
r_posternum=0
setTimeout("r_postit()",r_posterspd);
}


//Slide show - left coloumn project posters

var l_posterimages=new Array()
var l_posterspd=6000
var l_posternum=0

//location of posters

l_poster("Images/Posters/priest.jpg","Images/Posters/sorcerer.jpg","Images/Posters/takers.jpg","Images/Posters/armored.jpg","Images/Posters/pelham.jpg","Images/Posters/xnf2.jpg","Images/Posters/hancock.jpg","Images/Posters/drag.jpg","Images/Posters/kingdom.jpg","Images/Posters/obsessed.jpg","Images/Posters/nt2.jpg","Images/Posters/pirates.jpg","Images/Posters/pineapple.jpg");
//poster[0]="Images/Posters/armag.jpg";
//poster[1]="Images/Posters/poseid.jpg";
//poster[2]="Images/Posters/spidey2.jpg";
//poster[3]="Images/Posters/pearl.jpg";
//poster[4]="Images/Posters/stealth.jpg"; 

//configure the paths of the images

function l_poster(){
for (i=0;i<l_poster.arguments.length;i++){
l_posterimages[i]=new Image()
l_posterimages[i].src=l_poster.arguments[i];
}
}

function l_postit(){
if (!document.images)
return
document.images.l_postpnl.src=l_posterimages[l_posternum].src
if (l_posternum<l_posterimages.length-1)
l_posternum++
else
l_posternum=0
setTimeout("l_postit()",l_posterspd);
}


//Set status dialog & call functions

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

//gallery obtains photo & caption

function getCaption()
{
	var cap = document.getElementById("caption");
	cap.firstChild.nodeValue = opener.displayedCaption;
	document.imgPhoto.src = opener.displayedPhoto;
}

//destroy window

function kill()
{
	cap = null;
	displayedPhoto = null;
}

// set gallery window

//function winparams() 
//{
	
//	var w = (screen.availWidth - 10);
//	var h = screen.availHeight;
//	var x = ((screen.availWidth - w) - 10) / 2;
//	var y = (screen.height - h) / 2;
//	var chrome = "width=" + w + ",height=" + h + ",menubar=no,scrollbars=yes,resizable=yes,location=no,status=yes,titlebar=yes,toolbar=no,left=" + x + ",top=" + y;
//	var gallery = window.open("galleryjs.html","",chrome);
//	return gallery;
	
//}
//set awards page popup size
var popUpWin=0;
var chrmArray = new Array();
var chrmSize = 'width='+420+',left='+100+',top='+100+'';
chrmArray[0] = ''+chrmSize+',height='+530+'';
chrmArray[1] = ''+chrmSize+',height='+325+'';
chrmArray[2] = ''+chrmSize+',height='+625+'';
chrmArray[3] = ''+chrmSize+',height='+400+'';
function hPop(URLStr, sze)
{
	wsze = 0;
var	wsze = sze;
  if(popUpWin)
  if(!popUpWin.closed) popUpWin.close();
	{
	  switch (wsze)
	  {
	  case 0:
	  popUpWin = open(URLStr, 'popUpWin', chrmArray[0]);
	  break;
	  case 1:
	  popUpWin = open(URLStr, 'popUpWin', chrmArray[1]);
	  break;
	  case 2:
	  popUpWin = open(URLStr, 'popUpWin', chrmArray[2]);
	  break;
	  case 3:
	  popUpWin = open(URLStr, 'popUpWin', chrmArray[3]);
	  break;
	  }
	}  
}

//set gallery window size

function sizeGalleryWindow()
{
	var w = document.body.scrollWidth + 5;
	var h = document.body.scrollHeight + 20;
	var x = (screen.width - w) / 2;
	var y = (screen.height - h) / 2;
	var chrome = "width=" + w + ",height=" + h + ",menubar=no,scrollbars=yes,resizable=yes,location=no,status=yes,titlebar=yes,toolbar=no,left=" + x + ",top=" + y;
	var gallery = window.open("galleryjs.html","gallery",chrome);
	return gallery;
}

// swap image and caption-Pearl Harbor
function swapPhoto(photoSRC,theCaption) 
{
	var gallery = sizeGalleryWindow();
	displayedCaption = theCaption;
	gallery.displayedCaption = displayedCaption;
	displayedPhoto = "Images/Pearl%20Harbor/" + photoSRC;
	gallery.displayedPhoto = displayedPhoto;
}


// swap image and caption-Bad Boys

function swapPhotoBadboys(photoSRC,theCaption) 
{
	var gallery = sizeGalleryWindow();
	displayedCaption = theCaption;
	gallery.displayedCaption = displayedCaption;
	displayedPhoto = "Images/BadBoys/" + photoSRC;
	gallery.displayedPhoto = displayedPhoto;
}

// swap image and caption-XXX2

function swapPhotoXXX2(photoSRC,theCaption) 
{
	var gallery = sizeGalleryWindow();
	displayedCaption = theCaption;
	gallery.displayedCaption = displayedCaption;
	displayedPhoto = "Images/XXX2/" + photoSRC;
	gallery.displayedPhoto = displayedPhoto;
}

// swap image and caption-Staff Shop

function swapPhotoStaff(photoSRC,theCaption) 
{
	var gallery = sizeGalleryWindow();
	displayedCaption = theCaption;
	gallery.displayedCaption = displayedCaption;
	displayedPhoto = "Images/Staff/" + photoSRC;
	gallery.displayedPhoto = displayedPhoto;
}

// swap image and caption-Stealth

function swapPhotoStl(photoSRC,theCaption) 
{
	var gallery = sizeGalleryWindow();
	displayedCaption = theCaption;
	gallery.displayedCaption = displayedCaption;
	displayedPhoto = "Images/Stealth/" + photoSRC;
	gallery.displayedPhoto = displayedPhoto;
}


// swap image and caption-Poseidon
function swapPhotoPos(photoSRC,theCaption) 
{
	var gallery = sizeGalleryWindow();
	displayedCaption = theCaption;
	gallery.displayedCaption = displayedCaption;
	displayedPhoto = "Images/Poseidon/" + photoSRC;
	gallery.displayedPhoto = displayedPhoto;
}


// swap image and caption-DejaVu
function swapPhotoDv(photoSRC,theCaption) 
{
	var gallery = sizeGalleryWindow();
	displayedCaption = theCaption;
	gallery.displayedCaption = displayedCaption;
	displayedPhoto = "Images/Deja/" + photoSRC;
	gallery.displayedPhoto = displayedPhoto;
}


// swap image and caption-Pirates
function swapPhotoPt(photoSRC,theCaption) 
{
	var gallery = sizeGalleryWindow();
	displayedCaption = theCaption;
	gallery.displayedCaption = displayedCaption;
	displayedPhoto = "Images/Pirates/" + photoSRC;
	gallery.displayedPhoto = displayedPhoto;
}


// swap image and caption-Transformers
function swapPhotoXnf(photoSRC,theCaption) 
{
	var gallery = sizeGalleryWindow();
	displayedCaption = theCaption;
	gallery.displayedCaption = displayedCaption;
	displayedPhoto = "Images/Trans/" + photoSRC;
	gallery.displayedPhoto = displayedPhoto;
}


// contacts mail
function eml(recipient)
{
	var who = recipient
//	alert(who);
	if (who == "dave")
	{	
		var name = "dave";
		var domain = "fxpertsinc.com";
		var subject = "inquiry from website";
		location.href='mailto:' + name + '@' + domain + '?subject=' + subject + '';
		return;
	}
	if	(who == "info")
	{
		
		var name = "scaninfo";
		var domain = "fxpertsinc.com";
		var subject = "scan inquiry";
		location.href='mailto:' + name + '@' + domain + '?subject=' + subject + '';
		return;
	}
	if	(who == "site")
	{
		var name = "webtech";
		var domain = "fxpertsinc.com";
		var subject = "site inquiry";
		location.href='mailto:' + name + '@' + domain + '?subject=' + subject + '';
		return;
	}	
}

//	projects table script

/* Change these values */
var image_path = "Graphics/";
var image_up = "arrow-up.gif";
var image_down = "arrow-down.gif";
var image_none = "arrow-none.gif";

/* Don't change anything below this unless you know what you're doing */
addEvent(window, "load", sortables_init);

var SORT_COLUMN_INDEX;

function sortables_init() {
	// Find all tables with class sortable and make them sortable
	if (!document.getElementsByTagName) return;
	tbls = document.getElementsByTagName("table");
	for (ti=0;ti<tbls.length;ti++) {
		thisTbl = tbls[ti];
		if (((' '+thisTbl.className+' ').indexOf("sortable") != -1) && (thisTbl.id)) {
			//initTable(thisTbl.id);
			ts_makeSortable(thisTbl);
			//sum_up(thisTbl);
		}
	}
}

function ts_makeSortable(table) {
	if (table.rows && table.rows.length > 0) {
		var firstRow = table.rows[0];
	}
	if (!firstRow) return;
	
	// We have a first row: assume it's the header, and make its contents clickable links
	for (var i=0;i<firstRow.cells.length;i++) {
		var cell = firstRow.cells[i];
		var txt = ts_getInnerText(cell);
		if (cell.className != "unsortable" && cell.className.indexOf("unsortable") == -1) {
			cell.innerHTML = '<a href="#" class="sortheader" onclick="ts_resortTable(this);return false;">'+txt+'<span class="sortarrow">&nbsp;&nbsp;<img src="'+ image_path + image_none + '" alt="&darr;"/></span></a>';
		}
	}
	alternate(table);
}

function ts_getInnerText(el) {
	if (typeof el == "string") return el;
	if (typeof el == "undefined") { return el };
	if (el.innerText) return el.innerText;	//Not needed but it is faster
	var str = "";
	
	var cs = el.childNodes;
	var l = cs.length;
	for (var i = 0; i < l; i++) {
		switch (cs[i].nodeType) {
			case 1: //ELEMENT_NODE
				str += ts_getInnerText(cs[i]);
				break;
			case 3:	//TEXT_NODE
				str += cs[i].nodeValue;
				break;
		}
	}
	return str;
}

function ts_resortTable(lnk) {
	// get the span
	var span;
	for (var ci=0;ci<lnk.childNodes.length;ci++) {
		if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci];
	}
	var spantext = ts_getInnerText(span);
	var td = lnk.parentNode;
	var column = td.cellIndex;
	var table = getParent(td,'TABLE');
	
	// Work out a type for the column
	if (table.rows.length <= 1) return;
	var itm = ts_getInnerText(table.rows[1].cells[column]);
	sortfn = ts_sort_caseinsensitive;
	if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) sortfn = ts_sort_date;
	if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) sortfn = ts_sort_date;
	if (itm.match(/^[£$€]/)) sortfn = ts_sort_currency;
	if (itm.match(/^[\d\.]+$/)) sortfn = ts_sort_numeric;
	SORT_COLUMN_INDEX = column;
	var firstRow = new Array();
	var newRows = new Array();
	for (i=0;i<table.rows[0].length;i++) { 
		firstRow[i] = table.rows[0][i]; 
	}
	for (j=1;j<table.rows.length;j++) { 
		newRows[j-1] = table.rows[j];
	}

	newRows.sort(sortfn);

	if (span.getAttribute("sortdir") == 'down') {
			ARROW = '&nbsp;&nbsp;<img src="'+ image_path + image_up + '" alt="&uarr;"/>';
			newRows.reverse();
			span.setAttribute('sortdir','up');
	} else {
			ARROW = '&nbsp;&nbsp;<img src="'+ image_path + image_down + '" alt="&darr;"/>';
			span.setAttribute('sortdir','down');
	} 
	
    // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones
    // don't do sortbottom rows
    for (i=0; i<newRows.length; i++) { 
		if (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) {
			table.tBodies[0].appendChild(newRows[i]);
		}
	}
    // do sortbottom rows only
    for (i=0; i<newRows.length; i++) {
		if (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) 
			table.tBodies[0].appendChild(newRows[i]);
	}
    
	// Delete any other arrows there may be showing
	var allspans = document.getElementsByTagName("span");
	for (var ci=0;ci<allspans.length;ci++) {
		if (allspans[ci].className == 'sortarrow') {
			if (getParent(allspans[ci],"table") == getParent(lnk,"table")) { // in the same table as us?
				allspans[ci].innerHTML = '&nbsp;&nbsp;<img src="'+ image_path + image_none + '" alt="&darr;"/>';
			}
		}
	}
			
	span.innerHTML = ARROW;
	alternate(table);		
}

function getParent(el, pTagName) {
	if (el == null) {
		return null;
	} else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase()) {	// Gecko bug, supposed to be uppercase
		return el;
	} else {
		return getParent(el.parentNode, pTagName);
	}
}
function ts_sort_date(a,b) {
	// y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX
	aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
	bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
	if (aa.length == 10) {
			dt1 = aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2);
	} else {
			yr = aa.substr(6,2);
			if (parseInt(yr) < 50) { 
				yr = '20'+yr; 
			} else { 
				yr = '19'+yr; 
			}
			dt1 = yr+aa.substr(3,2)+aa.substr(0,2);
	}
	if (bb.length == 10) {
			dt2 = bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2);
	} else {
			yr = bb.substr(6,2);
			if (parseInt(yr) < 50) { 
				yr = '20'+yr; 
			} else { 
				yr = '19'+yr; 
			}
			dt2 = yr+bb.substr(3,2)+bb.substr(0,2);
	}
	if (dt1==dt2) {
		return 0;
	}
	if (dt1<dt2) { 
		return -1;
	}
	return 1;
}

function ts_sort_currency(a,b) { 
	aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,'');
	bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,'');
	return parseFloat(aa) - parseFloat(bb);
}

function ts_sort_numeric(a,b) { 
	aa = parseFloat(ts_getInnerText(a.cells[SORT_COLUMN_INDEX]));
	if (isNaN(aa)) {
		aa = 0;
	}
	bb = parseFloat(ts_getInnerText(b.cells[SORT_COLUMN_INDEX])); 
	if (isNaN(bb)) {
		bb = 0;
	}
	return aa-bb;
}

function ts_sort_caseinsensitive(a,b) {
	aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).toLowerCase();
	bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).toLowerCase();
	if (aa==bb) {
		return 0;
	}
	if (aa<bb) {
		return -1;
	}
	return 1;
}

function ts_sort_default(a,b) {
	aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
	bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
	if (aa==bb) {
		return 0;
	}
	if (aa<bb) {
		return -1;
	}
	return 1;
}

function addEvent(elm, evType, fn, useCapture)
// addEvent and removeEvent
// cross-browser event handling for IE5+,	NS6 and Mozilla
// By Scott Andrew
{
	if (elm.addEventListener){
		elm.addEventListener(evType, fn, useCapture);
		return true;
	} else if (elm.attachEvent){
		var r = elm.attachEvent("on"+evType, fn);
		return r;
	} else {
		alert("Handler could not be removed");
	}
} 

function replace(s, t, u) {
  /*
  **  Replace a token in a string
  **    s  string to be processed
  **    t  token to be found and removed
  **    u  token to be inserted
  **  returns new String
  */
  i = s.indexOf(t);
  r = "";
  if (i == -1) return s;
  r += s.substring(0,i) + u;
  if ( i + t.length < s.length)
    r += replace(s.substring(i + t.length, s.length), t, u);
  return r;
}

function alternate(table) {
	// Take object table and get all it's tbodies.
	var tableBodies = table.getElementsByTagName("tbody");
	// Loop through these tbodies
	for (var i = 0; i < tableBodies.length; i++) {
		// Take the tbody, and get all it's rows
		var tableRows = tableBodies[i].getElementsByTagName("tr");
		// Loop through these rows
		// Start at 1 because we want to leave the heading row untouched
		for (var j = 1; j < tableRows.length; j++) {
			// Check if j is even, and apply classes for both possible results
			if ( (j % 2) == 0  ) {
				if (tableRows[j].className == 'odd' || !(tableRows[j].className.indexOf('odd') == -1) ) {
					tableRows[j].className = replace(tableRows[j].className, 'odd', 'even');
				} else {
					tableRows[j].className += " even";
				}
			} else {
				if (tableRows[j].className == 'even' || !(tableRows[j].className.indexOf('even') == -1) ) {
					tableRows[j].className = replace(tableRows[j].className, 'even', 'odd');
				}
				tableRows[j].className += " odd";
			} 
		}
	}
}

//	script for pasting on page 
//		var name = "dave";
//		var domain = "fxpertsinc.com";
//		document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
//		document.write(name + '@' + domain + '</a>');

//test for movie poster pop up

//function poster(elem)
//{
//	alert("here1");
//	var posterId = document.getElementById(elem);
//	alert(posterId);
//	posterId.style.color = "white";
//	alert(posterId.style.color);
//}
// test for firefox and opera
//  function swapPhoto(theCaption)
//{
//	var opengallery = open('galleryjs.html','fxperts','menubar=yes, scrollbars=yes, height=400, width=400, resizable=yes');
//    var displayedCaption = opengallery.document.getElementById("caption");		
//	alert("done");
//	displayedCaption.firstChild.nodeValue = theCaption;
//	opengallery.loadCaption();
//}
//var opengallery = "win1=window.open("galleryjs.html")";
//alert("done")
//document.images.imgPhoto.src = "Images/Pearl%20Harbor/" + photoSRC;



//	var w = screen.availWidth;
//	var h = screen.availHeight;
//	var x = (screen.width - w) / 2;
//	var y = (screen.height - h) / 2;
//	var chrome = "width=" + w + ",height=" + h + ",menubar=no,scrollbars=yes,resizable=yes,location=no,status=yes,titlebar=yes,toolbar=no,left=" + x + ",top=" + y;
//	alert("test");
//	winparams();
//	newWin=window.open('galleryjjs.html', 'popup', 'menubar=yes, scrollbars=yes, height=400, width=400, resizable=yes');
//	newWindow = ("galleryjjs.html","caption")
//	var chrome = ("menubar=no,scrollbars=yes,resizable=yes,location=no,status=yes,titlebar=yes,toolbar=no,left=100,top=100");
//	var opengallery = window.open("galleryjjs.html","gallery");
//	var screenWidth = screen.availWidth;
//	var screenHeight = screen.availheight;

//misc

//	var chrome = ("menubar=no,scrollbars=yes,resizable=yes,location=no,status=yes,titlebar=yes,toolbar=no,width=100,height=100");
//	var gallery = window.open("galleryjs.html","chrome");	

//{
//}

//	var displayedCaption = gallery.document.getElementById("caption");		
//	displayedCaption.lastChild.nodeValue = theCaption;		
//	gallery.document.imgPhoto.src = "Images/BadBoys/" + photoSRC;
//}
