// last modified script by Bernhard Friedrich; should work in all browsers
var a;
a=new Date(document.lastModified);
lm_year=a.getYear();lm_year=((lm_year<1000)?((lm_year<70)?2000:1900):0)+lm_year;
lm_month=a.getMonth()+1;lm_month=((lm_month<10)?'0':'')+lm_month;
lm_day=a.getDate();lm_day=((lm_day<10)?'0':'')+lm_day;


// get current year for copyright dates
var z=new Date();
var copy_year=z.getYear();copy_year=((copy_year<1000)?((copy_year<70)?2000:1900):0)+copy_year;


// functions for the Company Overview page
function coBtns(){
	// pre-load button images
	btn1off = new Image();
	btn1off.src = "images/btn_history1.gif";
	btn1on = new Image();
	btn1on.src = "images/btn_history2.gif";
	btn2off = new Image();
	btn2off.src = "images/btn_diemaking1.gif";
	btn2on = new Image();
	btn2on.src = "images/btn_diemaking2.gif";
	btn3off = new Image();
	btn3off.src = "images/btn_ourprocess1.gif";
	btn3on = new Image();
	btn3on.src = "images/btn_ourprocess2.gif";
	btn4off = new Image();
	btn4off.src = "images/btn_return1.gif";
	btn4on = new Image();
	btn4on.src = "images/btn_return2.gif";
}

function coBtnsOn(i){
	eval('document.btn_'+i+'.src=btn'+i+'on.src');
}

function coBtnsOff(i){
	eval('document.btn_'+i+'.src=btn'+i+'off.src');
}


// functions for the Major Markets page
function mmPics(){
	// pre-load images
	img1off = new Image();
	img1off.src = "images/mm_clear.gif";
	img1on = new Image();
	img1on.src = "images/mm_light_truck_auto_box.jpg";
	img2off = new Image();
	img2off.src = "images/mm_clear.gif";
	img2on = new Image();
	img2on.src = "images/mm_heavy_truck_highway_box.jpg";
	img3off = new Image();
	img3off.src = "images/mm_clear.gif";
	img3on = new Image();
	img3on.src = "images/mm_ord_box.jpg";
	img4off = new Image();
	img4off.src = "images/mm_clear.gif";
	img4on = new Image();
	img4on.src = "images/mm_pole_line_box.jpg";
	img5off = new Image();
	img5off.src = "images/mm_clear.gif";
	img5on = new Image();
	img5on.src = "images/mm_mining.jpg";
	img6off = new Image();
	img6off.src = "images/mm_clear.gif";
	img6on = new Image();
	img6on.src = "images/mm_valve_fitting_box.jpg";
}

function mmPicsOn(i){
	eval('document.img_1.src=img'+i+'on.src');
}

function mmPicsOff(i){
	eval('document.img_1.src=img'+i+'off.src');
}

function mmClick(){
	document.img_1.focus();
	return false;
}


