var autoTime=10000;var timeStep=15;var widthStep=100;var divWidth=519;var tabs=new Array("recoverTab","trackTab","speedTab","maintenanceTab");var main;var alt;var writeSlide;var x=0;var show=1;var m;function writeToHidden(tab,opt){var head;var backImage=new Image();switch(tab)
{case"recoverTab":count=1;head="Recover your vehicle if it\u2019s stolen.";nextSlide=1;text="If your vehicle is ever missing, stolen, or being used inappropriately, as an optional feature SkyGuard can locate it and disable it remotely (starter is disabled once key is removed from ignition). The vehicle can then be quickly and safely recovered.";img="recover-1";backImage.src="images/track-2.jpg";writeSlide=new tabContent(nextSlide,head,text,img);return(writeSlide,count,opt);case"trackTab":count=2;head="Track and monitor your vehicle.";if(opt==1){nextSlide=2;img="track-1";text="You can access your cars location no matter where you are with SkyGuard Mobile. You will always be able to know where your vehicle is, if it's moving and even where it's going. SkyGuard Mobile also allows you to remotely control your vehicle with features like enabling starter, opening locks, and activating your lights.";backImage.src="images/speed-1.jpg";}else if(opt==2){nextSlide=1;text="SkyGuard gives you the peace of mind of knowing exactly where your vehicle is at any time. With a SkyGuard GPS-based unit installed in your vehicle, you simply log onto the SkyGuard website to monitor the current and previous locations of your vehicle at any time via ActiveTrak.";img="track-2";backImage.src="images/speed-1.jpg";}
writeSlide=new tabContent(nextSlide,head,text,img);return(writeSlide,count,opt);case"speedTab":count=1;head="Get proactive speed and location alerts.";nextSlide=1;text="Using SkyGuard's password-protected website, vehicle owners can set speed limits and designate up to 25 geographic zones as ActiveBoundaries. Whenever the vehicle exceeds the set speed limit - or enters or exits an ActiveBoundary - SkyGuard sends an immediate alert via email and/or text message.";img="speed-1";backImage.src="images/maintenance-1.jpg";writeSlide=new tabContent(nextSlide,head,text,img);return(writeSlide,count,opt);case"maintenanceTab":count=1;head="Get handy reminders for vehicle maintenance.";nextSlide=1;text="With SkyGuard IntelliCare, you can receive timely alerts about needed service via cellphone and email. Alerts are based on your vehicle\u2019s actual mileage, so you\u2019ll never miss out on getting the maintenance you need!"
img="maintenance-1";backImage.src="images/maintenance-2.jpg";writeSlide=new tabContent(nextSlide,head,text,img);return(writeSlide,count,opt);default:count=1;head="Get alerts when teens speed.";nextSlide=2;text="Whenever the vehicle exceeds the set speed limit, SkyGuard sends an immediate alert to parents via email and/or text message.";img="recover-1";writeSlide=new tabContent(nextSlide,head,text,img);return(writeSlide,count,opt);}}
var arrow="playSlide";var arrowExt=".png";var nextArrowOn=new Image();nextArrowOn.src="images/"+arrow+"_next-on"+arrowExt;var prevArrowOn=new Image();prevArrowOn.src="images/"+arrow+"_prev-on"+arrowExt;function play(opt){if(x<tabs.length){tab=tabs[x];moveTab(tab);slideOut(divWidth,tab,opt);if(opt<count){opt++;}else{opt=1;x++;}}else{x=0;}
e=setTimeout("play('"+opt+"')",autoTime);}
function tabSlidePlay(tab){slideOut(divWidth,tab,show);if(show<count){show++;}else{show=1;}
m=setTimeout("tabSlidePlay('"+tab+"')",autoTime);}
function tabContent(pos,headline,text,image){this.pos=pos;this.headline=headline;this.text=text;this.image=image;}
function timer(px,whichSlide){if(whichSlide=="main")var slide=document.getElementById('mainBodyImage');if(whichSlide=="alt")slide=document.getElementById('altBodyImage');if(px>widthStep){t=setTimeout("timer('"+(px-widthStep)+"', '"+whichSlide+"')",timeStep);slide.style.width=px+"px";}else{slide.style.visibility="hidden";}}
function slideOut(px,tab,opt){main=document.getElementById('mainBodyImage');alt=document.getElementById('altBodyImage');writeToHidden(tab,opt);var slide=alt;var img=alt.getElementsByTagName("img");if(main.style.visibility=="hidden"){slide=main;img=main.getElementsByTagName("img");}
slide.style.backgroundImage="url(images/"+writeSlide.image+".jpg)";var h2=slide.getElementsByTagName('h2');h2[0].firstChild.nodeValue=writeSlide.headline;var p=slide.getElementsByTagName('p');p[0].firstChild.nodeValue=writeSlide.text;if(opt==1){var prev=count;}else{prev=opt-1;}
var next=writeSlide.pos;var a=slide.getElementsByTagName('a');a[0].onclick=function(e){e=e||window.event;slideOut(divWidth,tab,prev);}
a[1].onclick=function(e){e=e||window.event;slideOut(divWidth,tab,next);}
if(count=="1"){img[0].style.display="none";img[1].style.display="none";}else{img[0].style.display="inline";img[1].style.display="inline";}
if(main.style.visibility!="hidden"){alt.style.width=px+"px";main.style.zIndex=11;alt.style.zIndex=1;alt.style.visibility="visible";main.style.overflow="hidden";timer(px,"main");}else{main.style.width=px+"px";alt.style.zIndex=11;main.style.zIndex=1;main.style.visibility="visible";alt.style.overflow="hidden";timer(px,"alt");}}
function moveTab(id){var x=document.getElementsByTagName("li");for(var i=0;i<x.length;i++){x[i].className="tab_off";}
var tabID=id;var tab=document.getElementById(tabID);tab.className="tab_on";}
function clearTime(){clearTimeout(e);if(m){clearTimeout(m);}}