// Drop Bown Menu - Head Script
// copyright Stephen Chapman, 4th March 2005, 5th February 2006
// you may copy this menu provided that you retain the copyright notice

var fix = 0; var delay = 500; var modd = 0;
var bar = new menuBar();
var string = document.location.href;

if (string.indexOf("forums")!=-1) 
{
bar.addMenu('Forums');
bar.addItem('https://www.allpar.com/forums/index.php?app=core&module=usercp&tab=core&area=email','Update email address');
bar.addItem('http://www.allpar.com/forums/index.php?app=subscriptions','Subscribe/Donate');
bar.addItem('http://www.allpar.com/forums/index.php?app=members&module=messaging','Your PMs and messages');
bar.addItem('http://www.allpar.com/forums/index.php?app=core&module=usercp&tab=members','Change my settings');
bar.addItem('http://www.allpar.com/forums/index.php?app=core&module=usercp&tab=members&area=facebook','Manage Facebook');
} 

bar.addMenu('Popular');
bar.addItem('http://www.allpar.com/','<b>Home</b>');
bar.addItem('/news/','News briefs');
bar.addItem('/forums/','Forums');
bar.addItem('/model/','Cars by name');
bar.addItem('/trucks/','Trucks, Campers, Buses, SUVs');
bar.addItem('/model/upcoming.html','Rumors and predictions');
bar.addItem('/fix/','Repairs');
bar.addItem('/history/chrysler-years/','Chrysler by year');
bar.addItem('/mopar.html','Engines and transmissions');

bar.addMenu('Get Involved');
bar.addItem('/forums/index.php','Forums');
bar.addItem('/cars/stories/index.php','Reader Stories');
bar.addItem('/forums/index.php?showforum=122','Classifieds');
bar.addItem('/forums/index.php?app=garage','Registry');
bar.addItem('/weblogs/','Web-Logs');
bar.addItem('/forums/index.php?showforum=122','Classified/Swap Meet');
bar.addItem('/gallery/','Photos');
bar.addItem('/cgi-bin/sumail/mail.cgi','Get Weekly Updates');
bar.addItem('/i/form/form.php','Contact Us / Report errors');

bar.addMenu('News');
bar.addItem('/news/index.php','News Briefs');
bar.addItem('/forums/index.php?showforum=65','News and Rumors Forum');
bar.addItem('/model/upcoming.html','Upcoming Cars, Trucks');
bar.addItem('/i/meets/car-shows.html','Car Shows');
bar.addItem('/cgi-bin/sumail/mail.cgi','Allpar Updates');

bar.addMenu('Cars and Trucks');
bar.addItem('/model/index.html','All, by name');
bar.addItem('/history/chrysler-years/index.html','All, by year');
bar.addItem('/reviews/index.html','Reviews');
bar.addItem('/model/upcoming.html','Upcoming/rumors');
bar.addItem('/model/concepts.html','Concepts');
bar.addItem('/model/m/minivans.html','Minivans');
bar.addItem('/trucks/index.html','Trucks, Jeeps, SUVs, Vans, Campers');
bar.addItem('/squads/index.html','Police, Ambulance, Hearse, etc');
bar.addItem('/world/index.html','Outside the US');
// bar.addItem('/old/club/index.php','200,000 Mile Club');
bar.addItem('/cars/index.html','Other cars');

bar.addMenu('Tech / Fix / Engines');
bar.addItem('/fix/index.html','Repairs');
bar.addItem('/mopar.html','Engines');
bar.addItem('/mopar/phoenix-engines.html','Pentastar V6');
bar.addItem('/mopar/transmissions/','Transmissions');
bar.addItem('/corporate/technology.html','Innovation and Technology');
bar.addItem('/corporate/new-technology.html','New or Ongoing');
// bar.addItem('/corporate/alternative-fuels.html','Environment and Alternative Fuel');
bar.addItem('/stereo/','Stereos');
bar.addItem('/corporate/chrysler-group/five-year-plan.html','2009-14 - Five Year Plan');

