// Browser & Platform Variables
var platform = navigator.platform.substr(0,3);
var browser = navigator.appName;
var shortVersion = navigator.appVersion.substr(0,1);
var longVersion = navigator.appVersion;

// Variables needed for Rollovers
var over = 'no';
var whichOne = ' ';
var styleSheetElement;
var oldElement;


// Function to Assign the relative path to images and links
if (whichLevel == 0) {
	var path = '';
} else {
	var path = '../';
}


navHomeOn = new Image();
navHomeOn.src = "" + path +"images/nav_0_on.jpg";
navHomeOff = new Image();
navHomeOff.src = "" + path +"images/nav_0.jpg";

navAboutOn = new Image();
navAboutOn.src = "" + path +"images/nav_1_on.jpg";
navAboutOff = new Image();
navAboutOff.src = "" + path +"images/nav_1.jpg";

navProductsOn = new Image();
navProductsOn.src = "" + path +"images/nav_2_on.jpg";
navProductsOff = new Image();
navProductsOff.src = "" + path +"images/nav_2.jpg";
navProductsSelectOff = new Image();
navProductsSelectOff.src = "images/nav_2.jpg";

navReviewsOn = new Image();
navReviewsOn.src = "" + path +"images/nav_3_on.jpg";
navReviewsOff = new Image();
navReviewsOff.src = "" + path +"images/nav_3.jpg";

navEventsOn = new Image();
navEventsOn.src = "" + path +"images/nav_4_on.jpg";
navEventsOff = new Image();
navEventsOff.src = "" + path +"images/nav_4.jpg";

navInternationalOn = new Image();
navInternationalOn.src = "" + path +"images/nav_5_on.jpg";
navInternationalOff = new Image();
navInternationalOff.src = "" + path +"images/nav_5.jpg";

navContactOn = new Image();
navContactOn.src = "" + path +"images/nav_6_on.jpg";
navContactOff = new Image();
navContactOff.src = "" + path +"images/nav_6.jpg";

navDVDOn = new Image();
navDVDOn.src = "" + path +"images/nav_7_on.jpg";
navDVDOff = new Image();
navDVDOff.src = "" + path +"images/nav_7.jpg";


// function that turns on the main nav graphics as well as the menus
function menuOn(pic) {
	over = 'yes';
	var layerName = pic + 'Menu';
		styleSheetElement = document.getElementById(layerName);
		if(document.images) {
			if (whichOne != ' ') {
				if (currentSection != whichOne) {
				eval('document.images[whichOne].src = ' + whichOne + 'Off.src');
				}
				whichOne = whichOne + 'Menu';
				oldElement = document.getElementById(whichOne);
				oldElement.style.visibility = "hidden";
				
			}
			styleSheetElement.style.visibility = "visible";
			if (whichLevel == 1)  {
				eval('document.images[pic].src = ' + pic + 'On.src');
			} else {
				eval('document.images[pic].src = ' + pic + 'On.src');
			}
			whichOne = layerName;		
		}
	}



// Timer function that is run to give the user time to get to the menu from the button
function overChecker(pic) {
	if ((browser == 'Netscape') && (shortVersion < 5)) {
		off(pic);		
	}
	else {
		whichOne = pic;
		over = 'no';
		setTimeout("menuOff()", 900);
	}
}

// function that turns off the main nav graphics as well as the menus
function menuOff() 
{
	if (document.images) {
		if (over == 'no')  {	
			styleSheetElement.style.visibility = "hidden";
			if (currentSection != whichOne) {
				eval('document.images[whichOne].src = ' + whichOne + 'Off.src');
			}
		}	
	}
}


// Image replace On Function	
function on(pic) {
	document.images[pic].src = eval(pic + 'On.src');
}
        

// Image replace Off Function	
function off(pic) {
	document.images[pic].src = eval(pic + 'Off.src');
}

function showInfo(newText){
   document.getElementById('tabHolder').innerHTML = newText
}

function get_random()
{
    var ranNum= Math.floor(Math.random()*6);
    return ranNum;
}

function testimonials()
{
   var whichTestimonial=get_random();

    var testimonials=new Array(6)
     testimonials[0]='<div id="testimonials">The Big Mountain Series is by far the most exciting yet. It provides  the smooth, rhythmic  motions we love, with  just the right increase  in range of motion  and intensity for big  mountain <span style="white-space: nowrap;">skiing. <img src="../images/quotes_r.gif" alt="" width="16" height="13" border="0" style="vertical-align: top;" /></span></div><div id="testimonialsPerson">- John Crews<br />Skiing Magazine\'s Featured <br />Instructor, Sun Valley, ID</div>';
     testimonials[1]='<div id="testimonials">My S4 is a marvel. I have lost \'40 pounds\' of ugly fat. I ski like I did when I used to compete in freestyle events (now 40). Again, I ski only the black diamonds and the double blacks at Mammoth. My 10 year old son, who has been skiing one year, skis like an old pro now. He has also lost weight and improved his soccer skills. I am so pleased with my purchase. We have a number of machines at home that just sit and gather dust, not this one, we use it every day. Thank you Skier\'s <span style="white-space: nowrap;">Edge. <img src="../images/quotes_r.gif" alt="" width="16" height="13" border="0" style="vertical-align: top;" /></span></div><div id="testimonialsPerson">- K. Dube <br />Los Angeles, CA</div>';
     testimonials[2]='<div id="testimonials">Awesome machine - I am addicted to using it! Best trainer and fitness fun machine. You\'ll never get my Skier\'s Edge back!! It\'s <span style="white-space: nowrap;">great! <img src="../images/quotes_r.gif" alt="" width="16" height="13" border="0" style="vertical-align: top;" /></span></div><div id="testimonialsPerson">- L. Jickell <br />DeBary, FL</div>';
     testimonials[3]='<div id="testimonials">...Skier\'s Edge is a space-age product that a bear couldn\'t break but that a child can master in less than 10 <span style="white-space: nowrap;">minutes. <img src="../images/quotes_r.gif" alt="" width="16" height="13" border="0" style="vertical-align: top;" /></span></div><div id="testimonialsPerson">- Rich Benyo <br />San Francisco Chronicle</div>';
     testimonials[4]='<div id="testimonials">Truly awesome design &amp; manufacturing; I used to sell exercise equipment and the quality of the materials and manufacturing are on par with $3,000 - $5,000 <span style="white-space: nowrap;">machines. <img src="../images/quotes_r.gif" alt="" width="16" height="13" border="0" style="vertical-align: top;" /></span></div><div id="testimonialsPerson">- D. Libby <br />Denver, CO</div>';
     testimonials[5]='<div id="testimonials">My grandkids who were still in the snowplow class, worked on the Skier\'s Edge for two days and I still can\'t believe my eyes. The snowplow has disappeared, and they are both parallel skiing as if they had been on skis for years. Boy, what a <span style="white-space: nowrap;">difference! <img src="../images/quotes_r.gif" alt="" width="16" height="13" border="0" style="vertical-align: top;" /></span></div><div id="testimonialsPerson">- R. Van Sickler <br />Merrill, OR</div>';
  
   document.write(testimonials[whichTestimonial]);
  }