ver=parseInt(navigator.appVersion)
ie4=(ver>3  && navigator.appName!="Netscape")?1:0
/*******/
function playSound() {
  if (ie4) {
     document.getElementById('bgsound_id').src="/aud/airGun.wav";
  }
}
/*******/
function swapImg(v_img,v_mode) {
  if (v_mode == "ON") {
      document.getElementById(v_img).src="/img/hdr_"+v_img+"On.gif";
  }
  else {
      document.getElementById(v_img).src="/img/hdr_"+v_img+"Off.gif";
  }
}
/*******/
function goToPage(v_page) {
  playSound();
  if (v_page=="home") {
      v_page="http://www.rockawayauto.com";
  }
  else {
      v_page="/Htm/"+v_page+".htm";
  }
  setTimeout("document.location.href='"+v_page+"';",1000);
}
/*******/
function writeHeader() {
  var v_html="";

  v_html="<table align='center' class='disp'  cellspacing=0 cellpadding=0 style='border:solid 2px black'"+
         "       width=750 height=425 border=0>"+
         "  <tr>"+
         "    <td align='center'>"+header();+"</td>"+
         "  </tr>"+
         "  <tr>"+
         "    <td>";
   document.write(v_html);         
}            
/*******/            
function header() {
  var v_html=""
  
  v_html="<bgsound id='bgsound_id'>"+
         "<link href='/css/style.css' type=text/css rel=stylesheet>"+
         " <table cellpadding='0' cellspacing='0' border='0'>"+
         "   <tr>"+
         "    <td><img src='/img/hdr_headerTop.gif'></td>"+
         "   </tr>"+
         " </table>"+
         " <table width='100%' cellpadding='0' cellspacing='0' border='0'>"+
         "  <tr>"+
	 "   <td align='center' background='/img/hdr_headerBottom.gif'>"+
         "     <img onclick='goToPage(this.id);' id='home'        src='/img/hdr_homeOff.gif' onmouseover=swapImg(this.id,'ON'); onmouseout=swapImg(this.id,'OFF'); style='cursor:hand;'>"+
         "     <img onclick='goToPage(this.id);' id='aboutUs'     src='/img/hdr_aboutUsOff.gif' onmouseover=swapImg(this.id,'ON'); onmouseout=swapImg(this.id,'OFF'); style='cursor:hand;'>"+
         "     <img onclick='goToPage(this.id);' id='autoService' src='/img/hdr_AutoServiceOff.gif' onmouseover=swapImg(this.id,'ON'); onmouseout=swapImg(this.id,'OFF'); style='cursor:hand;'>"+
        // "     <img onclick='goToPage(this.id);' id='towing'      src='/img/hdr_towingOff.gif' onmouseover=swapImg(this.id,'ON'); onmouseout=swapImg(this.id,'OFF'); style='cursor:hand;'>"+
         "     <img onclick='goToPage(this.id);' id='ourStaff'    src='/img/hdr_ourStaffOff.gif' onmouseover=swapImg(this.id,'ON'); onmouseout=swapImg(this.id,'OFF'); style='cursor:hand;'>"+
         "     <img onclick='goToPage(this.id);' id='contactUs'   src='/img/hdr_contactUsOff.gif' onmouseover=swapImg(this.id,'ON'); onmouseout=swapImg(this.id,'OFF'); style='cursor:hand;'>"+
         "   </td>"+
         "  </tr>"+
         " </table>";
  return v_html;
}
/*******/  
function writeFooter() {
  var v_html=""
  
  v_html="    </td>"+
         "  </tr>"+
         "  <tr>"+
         "    <td align='center'>"+footer();+"</td>"+
         "  </tr>"+
         "</table>";
  document.write(v_html);
}
/*******/  
function footer() {
  var v_html=""
   
  v_html="<table class='disp' width='100%' cellpadding='0' cellspacing='0' border='0'>"+
         "  <tr>"+
         "    <td align='center'><img src='/img/ftr_chainHook.gif'>"+
         "    </td>"+
         "  </tr>"+
         "  <tr>"+
         "    <td align='center'>"+
         "      <font style='font-family:verdana; cursor:hand;' size='2' color='#FF0000' onClick=goToPage('home');><b>Home</b>&nbsp;&nbsp;</font>|"+
         "      <font style='font-family:verdana; cursor:hand;' size='2' color='#FF0000' onClick=goToPage('aboutUs');>&nbsp;<b>About Us</b>&nbsp;&nbsp;</font>|"+
         "      <font style='font-family:verdana; cursor:hand;' size='2' color='#FF0000' onClick=goToPage('autoService');>&nbsp;<b>Auto Service</b>&nbsp;&nbsp;</font>|"+
        // "      <font style='font-family:verdana; cursor:hand;' size='2' color='#FF0000' onClick=goToPage('towing');>&nbsp;<b>Towing</b>&nbsp;&nbsp;</font>|"+
         "      <font style='font-family:verdana; cursor:hand;' size='2' color='#FF0000' onClick=goToPage('ourStaff');>&nbsp;<b>Our Staff</b>&nbsp;&nbsp;</font>|"+         
         "      <font style='font-family:verdana; cursor:hand;' size='2' color='#FF0000' onClick=goToPage('contactUs');>&nbsp;<b>Contact Us</b></font>"+
         "      <br>"+
         "    </td>"+         
         "  </tr>"+
         "</table>";

  return v_html;
}
/*******/
function seeTrucks(v_dscr) {
  
  if(v_dscr=="tow_chevyflatbed") v_txt="Chevy Flatbed";
  if(v_dscr=="tow_fleet") v_txt="Rockaway Auto Fleet";
  if(v_dscr=="tow_interflatbed") v_txt="International Flatbed";
  if(v_dscr=="tow_fordflatbed")  v_txt="Ford Flatbed";
  if(v_dscr=="tow_lightduty")    v_txt="Light Duty Wrecker";
  if(v_dscr=="tow_mediumduty")   v_txt="Medium Duty Wrecker";
  
  if(v_dscr=="tow_carlflatbedfront" || v_dscr=="tow_carlflatbedside" ||v_dscr=="tow_carlflatbedrear")   v_txt="Carl hooks up a wreck";
  
  document.getElementById("dscrit").innerHTML="<b>"+v_txt+"</b>";
  document.getElementById("viewit").src="/img/"+v_dscr+".jpg";
}

