﻿
  if (document.images)
   {
     pic0on= new Image(215,25);
     pic0on.src="images/menu/x-6022.gif";
     pic1on= new Image(215,25);
     pic1on.src="images/menu/x-litex-10022.gif";
     pic2on= new Image(215,25);
     pic2on.src="images/menu/n103n-com2.gif";
     pic3on= new Image(215,25);
     pic3on.src="images/menu/n102n-com2.gif";
     pic4on= new Image(215,25);
     pic4on.src="images/menu/n84n-com2.gif";
     pic5on= new Image(215,25);
     pic5on.src="images/menu/n102sn-com2.gif";
     pic6on= new Image(215,25);
     pic6on.src="images/menu/n43tn-com2.gif";
     pic7on= new Image(215,25);
     pic7on.src="images/menu/n43n-com2.gif";
     pic8on= new Image(215,25);
     pic8on.src="images/menu/n42n-com2.gif";
     pic9on= new Image(215,25);
     pic9on.src="images/menu/n302.gif";
     pic10on= new Image(215,25);
     pic10on.src="images/menu/cruise2.gif";
     pic11on= new Image(215,25);
     pic11on.src="images/menu/n-com2.gif";
     pic12on= new Image(215,25);
     pic12on.src="images/menu/n42en-com2.gif";
     pic13on= new Image(215,25);
     pic13on.src="images/menu/n202.gif";

     pic0off= new Image(215,25);
     pic0off.src="images/menu/x-602.gif";
     pic1off= new Image(215,25);
     pic1off.src="images/menu/x-litex-1002.gif";
     pic2off= new Image(215,25);
     pic2off.src="images/menu/n103n-com.gif";
     pic3off= new Image(215,25);
     pic3off.src="images/menu/n102n-com.gif";
     pic4off= new Image(215,25);
     pic4off.src="images/menu/n84n-com.gif";
     pic5off= new Image(215,25);
     pic5off.src="images/menu/n102sn-com.gif";
     pic6off= new Image(215,25);
     pic6off.src="images/menu/n43tn-com.gif";
     pic7off= new Image(215,25);
     pic7off.src="images/menu/n43n-com.gif";
     pic8off= new Image(215,25);
     pic8off.src="images/menu/n42n-com.gif";
     pic9off= new Image(215,25);
     pic9off.src="images/menu/n30.gif";
     pic10off= new Image(215,25);
     pic10off.src="images/menu/cruise.gif";
     pic11off= new Image(215,25);
     pic11off.src="images/menu/n-com.gif";
     pic12off= new Image(215,25);
     pic12off.src="images/menu/n42en-com.gif";
     pic13off= new Image(215,25);
     pic13off.src="images/menu/n20.gif";
   }

function lightup(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
    }
 }

function turnoff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
    }
 }


