<!--

// Flash Version Detector  v1.1.5
// http://www.dithered.com/javascript/flash_detect/index.html
// code by Chris Nott (chris@NOSPAMdithered.com - remove NOSPAM)
// with VBScript code from Alastair Hamilton

var flashVersion = 0;

function getFlashVersion() {
	var agent = navigator.userAgent.toLowerCase(); 
	
   // NS3 needs flashVersion to be a local variable
   if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
      flashVersion = 0;
   }
   
	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') { 
			if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
			else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
			else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
			else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
			else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
		}
	}

	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	   document.write('<scr' + 'ipt language="VBScript"\> \n');
		document.write('on error resume next \n');
		document.write('dim obFlash \n');
		document.write('set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") \n');
		document.write('if IsObject(obFlash) then \n');
		document.write('flashVersion = 7 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") end if \n');
		document.write('if flashVersion < 7 and IsObject(obFlash) then \n');
		document.write('flashVersion = 6 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") end if \n');
		document.write('if flashVersion < 6 and IsObject(obFlash) then \n');
		document.write('flashVersion = 5 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.4") end if \n');
		document.write('if flashVersion < 5 and IsObject(obFlash) then \n');
		document.write('flashVersion = 4 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.3") end if \n');
		document.write('if flashVersion < 4 and IsObject(obFlash) then \n');
		document.write('flashVersion = 3 \n');
		document.write('end if');
		document.write('</scr' + 'ipt\> \n');
  }
		
	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;

	// older WebTV supports flash 2
	else if (agent.indexOf("webtv") != -1) flashVersion = 2;

	// Can't detect in all other cases
	else {
		flashVersion = flashVersion_DONTKNOW;
	}

	return flashVersion;
}


//	SITE VARIABLES

var flashVersion = getFlashVersion();
var flashVersion_DONTKNOW = -1;

//var absURL = "http://www.trinityrailcardev.com/";
 var absURL = "/";

var btn_home_off	= new Image();	btn_home_off.src	= absURL + "common_files/btn_home_off.gif";
var btn_railcars_off	= new Image();	btn_railcars_off.src	= absURL + "common_files/btn_railcars_off.gif";
var btn_components_off	= new Image();	btn_components_off.src	= absURL + "common_files/btn_components_off.gif";
var btn_leasing_off		= new Image();	btn_leasing_off.src		= absURL + "common_files/btn_leasing_off.gif";
var btn_fleet_off		= new Image();	btn_fleet_off.src		= absURL + "common_files/btn_fleet_off.gif";
var btn_european_off	= new Image();	btn_european_off.src	= absURL + "common_files/btn_european_off.gif";
var btn_quality_off		= new Image();	btn_quality_off.src		= absURL + "common_files/btn_quality_off.gif";

var btn_about_off		= new Image();	btn_about_off.src		= absURL + "common_files/btn_about_off.gif";
var btn_history_off		= new Image();	btn_history_off.src		= absURL + "common_files/btn_history_off.gif";
var btn_officers_off	= new Image();	btn_officers_off.src	= absURL + "common_files/btn_officers_off.gif";
var btn_facilities_off	= new Image();	btn_facilities_off.src	= absURL + "common_files/btn_facilities_off.gif";
var btn_news_off		= new Image();	btn_news_off.src		= absURL + "common_files/btn_news_off.gif";
var btn_contact_off		= new Image();	btn_contact_off.src		= absURL + "common_files/btn_contact_off.gif";

var btn_home_on		= new Image();	btn_home_on.src		= absURL + "common_files/btn_home_on.gif";
var btn_railcars_on		= new Image();	btn_railcars_on.src		= absURL + "common_files/btn_railcars_on.gif";
var btn_components_on	= new Image();	btn_components_on.src	= absURL + "common_files/btn_components_on.gif";
var btn_leasing_on		= new Image();	btn_leasing_on.src		= absURL + "common_files/btn_leasing_on.gif";
var btn_fleet_on		= new Image();	btn_fleet_on.src		= absURL + "common_files/btn_fleet_on.gif";
var btn_european_on		= new Image();	btn_european_on.src		= absURL + "common_files/btn_european_on.gif";
var btn_quality_on		= new Image();	btn_quality_on.src		= absURL + "common_files/btn_quality_on.gif";

