
// TRAILER MODELS	
var tr=new Array("voyager","magnum","economax","versamax","atv","s3k","s7k","s10k","s12k","s14k","titan");	
var page_types=new Array("about","_pres","_std_feat","_opt_feat","_logo");	
var presentations=new Array("home_pres","tj_pres","stabjack1_pres","stabjack2_pres","foldup_pres","foldup2_pres","protectedlights_pres","protectedwires_pres","tiedown_pres","sog_pres","sturdyfenders_pres","duraguard_pres","ramphardware_pres","acculube_pres","boxtubeframe_pres","ptdeck_pres","colorchoices_pres","dring_pres","tirecarrier1_pres","tirecarrier2_pres","voy_opt_cover_pres","mag_opt_cover_pres","voyager_5K_pres","voyager_tandem_pres","magnum_tandem_pres","voyager_stobox_pres","voyager_ebrake_pres","voy_rampgate_pres","mag_rampgate_pres","stakepockets_pres","ladderramp_pres","wireharness_pres","dovetail_pres","tailslot_pres","econo_ramp_pres","tubeframe_pres","versamax_opt_roller_pres","versamax_opt_ramp_pres","magfoldup_pres","mag_sog_pres","voy_colorchoices_pres","econ_foldup_pres","s3k_foldup_pres","s3k_tirecarrier_pres","mag_sturdyfenders_pres");

// tracks whether a model has been viewed.
var voyager_viewed=0;
var magnum_viewed=0;
var economax_viewed=0;
var versamax_viewed=0;
var atv_viewed=0;
var s7k_viewed=0;
var s3k_viewed=0;
var s10k_viewed=0;
var s12k_viewed=0;
var s14k_viewed=0;
var titan_viewed=0;

//-------> Utils
function off(o) {
  if (document.getElementById(o)!=null)
      document.getElementById(o).style.display = "none";         
}
function on(o,h) {
  if (document.getElementById(o)!=null) {
     document.getElementById(o).style.display = "block";
     if (h!=null) document.getElementById(o).style.height = h;
  }
}
//------> Utils


function home_pres_on() {
//  if (document.getElementById('faq').style.display=="block") return;
//  if (document.getElementById('whyironeagle').style.display=="block") return;
//  if (document.getElementById('myGallerySet').style.display=="block") return;
  turn_off_pres();
  on('home');  
  on('home_models')
  on('home_pres_new');  
  on('home_logo');  
}

// turns on "Why an Iron Eagle Trailer div...
function turnonWhyIET() {
   turn_off_pages();
   turn_off_logos();
   set_container_sizes('whyironeagle');                         
   on('why_iet_logo');   
}

function resetTabs() {
  document.getElementById('qtab_home').innerHTML = "<img src='qtabs/qtblue-47x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>Home</font>";        
  document.getElementById('qtab_voyager').innerHTML = "<img src='qtabs/qtblue-69x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>Voyager</font>";        
  document.getElementById('qtab_magnum').innerHTML = "<img src='qtabs/qtblue-69x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>Magnum</font>";        
  document.getElementById('qtab_economax').innerHTML = "<img src='qtabs/qtblue-69x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>Economax</font>";          
  document.getElementById('qtab_versamax').innerHTML = "<img src='qtabs/qtblue-69x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>Versamax</font>";          
  document.getElementById('qtab_s3k').innerHTML = "<img src='qtabs/qtblue-47x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>3000</font>";        
  document.getElementById('qtab_atv').innerHTML = "<img src='qtabs/qtblue-47x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>Atv</font>";          
  document.getElementById('qtab_s7k').innerHTML = "<img src='qtabs/qtblue-47x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>7000</font>";          
  document.getElementById('qtab_s10k').innerHTML = "<img src='qtabs/qtblue-47x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>10K</font>";          
  document.getElementById('qtab_s12k').innerHTML = "<img src='qtabs/qtblue-47x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>12K</font>";          
  document.getElementById('qtab_s14k').innerHTML = "<img src='qtabs/qtblue-47x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>14K</font>";        
  document.getElementById('qtab_titan').innerHTML = "<img src='qtabs/qtblue-91x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>Titan Series</font>";        
}