function seeStaff(v_name) { 
  if(v_name=="mike") {
     v_txt="Mike is the Proprietor of Rockaway Auto Repair Inc. His father, George, founded the business in 1946. At a young age Mike began working with his father as an auto mechanic. As time went on, he established the towing division of the business. Approximately 25 years ago, when George semi-retired, Mike took the reins. Mike oversees all aspects of the business which include auto repairs, towing, customer service, billing, etc. Mike is also an active automotive technician and a Wreckmaster Certified Towing Operator.";
  }
  
  if(v_name=="carl") {
     v_txt="Carl has been with us since 1996. He is TRAA certified and our Towing Manager. Carl oversees all of Rockaway Auto's towing accounts and towing operators. Any towing inquiries should be directed to Carl.";
  }
  
  if(v_name=="diane") {
     v_txt="Diane has been with us since 2002 and is one of our part-time Office Secretaries. Call Diane to schedule your next appointment or check on your vehicle's status.";
  }
  
  if(v_name=="linda") {
       v_txt="Linda started at Rockaway Auto in January 2005 and is one of our part-time Office Secretaries.  Linda will gladly tell you when your car will be ready and help you schedule future appointments.  ";
  }
  
  if(v_name=="greg") {
     v_txt="Greg is our head mechanic. He is an ASE Certified Technician, a Certified State Motor Vehicle Inspector, and New Jersey Certified Emissions Repair Technician. He specializes in diagnostic problems and can tackle any type of automotive difficulty your vehicle may be experiencing.";
  }
  
  if(v_name=="bill") {
     v_txt="Bill is one of our daytime tow operators.  He's been with us since November 2005.  With Bill's years experience you can count on his reliable and courteous service."
  }

  if(v_name=="jose") {
     v_txt="Jose has been with us since November 2005.  He is a TRAA certified tow operator.  With Jose's strong work ethic and enthusiastic attitude, you will find Jose extremely dependable."
  } 

  if(v_name=="jon") {
     v_txt="Jon has been a member of our staff since 1999, he is one of our part-time night Towing Operators. When it's the middle of night and you're in need of a tow, don't panic, Jon is on call and ready for any late night tows.";
  }
  
  if(v_name=="corey") {
       v_txt="Corey joined our team in 2007 and is one of our part-time night Towing Operators.  He recently earned his Commercial Driver's License (CDL) and is a TRAA certified tow operator.  You can count on Corey for his reliable and courteous service.";
  }
  
  if(v_name=="pete") {
         v_txt="Pete joined our team in 2007 and is one of our daytime Towing Operators.  With his strong work ethic and enthusiastic attitude, you will find Pete extremely dependable.";
  }
  
  if(v_name=="rob") {
         v_txt="Rob joined our team in 2008 and is one of our daytime Towing Operators.  His years of industry experience and strong work ethic make Rob extremely dependable.";
  }
  
  if(v_name=="willie") {
       v_txt="Rest In Peace Willie (1993 - 2005)";
  }
  
  if(v_name=="tinka") {
     v_txt="Tinka is a member of our Rottweiler team.  She carefully watches over the property day and night.";
  }  
  
  if(v_name=="heidi") {
     v_txt="Heidi is the other member of our Rottweiler team.  She shares the responsibility of watching over the property.  If you see Heidi coming, be sure to get out of her way.";
  }
  
  if(v_name=="jerry") {
     v_top_txt="<b style='font-size:14px;'>Jehermie Czerkas<br />\"Big Fat Rat\"<br />1970-2009</b>";
     v_txt="<b style='font-size:14px;'>Keep driving that flatbed<br /><br />Keep watch over us<br /><br />We miss you</b><br /><br />";
     document.getElementById("viewit").src="/img/os_"+v_name+"100.jpg";  
     document.getElementById("viewit").style.display="block"; 
     document.getElementById("viewit2").src="/img/os_jerry2100.jpg";  
     document.getElementById("viewit2").style.display="block";  
     document.getElementById("viewit3").src="/img/jerry_tow.jpg";
     document.getElementById("viewit3").style.display="block";      
     document.getElementById("dscrit").innerHTML=v_txt;
     document.getElementById("dscrittop").innerHTML=v_top_txt; 
  }
  else{
  document.getElementById("viewit").src="/img/os_"+v_name+"100.jpg";  
  document.getElementById("viewit").style.display="block"; 
  document.getElementById("viewit2").style.display="none"; 
  document.getElementById("viewit3").style.display="none"; 
  document.getElementById("dscrit").innerHTML=v_txt;
  document.getElementById("dscrittop").innerHTML="";  
  }
}

