// JavaScript Document
// get models for quick search
function GetModels(setfocus)
{var xmlHttp2;try
{xmlHttp2=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e)
{alert("Your browser does not support AJAX!");return false;}}}
xmlHttp2.onreadystatechange=function()
{if(xmlHttp2.readyState==4)
{document.getElementById("ModelsList").innerHTML=xmlHttp2.responseText;if(setfocus==1)document.quicksearch.Model.focus();}}
xmlHttp2.open("GET","/fetchmodels.asp?Make="+document.quicksearch.Make.value+"&Preselected="+document.quicksearch.PreselectedModel.value,true);xmlHttp2.send(null);}
function GetNewModels(setfocus)
{var xmlHttp2;try
{xmlHttp2=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e)
{alert("Your browser does not support AJAX!");return false;}}}
xmlHttp2.onreadystatechange=function()
{if(xmlHttp2.readyState==4)
{document.getElementById("NewModelsList").innerHTML=xmlHttp2.responseText;if(setfocus==1)document.newquicksearch.newmodel.focus();}}
xmlHttp2.open("GET","/fetchnewmodels.asp?Make="+document.newquicksearch.newmake.value,true);xmlHttp2.send(null);}
function GetDerivatives(setfocus)
{var xmlHttp2;try
{xmlHttp2=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e)
{alert("Your browser does not support AJAX!");return false;}}}
xmlHttp2.onreadystatechange=function()
{if(xmlHttp2.readyState==4)
{document.getElementById("DerivativeList").innerHTML=xmlHttp2.responseText;if(setfocus==1)document.newquicksearch.newtrim.focus();}}
xmlHttp2.open("GET","/fetchderivatives.asp?Make="+document.newquicksearch.newmake.value+"&Model="+document.newquicksearch.newmodel.value,true);xmlHttp2.send(null);}
//drop down
var TimeOut=1000;var currentLayer=null;var currentitem=null;var currentLayerNum=0;var noClose=0;var closeTimer=null;function mopen(n)
{var l=document.getElementById("menu"+n);var mm=document.getElementById("mmenu"+n);if(l)
{mcancelclosetime();l.style.visibility='visible';if(currentLayer&&(currentLayerNum!=n))
currentLayer.style.visibility='hidden';currentLayer=l;currentitem=mm;currentLayerNum=n;}
else if(currentLayer)
{currentLayer.style.visibility='hidden';currentLayerNum=0;currentitem=null;currentLayer=null;}}
function mclosetime()
{closeTimer=window.setTimeout(mclose,TimeOut);}
function mcancelclosetime()
{if(closeTimer)
{window.clearTimeout(closeTimer);closeTimer=null;}}
function mclose()
{if(currentLayer&&noClose!=1)
{currentLayer.style.visibility='hidden';currentLayerNum=0;currentLayer=null;currentitem=null;}
else
{noClose=0;}
currentLayer=null;currentitem=null;}
document.onclick=mclose;
//axaz tabs
//
//
//** Ajax Tabs Content script v2.0- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Updated Oct 21st, 07 to version 2.0. Contains numerous improvements
//** Updated Feb 18th, 08 to version 2.1: Adds a public "tabinstance.cycleit(dir)" method to cycle forward or backward between tabs dynamically. Only .js file changed from v2.0.
//** Updated April 8th, 08 to version 2.2:
// -Adds support for expanding a tab using a URL parameter (ie: http://mysite.com/tabcontent.htm?tabinterfaceid=0)
// -Modified Ajax routine so testing the script out locally in IE7 now works
var ddajaxtabssettings={}
ddajaxtabssettings.bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
ddajaxtabssettings.loadstatustext="
"
////NO NEED TO EDIT BELOW////////////////////////
function ddajaxtabs(tabinterfaceid, contentdivid){
this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container
this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container
this.enabletabpersistence=true
this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container
this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array
this.contentdivid=contentdivid
this.defaultHTML=""
this.defaultIframe=''
this.defaultIframe=this.defaultIframe.replace(/