<!--
var browser = navigator.userAgent.toLowerCase();
var coll = "";
var site = "http://www.supermotors.net"; //|!| CHANGE THIS VARIABLE|!|
var isNav = ((browser.indexOf('mozilla')!=-1) && (browser.indexOf('spoofer')==-1)
		&& (browser.indexOf('compatible') == -1) && (browser.indexOf('opera')==-1)
		&& (browser.indexOf('webtv')==-1) && (browser.indexOf('hotjava')==-1));
var isIE = ((browser.indexOf("msie") != -1) && (browser.indexOf("opera") == -1));
if (isIE) {
	coll=".all";
}

function getObj(targetName)
{
	if (document.all) {
		return document.all[targetName];
	} else if (document.getElementById) {
		return document.getElementById(targetName);
	}
}

function replace(string,text,by) {
// Replaces text with by in string
    var strLength = string.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return string;

    var i = string.indexOf(text);
    if ((!i) && (text != string.substring(0,txtLength))) return string;
    if (i == -1) return string;

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replace(string.substring(i+txtLength,strLength),text,by);

    return newstr;
}

function isAlpha(chr)
{
	if (!(((chr.charAt(0) >= "a") && (chr.charAt(0) <= "z")) || ((chr.charAt(0) >= "A") && (chr.charAt(0) <= "Z")))) {
		return false;
	} else {
		return true;
	}
}



function isNumeric(str)
{
	var aChar;
	for(var i=0; i!=str.length; i++)
		{
		aChar=str.substring(i,i+1)
		if(aChar < "0" || aChar > "9") {
			return false;
		}
	}
	return true;
}

function regURLover(id)
{
	window.status = site + "/?vID=" + id;
	return true;
}

function regURLout()
{
	window.status = "";
	return true;
}

function checkdate(strDate)
{
	//returns true if the date entered is valid, false if invalid
	//expects a date in mm/dd/yyyy or mm-dd-yyyy format
	//a 2-digit year will be converted according to the variables set below
	
	var reDateSplit = /\/|-/;	//dates may be split with either a / or a -
	var i;
	var r = false;				//the return value
	
	//the following variables are for handling valid year values
	var nDateThreshold = 83;	//if the two-digit year entereded is below this, we add nDateHighyear, else we add nDateLowyear
	var nDateHighyear = 2000;
	var nDateLowyear = 1900;
	var nDateMinyear = 1900;	//the lowest allowable year
	var nDateMaxyear = 3000;	//the highest allowable year
	//for example a year of "96" would not be below nDateThreshold, so we would add nDateLowyear to get 1996
	//a year of "95" would be below nDateThreshold, so we would add ndateHighyear to get 2095
	
	
	var aDatePieces = strDate.split(reDateSplit);
	if (aDatePieces.length == 3) {
		//we have 3 pieces of a date, continue processing
		if (aDatePieces[0].length < 3 && aDatePieces[1].length < 3) {
			//eliminate the cases where someone enters a date like 8/013/02 or something
			for (i=0; i<3; i++) {
				aDatePieces[i] = parseInt(aDatePieces[i], 10);	//turn each piece of the date into a base-10 integer (allows preceeding zeros)
			}
			if (aDatePieces[0] && aDatePieces[1]) {
				//month and day are above 0
				if (aDatePieces[0] <= 12 && ((aDatePieces[2] < 100) || (aDatePieces[2] > nDateMinyear && aDatePieces[2] < nDateMaxyear))) {
					//the month is between 1 and 12, AND...
					//the year is either a 2-digit year (0-99), or is a 4-digit year between nDateMinyear and nDateMaxyear
					switch (aDatePieces[0]) {
						case 1:
						case 3:
						case 5:
						case 7:
						case 8:
						case 10:
						case 12:
							r = (aDatePieces[1] < 32);
							break;
						case 4:
						case 6:
						case 9:
						case 11:
							r = (aDatePieces[1] < 31);
							break;
						default:
							//february, check for leap year
							if (aDatePieces[2] < 100) {
								//it's a 2-digit year (0-99), check the threshold
								if (aDatePieces[2] < nDateThreshold) {
									aDatePieces[2] += nDateHighyear;
								} else {
									aDatePieces[2] += nDateLowyear;
								}
							}
							if (((aDatePieces[2] % 4 == 0) && (aDatePieces[2] % 100 != 0)) || (aDatePieces[2] % 400 == 0)) {
								//it's a leap year, i.e.:
								//the year is divisible by 4 AND NOT divisible by 100, unless it's also divisible by 400
								r = (aDatePieces[1] < 30);
							} else {
								r = (aDatePieces[1] < 29);
							}
							break;
					}
				}
			}
		}
	}
	
	return r;
}

