// JavaScript Document

//  An email address service routine (partly courtesy of Actinic)
//  <a href="mailto:chrishutchins@btinternet.com">chrishutchins@btinternet.com</a>

function ee_mto (mad) {
	_ad = mad.replace(/&/,"@");
	document.write("<a href=\"mailto:" + _ad + "\">" + _ad + "</a>");
	return;
}

function ee_rhcolimg (i) {
/* selection of images for the rh column */
	var _img = new Array();
	_img[0] = "";
	_img[1] = "psvisolation.jpg";
	_img[2] = "nshazardex.jpg";
	_img[3] = "waanpower.jpg";
	_img[4] = "iiprocess.jpg";
	_img[5] = "trs2300004.jpg";
	_img[6] = "eicshell24.jpg";
	_img[7] = "mathpsteamdrum.jpg";
	_img[8] = "wpbpstoragetank.jpg";
	_img[9] = "pubvopak.jpg";
	_img[10] = "msstcwg.jpg";
	
	if (i) {
		disp = i;
	} else {
		disp = Math.floor(Math.random()*_img.length);
	}
	
	if (disp==0) {
		disp++;
	}
	
	//alert("index="+disp);
	
	document.write('<img src="images9/' + _img[disp] + '" width="268" height="201">');
	
	
	
}

function ee_topimage() {
/* adds flexibility to change the top inage without changing the site */

	var _img = new Array();
	_img[0] = "top_12.jpg";
	_img[1] = "";

	var disp = 0;
	
	document.write('<img src="images9/' + _img[disp] + '" width="257" height="86" style="padding:19px 0 0 7px;">');
	
}

function ee_public_footer_buttons() {
/* adds flexibility to change the footer buttons without changing the site */

document.write('<div id="ibbuttons" style="width:975px;">');
document.write('<table width="850" border="0" cellspacing="0" cellpadding="0"><tr><td width="22">&nbsp;</td>');
document.write('<td width="123"><a href="mem_about.htm"><img src="images9/ejoin_but.jpg" width="105" height="68"  border="0"></a></td>');
document.write('<td width="123"><a href="http://www.eemua.org/acatalog/shop.html"><img src="images9/eshop_but.jpg" width="105" height="68" border="0"></a></td>');
document.write('<td width="185"><a href="compex_scheme.htm"><img src="images9/compex-supporter-WEB-RGB-72dpi_v2.gif" width="167" height="68" border="0"></a></td>');
document.write('<td width="123"><a href="about_ecui.htm"><img src="images9/ecui_but.jpg" width="105" height="68" border="0"></a></td>');
document.write('<td width="123"><a href="http://www.eemuawiki.co.uk/"><img src="images9/ew_but.jpg" width="105" height="68" border="0"></a></td>');
document.write('<td width="123"><a href="incidentreporter.htm"><img src="images9/ir_but.jpg" width="105" height="68" border="0"></a></td>');
<!--document.write('<td width="185">&nbsp;</td>');-->
document.write('<td width="25">&nbsp;</td></tr></table></div>');

}

function ee_public_footer_todate() {
/* neutralises year-end date-change problem in copyright */
d = new Date();
var yr = new String(d.getFullYear()); 
document.write(yr.substr(2,2));
}

function ee_public_footer_legals() {
/* legal statement of company name and address */
document.write("The Engineering Equipment and Materials Users' Association is a company limited by guarantee and registered in England<br>"+
               "Company number 477838. Registered address: 63 Mark Lane, London EC3R 7NQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
}



