// JavaScript Document
// print out two parts of email address
// to protect from spam spiders
// <a href='mailto:joeSmith@gmail.com'>joeSmith@gmail.com</a>
function email(part1, part2)
{
  document.write("<a href='mailto:" + part1 + "@" + part2 + "'>"
  + part1 + "@" + part2 + "<a>");
}

// Simple Marquee / Ticker Script
// copyright 3rd January 2006, Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the below code in this script (including this
// comment) is used without any alteration

var tWidth='600px';                  // width (in pixels)
var tHeight='50px';                  // height (in pixels)
//var tcolour='#ffffcc';             // background colour:
var moStop=false;                    // pause on mouseover (true or false)
var tSpeed=1;                        // scroll speed (1 = slow, 5 = fast)

// enter your ticker content here (use \/ and \' in place of / and ' respectively)
var content='NO FILTER: ammonia 8.1ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'hydrogen sulfide 3ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'ammonia 9.5ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'hydrogen sulfide 3.2 ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'ammonia 6.4 ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'hydrogen sulfide 2.5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';

var cps=tSpeed; 
var aw, mq; 
var fsz = parseInt(tHeight) - 4; 

// display the color photo when user mouses over photo
// Parameter: current image marker
function showColor(whichPix)
{
	//alert("whichPix = " + whichPix);
	// Matt's photo
	if(whichPix == "matt")
	{
		// get a handle on the correct img tag
		var placeHolder = document.getElementById("Matt Johnson");
		// change the src attribute to the color image
		placeHolder.setAttribute("src", "graphic/matt.gif");
		
		// update the text description
		var description = document.getElementById("mattDescription");
		var text = "Matt Johnson (matt.johnson@eti-mn.com) Co-Founder, President  & CEO – Matt Johnson holds a B.A. in Business Administration with an emphasis in management from Bethany Lutheran College. Prior to co-founding Environmental Technologies Matt held the position of office manager at Dennis J. Johnson and Associates, Incorporated where he was involved in accounts payable/receivable, payroll, scheduling, strategic planning, and human resources.  In his role as President and CEO of Environmental Technologies Matt has numerous responsibilities.  He is involved in business development, management, marketing, sales, and strategic planning.";
		description.firstChild.nodeValue = text;
	}
	
	// Dennis' photo
	if(whichPix == "dennis")
	{
		// get a handle on the correct img tag
		var placeHolder = document.getElementById("Dennis Johnson");
		// change the src attribute to the color image
		placeHolder.setAttribute("src", "graphic/dennis.gif");
		// update the text description
		var description = document.getElementById("dennisDescription");
		var text = "Dennis Johnson (dennis.johnson@eti-mn.com) Co-Founder, Vice-President & Chief Technology Officer - Dennis Johnson holds a B.S. in Civil Engineering from the University of Minnesota and is a licensed professional engineer in the states of Minnesota, Iowa, South Dakota, and Indiana.  Prior to co-founding Environmental Technologies Dennis was the owner of Dennis J. Johnson and Associates, Incorporated, which was a consulting engineering firm located in Southwest Minnesota. That company, which Environmental Technologies grew from, was involved in water/wastewater, site design, and road construction projects for agricultural, industrial, and municipal clients over a 20 year period.  In addition to these projects, Dennis is an expert witness and has been called to testify in several trials due to his extensive agricultural knowledge.  In his role as Vice-President and Chief Technology Officer Dennis has numerous responsibilities.  He is involved in product design, project development, project management, research and development, and sales.";
		description.firstChild.nodeValue = text;
		}	
}

// display the B&W photo when user mouses out from photo
// Parameter: current image marker
function showBW(whichPix)
{
	//alert("whichPix = " + whichPix);
	// Matt's photo
	if(whichPix == "matt")
	{
		// get a handle on the correct img tag
		var placeHolder = document.getElementById("Matt Johnson");
		// change the src attribute to the color image
		placeHolder.setAttribute("src", "graphic/mattB&W.gif");
		// update the text description
		var description = document.getElementById("mattDescription");
		var text = "Matt Johnson";
		description.firstChild.nodeValue = text;	}
		
	// Dennis' photo
	if(whichPix == "dennis")
	{
		// get a handle on the correct img tag
		var placeHolder = document.getElementById("Dennis Johnson");
		// change the src attribute to the color image
		placeHolder.setAttribute("src", "graphic/dennisB&W.gif");
		// update the text description
		var description = document.getElementById("dennisDescription");
		var text = "Dennis Johnson";
		description.firstChild.nodeValue = text;
	}
}


function startticker()
{
	if (document.getElementById)
	{
		var tick = '<div style="position:relative;width:'+tWidth+';height:'+tHeight+';overflow:hidden;"';
		if (moStop)
		   tick += ' onmouseover="cps=0" onmouseout="cps=tSpeed"';
			
		tick +='><div id="mq" style="position:absolute;left:0px;top:0px;font-size:'+fsz+'px;white-space:nowrap;"><\/div><\/div>';
		document.getElementById('ticker').innerHTML = tick;
		mq = document.getElementById("mq");
		mq.style.left=(parseInt(tWidth)+10)+"px"; 
		mq.innerHTML='<span id="tx">'+content+'<\/span>'; aw = document.getElementById("tx").offsetWidth;
		lefttime=setInterval("scrollticker()",50);
	}
} 

function scrollticker()
{
	mq.style.left = (parseInt(mq.style.left)>(-10 - aw)) ?parseInt(mq.style.left)-cps+"px" : parseInt(tWidth)+10+"px";
}

function useBioFilter( )
{
	// set the variables to represent the biofilter figures
   tWidth='550px';                  // width (in pixels)
   tHeight='20px';                  // height (in pixels)
   tcolour='#ffffcc';               // background colour:
   moStop=false;                     // pause on mouseover (true or false)
   tSpeed=1;                        // scroll speed (1 = slow, 5 = fast)
	content='BIO-FILTER ON: ammonia 1.0ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'hydrogen sulfide .5ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'ammonia 1.2ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'hydrogen sulfide .3 ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'ammonia 0.9 ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'hydrogen sulfide .1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';

   // calculate out variables based on new information
   cps=tSpeed; 
   fsz = parseInt(tHeight) - 4; 
   // restart the ticker
	startticker( );
}

function noBioFilter( )
{
	// set the variables to represent the biofilter figures
   tWidth='600px';                  // width (in pixels)
   tHeight='50px';                  // height (in pixels)
   tcolour='#FFFFFF';               // background colour:
   moStop=false;                     // pause on mouseover (true or false)
   tSpeed=1;                        // scroll speed (1 = slow, 5 = fast)
	content='NO FILTER: ammonia 8.1ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'hydrogen sulfide 3ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'ammonia 9.5ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'hydrogen sulfide 3.2 ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'ammonia 6.4 ppm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'hydrogen sulfide 2.5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
   // calculate out variables based on new information
   cps=tSpeed; 
   fsz = parseInt(tHeight) - 4; 
   // restart the ticker
	startticker( );
}
window.onload=startticker;
                  