var btn_about_on		= new Image();	btn_about_on.src		= absURL + "common_files/btn_about_on.gif";
var btn_history_on		= new Image();	btn_history_on.src		= absURL + "common_files/btn_history_on.gif";
var btn_officers_on		= new Image();	btn_officers_on.src		= absURL + "common_files/btn_officers_on.gif";
var btn_facilities_on	= new Image();	btn_facilities_on.src	= absURL + "common_files/btn_facilities_on.gif";
var btn_news_on			= new Image();	btn_news_on.src			= absURL + "common_files/btn_news_on.gif";
var btn_contact_on		= new Image();	btn_contact_on.src		= absURL + "common_files/btn_contact_on.gif";


function topNav(page) {

	document.writeln('	<table cellpadding="0" cellspacing="0" border="0" width="100%">');
	document.writeln('		<tr class="main_body">');
	document.writeln('			<td><img src="' + absURL + 'common_files/img_brownbar_top.gif"></td>');
	
	document.writeln('<td><a href="' + absURL + 'index.html"><img src="' + absURL + 'common_files/btn_home_off.gif"	border="0"	name="top_btn7" onMouseOver="top_btn7.src=btn_home_on.src"	onMouseOut="top_btn7.src=btn_home_off.src"></a></td>');

	if (page == "railcars") 
		{document.writeln('<td><img src="' + absURL + 'common_files/btn_railcars_on.gif" border="0" name="top_btn1"></td>');}
	 else 
		{document.writeln('			<td><a href="' + absURL + 'railcars/index.html"	><img src="' + absURL + 'common_files/btn_railcars_off.gif" border="0" name="top_btn1" onMouseOver="top_btn1.src=btn_railcars_on.src" onMouseOut="top_btn1.src=btn_railcars_off.src"></a></td>');}

	if (page == "components") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_components_on.gif"		border="0"	name="top_btn2"></td>');
	} else {
		document.writeln('			<td><a href="' + absURL + 'components/index.html"	><img src="' + absURL + 'common_files/btn_components_off.gif" border="0" name="top_btn2" onMouseOver="top_btn2.src=btn_components_on.src"	onMouseOut="top_btn2.src=btn_components_off.src"></a></td>');
	}

	if (page == "leasing") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_leasing_on.gif"		border="0"	name="top_btn3"></td>');
	} else {
		document.writeln('			<td><a href="' + absURL + 'leasing/index.html"		><img src="' + absURL + 'common_files/btn_leasing_off.gif"		border="0"	name="top_btn3" onMouseOver="top_btn3.src=btn_leasing_on.src"		onMouseOut="top_btn3.src=btn_leasing_off.src"></a></td>');
	}

	if (page == "fleet") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_fleet_on.gif"			border="0"	name="top_btn4"></td>');
	} else {
		document.writeln('			<td><a href="' + absURL + 'fleet/index.html"		><img src="' + absURL + 'common_files/btn_fleet_off.gif"			border="0"	name="top_btn4" onMouseOver="top_btn4.src=btn_fleet_on.src"			onMouseOut="top_btn4.src=btn_fleet_off.src"></a></td>');
	}
/*
	if (page == "european") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_european_on.gif"		border="0"	name="top_btn5"></td>');
	} else {
		document.writeln('			<td><a href="' + absURL + 'european/index.html"		><img src="' + absURL + 'common_files/btn_european_off.gif"		border="0"	name="top_btn5" onMouseOver="top_btn5.src=btn_european_on.src"		onMouseOut="top_btn5.src=btn_european_off.src"></a></td>');
	}
*/
	if (page == "quality") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_quality_on.gif"		border="0"	name="top_btn6"></td>');
	} else {
		document.writeln('			<td><a href="' + absURL + 'quality/index.html"		><img src="' + absURL + 'common_files/btn_quality_off.gif"		border="0"	name="top_btn6" onMouseOver="top_btn6.src=btn_quality_on.src"		onMouseOut="top_btn6.src=btn_quality_off.src"></a></td>');
	}
	document.writeln('			<td width="100%" background="' + absURL + 'common_files/hdr_tab_extender.gif"><img src="' + absURL + 'common_files/spacer.gif" border="0"></td>');
	document.writeln('		</tr>');
	document.writeln('	</table>');

}


