
   NS4 = (document.layers);
   NS6 =  ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 5))
   IE4 = (document.all);
   MAC45 = (navigator.appVersion.indexOf("MSIE 4.5") != -1)
  ver4 = (NS4 || IE4);   
 isMac = (navigator.appVersion.indexOf("Mac") != -1);
 menuHeight=-29;
 menuOffset=258;
var overmenu = false;
var openmenu = null;
var overcheck = null;

//MM Scripts:
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//End MM
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}



//Resize and move the window
//function moveWindow()  {
//window.moveTo("6","6");
//}

//function resizeWindow() {
//window.resizeTo("810","575");
//} 

//Pop-up center Javascript:
<!-- Original:  Nannette Thacker (nannette@shiningstar.net) -->
<!-- Web Site:  http://www.shiningstar.net -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

var version4 = (navigator.appVersion.charAt(0) == "4"); 
var popupHandle;
function closePopup() {
if(popupHandle != null && !popupHandle.closed) popupHandle.close();
}

function displayPopup(position,url,name,height,width,evnt) {
  // position=1 POPUP: makes screen display up and/or left, down and/or right 
  // depending on where cursor falls and size of window to open
  // position=2 CENTER: makes screen fall in center
  var properties = "toolbar = 0, location = 0, height = " + height;
  properties = properties + ", width=" + width;
  var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
  if(navigator.appName == "Microsoft Internet Explorer") {
    screenY = document.body.offsetHeight;
    screenX = window.screen.availWidth;
  }
  else {
    screenY = window.outerHeight
    screenX = window.outerWidth
  }

  if(position == 3) {
    properties += ",scrollbars=1";
    position = 2;
  }

  if(position == 1)	{ // if POPUP not CENTER
    cursorX = evnt.screenX;
    cursorY = evnt.screenY;
    padAmtX = 10;
    padAmtY = 10;
    if((cursorY + height + padAmtY) > screenY) {
      // make sizes a negative number to move left/up
      padAmtY = (-30) + (height * -1);
      // if up or to left, make 30 as padding amount
    }
    if((cursorX + width + padAmtX) > screenX)	{
      padAmtX = (-30) + (width * -1);	
      // if up or to left, make 30 as padding amount
    }
    if(navigator.appName == "Microsoft Internet Explorer") {
      leftprop = cursorX + padAmtX;
      topprop = cursorY + padAmtY;
    }
    else {
      leftprop = (cursorX - pageXOffset + padAmtX);
      topprop = (cursorY - pageYOffset + padAmtY);
    }
  }
  else{
    leftvar = (screenX - width) / 2;
    rightvar = (screenY - height) / 2;
    if(navigator.appName == "Microsoft Internet Explorer") {
       leftprop = leftvar;
       topprop = rightvar;
    }
    else {
      leftprop = (leftvar - pageXOffset);
      topprop = (rightvar - pageYOffset);
    }
  }
  if(evnt != null) {
    properties = properties + ", left = " + leftprop;
    properties = properties + ", top = " + topprop;
  }
  closePopup();
  popupHandle = open(url,name,properties);
}


//Other scripts:

function FindLeftEdge(img) {
// Find Position of Image File
        xPos = img.offsetLeft;
        tempEl = img.offsetParent;
        while (tempEl != null) {
                xPos += tempEl.offsetLeft;
                tempEl = tempEl.offsetParent;
        }
        return xPos;
}

function FindTopEdge(img) {
// Find Position of Image File
        yPos = img.offsetTop;
        tempEl = img.offsetParent;
        while (tempEl != null) {
                yPos += tempEl.offsetTop;
                tempEl = tempEl.offsetParent;
        }
        if (MAC45) yPos=menuOffset;
        return yPos;
        }

function findloc (imgname)
// Find Position of Image File
{
var holdingImage = document.images[imgname];
var canvasLeft = (NS4 && !NS6) ? holdingImage.x : FindLeftEdge(holdingImage);
var canvasTop = (NS4 && !NS6) ? holdingImage.y : FindTopEdge(holdingImage);
var canvasWidth = holdingImage.width;
var canvasHeight = holdingImage.height;
return ([canvasLeft,canvasTop]);
}

function showMenu(imgname) 
// Show Menu Layer
{
        if (NS6) 
                menu=document.getElementById(imgname+"layer")
        else if (NS4)
                menu=eval("document.layers."+imgname+"layer")
        else
                menu=eval(imgname+"layer");
        if (NS4) menu.visibility = "show"
        else menu.style.visibility = "visible"
        openmenu=imgname;
}

function hideMenu() 
// Hide Menu Layer
{
if (openmenu != null)
        {
        if (NS6) 
                menu=document.getElementById(openmenu+"layer")
        else if (NS4)
                menu=eval("document.layers."+openmenu+"layer")
        else
                menu=eval(openmenu+"layer");
            if (NS4) menu.visibility = "hide"
            else menu.style.visibility = "hidden"
                unswap_img(openmenu)
        }
}

