// JavaScript Document

<!--

// begin flash detection code)

function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}

// end flash detection






/*  EXPIRE IMAGE SCRIPT (HOLIDAYS, PROMOS, ETC.) */

//set the below to the image you wish to use as the "new" image
var imagetag='<a href="giveaways/holiday07_promo.htm" target="_blank" title="$25 Cashback Offer"><img src="images/homepage/552x420_25cashback.jpg" border="0"></a>'
var today=new Date()
function expireat(expiredate){
var expire=new Date(expiredate)
if (today.getTime()<=expire.getTime())
document.write(imagetag)
}






// RANDOM IMAGE CODE (QUICKLINKS)
<!--
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];
		}
	}
}
// -->


// begin printer friendly
function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}
// end printer friendly



function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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_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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



// JUMP MENU
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}




// BEGIN OLD MENU PROPERTIES (FROM JB's ORIGINAL MENU)
// THIS IS NOT USED ANYMORE (ACCEPT ON OUTDATED PAGES THAT MAY BE MISSED)
function mmLoadMenus() {
  if (window.mm_menu_0012093934_0) return;
  window.mm_menu_0012093934_0 = new Menu("root",52,20,"Verdana, Arial, Helvetica, sans-serif",12,"#333333","#999999","","#f0f0f0","center","middle",2,0,1000,0,0,true,false,false,0,true,true);
  mm_menu_0012093934_0.addMenuItem("History","location='http://www.traxxas.com/about/trx_about_history.htm'");
  mm_menu_0012093934_0.addMenuItem("Jobs","location='http://www.traxxas.com/about/trx_about_jobs.htm'");
   mm_menu_0012093934_0.hideOnMouseOut=true;
   mm_menu_0012093934_0.menuBorder=0;
   mm_menu_0012093934_0.menuItemBorder=0;
   mm_menu_0012093934_0.menuLiteBgColor='#ffffff';
   mm_menu_0012093934_0.menuBorderBgColor='#555555';
   mm_menu_0012093934_0.bgColor='#999999';
  window.mm_menu_0012100740_1 = new Menu("root",81,20,"Verdana, Arial, Helvetica, sans-serif",12,"#333333","#999999","","#f0f0f0","center","middle",2,0,1000,0,0,true,false,false,0,true,true);
  mm_menu_0012100740_1.addMenuItem("Nitro","location='http://www.traxxas.com/products/trx_nitro.htm'");
  mm_menu_0012100740_1.addMenuItem("Electric","location='http://www.traxxas.com/products/trx_electric.htm'");
  mm_menu_0012100740_1.addMenuItem("Marine","location='http://www.traxxas.com/products/trx_marine.htm'");
  mm_menu_0012100740_1.addMenuItem("Accessories","location='http://www.traxxas.com/products/trx_accessories.htm'");
   mm_menu_0012100740_1.hideOnMouseOut=true;
   mm_menu_0012100740_1.menuBorder=0;
   mm_menu_0012100740_1.menuItemBorder=0;
   mm_menu_0012100740_1.menuLiteBgColor='#ffffff';
   mm_menu_0012100740_1.menuBorderBgColor='#555555';
   mm_menu_0012100740_1.bgColor='#999999';
  window.mm_menu_0012100806_2 = new Menu("root",105,20,"Verdana, Arial, Helvetica, sans-serif",12,"#333333","#999999","","#f0f0f0","center","middle",2,0,1000,0,0,true,false,false,0,true,true);
  mm_menu_0012100806_2.addMenuItem("Surfer's&nbsp;Rides","location='http://monster.traxxas.com/photopost/'");
  mm_menu_0012100806_2.addMenuItem("Message&nbsp;Board","location='http://monster.traxxas.com'");
   mm_menu_0012100806_2.hideOnMouseOut=true;
   mm_menu_0012100806_2.menuBorder=0;
   mm_menu_0012100806_2.menuItemBorder=0;
   mm_menu_0012100806_2.menuLiteBgColor='#ffffff';
   mm_menu_0012100806_2.menuBorderBgColor='#555555';
   mm_menu_0012100806_2.bgColor='#999999';
  window.mm_menu_0012100832_3 = new Menu("root",57,20,"Verdana, Arial, Helvetica, sans-serif",12,"#333333","#999999","","#f0f0f0","center","middle",2,0,1000,0,0,true,false,false,0,true,true);
  mm_menu_0012100832_3.addMenuItem("General","location='http://www.traxxas.com/support/index.php?action=show&cat=127'");
  mm_menu_0012100832_3.addMenuItem("Nitro","location='http://www.traxxas.com/support/index.php?action=artikel&cat=129&id=433'");
  mm_menu_0012100832_3.addMenuItem("Electric","location='http://www.traxxas.com/support/index.php?action=artikel&cat=128&id=432'");
   mm_menu_0012100832_3.hideOnMouseOut=true;

   mm_menu_0012100832_3.menuBorder=0;
   mm_menu_0012100832_3.menuItemBorder=0;
   mm_menu_0012100832_3.menuLiteBgColor='#ffffff';
   mm_menu_0012100832_3.menuBorderBgColor='#555555';
   mm_menu_0012100832_3.bgColor='#999999';
  window.mm_menu_0012101217_4 = new Menu("root",100,20,"Verdana, Arial, Helvetica, sans-serif",11,"#333333","#999999","","#f0f0f0","center","middle",2,0,1000,0,0,true,false,false,0,true,true);
 // mm_menu_0012101217_4.addMenuItem("Rebate&nbsp;Center","location='http://www.traxxas.com/support/index.php?action=artikel&cat=167&id=578'");
  mm_menu_0012101217_4.addMenuItem("Knowledge&nbsp;Base","location='http://www.traxxas.com/support/index.htm'");
  mm_menu_0012101217_4.addMenuItem("Contact&nbsp;Info","location='http://www.traxxas.com/support/index.php?action=artikel&cat=127&id=449'");
  mm_menu_0012101217_4.addMenuItem("Useful&nbsp;links","location='http://www.traxxas.com/support/index.php?action=artikel&cat=34&id=479'");
  mm_menu_0012101217_4.addMenuItem("Manuals","location='http://www.traxxas.com/support/index.php?action=artikel&cat=165&id=518'");
   mm_menu_0012101217_4.hideOnMouseOut=true;
   mm_menu_0012101217_4.menuBorder=0;
   mm_menu_0012101217_4.menuItemBorder=0;
   mm_menu_0012101217_4.menuLiteBgColor='#ffffff';
   mm_menu_0012101217_4.menuBorderBgColor='#555555';
   mm_menu_0012101217_4.bgColor='#999999';

  mm_menu_0012101217_4.writeMenus();
} // mmLoadMenus()

// END OLD MENU PROPERTIES (FROM JB's ORIGINAL MENU)





// SETUPS: POP-IMAGES OPEN TO EXACT IMAGE SIZE
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 0;
PositionY = 0;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 800;
defaultHeight = 600;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}


// -->

