﻿

	function rw(txtStr) { document.write(txtStr) }

	//menu constructor
	function writeMainLinks(ref) {
	
		var refArrow = '&nbsp;<img src="images/nav/arrow_left_rBG.gif" alt="" height="9" width="9" border="0">';
		var dottedLine = '<div align="center"><img src="images/nav/hrz_dots_rBG.gif" alt="" height="1" width="168" border="0" vspace="3"></div>'
		var str = "";
	
		//loop through categories
		for(i=0;i<=category.length-1;i++) {
			rw('<div style="padding: 0px 0px 0px 8px">');
			
			//write category title bars
			if (category[i].href != 0) {
				rw('<a href="'+category[i].href+'" title="'+category[i].alt+'">');
				rw('<img src="'+category[i].source+'" alt="'+category[i].alt+'" width="212" height="27" border="0">');
				rw('</a>');
			}
			else {
				rw('<img src="'+category[i].source+'" alt="'+category[i].alt+'" width="212" height="27" border="0">');
			}
			
			rw('</div>');
				
			rw('<div class="linkbox">');
	
			//loop through and write links in a category
			for(j=0;j<=category[i].linkItem.length-1;j++ ) {
	
				rw('&nbsp;&nbsp;<a href="' + category[i].linkItem[j].href +'" title="' + category[i].linkItem[j].title + '" class="mainlink">' + category[i].linkItem[j].innerTxt + '</a>');
				
				if( category[i].linkItem[j].ref == ref ) {
					rw( refArrow );
				}
				
				if( j != category[i].linkItem.length-1 ) {
					rw(	dottedLine );
				}
	
			}
				
			rw('</div>');
		}
	
	}
	
	//title bar constructor
	function writeTitleBar() {
	rw('<div style="width:760px;height:106px">');
	rw('<a title="Click here for home page" href="index.asp"><img src="images/nav/titleBar_01.gif" alt="Bertrem Products Inc." width="458" height="106" border="0" /></a><img src="images/nav/titleBars_02.gif" alt="Engineered Solutions for Process Control Since 1985" width="301" height="106" border="0" />');
	rw('</div>');
	}
	
	//disclaimer
	function writeDisclaimer() {
		rw('<div style="padding: 10px 0px 25px 17px" align="left">');
		rw('<img src="images/nav/addressBar.gif" alt="" height="52" width="739" usemap="#map_addressbar" border="0" />');
		rw('<map name="map_addressbar"><area title="Have An Engineering Question - E-mail engineering@bertrem.com" shape="rect" coords="568,25,729,42" href="mailto:engineering@bertrem.com" alt="engineering@bertrem.com"><area title="Have Product Question - E-mail sales@bertrem.com" shape="rect" coords="573,6,698,22" href="mailto:sales@bertrem.com" alt="sales@bertrem.com"></map></div>');
	}
	
	
	//menu object prototypes
	function menuCat(href,imgSrc,alt) {
		this.href = (href != null || href != "" ? new String(href) : 0);
		this.source = new String(imgSrc);
		this.alt = (alt != null || alt != "" ? new String(alt) : "");
	}
	function menuLink(href,innerTxt,title,ref) {
		this.href = new String(href);
		this.innerTxt = new String(innerTxt);
		this.title = (title != null || title != "" ? new String(title) : "");
		this.ref = ref;
	}
	
	
	//menu and link objects
	var category = new Array();
	
		category[0] = new menuCat("index.asp","images/nav/link_title_01.gif","BPI Online");
		category[0].linkItem = new Array();
		with (category[0]) {
			linkItem[0] = new menuLink('about.htm','About Bertrem','Learn More About Bertrem Products, Inc.','about');
		//	linkItem[1] = new menuLink('#','Location &amp; Maps','Find Out Where Bertrem Products Is Located','location');
			linkItem[1] = new menuLink('contact.asp','Contact Us','All The Contact Information You Need To Know','contact');
			linkItem[2] = new menuLink('quote_request.asp','Quote Request','Fill out our online Quote Request form.','quote_request');
		}
			
		category[1] = new menuCat("","images/nav/link_title_02.gif","BPI e-solutions");
		category[1].linkItem = new Array();
		with (category[1]) {
			linkItem[0] = new menuLink('product_sheet.asp','Our Product Catalog','A Complete List Of Product Lines We Carry','product_sheet');
			linkItem[1] = new menuLink('regions.asp','Products By Region','Products Listed by Regions &amp; Territories','regions');
		//	linkItem[2] = new menuLink('#','Engineered Solutions','',8);
		//	linkItem[3] = new menuLink('#','Valve Solutions','',9);
			
			
			//arLinks1[3] = { href:'#', name:'Actuator &amp; Accessory<br>&nbsp;&nbsp;Solutions', title:'', tag: 9 };
			//arLinks1[4] = { href:'#', name:'Boiler Cleaning<br>&nbsp;&nbsp;Solutions', title:'', tag: 10 };
			//arLinks1[5] = { href:'#', name:'Plant Maintenance<br>&nbsp;&nbsp;Solutions', title:'', tag: 11 };
			//arLinks1[6] = { href:'#', name:'Pumps &amp; Miscellaneous', title:'', tag: 12 };
		}

