/*nav*/
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if(window.attachEvent){
	window.attachEvent("onload", sfHover);
}


/*expandable container*/
var one_is_expanded = false;
var two_is_expanded = false;
var three_is_expanded = false;

var content_tuneboy_program = '<h2><i>TuneBoy Diagnostics</i></h2>';

		content_tuneboy_program += '<h5>Virtual Dash</h5>';
		content_tuneboy_program += '<p>The TuneBoy program has four screens, the first screen provides a virtual dash, this displays data such as RPM, throttle position, engine temp, air pressure and build related info like the VIN.</p>';
		content_tuneboy_program += '<img src="images/VirtualDash.jpg" width="640" height="441" alt="Virtual Dash" />';
		content_tuneboy_program += '<p class="screenDisclaimer">Note: Screen layout above may differ, depending on bike Make and Model.</p>';
		content_tuneboy_program += '<p>The virtual dash has a button to reset the closed throttle position and a + and - button to allow adjustment of the Idle fuel trim (commonly referred to as CO adjustment).</p>';

		content_tuneboy_program += '<h5>Sensor Data</h5>';
		content_tuneboy_program += '<p>The second screen on the TuneBoy program is the sensor data screen, this screen shows all the current sensor info from the ECU, this includes injector pulse time, ignition timing temp sensor values as well as sensor voltage readings. This screen can be very helpful in tracking down a sensor or ignition coil that is starting to fail.</p>';
		content_tuneboy_program += '<img src="images/SensorData.jpg" width="640" height="441" alt="Sensor Data" />';
		content_tuneboy_program += '<p class="screenDisclaimer">Note: Screen layout above may differ, depending on bike Make and Model.</p>';
		content_tuneboy_program += '<p>All of the data and buttons on the virtual dash are also on this screen but are shown in text form rather than as a guage.</p>';
		
		content_tuneboy_program += '<h5>Error Codes</h5>';
		content_tuneboy_program += '<p>The error codes screen will list any errors that the ECU has detected, these are shown with the problem code Pnnnn and a line of text explaining what caused the error. Current running info at the time of the first error is displayed in the freeze frame data at the bottom of the screen.</p>';
		content_tuneboy_program += '<img src="images/Errors.jpg" width="640" height="441" alt="Error Codes" />';
		content_tuneboy_program += '<p class="screenDisclaimer">Note: Screen layout above may differ, depending on bike Make and Model.</p>';
		content_tuneboy_program += '<p>The clear all errors button will clear the errors from the ECU and turn off the malfunction light on the dash of the bike. If the problem still exists then the light will come back on and the error will again be logged.</p>';
		content_tuneboy_program += '<p>The refresh button will refresh the error list, this can be used to see if an error has come back after being cleared.</p>';
		
		content_tuneboy_program += '<h5>Test Modes</h5>';
		content_tuneboy_program += '<p>The last screen is the Test Modes screen, this screen allows you to start the system tests in the ECU, for example the thermo fan test will run the thermo fan for a number of seconds allowing you to check that the fan does not have a fault, other tests include the idle stepper motor, purge valve, rev counter and the fuel pump.</p>';
		content_tuneboy_program += '<img class="last" src="images/Tests.jpg" width="640" height="441" alt="Test Modes" />';
		content_tuneboy_program += '<p class="screenDisclaimer">Note: Screen layout above may differ, depending on bike Make and Model.</p>';

		
		