// o = model, ie. voyager, s3k
// n = Name,  ie. Voyager, 3000
// s = Size, Tab size, ie. 69
function blueadj(o,n,s) {
     resetTabs();
     document.getElementById('qtab_'+o).innerHTML = "<img src='qtabs/qt-clr-"+s+"x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>"+n+"</font>";        
     if (eval(o+"_viewed")==0) {
         document.getElementById(o+'_ff0').style.border = "solid 4px blue";
     }
     about(o);
     features(o+'_home_feat',o,null,null);
}

<!--- BEGIN generic Trailer methods -->
function turnonTrailer(o) {
   turn_off_pages();
   turn_off_logos();                     
   if (o=="voyager") {  
     blueadj(o,'Voyager',69);
     voyager_viewed=1;     
     setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;
   } 
   if (o=="magnum") {
     blueadj(o,'Magnum',69);
     magnum_viewed=1;
     setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;
   }
   if (o=="economax") {
     blueadj(o,'Economax',69);
     economax_viewed=1;
     setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;
   }
   if (o=="versamax") {
     blueadj(o,'Versamax',69);
     versamax_viewed=1;setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;
   }
   if (o=="s3k") {
     blueadj(o,'3000',47);
     s3k_viewed=1;
     setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;
   }
   if (o=="atv") {
     blueadj(o,'Atv',47);
     atv_viewed=1;
     setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;    
   }
   if (o=="s7k") {
     blueadj(o,'7000',47);
     s7k_viewed=1;
     setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;    
   }
   if (o=="s10k") { 
     blueadj(o,'10k',47);
     s10k_viewed=1;
     setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;     
   }
   if (o=="s12k") {
      blueadj(o,'12k',47);
     s10k_viewed=1;
     setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;
   }
   if (o=="s14k") {
      blueadj(o,'14k',47);
     s10k_viewed=1;
     setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;
   }
   if (o=="titan") {
      blueadj(o,'Titan Series',91);
     titan_viewed=1;
     setModelHomeState(1);
      turnOnBtns(o);
      scroll(0,0);
     return;
   }

   about(o);  
}

function set_container_sizes(o) {  
  if (o=="voyager"|o=="voyager_std_feat"|o=="voyager_opt_feat"|o=="magnum"|o=="magnum_std_feat"|o=="magnum_opt_feat" | o=="atv"|o=="atv_std_feat"|o=="atv_opt_feat") {        
    document.getElementById('container').style.height = "1050px";            
    document.getElementById(o).style.height = "900px";                
  }
 else if (o=="s3k"|o=="s3k_std_feat"|o=="s3k_opt_feat"|o=="economax"|o=="economax_std_feat"|o=="economax_opt_feat" | o=="s7k"|o=="s7k_std_feat"|o=="s7k_opt_feat") {        
    document.getElementById('container').style.height = "1050px";            
    document.getElementById(o).style.height = "900px";                
  }  
 else if (o=="versamax"|o=="versamax_std_feat"|o=="versamax_opt_feat") {        
    document.getElementById('container').style.height = "1050px";            
    document.getElementById(o).style.height = "900px";                
  }
  else if (o=="s12k"|o=="s12k_std_feat"|o=="s12k_opt_feat"|o=="s10k"|o=="s10k_std_feat"|o=="s10k_opt_feat" | o=="s7k"|o=="s7k_std_feat"|o=="s7k_opt_feat") {        
    document.getElementById('container').style.height = "1050px";            
    document.getElementById(o).style.height = "900px";                
  }
 else if (o=="home") {     
    document.getElementById('container').style.height = "1350px";            
    on(o,"1190px");                
  }
  else if (o=="locator") {     
    document.getElementById('container').style.height = "1250px";            
    on(o,"998px");                
  }
 else if (o=="whyironeagle") {
    document.getElementById('container').style.height = "660px";  
    on(o,"480px");           
 }
 else {
 document.getElementById('container').style.height = "1050px";            
    document.getElementById(o).style.height = "900px";                
 }
}