// navigation buttons and links for Rex Forge site
function Nav(current) { 
	document.writeln('					<img src="images/clear.gif" width="160" height="1" alt=""><br>');

	if(current == 1){
		document.writeln('					<div align="left" class="menu-hi" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						HOME');
		document.writeln('					</div>');
	}else{
		document.writeln('					<div align="left" class="menu" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						<a href="index.html" class="menu">HOME</a>');
		document.writeln('					</div>');
	}

	if(current == 2){
		document.writeln('					<div align="left" class="menu-hi" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						MISSION STATEMENT');
		document.writeln('					</div>');
	}else{
		document.writeln('					<div align="left" class="menu" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						<a href="mission_statement.html" class="menu">MISSION STATEMENT</a>');
		document.writeln('					</div>');
	}

	if(current == 3){
		document.writeln('					<div align="left" class="menu-hi" style="padding-left: 10px; padding-bottom: 4px;">');
		document.writeln('						COMPANY OVERVIEW');
		document.writeln('					</div>');
		if(co_subsect == 1){
			document.writeln('					<div align="left" class="menu-hi" style="padding-left: 30px; padding-bottom: 4px;">');
			document.writeln('						HISTORY');
			document.writeln('					</div>');
		}else{
			document.writeln('					<div align="left" class="menu-hi" style="padding-left: 30px; padding-bottom: 4px;">');
			document.writeln('						<a href="co_history.html" class="menu">HISTORY</a>');
			document.writeln('					</div>');
		}
		if(co_subsect == 2){
			document.writeln('					<div align="left" class="menu-hi" style="padding-left: 30px; padding-bottom: 4px;">');
			document.writeln('						DIE MAKING');
			document.writeln('					</div>');
		}else{
			document.writeln('					<div align="left" class="menu-hi" style="padding-left: 30px; padding-bottom: 4px;">');
			document.writeln('						<a href="co_die_making.html" class="menu">DIE MAKING</a>');
			document.writeln('					</div>');
		}
		if(co_subsect == 3){
			document.writeln('					<div align="left" class="menu-hi" style="padding-left: 30px; padding-bottom: 9px;">');
			document.writeln('						OUR PROCESS');
			document.writeln('					</div>');
		}else{
			document.writeln('					<div align="left" class="menu-hi" style="padding-left: 30px; padding-bottom: 9px;">');
			document.writeln('						<a href="co_our_process.html" class="menu">OUR PROCESS</a>');
			document.writeln('					</div>');
		}
	}else{
		document.writeln('					<div align="left" class="menu" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						<a href="company_overview.html" class="menu">COMPANY OVERVIEW</a>');
		document.writeln('					</div>');
	}

	if(current == 4){
		document.writeln('					<div align="left" class="menu-hi" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						EQUIPMENT');
		document.writeln('					</div>');
	}else{
		document.writeln('					<div align="left" class="menu" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						<a href="equipment.html" class="menu">EQUIPMENT</a>');
		document.writeln('					</div>');
	}

	if(current == 5){
		document.writeln('					<div align="left" class="menu-hi" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						QUALITY');
		document.writeln('					</div>');
	}else{
		document.writeln('					<div align="left" class="menu" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						<a href="quality.html" class="menu">QUALITY</a>');
		document.writeln('					</div>');
	}

	if(current == 6){
		document.writeln('					<div align="left" class="menu-hi" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						ENVIRONMENT');
		document.writeln('					</div>');
	}else{
		document.writeln('					<div align="left" class="menu" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						<a href="environment.html" class="menu">ENVIRONMENT</a>');
		document.writeln('					</div>');
	}

	if(current == 7){
		document.writeln('					<div align="left" class="menu-hi" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						MAJOR MARKETS');
		document.writeln('					</div>');
	}else{
		document.writeln('					<div align="left" class="menu" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						<a href="major_markets.html" class="menu">MAJOR MARKETS</a>');
		document.writeln('					</div>');
	}

	if(current == 8){
		document.writeln('					<div align="left" class="menu-hi" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						CONTACT US');
		document.writeln('					</div>');
	}else{
		document.writeln('					<div align="left" class="menu" style="padding-left: 10px; padding-bottom: 9px;">');
		document.writeln('						<a href="contact_us.html" class="menu">CONTACT US</a>');
		document.writeln('					</div>');
	}

	document.writeln('					<br>');
}


function bottomNav(current) { 

	document.writeln('					<div align="center" class="med2" style="padding-top: 5px; padding-bottom: 5px;">');

	if(current == 1){
		document.writeln('						<span class="blink-dis">HOME</span> &nbsp;|&nbsp; ');
	}else{
		document.writeln('						<a href="index.html" class="blink">HOME</a> &nbsp;|&nbsp; ');
	}

	if(current == 2){
		document.writeln('						<span class="blink-dis">MISSION STATEMENT</span> &nbsp;|&nbsp; ');
	}else{
		document.writeln('						<a href="mission_statement.html" class="blink">MISSION STATEMENT</a> &nbsp;|&nbsp; ');
	}

	if(current == 3){
		document.writeln('						<span class="blink-dis">COMPANY OVERVIEW</span> &nbsp;|&nbsp; ');
	}else{
		document.writeln('						<a href="company_overview.html" class="blink">COMPANY OVERVIEW</a> &nbsp;|&nbsp; ');
	}

	if(current == 4){
		document.writeln('						<span class="blink-dis">EQUIPMENT</span> &nbsp;|&nbsp; ');
	}else{
		document.writeln('						<a href="equipment.html" class="blink">EQUIPMENT</a> &nbsp;|&nbsp; ');
	}

	if(current == 5){
		document.writeln('						<span class="blink-dis">QUALITY</span><br>');
	}else{
		document.writeln('						<a href="quality.html" class="blink">QUALITY</a><br>');
	}

	if(current == 6){
		document.writeln('						<span class="blink-dis">ENVIRONMENT</span> &nbsp;|&nbsp; ');
	}else{
		document.writeln('						<a href="environment.html" class="blink">ENVIRONMENT</a> &nbsp;|&nbsp; ');
	}

	if(current == 7){
		document.writeln('						<span class="blink-dis">MAJOR MARKETS</span> &nbsp;|&nbsp; ');
	}else{
		document.writeln('						<a href="major_markets.html" class="blink">MAJOR MARKETS</a> &nbsp;|&nbsp; ');
	}

	if(current == 8){
		document.writeln('						<span class="blink-dis">CONTACT US</span>');
	}else{
		document.writeln('						<a href="contact_us.html" class="blink">CONTACT US</a>');
	}

	document.writeln('					</div>');
}

