var cur_tab="";function update_commercial_menus(){$$("div.features_menu").each(function(h){h=$(h);var g=$(h.getLast());var e=h.getSize().scrollSize.x;var d=0;var b=0;var j=0;g.getFirst().getChildren().each(function(l){var k=0;var f=$(l).getLast().getChildren();f.each(function(m){b=parseInt(m.getFirst().getStyle("margin-left"));j=parseInt(m.getFirst().getStyle("margin-right"));if((m.getSize().scrollSize.x+b+j)>d){d=m.getSize().scrollSize.x+b+j;}k++;if(k<f.length){$(m).getFirst().setStyle("border-bottom","1px solid #333333");}});});if(d==(b+j)){d=g.getFirst().getSize().scrollSize.x-(b+j);}if(d>e){e=d;}g.setStyles({width:e+"px",left:"0px"});if((h.getPosition().x-$("wrapper").getPosition().x)+(e+j)>960){var c=-(h.getPosition().x-$("wrapper").getPosition().x)+960-(e+j);g.setStyle("left",c+"px");}});var a=$("cost_businesslink_menu").innerHTML.split("Link");$("cost_businesslink_menu").setHTML(a[0]+"<em>Link</em>"+a[1]);}function rollMe(a){if($(a.id).getStyle("opacity")==1){$(a.id).toggleClass("hover");$(a.id).getFirst().toggleClass("hover");$(a.id).getFirst().getNext().toggleClass("hover");}}function checkExtras(){if($("gallery_thumbs_container")&&hasFlashMin()){eval($("gallery_thumbs_container").getFirst().getFirst().href);var myFx=new Fx.Style($("c_video"),"opacity",{duration:500});myFx.start(0,1);}else{if($("gallery_thumbs_container")){$("video_player").setHTML("<a href='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOW' title='Get Flash'><img src='/shared/images/get_flash.gif' style='position:absolute;bottom: 20px; right: 20px'/><img src="+gallery_poster[0]+" /></a>");$("video_player").setStyles({visibility:"visible",padding:"16px"});$("gallery_thumbs").setStyle("display","none");var myFx=new Fx.Style($("c_video"),"opacity",{duration:500});myFx.start(0,1);}}if(!$("promos")&&$("promo_container")){$("promo_container").setStyle("height","0px");}var as=$$(".content_holder ol li a");for(var i=0;i<as.length;i++){if(as[i].href.indexOf("showUpfit")>0){as[i].id="upfit_"+i;as[i].href=as[i].href.split("')")[0];as[i].href+="', 'upfit_"+i+"')";}}}function showVideo(a){highlightThumb(a);$("video_player").setStyle("visibility","hidden");$("video_player").setHTML("<img src='"+gallery_poster[a]+"' alt='"+gallery_titles[a]+"' />");showFlash("/shared/flash/stand_alone_player.swf","video_player","",true);embedLoadedPos=a;linkTrack("Gallery Item "+a,a);}var last_gallery_item;function highlightThumb(a){if($(last_gallery_item)){last_gallery_item.removeClass("at");}$("gallery_item_"+a).addClass("at");last_gallery_item=$("gallery_item_"+a);}function setEmbedLoaded(){embedLoaded=true;setJSON(embedLoadedPos);}function setJSON(a){window.document.video_player_flash.SetVariable("title",gallery_titles[a]);window.document.video_player_flash.SetVariable("poster",gallery_poster[a]);window.document.video_player_flash.SetVariable("flv",gallery_src[a]);window.document.video_player_flash.SetVariable("disclaimer",gallery_video_disclaimer[a]);window.document.video_player_flash.change();}function showTabContent(){if($("c_tab_content")){if(window.ie6||window.khtml){var e=$$(".last_tab")[0];var c=e.getSize().size.x;var d=$$(".tabs_nav li").length;var a=Math.round((432/d-c)*100)/100*d;e.setStyle("width",(c+a)+"px");}if(getParameter("tab")!=""){showTab(getParameter("tab").split("_tab")[0]);}else{var b=$$(".first_tab");showTab(b[0].getFirst().id.split("_tab")[0]);}}}function showTab(a){if(cur_tab!=a){if($(cur_tab)){$(cur_tab).setStyle("display","none");$(cur_tab+"_tab").removeClass("tab_on");$("tab_left").removeClass("tab_corner_on");$("tab_right").removeClass("tab_corner_on");}$(a).setStyle("display","block");$(a+"_tab").addClass("tab_on");if($(a+"_tab").getParent().hasClass("first_tab")){$("tab_left").addClass("tab_corner_on");}if($(a+"_tab").getParent().hasClass("last_tab")){$("tab_right").addClass("tab_corner_on");}cur_tab=a;}}var last_upfit_shown;function showUpfit(a,b){$("c_video").setHTML("<img src='"+a+"' />");$("c_video").setStyles({left:"466px",top:"0px",padding:"0px",visibility:"visible",opacity:"1",background:"none"});if($(last_upfit_shown)){$(last_upfit_shown).removeClass("current_upfit");$(last_upfit_shown).getParent().removeClass("current_upfit");}$(b).addClass("current_upfit");$(b).getParent().addClass("current_upfit");last_upfit_shown=b;}function findBusinessDealer(){if(typeof(populate_zip)!="undefined"&&populate_zip!=""){javascript:wrap("cdl","zipcode="+populate_zip,"businesslink");}else{javascript:wrap("cdl","","businesslink");}}function upfitBack(){var b=getParameter("ref");var a="/en/business/";if(b!=""){if(b=="3500"){a="/en/business/vehicles/chassis_cab_3500/";}if(b=="4500"){a="/en/business/vehicles/chassis_cab_4500/";}if(b=="5500"){a="/en/business/vehicles/chassis_cab_5500/";}if(b=="sorter"){a="/en/business/vehicles/";}if(b=="bl"){a="/en/business/businesslink/?tab=upfitter_equipment";}}window.location.href=a;}function farmBureauServiceMark(){var b=$$("#vehicle_feature_body li").concat($$("#vehicle_feature_body p")).concat($$("#vehicle_feature_body span"));var d="<sup style='font-size:7px;line-height:0px;'>SM</sup>";for(i=0;i<b.length;i++){if(b[i].className.indexOf("column")<0&&b[i].className.indexOf("snippet")<0){var c=b[i].innerHTML;if(c.indexOf("Farm Bureau")>=0){b[i].innerHTML=c.replace(/Farm Bureau/,"Farm Bureau"+d);}}}}function update_cur_vehicle(){var a=location.href.toLowerCase();var c=a.split("/");if(this.hrefLocation.search("/vehicles/")!=-1){var b=c[c.length-2];cur_vehicle=b;}}onload_register("showTabContent()");onload_register("farmBureauServiceMark()");var acrobatVersion=0;var acrobatUrl="/bodybuilder/year.pdf";var requiredAcrobatVersion=4;function getAcrobatVersion(){var a=navigator.userAgent.toLowerCase();if(navigator.plugins!=null&&navigator.plugins.length>1){for(i=0;i<navigator.plugins.length;i++){var b=navigator.plugins[i];if(b.name.indexOf("Adobe Acrobat")>-1||b.name.indexOf("PDF")>-1){acrobatVersion=parseFloat(b.description.substring(30));if(b.description.indexOf("Firefox")>-1||b.description.indexOf("PDF")>-1){acrobatVersion=9;}else{if(isNaN(acrobatVersion)){if(b.description.substring(46).contains("7")){acrobatVersion=7;}if(b.description.substring(46).contains("8")){acrobatVersion=8;}if(b.description.substring(46).contains("9")){acrobatVersion=9;}}}}}}else{if(a.indexOf("msie")!=-1&&parseInt(navigator.appVersion)>=4&&a.indexOf("win")!=-1){var c='<script language="VBScript"> \n';c=c+"on error resume next \n";c=c+"dim obAcrobat \n";c=c+'set obAcrobat = CreateObject("AcroPDF.PDF.1") \n';c=c+"if IsObject(obAcrobat) then \n";c=c+"acrobatVersion = 7 \n";c=c+'else set obAcrobat = CreateObject("PDF.PdfCtrl.6") end if \n';c=c+"if acrobatVersion < 7 and IsObject(obAcrobat) then \n";c=c+"acrobatVersion = 6 \n";c=c+'else set obAcrobat = CreateObject("PDF.PdfCtrl.5") end if \n';c=c+"if acrobatVersion < 6 and IsObject(obAcrobat) then \n";c=c+"acrobatVersion = 5 \n";c=c+'else set obAcrobat = CreateObject("PDF.PdfCtrl.1") end if \n';c=c+"if acrobatVersion < 5 and IsObject(obAcrobat) then \n";c=c+"acrobatVersion = 4 \n";c=c+"end if";c=c+"<\/script> \n";document.write(c);}}return acrobatVersion;}acrobatVersion=getAcrobatVersion();function acrobatDetect(){if(acrobatVersion>=requiredAcrobatVersion){versionOk();}else{if(acrobatVersion>0){versionWarning();}else{if(acrobatVersion==0){noAcrobat();}else{acrobatVersion=0;noAcrobat();}}}}function versionWarning(){var a="It has been determined that you don't have Acrobat 4.0 on your machine.";a+="\nIf you?d like to download and upgrade Acrobat, click OK. ";a+="\nIf not, choose Cancel.";if(confirm(a)){flexWin("http://www.adobe.com/products/acrobat/readstep.html","auto","800","550","adobe","toolbar");}}function noAcrobat(){var a="In order to view this document you need the Adobe Acrobat reader.";a+="\nIf you?d like to download and install Acrobat, click OK. ";a+="\nIf not, choose Cancel.";a+="\n\nNOTE: Please refresh this page after the installing the Adobe Reader.";if(confirm(a)){flexWin("http://www.adobe.com/products/acrobat/readstep.html","auto","800","550","adobe","toolbar");}}function versionOk(){flexWin(acrobatUrl,"yes","1024","768","acrobatUrl","all");}