function about(o) {   
   turn_off_pages();
   on(o);    
//   on(o+'_pres');
   turnOnPres(o);
   on(o+'_logo');
   on(o+'about');
   set_container_sizes(o);  
//   document.getElementById(o+'_opt_feat').enabled = "true";  
//   document.getElementById(o+'_std_feat').enabled = "true";   
//   trailer(this,o);                
}

function features(o,t,ff,startpres) {   
//   alert('features');
   turn_off_pages();
   turn_off_pres();
   turnOffBtns();
   on(o);     
   on(t);        
   if (startpres==null) on(t+'_pres');    
   on(t+'about');     
   if (ff!=null) {
      var ftype = ff.substr(0,1);
      for(s=0;s<12;s++) {
        if (null!=document.getElementById(t+'_'+ftype+'f'+s)) {
           document.getElementById(t+'_'+ftype+'f'+s).style.border = "solid 4px white";       
        }
      }
//      alert(t+'_'+ff+'0');
      document.getElementById(t+'_'+ff).style.border = "solid 4px blue";
      on(startpres);   
   }
   if (o.indexOf('_std_feat')>0) {
     turnOffAllBtns(); 
     setStandardFeatureState(1);
     syncBtns(t);
   }
   if (o.indexOf('_opt_feat')>0) {
     turnOffAllBtns();
     setOptionalFeatureState(1);
     syncBtns(t);
   }
   if (o.indexOf('_home_feat')>0) {
     turnOffAllBtns();
     setModelHomeState(1);
     syncBtns(t);
   }
   turnOnBtns(t);   
}

function trailer_specs() {   
   window.open('./pdf/voyager.pdf');	
}


function trailer_main_write(o) { 
  alert(o);
}

function trailer(o,t) {  
  turn_off_pres();
  on(t+'_pres');  
  on(t+'_logo');  
  if (o.style==null) return; 
  o.style.border = "solid 4px blue";
//  trailer_write(t);  
}

//
// o = thumbnail that was clicked on
// t = trailer type, ie. voyager, magnum
// f = feature
//
function trailer(o,t,f) {  
  turn_off_pres();
  on(t+'_logo');  
  on(f);  
  // ftype = s for Standard Feature
  // ftype = o for Optional Feature
  var ftype = o.substr(0,1);
  for(s=0;s<12;s++) {
     if (null!=document.getElementById(t+'_'+ftype+'f'+s)) {
        document.getElementById(t+'_'+ftype+'f'+s).style.border = "solid 4px white";       
     }
  }
  document.getElementById(t+'_'+o).style.border = "solid 4px blue";
}

//
// o = thumbnail that was clicked on
// t = trailer type, ie. voyager, magnum
// f = feature
//
function trailer_out(o,t,f) {
  if (o.style==null) return; 
  o.style.border = "solid 4px white";
  on(t+'_pres');  
  off(f);  
}
function sfeat(o) {
  turn_off_pages();        
  on(o+'_std_feat');    
  on(o);  
  set_container_sizes(o);
  trailer(this,o);    
}

function ofeat(o) {
  turn_off_pages();     
  on(o);  
  on(o+'_opt_feat');    
  set_container_sizes(o);
  trailer(this,o);    
}

<!--- END generic Trailer methods -->







function tj(o) {
//  alert("tj(o)");  
  turn_off_pres();
  on('tj_pres');
  if (o==null) return;  
  o.style.border = "solid 4px blue";
}
function tj_out(o) {
  o.style.border = "solid 4px white";
}


function faqnext() {
//  alert(document.getElementById('faqchg').selectedIndex);
  if (document.getElementById('faqchg').selectedIndex>7) {
      document.getElementById('faqchg').selectedIndex=0;
  }
  else {
    document.getElementById('faqchg').selectedIndex+=1;
  }
  y = document.getElementById('faqchg').selectedIndex;
//  alert(y);
  changeq('q'+(y+1));																																																																																																																																																																																																								
}