function popup (imgname)
// Pop Up Menu
{
        if (NS6) 
                menu=document.getElementById(imgname+"layer")
        else if (NS4)
                menu=eval("document.layers."+imgname+"layer")
        else
                menu=eval(imgname+"layer");
if (NS4)
{
        menu.top = findloc(imgname)[1]-1-menuHeight;
        menu.left = findloc(imgname)[0];
}
else if (NS6)
{
        menu.style.top = findloc(imgname)[1]-1-menuHeight;
        menu.style.left = findloc(imgname)[0];
}
else
{
        menu.style.pixelTop = findloc(imgname)[1]-1-menuHeight;
        menu.style.pixelLeft = findloc(imgname)[0];
}
showMenu(imgname);
}

function checkmenu (openmenu,check)
// Check to see if menu is open but not used, if so it is closed
{
if ((overmenu == 0) && (check == overcheck))
{
        if (NS6) 
                menu=document.getElementById(openmenu+"layer")
        else if (NS4)
                menu=eval("document.layers."+openmenu+"layer")
        else
                menu=eval(openmenu+"layer");
            if (NS4) menu.visibility = "hide"
            else menu.style.visibility = "hidden"
                unswap_img(openmenu)
}
}

function menutimeout (openmenu)
// quarter second timeout after mouse moves away from image in IE 
{
if (IE4){
overcheck=overcheck+1;
setTimeout("checkmenu(openmenu,"+overcheck+")",350);
}
}

function tocItem (name) {
this.on = new Image();
this.on.src = "/images/" + name + "-o.gif"
this.off = new Image();
this.off.src = "/images/" + name + ".gif"
}

function toc_new (name) {
tocItem[name] = new tocItem(name);
}

function swap_img (imgName, openmenu)
// Swap out image for mouseover event
{
if (document.images) {
if ((openmenu == null) || (IE4) || (NS6))
        document[imgName].src = tocItem[imgName].on.src
else
        {
        image= eval("document.layers."+openmenu+"layer.document.images['"+imgName+"']");
        image.src = tocItem[imgName].on.src;
        }
}
}

function unswap_img (imgName, openmenu)
// Return to original image
{
if (document.images) {
if ((openmenu == null) || (IE4) || (NS6))
    document[imgName].src = tocItem[imgName].off.src
else
        {
        image= eval("document.layers."+openmenu+"layer.document.images['"+imgName+"']");
        image.src = tocItem[imgName].off.src;
        }
}
}

if (document.images != null) {

//I have no idea what the hell this does or why it is here...
toc_new('nav1products');
toc_new('nav1downloads');
toc_new('nav1customerservice');
toc_new('nav1contactus');
toc_new('nav1dealers');
toc_new('nav1faq');
toc_new('nav1forum');
toc_new('nav1aboutus');
toc_new('nav1mailinglist');

toc_new('nav2products');
toc_new('nav2all');
toc_new('nav2digitalmediaplayers');
toc_new('nav2homeplayer');
toc_new('nav2portableplayer');
toc_new('nav2kenwoodmusickeg');
toc_new('nav2software');
toc_new('nav2accessories');
toc_new('nav2directions');
toc_new('nav2warranty');
toc_new('nav2updatingfirmware');

toc_new('nav2allaboutphatnoise');
toc_new('nav2ourmission');
toc_new('nav2phatnoiseinthenews');
toc_new('nav2pressreleases');
toc_new('nav2newsarchive');
toc_new('nav2plugins');

toc_new('nav3overview');
toc_new('nav3audi');
toc_new('nav3volkswagen');
toc_new('nav3kenwoodmusickeg');
toc_new('nav3acura');
toc_new('nav3bmw');
toc_new('nav3ferrari');
toc_new('nav3ford');
toc_new('nav3honda');
toc_new('nav3infiniti');
toc_new('nav3lexus');
toc_new('nav3lincoln');
toc_new('nav3mercury');
toc_new('nav3mini');
toc_new('nav3nissan');
toc_new('nav3porsche');
toc_new('nav3rangerover');
toc_new('nav3scion');
toc_new('nav3sony');
toc_new('nav3toyota');
toc_new('nav3trafficpro');
toc_new('nav3formats');
toc_new('nav3ssa');
toc_new('nav3standardinterface');
toc_new('nav3installation');
toc_new('nav3viot');
toc_new('nav3mazda');

toc_new('nav3musicmanager');
toc_new('nav3mediamanager');
toc_new('nav3cdmanager');
toc_new('nav3library');
toc_new('nav3encoder');
toc_new('nav3device');

toc_new('nav4stereos');
toc_new('nav4check');
}

