Skip to content

Breaking News

Author
PUBLISHED: | UPDATED:

http://www.cars.com/js/utility.js
http://www.cars.com/includes/js/video/vidYears.js
http://www.cars.com/js/wss/flashFunctions.js

var vidTitle = “”;
var vidCaption = “”;
var vidSection = “”;
try{vidSection = opener.vidSection;}catch(e){}
if(vidSection != “” && vidSection != null){
vidSection += ” Video”;
}else if(vidSection == “” || vidSection == null) {
vidSection = ”  “;
}
if(vidSection == “” || vidSection == null || vidSection == ‘  ‘) vidSection = “Cars.com Video”;
if(false) vidSection = “MotherProof Video”;
if(false) vidSection = “”;

try{vidTitle = opener.vidTitle;}catch(e){}

if(vidTitle == “” || vidTitle == null){vidTitle = “”;}

vidCaption = “”;
if(vidCaption == “” || vidCaption == null){
try{vidCaption = opener.vidCaption;}catch(e){}
}

function doTitle(){if (vidTitle != “” && vidTitle != null) document.write(“

“+vidTitle+”

“);document.close();}
function doCaption(){
if (vidCaption != “” && vidCaption != null) {
document.write(‘

‘+vidCaption+’

‘);document.close();
}else {
document.write(‘

‘);document.close();
}
}
function doSection(){if (vidSection != “” && vidSection != null) document.write(vidSection); document.close(); }

var pgtitle = vidTitle;
var ref = “advice”;
var frmpg = “/video/player.jsp”;
var storybody = vidCaption;
var varstr = “videoId=87922078001”;
var iscache = 0;
function emailToFriend()
{

openPopup(‘/go/email/mailerPopUp.jsp’, “mailpopup”, “width=425,height=600,top=50,left=50”);
}

function setVids(yrIndex){
var mmDrop = document.videonav.vehicledropdown;
mmDrop.options.selectedIndex = 0; // init selection index
mmDrop.options.length = 1; // clear select

if(vidYears[yrIndex]){
var saveDisplayTxt = “”;
var urlStr = “”;
var cntr = 1;

for (i=1;i<vidYears[yrIndex].length;i++){
urlStr="makeid="+vidYears[yrIndex][i][0]+"&year="+vidYears[yrIndex][0]+"&modelid="+vidYears[yrIndex][i][1];//+"&location="+vidYears[yrIndex][i][4];
var displayTxt = vidYears[yrIndex][i][2]+" "+vidYears[yrIndex][i][3];
if(saveDisplayTxt != displayTxt && displayTxt != "" ) {
mmDrop.options[cntr] = new Option(displayTxt, urlStr);
if(vidYears[yrIndex][i][4] == '') mmDrop.options[cntr].selected=true;
saveDisplayTxt = displayTxt;
cntr +=1;
}
}
}
}

function selectItem(){
urlStr=document.videonav.vehicledropdown.options[document.videonav.vehicledropdown.selectedIndex].value;
location.replace("player.jsp?self=t&"+urlStr);
return;
}

function showVidNav(){
var d = document.getElementById('vidNavDropdown');
if (d.style.visibility != "visible") {
d.style.visibility = "visible";
document.getElementById('changeLinkIcon').src = "images/minusIcon.jpg";
}
else if (d.style.visibility == "visible") {
d.style.visibility = "hidden";
document.getElementById('changeLinkIcon').src = "images/plusIcon.jpg";
}
d.style.top = "65px";
}

function hideDropdown(){
var d = document.getElementById('vidNavDropdown');
if (d.style.visibility == "visible") {
d.style.visibility = "hidden";
}
}

var fromPG = false;
var offset = 0;
if(fromPG) offset = 20;
function winSize(){
if(opener){
if(navigator.userAgent.indexOf('MSIE')!=-1) window.resizeTo(752+offset,631+offset);
else if(window.innerWidth != eval(740+offset) || window.innerHeight != eval(600+offset)) {
window.innerWidth = 740+offset; window.innerHeight = 600+offset;
}
}
}
window.resizeTo(900,705);

http://www.cars.com/includes/js/video/vidYears.js

http://admin.brightcove.com/js/BrightcoveExperiences.js
http://admin.brightcove.com/js/APIModules_all.js

http://www.cars.com/js/cars/carsBrightcove.js

CARS.video._videoToLoad = ‘87922078001’;

* { outline: none; }
#wrapper { width: 840px; }
#player { width: 100%; }

Year

Select a Vehicle 

var indexHold;
var i=1;
for (i=1;i<vidYears.length;i++ )
{
yearShow = vidYears[i][0];
document.videonav.videoyear.options[i] = new Option( yearShow, vidYears[i][0] );
if(vidYears[i][0] == ''){
indexHold=i;
document.videonav.videoyear.options[i].selected=true;
}
}
setVids(indexHold);