function faqprev() {
  document.getElementById('faqchg').selectedIndex-=1;
  if (document.getElementById('faqchg').selectedIndex<1) document.getElementById('faqchg').selectedIndex=8;
  y = document.getElementById('faqchg').selectedIndex;
  changeq('q'+(y+1));
}


function turn_off_logos() {
  off('home_logo');   
  off('photo_logo');   
  off('faq_logo');   
  off('why_iet_logo');         
  for(i=0;i<tr.length;i++) {
    off(tr[i]+'_logo');
  }
}  


var ma = new Array(6);
ma[0]=new Array("top5","top4","top3","top2","top1","top6");	
ma[1]=new Array("top4","top3","top2","top1","top6","top5");
ma[2]=new Array("top3","top2","top1","top6","top5","top4");
ma[3]=new Array("top2","top1","top6","top5","top4","top3");
ma[4]=new Array("top1","top6","top5","top4","top3","top2");
ma[5]=new Array("top6","top5","top4","top3","top2","top1");

var top_cnt = 0;
var top_max = 5;

function top_ctl_cycle() {
   return;
   if (top_cnt>5)top_cnt=0;
   new Effect.Move(ma[top_cnt][0],{x: 102, y: 0});   
   new Effect.Move(ma[top_cnt][1],{x: 102, y: 0});   
   new Effect.Move(ma[top_cnt][2],{x: 102, y: 0});  
   new Effect.Move(ma[top_cnt][3],{x: 102, y: 0});    
   new Effect.Move(ma[top_cnt][4],{x: 102, y: 0});   
   new Effect.Move(ma[top_cnt][5],{x: -510, y: 0}); 
   new Effect.Appear(ma[top_cnt][5],{duration: 3.0}); 
   top_cnt=top_cnt+1;
   if (top_cnt>5)top_cnt=0;
}


function top_ctl_on() {
  if (document.getElementById('top_ctl')!=null) {
	  document.getElementById('top_ctl').innerHTML = "<a href='javascript:top_ctl_cycle();'><img src='hand-48x48.png' style='border: 0px; position:relative; left: 10px;'/></a>";
	  document.getElementById('top1').innerHTML = "<img src='Top-Home1-100px.jpg' width=100 height=75 />";  
	  document.getElementById('top2').innerHTML = "<img src='Top-Home4-100px.jpg'/>";  
	  document.getElementById('top3').innerHTML = "<img src='Top-Home5-100px.jpg'/>";
	  document.getElementById('top4').innerHTML = "<img src='Top-Home6-100px.jpg'/>";  
	  document.getElementById('top5').innerHTML = "<img src='Top-Home7-100px.jpg'/>";
	  document.getElementById('top6').innerHTML = "<img src='Top-Home8-100px.jpg'/>";
  }
}

function turn_off_photogallery() {
  off('pgtxt');
  off('pgpic');
  for(s=0;s<10;s++) {
    off('pgthumb'+s);
  }
}

function turn_off_pages() {
  off('faq');
  off('locator');
  off('locator_in');    
  off('home');          
  off('whyironeagle');
  off('caption2');
  off('top1');off('top2');off('top3');off('top4');off('top5');off('top6');off('top_ctl');  
  off('home_models')
  off('home_pres_new'); 
  for(i=0;i<tr.length;i++) {
    off(tr[i]);
    off(tr[i]+'about');
    off(tr[i]+'_home_feat');
    off(tr[i]+'_std_feat');
    off(tr[i]+'_opt_feat');    
  }
  turn_off_pres();
  turn_off_photogallery();
  turnOffBtns();   
}

function turn_off_feats() {
  for(i=0;i<tr.length;i++) {
    off(tr[i]+'_home_feat');
    off(tr[i]+'_std_feat');
    off(tr[i]+'_opt_feat');    
  }
}

