//Javascript

function preloadImages() {
        
        var preloadList = new Array(            
                "images/nav_selected_home.gif",
                "images/nav_unselected_home.gif",
                "images/nav_selected_about.gif",
                "images/nav_unselected_about.gif",
				"images/nav_selected_clothing.gif",
				"images/nav_unselected_clothing.gif",
				"images/nav_selected_downloads.gif",
				"images/nav_unselected_downloads.gif",
				"images/nav_selected_trucks.gif",
				"images/nav_unselected_trucks.gif",
				"images/nav_selected_news.gif",
				"images/nav_unselected_news.gif",
				"images/nav_selected_purchase.gif",
				"images/nav_unselected_purchase.gif",
				"images/nav_selected_links.gif",
				"images/nav_unselected_links.gif"
        ) 
}



function getDateStr(){
    var today = new Date()
    var todayStr = today.getMonth() + "/" + today.getDate() + "/" + today.getYear();
    return todayStr
    } 
	

function openWin(fileName) { 
//newwin = window.open(fileName,"height=400,width=600,scrollbars,resizable") ;
//alert(fileName + title);

newWin = window.open(fileName,"newWin","width=800,height=500,resizable=yes") ;

newWin.location.href = fileName;



}

	
function weight(s){
	var so = document.weight_form.menu.options[document.weight_form.menu.selectedIndex] ;
	var weight = so.value ;
	fileName = "chart_" + weight + "lbs.html";
	
	openWin(fileName);
	
}
function chooseWeight(s){

	var wieght75 = new Array (
	"Super-Light or Extra-Light",
	 "Super-Light or Extra-Light",
	"Max-Light",
	"Super-Light",
	"Super-Light",
	"Extra-Light",
	"Max-Light",
	"Super-Light",
	"Max-Light",
	"Super-Light",
	"Light",
	"Light");
	
	var wieght100 = new Array (
	"yo",
	 "this",
	"means",
	"you",
	"wieght",
	"100",
	"pounds",
	"Super-Light",
	"Max-Light",
	"Super-Light",
	"Light",
	"Light");

	var wieght125 = new Array (
	"kjkj",
	 "kj;jk",
	"means",
	"you",
	"kjlkjj",
	"125",
	"lkjlkjyy",
	"Super-Light",
	"Max-Light",
	"Super-Light",
	"Light",
	"Light");

	var wieght150 = new Array (
	"ggggg",
	 "kj;jk",
	"means",
	"you",
	"ttt",
	"150",
	"lkjlkjyy",
	"Super-Light",
	"Max-Light",
	"llll-Light",
	"oooooo",
	"pppppp");
	
	var so = s.options[s.selectedIndex] ;
	var weight = so.value ;

	
	 if (weight = "75") {		 
		for (cnt=0; cnt<document.weight_form.elements.length; cnt++) { 
			if (document.weight_form.elements[cnt].name == 'weightField') { 
			document.weight_form.elements[cnt].value = wieght75[cnt];
			}
		}
		}
	
	 if (weight = "100") {		 
		for (cnt=0; cnt<document.weight_form.elements.length; cnt++) { 
			if (document.weight_form.elements[cnt].name == 'weightField') { 
			document.weight_form.elements[cnt].value = wieght100[cnt];
			}
		}
		}
	 if (weight = "100") {		 
		for (cnt=0; cnt<document.weight_form.elements.length; cnt++) { 
			if (document.weight_form.elements[cnt].name == 'weightField') { 
			document.weight_form.elements[cnt].value = wieght100[cnt];
			}
		}
		}
}


var pic = null
var popImg = null  // use this when referring to pop-up image
var picTitle = null
var imgCount = 0
var imgWinName = "popImg"

function openPopImg(picName, windowTitle, windowWidth, windowHeight){
  closePopImg()
  picTitle = windowTitle
  imgWinName = "popImg" + imgCount++ //unique name for each pop-up window
  popImg = window.open(picName, imgWinName,
           "toolbar=no,scrollbars=no,resizable=no,width=" 
           + (parseInt(windowWidth)+20)  + ",height=" 
           + (parseInt(windowHeight)+15)) 
  }
  
function closePopImg(){    // close pop-up window if it is open 
  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(popImg != null) if(!popImg.closed) popImg.close() 
  }
  
function setStatus(msg){
  status = msg
  return true
  }
