
var bName=navigator.appName;var agt=navigator.userAgent.toLowerCase();var NS=(bName=="Netscape");var IE=(bName=="Microsoft Internet Explorer");var IE5x=(agt.indexOf("msie 5")!=-1);var bVer=parseInt(navigator.appVersion);var NS4=(NS&&bVer<5);var NS6=(NS&&bVer>=5);var IESP2=(agt.indexOf("sv1")!=-1);var isMac=(agt.indexOf('mac')!=-1);var isMacIE5x=(isMac&&IE5x);var winVar=null;var actionVar;var docRef="document.";if(NS4)docRef="document.";if(NS6)docRef="document.";if(IE)docRef="document.all.";document.preloadArray=new Array();document.chosenPhotos=new Array();chosenCaptions=new Array();var chosenPhotoIMGobjectName="chosenPhotoIMG";var chosenPhotoDIVobjectName="chosenPhotoCaption";var lastChosenPhotoIndex=0;function preloadChosenPhoto(imageFile,caption)
{if(document.images)
{if(document.chosenPhotos==null)
{document.chosenPhotos=new Array();}
var p=document.chosenPhotos.length;if(imageFile.charAt(0)!="#")
{document.chosenPhotos[p]=new Image;document.chosenPhotos[p].src=imageFile;chosenCaptions[p]=caption;}}}
var shownRegExp=new RegExp(" shown","i");var appendShown=true;var appendNAV=false;function getPhotoCaption(index)
{if(index<chosenCaptions.length&&null!=chosenCaptions[index])
{var caption=chosenCaptions[index];caption=caption.replace(shownRegExp,'');if(null==caption||""==caption.replace(/ /g,""))
{caption=chosenPhotoDIVobjectText;}
else if(appendShown)
{caption+=" shown&nbsp;";if(appendNAV){caption+="(Not Actual Vehicle)";}}
return caption;}}
function choosePhoto(n,w,h)
{var imgRef=eval(docRef+chosenPhotoIMGobjectName);if(null!=imgRef&&n<document.chosenPhotos.length)
{imgRef.src=document.chosenPhotos[n].src;if(w){if(document.chosenPhotos[n].width>w){imgRef.width=w}}
updateChosenPhotoCaption(n);highlightPhoto('tnImg'+n);}
lastChosenPhotoIndex=n;}
var highlightedPhoto=null;function highlightPhoto(imgName)
{var imgRef=eval(docRef+imgName);if(null!=imgRef)
{if(null!=highlightedPhoto){highlightedPhoto.className="photo";}
imgRef.className="photoHighlight";highlightedPhoto=imgRef;}}
var chosenPhotoDIVobjectText=null;function updateChosenPhotoCaption(n)
{var divRef=null;if(IE||NS4)
{divRef=eval(docRef+chosenPhotoDIVobjectName);}
else
{divRef=document.getElementById(chosenPhotoDIVobjectName);}
if(null!=divRef)
{if(null==chosenPhotoDIVobjectText)
{chosenPhotoDIVobjectText=divRef.innerHTML;}
var caption=getPhotoCaption(n,chosenPhotoDIVobjectText);if(null==caption||""==caption.replace(/ /g,""))
{divRef.innerHTML=chosenPhotoDIVobjectText;}
else
{divRef.innerHTML=caption;}}}