function turn_off_pres() {
//   off('voy_video');
     off('home');
//     off('pgmain');
     off('pgpic');
     off('pgtxt');
  off('home_pres_new');  
 for(i=0;i<presentations.length;i++) {   
    off(presentations[i]);
 }
 for(i=0;i<tr.length;i++) {   
    off(tr[i]+'_pres');
 } 
}


function turnonV(s) {
  window.open(""+s+"",null,"toolbar=0,location=0,directories=0,titlebar=0,status=0,menubar=0,scrollbars=0,width=1024,height=768");
}

function turnonVoyVideo() {
  turn_off_pres();
//  on('voy_video');
}


function turnonNearestDealerMap() {
  turn_off_pages();
  turn_off_logos();
//  on('home');   
//  on('home_logo');
  on('map');
//  on('nearestDealer');  
  load();
//  scroll(0,0);
}

function turnonLoc(o) {
  turn_off_pages();
  turn_off_logos();
  resetTabs();
  top_ctl_on();
  document.getElementById('qtab_home').innerHTML = "<img src='qtabs/qt-clr-69x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>Home</font>";
    
  document.getElementById('home_models').style.top = "230px";
  on('home_models');   
  on('home_logo');
  on('locator');
  on('locator_in');
  set_container_sizes('locator');  
  scroll(0,0);
}

function turnoffModHome(i) {
  i.style.border = "solid 4px white";
}

function turnonModHome(i,o,mod) {  
  for(s=0;s<=10;s++) {     
     if ((i!=null)&(i.id!=mod+"_ff"+s)) {
        if (document.getElementById(mod+'_ff'+s)!=null) {
           document.getElementById(mod+'_ff'+s).style.border = "solid 4px white";
        }
     }
  }
  document.getElementById(mod+'_ff'+i).style.border = "solid 4px blue";  
  document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres(o,mod);        
}


function turnOnPres(mod) {
  if (mod=='voyager') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('VoyMain1-400.jpg',mod);
  if (mod=='magnum') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('MagMain1-400.jpg',mod);
  if (mod=='economax') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('EconMain1-400.jpg',mod);
  if (mod=='versamax') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('VmaxMain1-400.jpg',mod);
  if (mod=='s3k') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('3000Main1-400.jpg',mod);
  if (mod=='s7k') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('7kMain1-400.jpg',mod);
  if (mod=='s10k') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('10kMain1-400.jpg',mod);
  if (mod=='atv') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('AtvMain1-400.jpg',mod);
  if (mod=='s12k') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('14k12kMain1-400.jpg',mod);
  if (mod=='s14k') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('14k12kMain1-400.jpg',mod);
  if (mod=='titan') document.getElementById(mod+'_pres').innerHTML = getModelHomePagePres('TitanMain1-400.jpg',mod);
  on(mod+'_pres');
}

function getModelHomePagePres(o,mod) {
  return "<table><tr><td><img src='"+o+"'/></td><td width='250px'>"+getModelHomePagePresText(mod)+"</td></tr></table>";
}