var content_tuneedit_program = '<h2><i>TuneEdit Mapping</i></h2>';					
		content_tuneedit_program += '<p class="first">The TuneEdit program is the most powerful program in the TuneBoy product as it allows you to fix all the problems with the standard Triumph, Aprilia or Benelli maps. Many of the mapping problems are not due to poor mapping but rather as a result of ride by noise and emission regulations. These intentional lean points in the maps can be fixed without needing to put the bike on a dyno.</p>';					
		content_tuneedit_program += '<p>The default mode for TuneEdit only shows two tables, these are the fuel trim table and ignition trim table. This is done so that the first time user can get up to speed without being overwhelmed by all the things that can be changed.</p>';					
		content_tuneedit_program += '<p>The following is a list of some of the tables the TuneEdit program can change, for more information see the documentation provided with the program.</p>';
							
		content_tuneedit_program += '<h5>Fuel Map</h5>';					
		content_tuneedit_program += '<p>The main fuel map is made up of a grid divided into 16 throttle points and 24 RPM points. The following screen shot shows the fuel map for a 2002 Daytona with sports exhaust. With the TuneEdit program you can change any part of this map, this allows very fine control over the fuel system and allows any changes to be catered for.</p>';					
		content_tuneedit_program += '<img src="images/FuelMap2.gif" width="640" height="351" alt="Fuel Map" />';					
		content_tuneedit_program += '<p>The bottom of the screen shows the current running data from the bike.</p>';					
		content_tuneedit_program += '<p>The Aprilia tunes have a map for each cylinder as the demands of the front and rear cylinders are very different</p>';					
		content_tuneedit_program += '<p>The fuel map can also be shown as a <a href="#3dgraph">3D Graph</a> to make it easier to see areas that need work.</p>';	
						
		content_tuneedit_program += '<h5>Ignition Map</h5>';					
		content_tuneedit_program += '<p>The ignition map is made up of a grid divided into 16 load points and 16 RPM points. The following screen shot shows the ignition map for a 2002 Daytona with sports exhaust. The values in the map are degree&rsquo;s before top dead centre.</p>';					
		content_tuneedit_program += '<img src="images/IgnitionMap2.gif" width="640" height="351" alt="Ignition Map" />';					
		content_tuneedit_program += '<p>The bottom of the screen shows the current running data from the bike.</p>';					
		content_tuneedit_program += '<h5>Fuel Trim Map</h5>';					
		content_tuneedit_program += '<p>The Fuel Trim Map provides a way to adjust the Fuel Map by a percentage, the Fuel Trim Map has a location corresponding to each location in the Fuel Map, the percentage adjustment for each trim map location is applied to the Fuel Map when you download the map to the bike.</p>';					
		content_tuneedit_program += '<img src="images/FuelTrimMap2.gif" width="640" height="351" alt="Fuel Trim Map" />';					
		content_tuneedit_program += '<p>To adjust this map simply click the spot you want to change and hit the PGUP or PGDN key to change the value. If you want to change multiple values you can select an area by clicking and dragging (a green square will appear) or by using the shift key and clicking the area you want to select to.</p>';					

		content_tuneedit_program += '<h5>Ignition Trim Map</h5>';					
		content_tuneedit_program += '<p>The Ignition Trim Map provides a way to offset the Ignition Map by a number of degree&rsquo;s, the Ignition Trim Map has a location corresponding to each location in the Ignition Map, the degree&rsquo;s adjustment for each trim map location is applied to the Ignition Map when you download the map to the bike.</p>';					
		content_tuneedit_program += '<img src="images/IgnitionTrimMap2.gif" width="640" height="351" alt="Ignition Trim Map" />';					
		content_tuneedit_program += '<p>The bottom of the screen shows the current running data from the bike.</p>';					
		
		content_tuneedit_program += '<h5>A/F Map</h5>';					
		content_tuneedit_program += '<p>The Air Fuel Target maps (A/F 1 and A/F 2) are used by the ECU to calculate the ratio to mix the air and fuel at, this provides us with a way to adjust the bikes mapping without needing a dyno. By simply adjusting the intentional lean areas (Anything over 13.5/1) you can make the bike run smoother and produce more power.</p>';					
		content_tuneedit_program += '<img src="images/AFMap2.gif" width="640" height="351" alt="A/F Map" />';					
		content_tuneedit_program += '<p>We suggest using values starting at 13.5 (bottom of the map) up to 12.8 (top of the map).</p>';		
					
		content_tuneedit_program += '<h5 id="3dgraph">3D Graph</h5>';					
		content_tuneedit_program += '<p>The TuneEdit program can display the data in table format or as a 3D surface graph.</p>';					
		content_tuneedit_program += '<p>Viewing the data graphically often highlights areas in the mapping that need adjustment.</p>';					
		content_tuneedit_program += '<p>This first graph is the fuel map from the latest sports pipe tune for the current model 955i Daytona. The axis for the graph are throttle position and RPM.</p>';					
		content_tuneedit_program += '<p>You can see from this graph that the map is not very smooth and in fact has many areas that don&rsquo;t look quite right, for example the point where the pink lines cross seems out of place with the surrounding points in the graph.</p>';					
		content_tuneedit_program += '<img src="images/10129FuelMap.gif" width="438" height="286" alt="3D Graph" />';					
		content_tuneedit_program += '<p>This next graph shows the same map after several runs on the dyno using TuneEdit to customize the map. You can clearly see that the map has taken on a much smoother look and jagged points in the graph have been cleaned up.</p>';					
		content_tuneedit_program += '<img src="images/3DGraph.gif" width="441" height="292" alt="3D Graph" />';			
				
		content_tuneedit_program += '<h5>Using trim Maps Off The Internet</h5>';					
		content_tuneedit_program += '<p>Another useful feature of the TuneEdit program is the ability to use trim maps that have been developed using a piggyback computer. The TuneEdit program allows you to apply a trim map to the Fuel Trim map, this has the same effect as having a piggyback computer with the trim map loaded, without having the liability of another point of failure. The TuneEdit software makes the piggyback computer hardware redundant.</p>';					
		content_tuneedit_program += '<p>The TuneEdit program will always get a better result than a piggyback computer because TuneEdit allows far more adjustment to accomodate your modifications.</p>';					
		content_tuneedit_program += '<p class="last">Why add another point for failure by wiring in more hardware when you can make the same changes inside the bikes ECU...</p>';					




