var CheckCount=0;function StoreModel(){for(var a=0;a<document.getElementById("ddModel").options.length;a++)if(document.getElementById("ddModel").options[a].selected)document.getElementById("SelectedModel").value=document.getElementById("ddModel").options[a].text}function CheckCheck(a){if(a.checked)CheckCount++;else CheckCount--;if(CheckCount>=4){alert("Maximum of 3 vehicle may be selected at one time for comparison");CheckCount=3;a.checked=false}}function ChangeSearch(a){if(a==0)document.getElementById("btSearch").src="BTNsearch_O.gif";else if(a==1)document.getElementById("btSearch").src="BTNsearch_N.gif";else document.getElementById("btSearch").src="BTNsearch_D.gif"}function ChangeHeader(d,c){var b,a;b=document.getElementById("DataGrid1__ctl1_"+c).style.backgroundImage.length;b=b-5;a=document.getElementById("DataGrid1__ctl1_"+c).style.backgroundImage.substr(0,b);if(a.substr(a.length-1,1)!="D")d.style.backgroundImage=a+"_O.gif)"}function ChangeHeaderBack(d,c){var b,a;b=document.getElementById("DataGrid1__ctl1_"+c).style.backgroundImage.length;b=b-5;a=document.getElementById("DataGrid1__ctl1_"+c).style.backgroundImage.substr(0,b);if(a.substr(a.length-1,1)=="O"){a=a.substr(0,a.length-2);d.style.backgroundImage=a+".gif)"}}function SetBackImage(a,d,c){var b="gif";document.body.style.backgroundImage="url(backgrounds/"+a+"/"+d+"_gradient_top."+b+")";document.body.style.backgroundColor=c;if(a=="5"){document.body.style.backgroundRepeat="repeat-y";document.body.style.backgroundPosition="center"}else{document.body.style.backgroundRepeat="repeat-x";document.body.style.backgroundPositionX="center"}}