function getModelHomePagePresText(mod) {
  if (mod=='voyager') return "<h1>Voyager Series&#8482;</h1><br><br> If you're looking for the northwest\'s best value in utility trailers, your search is over! <br><br>Since 1995 we have made thousands of these and chances are there's one in your neighborhood. Voyager series is a fully equipped utility trailer that\'s a time tested solution for hauling anything from landscape supplies to camping gear.";  
  if (mod=='magnum') return "<h1>Magnum Series&#8482;</h1><br><br> Steel side panels make this trailer a commercial user's choice. Standard weight capacity is over 1 ton and can be increased to 2 tons if needed. Take the time and compare Magnum series to any other brand of steel sided trailer and you'll see the difference. We give you more features and higher quality at a low cost...<i>That's what we do.</i>";  
  if (mod=='economax') return "<h1>Economax Series&#8482;</h1><br><br> Easily transport your small tractor for servicing, or your golf cart to the course. This trailer is used for a multitude of applications. It has the same rugged mainframe and running gear as the Voyager and Magnum. The difference is the 1ft perimeter railing instead of 2ft walls.";  
  if (mod=='versamax') return "<h1>Versamax Series&#8482;</h1><br><br> <b>Question</b> - <i>\"Is there one trailer that will haul my Rafts, Snowmobiles, ATV's, Jet Skis, Drift Boat, or Camping Gear?\"</i> <br><br><b>Answer</b>...VersaMax! <br><br> From Furniture to Hot Tubs, anything up to 2000 Lbs. is fair game. The wide profile tires are compact in size but huge in performance. They're 10 ply rated for a combined capacity of over 3000 Lbs. We build it wide and keep it low for the best solution to haul it all!";  
  if (mod=='atv') return "<h1>ATV Series&#8482;</h1><br><br> Place the ramps on either side, ride up and on, strap down your machine, and away you go. <br><br>You can transport up to 3 ATV's to the mountain or the sand dunes on this rugged trailer. <br><br>With up to $20,000 of off road machines behind you, make sure they're on a trailer with a proven history of long term durability.";  
  if (mod=='s3k') return "<h1>3000 Series&#8482;</h1><br><br> Looking for a flatbed trailer that's budget friendly without budget quality? <br><br>You've found it! <br><br>The box tube mainframe is identical to the Voyager and Magnum series, the difference is this trailer's equipped with stake pockets instead of side walls.";  
  if (mod=='s7k') return "<h1>7000 Series&#8482;</h1><br><br> A mid-sized car or 4 to 6 ATV's are ideal cargo for this model.<br><br> Stake pockets and tie-rails on all sides make securing your cargo quick and easy. <br><br>This is the right choice for cargo weighing up to 5000 Lbs.";  
  if (mod=='s10k') return "<h1>10K Series&#8482;</h1><br><br> A Bobcat or a Pickup truck make good examples of what customers haul on this model.<br><br> Stake pockets and tie-rails on all sides make securing your cargo quick and easy. <br><br>This is the best choice for cargo weight within 4500 and 7500 Lbs.";  
  if (mod=='s12k') return "<h1>12K Series&#8482;</h1><br><br> Mini-Excavator, Skid steer, and Construction supplies are some common uses. 12k is a business class multipurpose trailer that looks similar to the 10k series but has frame and running gear differences for increased payload capacity. This is the best choice for cargo weight between 7000 and 9500 Lbs.";    
  if (mod=='s14k') return "<h1>14K Series&#8482;</h1><br><br> Frontend loader, Track hoe, Skid steer, no problem. 14k is a business class equipment trailer with a payload capacity of 11,000 Lbs. This trailer's got the backbone to handle the demands of the busiest contractor day after day, year after year, without failąWe make sure of it.";      
  if (mod=='titan') return "<h1>Titan Series&#8482;</h1><br><br> Tandem Deckover trailers with an 8'-6\" wide deck and up to 11,000 Lbs of capacity. If your cargo is frequently loaded by forklift or exceeds 6'-10\" wide, then this is the right choice. It's equipped with stake pockets and tie-down rails, of course. Choose from 4 weight ratings and 4 lengths.<br><br> \"<i>If our Titan series is not enough, you might require a semi-truck.</i>\" ";      
}

function turnonFAQ() {
  turn_off_pages();
  turn_off_logos();
  document.getElementById('container').style.height = "660px";            
  document.getElementById('faq').style.height = "480px";            
  document.getElementById('faq').style.display = "block";             
  document.getElementById('faq_logo').style.display = "block";             
  document.getElementById('faqchg').selectedIndex=0;
  changeq('q1');
}
                                      
var active_thumb = 1;
var active_photo = 0;

// o = model, voyager,s3k,etc.
// p = pic number, 1,2,3,etc.
function GalleryModelPicTxt(o,p) {
  return magnum_photo_txt[p];
}