function bottomNav(page) {

	document.writeln('	<table cellpadding="0" cellspacing="0" border="0" width="689">');
	document.writeln('		<tr>');
	document.writeln('			<td><img src="' + absURL + 'common_files/img_brownbar_bottom.gif"></td>');
	if (page == "about") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_about_on.gif"			border="0"	name="bot_btn1"></td>');
	} else {
		document.writeln('			<td><a href="' + absURL + 'about.html"		><img src="' + absURL + 'common_files/btn_about_off.gif"			border="0"	name="bot_btn1" onMouseOver="bot_btn1.src=btn_about_on.src"			onMouseOut="bot_btn1.src=btn_about_off.src"></a></td>');
	}

	if (page == "history") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_history_on.gif"		border="0"	name="bot_btn2"></td>');
	} else {
		document.writeln('			<td><a href="' + absURL + 'history.html"	><img src="' + absURL + 'common_files/btn_history_off.gif"			border="0"	name="bot_btn2" onMouseOver="bot_btn2.src=btn_history_on.src"		onMouseOut="bot_btn2.src=btn_history_off.src"></a></td>');
	}

	if (page == "officers") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_officers_on.gif"		border="0"	name="bot_btn3"></td>');
	} else {
		document.writeln('			<td><a href="' + absURL + 'officers.html"	><img src="' + absURL + 'common_files/btn_officers_off.gif"		border="0"	name="bot_btn3" onMouseOver="bot_btn3.src=btn_officers_on.src"		onMouseOut="bot_btn3.src=btn_officers_off.src"></a></td>');
	}

	if (page == "facilities") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_facilities_on.gif"		border="0"	name="bot_btn4"></td>');
	} else {
		document.writeln('			<td><a href="' + absURL + 'facilities.html"	><img src="' + absURL + 'common_files/btn_facilities_off.gif"		border="0"	name="bot_btn4" onMouseOver="bot_btn4.src=btn_facilities_on.src"	onMouseOut="bot_btn4.src=btn_facilities_off.src"></a></td>');
	}
/*
	if (page == "news") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_news_on.gif"			border="0"	name="bot_btn5"></td>');
	}	
	 else {
		document.writeln('			<td><a href="' + absURL + 'press/index.html"		><img src="' + absURL + 'common_files/btn_news_off.gif"			border="0"	name="bot_btn5" onMouseOver="bot_btn5.src=btn_news_on.src"			onMouseOut="bot_btn5.src=btn_news_off.src"></a></td>');

//		document.writeln('			<td><a href="http://www.trin.net/invsrela/press.html"	target="press"	><img src="' + absURL + 'common_files/btn_news_off.gif"			border="0"	name="bot_btn5" onMouseOver="bot_btn5.src=btn_news_on.src"			onMouseOut="bot_btn5.src=btn_news_off.src"></a></td>');
	}
*/
	if (page == "contact") {
		document.writeln('			<td><img src="' + absURL + 'common_files/btn_contact_on.gif"		border="0"	name="bot_btn6"></td>');
	} else {
		document.writeln('			<td><a href="' + absURL + 'contact.html"	><img src="' + absURL + 'common_files/btn_contact_off.gif"			border="0"	name="bot_btn6" onMouseOver="bot_btn6.src=btn_contact_on.src"		onMouseOut="bot_btn6.src=btn_contact_off.src"></a></td>');
	}
	document.writeln('		</tr>');
	document.writeln('	</table>');

}


//Function that flips the image and expands the table
function Expand(divBlock){
	alert(divBlock);
	if(window.top.getElementById(divBlock).style.display == 'none'){
		window.top.getElementById(divBlock).style.display = 'block';
	} else {
		window.top.getElementById(divBlock).style.display = 'none';
	}	
}


function openNewWindow(URLtoOpen, windowName, windowFeatures)  {
	newWindow=window.open(URLtoOpen,windowName,windowFeatures); 
}


function resizeWindow(w, h)  {
	window.resizeTo(w, h);
}



// -->