var dom = (document.getElementById) ? true : false;
var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ns4 = (document.layers && !dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

if (nodyn) { event = "nope" }

// Settings
var tipFollowMouse= true;
var tipWidth= 200;
var offX= 15;
var offY= 10;
var tipFontFamily= "Franklin Gothic Book, Verdana, arial, helvetica, sans-serif";
var tipFontSize= "8pt";
var tipFontColor= "#000000";
var tipBgColor= "#DDECFF";
var tipBorderColor= "#000000";
var tipBorderWidth= 1;
var tipBorderStyle= "ridge";
var tipPadding= 4;

// content, image, description, optional bgColor, optional textcolor
var messages = new Array();
messages[0] = new Array('images/helmets/mini/JPEG/x602-1.jpg','The X-602/601 Casey Stoner Replica is the same high quality Carbon, Kevlar, and fiberglass shell helmet used by Casey Stoner. It has all the top features and is backed by Nolan&#39;s 5 year warranty.',"#FFFFFF");
messages[1] = new Array('images/helmets/mini/JPEG/x1002-1.jpg','The X-1002 is a high quality modular helmet, which is equipped with a VPS sunshield (Vision Proteciton System)<br><br>Metallic Full-Face Modular Series<br>Flat Full-Face Modular Series.',"#FFFFFF");
messages[2] = new Array('images/helmets/mini/JPEG/n103ncom1.jpg','The N103 N-Com is the newest Nolan modular helmet, it features a one button chin release with elliptical chinbar rotation, quick release shield, internal sunscreen system, and the ability to accept the N-Com electronics system.<br>Solid Full-Face Modular Series<br>Outlaw Full-Face Modular Series<br>Motorrad Full-Face Modular Series',"#FFFFFF");
messages[3] = new Array('images/helmets/mini/JPEG/n1021.jpg','The N102 N-Com is the best selling modular helmet, it features a one button chin release, VPS system, and the ability to accept the N-Com electronics system.',"#FFFFFF");
messages[4] = new Array('images/helmets/mini/JPEG/n84ncom1.jpg','The N84 N-Com is the Nolan Full-Face N-Com enabled helmet, it features the ability to accept the new integrated N-Com electronics system in a full face motorcycle helmet design.<br>Solid Full-Face Series<br>Replica Full-Face Series<br>Voodo and Devil Full-Face Series',"#FFFFFF");
messages[5] = new Array('images/helmets/mini/JPEG/n102s1.jpg','The Nolan N102S N-Com is a value priced helmet and is the same as the N102 N-Com without the VPS system.',"#FFFFFF");
messages[6] = new Array('images/helmets/mini/JPEG/n43trilogyncom1.jpg','The N43 Trilogy N-Com is really 6 helmets in 1 with the ability to accept the new integrated N-Com electronics.<br>Solid Open-Face Series<br>Outlaw Open-Face Series<br>Motorrad Open-Face Series',"#FFFFFF");
messages[7] = new Array('images/helmets/mini/JPEG/n43ncom1.jpg','The N43 N-Com is a value priced N43 without the ability to reconfigure the helmet as in the N43 Trilogy series, it features the ability to accept the new integrated N-Com electronics system.',"#FFFFFF");
messages[8] = new Array('images/helmets/mini/JPEG/n421.jpg','The N42 N-Com is a fully equipped open face helmet, it features the VPS system and the ability to accept the new integrated N-Com electronics system in a streamlined profile.',"#FFFFFF");
messages[12] = new Array('images/helmets/mini/JPEG/n42encom7.jpg','The N42E N-Com is the new redesigned N42 N-Com, it has the features of the N42 N-Com as well as rear export vents, a rear spoiler, and the ability to accept the new integrated N-Com electronics system in a streamlined profile.',"#FFFFFF");
messages[9] = new Array('images/helmets/mini/JPEG/n301.jpg','The N30 is a new retro design offering which comes with a light blue shield.',"#FFFFFF");
messages[10] = new Array('images/helmets/mini/JPEG/cruise1.jpg','The Cruise has a high quality painted GE Lexan shell and Hi-Brite protective clear-coat.<br><br>Cruise Metallic Series<br>Cruise Outlaw Series.',"#FFFFFF");
messages[11] = new Array('images/ncom.jpg','The N-Com electronics package is available in customized configurations and delivers superb performance and a flush integrated fit within the N-Com ready helmets.',"#FFFFFF");
messages[13] = new Array('images/helmets/mini/JPEG/n201.jpg','The N20 Traffic is a stylish jet helmet, with exceptional finish and features for the scooter, vintage, or cruiser rider.<br>Outlaw Half-Helmet Series<br>Dash Half-Helmet Series<br>Player Half-Helmet Series',"#FFFFFF");

if (document.images) {
	var theImgs = new Array();
	for (var i=0; i<messages.length; i++) {
  	theImgs[i] = new Image();
		theImgs[i].src = messages[i][0];
  }
}

var startStr = '<table width="' + tipWidth + '"><tr><td align="center" width="100%"><img src="';
var midStr = '" border="0"></td></tr><tr><td valign="top">';
var endStr = '</td></tr></table>';

var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ns4)? document.tipDiv.document: (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = (ns4)? document.tipDiv: tooltip.style;
	if (ie4||ie5||ns5) {	// ns4 would lose all this on rewrites
		tipcss.width = tipWidth+"px";
		tipcss.fontFamily = tipFontFamily;
		tipcss.fontSize = tipFontSize;
		tipcss.color = tipFontColor;
		tipcss.backgroundColor = tipBgColor;
		tipcss.borderColor = tipBorderColor;
		tipcss.borderWidth = tipBorderWidth+"px";
		tipcss.padding = tipPadding+"px";
		tipcss.borderStyle = tipBorderStyle;
	}
	if (tooltip&&tipFollowMouse) {
		if (ns4) document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove = trackMouse;
	}
}

window.onload = initTip;

var t1,t2;	// for setTimeouts
var tipOn = false;	// check if over tooltip link
function doTooltip(evt,num) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	// set colors if included in messages array
	if (messages[num][2])	var curBgColor = messages[num][2];
	else curBgColor = tipBgColor;
	if (messages[num][3])	var curFontColor = messages[num][3];
	else curFontColor = tipFontColor;
	if (ns4) {
		var tip = '<table bgcolor="' + tipBorderColor + '" width="' + tipWidth + '" cellspacing="0" cellpadding="' + tipBorderWidth + '" border="0"><tr><td><table bgcolor="' + curBgColor + '" width="100%" cellspacing="0" cellpadding="' + tipPadding + '" border="0"><tr><td>'+ startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr + '</td></tr></table></td></tr></table>';
		tooltip.write(tip);
		tooltip.close();
	} else if (ie4||ie5||ns5) {
		var tip = startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr;
		tipcss.backgroundColor = curBgColor;
	 	tooltip.innerHTML = tip;
	}
	if (!tipFollowMouse) positionTip(evt);
	else t1=setTimeout("tipcss.visibility='visible'",100);
}

var mouseX, mouseY;
function trackMouse(evt) {
	mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
	mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	if (tipOn) positionTip(evt);
}

function positionTip(evt) {
	if (!tipFollowMouse) {
		mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
		mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ns4)? tooltip.width: (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ns4)? tooltip.height: (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns4||ns5)? window.innerWidth-20+window.pageXOffset: document.body.clientWidth+document.body.scrollLeft;
	var winHt = (ns4||ns5)? window.innerHeight-20+window.pageYOffset: document.body.clientHeight+document.body.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip
	if ((mouseX+offX+tpWd)>winWd)
		tipcss.left = (ns4)? mouseX-(tpWd+offX): mouseX-(tpWd+offX)+"px";
	else tipcss.left = (ns4)? mouseX+offX: mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt)
		tipcss.top = (ns4)? winHt-(tpHt+offY): winHt-(tpHt+offY)+"px";
	else tipcss.top = (ns4)? mouseY+offY: mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}

function changeImage(filename)
{
   document.mainimage.src = filename;
}