function largePhoto(p,o) {  
  for(s=0;s<eval(o+'_photo_fn_thumb.length');s++) {     
     if (s==p) {
       document.getElementById('p_thumb'+s).style.border = "4px solid blue";
       var imgn = eval(o+'_photo_fn_large[p]');
       document.getElementById('pgpic').innerHTML = "<img src='"+imgn+"'/>";        
       document.getElementById('pgtxt').innerHTML = eval(o+'_photo_txt[p]');
     }
     else {
       document.getElementById('p_thumb'+s).style.border = "4px solid white";
     }
  }
}

function turnonPhotogallery(o) {
  turn_off_pres();
  turn_off_feats();
  
  turnOffAllBtns();
  setPhotogalleryState(1);
  turnOnBtns(o);
//  turnonTrailer(o);

  for(s=0;s<eval(o+'_photo_fn_thumb.length');s++) {     
     document.getElementById('pgthumb'+s).innerHTML = "<img id='p_thumb"+s+"' style='border: 4px solid white;' src='"+eval(o+'_photo_fn_thumb[s]')+"' height='35px' width='47px' onmouseover='javascript:largePhoto(\""+s+"\",\""+o+"\");' />";        
     on('pgthumb'+s);
  }
  document.getElementById('pgpic').innerHTML = "<img src='"+eval(o+'_photo_fn_large[0]')+"'/>";        
  document.getElementById('pgtxt').innerHTML = eval(o+'_photo_txt[0]');
  document.getElementById('p_thumb0').style.border = "4px solid blue";
  on('pgtxt');
  on('pgpic');
// commented out - this script requires prototype.js, scriptaculous.js - large downloads    
//  new Effect.Appear('pgpic', { duration: 2.0 });
}


var model_home_on = "cooltext416734477MouseOver.png";
var model_home_off = "cooltext416734477.png";
// 0 = button off
var model_home_state = 0;
var standard_features_on = "cooltext416734298MouseOver.png";
var standard_features_off = "cooltext416734298.png";
var standard_features_state = 0;
var optional_features_on = "cooltext416734610MouseOver.png";
var optional_features_off = "cooltext416734610.png";
var optional_features_state = 0;
var photogallery_on = "cooltext416734828MouseOver.png";
var photogallery_off = "cooltext416734828.png";
var photogallery_state = 0;

// o = model, ie. voyager, s3k
function syncBtns(o) {
  if (model_home_state==0) {
      turnOnModelHomeBtn(o);
   }  
  if (standard_features_state==0) {
    turnOnStandardFeatureBtn(o);
  }
  if (optional_features_state==0) {
    turnOnOptionalFeatureBtn(o);
  }
  if (photogallery_state==0) {
    turnOnPhotogalleryBtn(o);
  }  
}

function turnOffAllBtns() {
  model_home_state=0;
  standard_features_state=0;
  optional_features_state=0;
  photogallery_state=0;
}

function setModelHomeState(s) {
  if (s==1) turnOffAllBtns();
  model_home_state = s;
  return true;
}
function getModelHomeSrc() {
  if (model_home_state==0) {
     return model_home_off;
  }
  else {
     return model_home_on;
  }
}

function setStandardFeatureState(s) {
  if (s==1) turnOffAllBtns();
  standard_features_state = s;
  return true;
}
function getStandardFeatureSrc() {
  if (standard_features_state==0) {
     return standard_features_off;
  }
  else {
     return standard_features_on;
  }
}

function setOptionalFeatureState(s) {
  if (s==1) turnOffAllBtns();
  optional_features_state = s;
  return true;
}
function getOptionalFeatureSrc() {
  if (optional_features_state==0) {
     return optional_features_off;
  }
  else {
     return optional_features_on;
  }
}

function setPhotogalleryState(s) {
  if (s==1) turnOffAllBtns();
  photogallery_state = s;
  return true;
}
function getPhotogallerySrc() {
  if (photogallery_state==0) {
     return photogallery_off;
  }
  else {
     return photogallery_on;
  }
}


function turnOnModelHomeBtn(o) {
  document.getElementById('model_home').innerHTML = "<img src=\""+getModelHomeSrc()+"\" onclick='javascript:features(\""+o+"_home_feat\",\""+o+"\",null,null);' onmouseover='this.style.cursor=\"pointer\";this.src=getModelHomeSrc();' onmouseout='this.src=getModelHomeSrc();'/>";
}