function seeAutoService(v_dscr) {
  v_txt="";
   
  if(v_dscr=="as_mikehood") v_txt="Mike checks under the hood.";
  if(v_dscr=="as_johndoor") v_txt="John re-assembles a door";
  if(v_dscr=="as_greginspection") v_txt="Greg inspects a pickup.";
  if(v_dscr=="as_inspectionmachine") v_txt="Inspection Machine";
  if(v_dscr=="as_carltorch") v_txt="Carl cuts an exhaust pipe with a torch.";
  if(v_dscr=="as_carlift") v_txt="A car goes on the lift for some work.";
  if(v_dscr=="as_mikebrakes") v_txt="Mike replaces an axle boot.";
  if(v_dscr=="as_gregredcar") v_txt="Greg checks the car's electrical systems.";
  
    
  document.getElementById("dscrit").innerHTML="<b>"+v_txt+"</b>";
  document.getElementById("viewit").src="/img/"+v_dscr+".jpg";
}
 
 
function seePic(v_dscr) {
  v_txt="";
  if (v_dscr=="AccidentScene1") v_txt="Accident scene on Route 80 July 4th 2004.";
  if (v_dscr=="AccidentScene2") v_txt="Two vehicle accident on Route 80 East.";
  if (v_dscr=="SUVWreck1") v_txt="An SUV had lost control traveling West and rolled over into the EastBound Lane.";
  if (v_dscr=="SUVWreck2") v_txt="Mike and Jerry assess the SUV situation.";
  if (v_dscr=="FlatbedSUV") v_txt="The SUV is on the flatbed and ready to be taken away.";
  if (v_dscr=="HelicopterFlatbed") v_txt="A helicopter takes off for the hospital.";
  if (v_dscr=="MiniVanWreck1") v_txt="The Mini-Van needs to be towed away.";
  if (v_dscr=="MiniVanWreck2") v_txt="The Mini-Van was traveling East when the SUV hit it.";
  if (v_dscr=="FlatbedMiniVan1") v_txt="Carl hooks up the Mini-Van to the flatbed.";
  if (v_dscr=="silverToyota1") v_txt="Carl begins the recovery effort.";
  if (v_dscr=="silverToyota2") v_txt="The SUV rolled over off of Route 80.";
  if (v_dscr=="silverToyota3") v_txt="Jerry double checks that the rear straps are secure.";
  if (v_dscr=="silverToyota4") v_txt="Jerry climbs back up the hill to assist Carl.";
  if (v_dscr=="silverToyota5") v_txt="The SUV is pulled up the embankment to be towed away.";
			
  document.getElementById("dscrit").innerHTML="<b>"+v_txt+"</b>";
  document.getElementById("viewit").src="../img/"+v_dscr+".jpg";
}
