function setDynaList(n){var t=document.forms[n[2]].elements[n[1]],i=document.forms[n[4]].elements[n[3]],r=n[5];return clearDynaList(i),t.selectedIndex==-1&&(t.selectedIndex=0),populateDynaList(i,t[t.selectedIndex].value,r),!0}function clearDynaList(n){for(var t=n.options.length;t>=0;t--)n.options[t]=null;n.selectedIndex=-1}function populateDynaList(n,t,i){for(var r=0;r<i.length;r=r+3)i[r]==t&&(n.options[n.options.length]=new Option(i[r+1],i[r+2]));n.options.length==0&&(n.options[n.options.length]=new Option("[none available]",0)),n.selectedIndex=0}function Kermy_JS(n){return eval(n)}function MM_findObj(n,t){var u,r,i;for(t||(t=document),(u=n.indexOf("?"))>0&&parent.frames.length&&(t=parent.frames[n.substring(u+1)].document,n=n.substring(0,u)),(i=t[n])||!t.all||(i=t.all[n]),r=0;!i&&r<t.forms.length;r++)i=t.forms[r][n];for(r=0;!i&&t.layers&&r<t.layers.length;r++)i=MM_findObj(n,t.layers[r].document);return!i&&t.getElementById&&(i=t.getElementById(n)),i}function MM_validateForm(){for(var i,h,u,n,o,s,f,t="",e=MM_validateForm.arguments,r=0;r<e.length-2;r+=3)n=e[r+2],val=MM_findObj(e[r]),val&&(u=val.name,(val=val.value)!=""?n.indexOf("isEmail")!=-1?(i=val.indexOf("@"),(i<1||i==val.length-1)&&(t+="- "+u+" must contain an e-mail address.\n")):n!="R"&&(o=parseFloat(val),isNaN(val)&&(t+="- "+u+" must contain a number.\n"),n.indexOf("inRange")!=-1&&(i=n.indexOf(":"),s=n.substring(8,i),f=n.substring(i+1),(o<s||f<o)&&(t+="- "+u+" must contain a number between "+s+" and "+f+".\n"))):n.charAt(0)=="R"&&(t+="- "+u+" is required.\n"));t&&alert("The following error(s) occurred:\n"+t),document.MM_returnValue=t==""}function setTID(){}function SelectMake(n){try{for(i=0;i<document.forms[0].Make.length;++i)document.forms[0].Make.options[i].text.toLowerCase()==n.toLowerCase()&&(document.forms[0].Make.options[i].selected=!0)}catch(t){}}function SelectModel(n){try{for(i=0;i<document.forms[0].Model.length;++i)document.forms[0].Model.options[i].text.toLowerCase()==n.toLowerCase()&&(document.forms[0].Model.options[i].selected=!0)}catch(t){}}function disable(){try{document.getElementById("submit").disabled=!1}catch(n){}}function Sumbit(){try{ValidateZipCode(document.getElementById("hdnUrl").value,document.getElementById("Zipcode").value)=="false"?(alert("Please Enter Valid Zipcode."),submit_page=!1):(submit_page=!0,document.getElementById("makeimage__").src=document.getElementById("hdnUrl").value+"images/brand/"+document.getElementById("Make").value+".jpg",setdealerLst__(document.getElementById("hdnBrowser").value,document.getElementById("hdnUrl").value,document.getElementById("Make").value,document.getElementById("Zipcode").value))}catch(n){}}function setMakeImage(){try{setImage(document.getElementById("browser").value,document.getElementById("siteurl").value,document.getElementById("Make").value,document.getElementById("Model").value),document.getElementById("makemodeltitle").innerHTML=document.getElementById("Make").value+" "+document.getElementById("Model").value}catch(n){alert(n)}}function setImage(n,t,i,r){var u=!1,f;window.location.href.indexOf("www")==-1&&(t=t.replace("www.",""));if(window.XMLHttpRequest)u=new XMLHttpRequest,u.overrideMimeType&&u.overrideMimeType("text/xml");else if(window.ActiveXObject)try{u=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{u=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}!u,f=t+"Ajax/Server.aspx?request=getImage&make="+i+"&model="+r,u.onreadystatechange=function(){alertContents(u)},n=="Firefox"?u.open("GET",f,!0):n=="IE"&&u.open("POST",f,!0),u.send(null)}function alertContents(n){if(n.readyState==4)if(n.status==200)try{document.getElementById("makeimage").src=n.responseText}catch(t){}}function setdealerLst__(n,t,i,r){var u=!1,f;window.location.href.indexOf("www")==-1&&(t=t.replace("www.",""));if(window.XMLHttpRequest)u=new XMLHttpRequest,u.overrideMimeType&&u.overrideMimeType("text/xml");else if(window.ActiveXObject)try{u=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{u=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}!u,f=t+"Ajax/Server.aspx?request=getDealersLst&make="+i+"&zipcode="+r,n=="IE"?u.open("POST",f,!1):u.open("GET",f,!1),u.send(null),alertDealerContents(u)}function alertDealerContents(n){if(n.readyState==4)if(n.status==200)try{var t=n.responseText;dealerslist=t,showPopUp("dialog")}catch(i){}}function captureEnterKey(n){n||(n=window.event||event),n.keyCode==13&&Sumbit()}function getXMLHTTPResponse(n){var t=!1;if(window.XMLHttpRequest&&!window.ActiveXObject)try{t=new XMLHttpRequest}catch(i){t=!1}else if(window.ActiveXObject)try{t=new ActiveXObject("Msxml2.XMLHTTP")}catch(i){try{t=new ActiveXObject("Microsoft.XMLHTTP")}catch(i){t=!1}}if(t)return t.open("GET",n,!1),t.send(""),t.responseText}function ValidateZipCode(n,t){return url=n+"AJAX/Server.aspx?request=validatezip&zipcode="+t,getXMLHTTPResponse(url)}function ValidateZipInput(n){var i=/[^\d]/g,t=n.value.replace(i,"");n.value=t;return}