function turnOnStandardFeatureBtn(o) {
 var pr1="foldup_pres";
  if (o=='s10k'|o=='s12k'|o=='s14k'|o=='s7k') {
     pr1 = "foldup2_pres"; 
  }
  if (o=='s3k'|o=='atv') {
     pr1 = "s3k_foldup_pres"; 
  }
  document.getElementById('standard_feature_home').innerHTML = "<img src=\""+getStandardFeatureSrc()+"\" onclick='javascript:features(\""+o+"_std_feat\",\""+o+"\",\"sf0\",\""+pr1+"\");' onmouseover='this.style.cursor=\"pointer\";this.src=getStandardFeatureSrc();' onmouseout='this.src=getStandardFeatureSrc();'/>";
}
function turnOnOptionalFeatureBtn(o) {
  document.getElementById('optional_feature_home').innerHTML = "<img src=\""+getOptionalFeatureSrc()+"\" onclick='javascript:features(\""+o+"_opt_feat\",\""+o+"\",\"of0\",\"dring_pres\");' onmouseover='this.style.cursor=\"pointer\";this.src=getOptionalFeatureSrc();' onmouseout='this.src=getOptionalFeatureSrc();'/>";  
}
function turnOnPhotogalleryBtn(o) {
  document.getElementById('photogallery_home').innerHTML = "<img src=\""+getPhotogallerySrc()+"\" onclick='javascript:turnonPhotogallery(\""+o+"\");' onmouseover='this.style.cursor=\"pointer\";this.src=getPhotogallerySrc();' onmouseout='this.src=getPhotogallerySrc();'/>";
}

// o = model, ie. voyager, s3k
function turnOnBtns(o) {
  turnOnModelHomeBtn(o);
  turnOnStandardFeatureBtn(o);
  turnOnOptionalFeatureBtn(o);
  turnOnPhotogalleryBtn(o);

  on('model_home');
  if (o!="titan") {
    on('standard_feature_home');
    on('optional_feature_home');
    on('photogallery_home');
  }
}

function turnOffBtns() {
  off('model_home');
  off('standard_feature_home');
  off('optional_feature_home');
  off('photogallery_home');
}

function turnonHomePage() {
  turn_off_pages();
  turn_off_logos();
  on('top1');on('top2');on('top3');on('top4');on('top5');on('top6');on('top_ctl');
  home_pres_on();
  top_ctl_on()
//  document.getElementById('home').style.display = "block";
  on('home_logo');
  set_container_sizes('home');
   resetTabs();
   document.getElementById('qtab_home').innerHTML = "<img src='qtabs/qt-clr-69x25.gif'/><font style='position:absolute; left: 7px; top: 7px;'>Home</font>";
  document.getElementById('home_models').style.top = "422px";   
}


function turnoffq() {
 for(i=1;i<10;i++) {   
    document.getElementById('q'+i).style.display = "none";           
 }
}

function changeq(o) {
  //alert(o);
  document.getElementById('container').style.height = "660px";            
  document.getElementById('faq').style.height = "480px";            
  if (o=='q1') {
    turnoffq();
    document.getElementById('container').style.height = "760px";            
    document.getElementById('faq').style.height = "580px";            
    document.getElementById('q1').style.display = "block";
    document.getElementById('q1').style.backgroundColor = "#E4E7F2";
//    Rounded("div#q1","#FFFFFF","#E4E7F2","small");
  }
  else {
    turnoffq();
    document.getElementById(o).style.display = "block";
    document.getElementById(o).style.backgroundColor = "#E4E7F2";
//    Rounded("div#"+o,"#FFFFFF","#E4E7F2","small");
  }
  
}

function openvoyspec() {
  window.open("vspec.pdf","mywin","status=yes");
}

function addToFav() {
 window.external.AddFavorite("http://trailerinfo.com", "Iron Eagle Trailers");
}