bar.addMenu('People / History');
bar.addItem('/corporate/bios/index.html','People of Chrysler');
bar.addItem('/cars/stories/index.php','Car Stories');
bar.addItem('/history/index.html','Chrysler History');
bar.addItem('/history/chrysler-years/index.html','Chronology');
bar.addItem('/history/logos.html','Logos');
bar.addItem('/trucks/index.html#military','Military');
bar.addItem('/world/index.html','Worldwide');

bar.addMenu('Brands');
bar.addItem('/corporate/airtemp.php','Airtemp');
bar.addItem('/amc/index.html','AMC');
bar.addItem('/corporate/bios/cummins.html','Cummins');
bar.addItem('/history/index.html','Chrysler');
bar.addItem('/history/marine.html','Chrysler Marine');
bar.addItem('/cars/dodge/','Dodge');
bar.addItem('/cars/adopted/fiat/fiat-cars.html','Fiat');
bar.addItem('/cars/adopted/GEM/index.html','GEM');
bar.addItem('/trucks/index.html','Ram / Dodge Trucks');
bar.addItem('/SUVs/jeep/','Jeep');
bar.addItem('/cars/plymouth/index.php','Plymouth');
bar.addItem('/index.html','<b>---OTHER BRANDS---</b>');
bar.addItem('/world/spain.html','Barreiros');
bar.addItem('/history/desoto.html','DeSoto');
bar.addItem('/history/eagle.html','Eagle');
bar.addItem('/old/fargo.html','Fargo');
bar.addItem('/cars/adopted/farmobil.html','Farmobil');
bar.addItem('/trucks/graham-brothers.html','Graham Bros');
bar.addItem('/cars/adopted/humber.html','Humber');
bar.addItem('/cars/adopted/hudson-1936.html','Hudson');
bar.addItem('/cars/adopted/kaiser.html','Kaiser');
bar.addItem('/cars/adopted/matra/index.html','Matra');
bar.addItem('/history/maxwell.html','Maxwell');
bar.addItem('/cars/adopted/nash.html','Nash');
bar.addItem('/mopar/perkins.html','Perkins');
bar.addItem('/cars/adopted/rootes.html','Rootes: Hillman, Sunbeam, etc');
bar.addItem('/cars/adopted/simca/index.html','Simca');
bar.addItem('/corporate/bios/willys.html','Willys');

bar.addMenu('About Allpar');
bar.addItem('/index.html','Home');
bar.addItem('/i/form/form.php','Contact Us');
bar.addItem('/weblogs/','Web-logs');
// bar.addItem('/i/meets/index.html','Meets');
// bar.addItem('/i/videos.php','Video');
bar.addItem('/forums/index.php?app=garage','Vehicle Registry');
// bar.addItem('http://www.weborial.com/macstats/','Our MacStats site');
// bar.addItem('http://www.allpar.com/espanol','Espanol');
bar.addItem('/i/terms.html','Terms of Service');
bar.addItem('/index.html#search','<b>Search</b>');

bar.addMenu('Other');
bar.addItem('/corporate/factories.html','Factories');
// bar.addItem('/i/videos.php','Videos');
bar.addItem('/history/marine.html','Boats');
bar.addItem('/toys/index.html','Models and Toys');
// bar.addItem('/history/movies.html','Movies, TV, Celebrities');
// bar.addItem('/links/','Links');
// bar.addItem('/ed/index.html','Opinions');
bar.addItem('/racing/index.html','Racing');
bar.addItem('/world/index.html','Worldwide');



// do not change anything below this line
var blc = '#4D73B1'; // background 
var blh = '#ffffff';
var bla = '#328fce';
var lc = '#ffffff';
var lh = '#328fce';
var la = '#ffffff';