function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}
function FixCookieDate (date) {
	var base = new Date(0);
	var skew = base.getTime(); // dawn of (Unix) time - should be 0
	if (skew > 0)  // Except on the Mac - ahead of its time
		date.setTime (date.getTime() - skew);
}
function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
	}
	return null;
}

function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}
function DeleteCookie (name,path,domain) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

function ShowHelp(div, title, desc)
{
	div = document.getElementById(div);
	div.style.display = 'inline';
	div.style.position = 'absolute';
	div.style.width = '170';
	div.style.backgroundColor = 'lightyellow';
	div.style.border = 'dashed 1px black';
	div.style.padding = '10px';
	div.style.marginLeft = '7px';
	div.innerHTML = '<b>' + title + '</b><br><div>' + desc + '</div>';
}

function HideHelp(div)
{
	div = document.getElementById(div);
	div.style.display = 'none';
}

document.getElementsByClassName = function (needle)
{
  var         my_array = document.getElementsByTagName("*");
  var         retvalue = new Array();
  var        i;
  var        j;

  for (i = 0, j = 0; i < my_array.length; i++)
  {
    var c = " " + my_array[i].className + " ";
    if (c.indexOf(" " + needle + " ") != -1)
      retvalue[j++] = my_array[i];
  }
  return retvalue;
}

function addEvent(obj, evType, fn)
{
	if (obj.addEventListener)
	{
		obj.addEventListener(evType, fn, true);
		return true;
	}
	else if (obj.attachEvent)
	{
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	}
	else
	{
		return false;
	}
}

function HelpHover()
{
	this._mousePosX = 0;
	this._mousePosY = 0;
	this._hoverItem = null;
	this._hoverContents = null;
}

HelpHover.prototype.init = function()
{
	var hh = this;
	var helpItems = document.getElementsByClassName('hasHelp');
	for (var i=0; i<helpItems.length; i++)
	{
		helpItems[i].onmousemove = function(e)
		{
			if (!e) var e = window.event;
			if (e.pageX || e.pageY)
			{
				hh.mousePosX = e.pageX;
				hh.mousePosY = e.pageY;
			}
			else if (e.clientX || e.clientY)
			{
				hh.mousePosX = e.clientX + document.documentElement.scrollLeft;
				hh.mousePosY = e.clientY + document.documentElement.scrollTop;
			}
			hh._hoverItem = this;
			hh._hoverContents = document.getElementById(replace(this.id, "Thumb", "Help"));
			hh.move();
		}
		helpItems[i].onmouseout = function (e)
		{
			hh.out();
		}
	}
}

HelpHover.prototype.out = function()
{
	this._hoverContents.style.top = -10000+'px';
	this._hoverContents.style.left = -10000+'px';
	this._hoverItem = null;
	this._hoverContents = null;
}

HelpHover.prototype.move = function()
{
	/*
	These two lines are how you set where the floating layer will appear in relation to your mouse cursor.
	Currently it is set to appear 10 pixels to the right (X+10) and 10 pixels below (Y+10).
	If, for example, you wanted it 200 pixels to the left and 2 pixels below, you'd change this to:
	this._hoverContents.style.left = this.mousePosX-200+'px';
	this._hoverContents.style.top = this.mousePosY+2+'px';
	*/
	this._hoverContents.style.left = this.mousePosX+10+'px';
	this._hoverContents.style.top = this.mousePosY+10+'px';
}

addEvent(window, 'load', function()
{
	var hh = new HelpHover();
	hh.init();
});


-->