var content_datalogger_program = '<h2><i>TuneBoy DataLogger</i></h2>';
		content_datalogger_program += '<p class="first">The TuneBoy Data Logger is a program designed to help users tune their bikes without using a dyno. It is a Visual Basic program that uses the TuneBoy DLL to collect information from the bike to display in a graphical format. Many of the mapping problems are not due to poor mapping but rather as a result of ride by noise and emission regulations. These intentional lean points in the maps can be fixed without needing to put the bike on a dyno.</p>';
		content_datalogger_program += '<p>The default mode for TuneEdit only shows two tables, these are the fuel trim table and ignition trim table. This is done so that the first time user can get up to speed without being overwhelmed by all the things that can be changed.</p>';
		content_datalogger_program += '<p>The following is a list of some of the tables the TuneEdit program can change, for more information you can download the full documentation from the <a href="tutorials_support.html#Download">Download</a> area on the Tutorials &amp; Support page.</p>';
		content_datalogger_program += '<p>The Data Logger program only has one screen, this displays the collected data in five line graphs, the five line graphs show Wheel Speed, RPM, Throttle Position, O2 voltage and Engine Temperature.</p>';
		content_datalogger_program += '<img src="images/DataLogger2.gif" width="640" height="414" alt="TuneBoy Data Logger" />';
		content_datalogger_program += '<p>When you start the Data Logger the &#34;Start Logging&#34; button will be disabled until the program connects to the bike. Once connected it will enable the button and show the VIN on the right side of the screen at the bottom.</p>';
		content_datalogger_program += '<p>When you click the Start Logging button the program will start to collect the information for the five graphs, unless you have removed the tick next to that data on the right of the screen.</p>';
		content_datalogger_program += '<p>To view the data just click &#34;Stop Logging&#34; then &#34;Display Log&#34;.</p>';
		content_datalogger_program += '<p class="last">You can drag the red or blue line to points in the graph, when you do this the data from that point is placed in the blue or red text fields on the right of the screen. If you click the zoom in button the graph will zoom in on the area between the red and blue lines.</p>';



function expandContent(id) {
	if (id == 'tuneboy_program') {
		if (one_is_expanded) {
			document.getElementById('tuneboy_program').style.height = "20px";
			document.getElementById('tuneboy_program').style.visibility = "hidden";
			document.getElementById('tuneboy_program').innerHTML = "";
			one_is_expanded = false;
		} else {
			document.getElementById('tuneboy_program').style.height = "100%"; //2510px
			document.getElementById('tuneboy_program').style.visibility = "visible";
			document.getElementById('tuneboy_program').innerHTML = content_tuneboy_program;
			one_is_expanded = true;
		}
	} else if (id == 'tuneedit_program') {
		if (two_is_expanded) {
			document.getElementById('tuneedit_program').style.height = "20px";
			document.getElementById('tuneedit_program').style.visibility = "hidden";
			document.getElementById('tuneedit_program').innerHTML = "";
			two_is_expanded = false;
		} else {
			document.getElementById('tuneedit_program').style.height = "100%"; //3830px
			document.getElementById('tuneedit_program').style.visibility = "visible";
			document.getElementById('tuneedit_program').innerHTML = content_tuneedit_program;
			two_is_expanded = true;
		}
	} else if (id == 'datalogger_program') {
		if (three_is_expanded) {
			document.getElementById('datalogger_program').style.height = "20px";
			document.getElementById('datalogger_program').style.visibility = "hidden";
			document.getElementById('datalogger_program').innerHTML = "";
			three_is_expanded = false;
		} else {
			document.getElementById('datalogger_program').style.height = "100%"; //920px
			document.getElementById('datalogger_program').style.visibility = "visible";
			document.getElementById('datalogger_program').innerHTML = content_datalogger_program;
			three_is_expanded = true;
		}
	}
}