function menuBar() 
{this.jj = -1;
this.kk = 0;
this.mO = new Array();
this.addMenu = addMenu;
this.addItem = addItem;
this.writeBar = writeBar;
this.writeDrop = writeDrop;
}
function addMenu(main,link) 
{this.mO[++this.jj] = new Object();
this.mO[this.jj].main = main;
this.kk = 0;
this.mO[this.jj].link = new Array();
this.mO[this.jj].name = new Array();
}
function addItem(link,name) 
{this.mO[this.jj].link[this.kk] = link;
this.mO[this.jj].name[this.kk++] = name;
}
function writeBar() 
{for (var i=1;
i <= this.mO.length;
 i++)
{document.write('<span id="navMenu'+i+'" class="mH">'+this.mO[i-1].main+'<\/span>');}
}
function writeDrop() 
{for (var i=1;
i <= this.mO.length;
 i++)
{document.write('<div id="dropMenu'+i+'" class="mD">\r\n');
for (var h=0;
h < this.mO[i-1].link.length;
 h++)

// this has the extra tracking code 

//{document.write('<a class="mL" href="/js/clickcount.php?url='+this.mO[i-1].link[h]+'">'+this.mO[i-1].name[h]+'<\/a>');}

{document.write('<a href="'+this.mO[i-1].link[h]+'" class="mL">'+this.mO[i-1].name[h]+'<\/a>');}

document.write('<\/div>\r');}}
if (fix) {window.onscroll=sMenu};
window.onload=iMenu;
var onm = null;
var ponm = null;
var podm = null;
var ndm = bar.mO.length;
function posY() 
{return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;
}
 function sMenu() 
{document.getElementById('mB').style.top = posY() + 'px';
 for (i=1;
 i<=ndm;
 i++) 
{menuName = 'dropMenu' + i;
odm = document.getElementById(menuName);
 if (onm) 
{var yPos = onm.offsetParent.offsetTop + onm.offsetParent.offsetHeight;
odm.style.top = yPos + 'px';
}
}
}
 function iMenu() 
{if (document.getElementById) 
{document.onclick = mHide;
 for (i=1;
 i<=ndm;
 i++) 
{menuName = 'dropMenu' + i;
 navName = 'navMenu' + i;
 odm = document.getElementById(menuName);
 onm = document.getElementById(navName);
 odm.style.visibility = 'hidden';
 onm.onmouseover = mHov;
 onm.onmouseout = mOut;
}
 onm = null;
}
 return;
}
 function mHov(e) 
{if (modd) 
clearTimeout(modd);
document.onclick = null;
honm = document.getElementById(this.id);
 if (honm != onm) 
{honm.style.color = lh;
 honm.style.backgroundColor = blh;
}
 menuName = 'drop' + this.id.substring(3,this.id.length);
 odm = document.getElementById(menuName);
 if (podm == odm) 
{mHide();
 return;
}
 if (podm != null) mHide();
 onm = document.getElementById(this.id);
 if ((ponm != onm ) || (podm == null)) 
{onm.style.color = la;
 onm.style.backgroundColor = bla;
}
 if (odm) 
{xPos = onm.offsetParent.offsetLeft + onm.offsetLeft;
 yPos = onm.offsetParent.offsetTop + onm.offsetParent.offsetHeight;
 odm.style.left = xPos + 'px';
 odm.style.top = yPos + 'px';
 odm.style.visibility = 'visible';
 odm.onmouseover = omov;
 odm.onmouseout = omot;
 podm = odm;
 ponm = onm;
}
}

function omov()  {if (modd) clearTimeout(modd); }

function omot()  {modd = setTimeout('mHide()',delay);}

function mOut(e) 
{modd = setTimeout('mHide()',delay);  document.onclick = mHide; oonm = document.getElementById(this.id);
 if (oonm != onm)  {
		//oonm.style.color = lc;  
	//oonm.style.backgroundColor = blc;
	}
}

function mHide() 
{document.onclick = null;
 if (podm) {podm.style.visibility = 'hidden';
podm = null; ponm.style.color = lc;  ponm.style.backgroundColor = blc;
}
 onm = null;
}

if (fix) 
{var ag = navigator.userAgent.toLowerCase(); var isG = (ag.indexOf('gecko') != -1); var isR=0; if (isG) 
{t = ag.split("rv:"); isR = parseFloat(t[1]); }
if (isR && isR<1) { setInterval('sMenu()',50) };
}

