<!--
function openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) {
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
 newWin = window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
	newWin.focus();
}

function close_window(){
   if(newWin){
        newWin.close();
     newWin = null
    }
}

function SwapTopNav(btn,state){
	
	getWhere = document.hiddenvalues.whereAt.value;
	if(getWhere == 'bi' || getWhere == 'ss' || getWhere == 'ts' || getWhere == 'ra' || getWhere == 'rf' || getWhere == 'nv' || getWhere == 'ac'  && state == 'OUT'){
	       document[btn].src = '/Images/topnav/' + btn + '_down.jpg';
   }else{
	   chkTopNav();
	}   
//   if(getWhere == 'bi' || getWhere == 'ss' || getWhere == 'ts' || getWhere == 'ra' || getWhere == 'rf' || getWhere == 'nv' || getWhere == 'ac' ){
//        document[btn].src = '/Images/' + btn + '_down.jpg';
// }
	
	
	if(state == 'OVER'){
		document[btn].src = '/Images/topnav/' + btn + '_down.jpg';
		
	}else if(state == 'OUT' && getWhere != 'bi' || getWhere != 'ss' || getWhere != 'ts' || getWhere != 'ra' || getWhere != 'rf' || getWhere != 'nv' || getWhere != 'ac'){
	
		document[btn].src = '/Images/topnav/' + btn + '_up.jpg'
	}	
}

function setPurpose(){
	var i;
	var list = document.contact.SelectPurpose;
		
		for (i = 0; i < list.length; i++){
			selectedPurpose = list.options[list.selectedIndex].value;		
		}
			document.contact.SETPURPOSE.value = selectedPurpose;
}

function chkTopNav(){
		setWhere = document.hiddenvalues.whereAt.value;
	
		switch (setWhere){
            case 'bi':
			          document.btn_binoculars.src = '/Images/topnav/btn_binoculars_down.jpg';
                      document.all.NavBinocText.className = "Nav2";
                      
                      break;
			case 'ts':
			          document.btn_telescopes.src = '/Images/topnav/btn_telescopes_down.jpg';
                      document.all.NavTeleText.className = "Nav2";
                         break;
            case 'ss':
			          document.btn_spotting.src = '/Images/topnav/btn_spotting_down.jpg';
                      document.all.NavSpotText.className = "Nav2";
                          break;
            case 'ra':
			          document.btn_range.src = '/Images/topnav/btn_range_down.jpg';
                      document.all.NavRangeText.className = "Nav2";
                      
                          break;
            case 'rf':
			          document.btn_rifle.src = '/Images/topnav/btn_rifle_down.jpg';
                      document.all.NavRifleText.className = "Nav2";
                      
                          break;
            case 'nv':
			          document.btn_night.src = '/Images/topnav/btn_night_down.jpg';
                      document.all.NavNightText.className = "Nav2";
                      
                          break;
            case 'ac':
			          document.btn_accessories.src = '/Images/topnav/btn_accessories_down.jpg';
                      document.all.NavAccesText.className = "Nav2";
                      
					      break;
			default:
			       return true;   
       }
       
}

function gotoModel(form){
	
	var List = document[form].selectModel;
	//alert('HERE')
	if(List.options[List.selectedIndex].value == '0'){
		return false;
		}
	location = List.options[List.selectedIndex].value;
	//alert(location)
	
}

function gotoModel2(){
	
	var List = document.form2.selectModel2;
	//alert('HERE')
	if(List.options[List.selectedIndex].value == '0'){
		return false;
		}
	location = List.options[List.selectedIndex].value;
	//alert(location)
	
}

function SymError(){
  return true;
}
window.onerror = SymError;



function showImage(){

		var whatGroup = document.hiddenvalues.whereAt.value;
//alert('Top')
	switch (whatGroup){
            case 'bi':
			         var theImages = new Array()
			         theImages[0] = 'bi-1.jpg'
					 theImages[1] = 'bi-2.jpg'
					 theImages[2] = 'bi-3.jpg'
						break;
			case 'ts':
			         var theImages = new Array()
			         theImages[0] = 'ts-1.jpg'
					 theImages[1] = 'ts-2.jpg'
					 theImages[2] = 'ts-3.jpg'
                          break;
            case 'ss':
			         var theImages = new Array()
			         theImages[0] = 'ss-1.jpg'
					 theImages[1] = 'ss-2.jpg'
					 theImages[2] = 'ss-3.jpg'
                          break;
            case 'ra':
			         var theImages = new Array()
			         theImages[0] = 'ra-1.jpg'
					 theImages[1] = 'ra-2.jpg'
					 theImages[2] = 'ra-3.jpg'
                          break;
            case 'rf':
			         var theImages = new Array()
			         theImages[0] = 'rf-1.jpg'
					 theImages[1] = 'rf-2.jpg'
					 theImages[2] = 'rf-3.jpg'
                          break;
            case 'nv':
			         var theImages = new Array()
			         theImages[0] = 'nv-1.jpg'
					 theImages[1] = 'nv-2.jpg'
					 theImages[2] = 'nv-3.jpg'
                          break;
            case 'ac':
			         var theImages = new Array()
			         theImages[0] = 'GPS-1.jpg'
					 theImages[1] = 'GPS-2.jpg'
					 theImages[2] = 'GPS-3.jpg'
					      break;
			default:
			       //alert(whatGroup);
			       document.topImage.src ='http://www.binocularsdirect.com/images/topnav/placeholder.jpg'
			       return true;   
       }
       
       if (whatGroup == ''){
			
			return true;
			
		}else{
			var j = 0
			var p = theImages.length;
			
			var preBuffer = new Array()
				for (i = 0; i < p; i++){
					preBuffer[i] = new Image()
					preBuffer[i].src = theImages[i]
				}
				
				var whichImage = Math.round(Math.random()*(p-1));
	//alert(whichImage)
			document.topImage.src ='http://www.binocularsdirect.com/images/'+theImages[whichImage]
		}

}

//-->
