Array.prototype.inArray=function(a){for(var i=0;i<this.length;i++){if(a==this[i]){return true;}}return false;};Array.prototype.ReturnIndex=function(a){for(var i=0;i<this.length;i++){if(a==this[i]){return i;}}return-1;};function _int(a){return a-0;}function $(id,d){if(typeof(id)=='string'){return(isDefined(d)?d:document).getElementById(id);}return id;}function $et(t,d){return(isDefined(d)?d:document).getElementsByTagName(t);}function $f(a){return document[a];}function $ga(a,b){var c=a.getAttribute(b);return c?c:false;}function $rs(id,a){return $(id).style[(isDefined(a)?a:'display')];}function add_s_text(id,ind,val){$(id).options[ind].text=val;}function Ajax(a,b,c,d,e,f,g){var h=GetXmlHttpObject();if(h==null){alert("Your browser does not support AJAX!");return;}h.onreadystatechange=function(){if(h.readyState==4){if(h.status==200){if(b==''||h.responseText==b){if(c!=''){eval(c);}else{alert(h.responseText);}}else{if(d!=''){eval(d);}else{alert(h.responseText);}}}else{if(e!=''){eval(e);}else{alert('Error: Could Not Run Asynchronous Request');}}}else{}};if(a=='POST'){h.open("POST",f,true);h.setRequestHeader('Content-Type','application/x-www-form-urlencoded');h.send(g);}else{h.open("GET",f+(str_notEmpty(g)?'?'+g:''),true);h.send(null);}}function bold(t,s){if(s=='1'){return'<b>'+t+'</b>';}else{return t;}}function C_Count(a,b,c){var rem=a-return_value(b).length;if(rem<0){text_value(b,return_value(b).substring(0,a));}else{insert_html(c,rem);}}function changeOpac(a,b){style_display(b,a/100,'opacity');style_display(b,a/100,'MozOpacity');style_display(b,a/100,'KhtmlOpacity');style_display(b,'alpha(opacity='+a+')','filter');}function checkbox_bold(a,b){insert_html(b,bold(trim_tag(return_html(b),'b'),return_check(a)));}function clean_url(s){return encodeURIComponent(s);}function decode_url(s){return decodeURIComponent(s);}function dimvalue(id,attr){return _int(strip($rs(id,attr),'px'));}function dtype(i){return(document.all)?'block':i;}function Fade(a,b,c,d,e){if(!isDefined(e)){var a=return_MemOfIdByTag(a,b);style_display(a[c],'block');if(a.length>1){setTimeout(function(){Fade(a,0,c,isDefined(d)?d:5,1);},4000);}}else{if(b==0){style_display(a[c],'none');c=(c==a.length-1)?0:c+1;style_display(a[c],'block');}changeOpac(b>=100?100:b,a[c]);setTimeout(function(){Fade(a,b>=100?0:b+d,c,d,1);},b>=100?5000:20);}}function fd(id,value){var s=s2a(id);for(var i=1;i<s[0]+1;i++){$(s[i]).disabled=value;}}function form_check(id,value){var s=s2a(id);for(var i=1;i<s[0]+1;i++){$(s[i]).checked=value;}}function format_num(a){a=a.toFixed(2);var b=a.length-3;var a_end=a.substr(b,3);b=a.substr(0,b);var b_end=b.length-1;var count=1;var c='';for(var f=b_end;f>=0;f--){if(count==4&&b.substr(f,1)!='-'){c=','+c;count=0;}c=b.substr(f,1)+c;count++;}c=c+a_end;return c;}function GetXmlHttpObject(){var b=false;try{b=new ActiveXObject("Msxml2.XMLHTTP");}catch(exception1){try{b=new ActiveXObject("Microsoft.XMLHTTP");}catch(exception2){b=false;}}if(!b&&window.XMLHttpRequest){b=new XMLHttpRequest();}return b;}function hover(a,b,c){var t=$et(a);for(var i=0;i<t.length;i++){if(t[i].className.split(' ').inArray(b)){t[i].onmouseover=function(){this.className+=' '+c;return false;};t[i].onmouseout=function(){this.className=this.className.split(' ').slice(0,-1).join(' ');return false;};}}}function insert_html(id,value){id=s2a(id);for(var i=1;i<id[0]+1;i++){$(id[i]).innerHTML=value;}}function isDefined(a){return typeof(a)=='undefined'?false:true;}function LBox(a){var d,e,f,g;if(window.innerHeight&&window.scrollMaxY){d=document.body.scrollWidth;e=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){d=document.body.scrollWidth;e=document.body.scrollHeight;}else{d=document.body.offsetWidth;e=document.body.offsetHeight;}if(self.innerHeight){f=self.innerWidth;g=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){f=document.documentElement.clientWidth;g=document.documentElement.clientHeight;}else if(document.body){f=document.body.clientWidth;g=document.body.clientHeight;}if(e<g){e=g;}if(d<f){d=f;}var a=isDefined(a)?a:'OL';style_display(a,e+'px','height');style_display(a,'block');}function PageScroll(a){if(window.pageYOffset||window.pageXOffset){var ret=[window.pageXOffset,window.pageYOffset];}else if(document.documentElement.scrollTop||document.documentElement.scrollLeft){var ret=[document.documentElement.scrollLeft,document.documentElement.scrollTop];}else{var ret=[document.body.scrollLeft,document.body.scrollTop];}if(!isDefined(a)){return ret;}else if(a=='x'){return ret[0];}else{return ret[1];}}function PageSize(a){if(self.innerHeight){var r=[self.innerWidth,self.innerHeight];}else if(document.documentElement&&document.documentElement.clientHeight){var r=[document.documentElement.clientWidth,document.documentElement.clientHeight];}else if(document.body){var r=[document.body.clientWidth,document.body.clientHeight];}else{var r=[0,0];}if(!isDefined(a)){return r;}else if(a=='w'){return r[0];}else{return r[1];}}function Payment(a,b,c,d,e,f){if(typeof(a)!='number'){a=_int(strip(a,['$',',']));}if(typeof(b)!='number'){b=_int(strip(b,['$',',']));}if(typeof(c)!='number'){c=_int(strip(c,'%'));}if(typeof(d)!='number'){d=_int(d);}if(typeof(e)!='number'){e=_int(e);}c=c/1200;var p=((a-b)*c)/(1-Math.pow((1+c),-(d*e)));if(typeof(f)=='object'){if(str_notEmpty(f[0])){insert_html(f[0],format_num(p));}if(str_notEmpty(f[1])){insert_html(f[1],format_num(p*d*e));}if(str_notEmpty(f[2])){insert_html(f[2],format_num((p*d*e)-a+b));}}else{return[p,p*d*e,(p*d*e)-a+b];}}function remove_element(a){a=s2a(a);for(var i=1;i<a[0]+1;i++){$(a[i]).parentNode.removeChild($(a[i]));}}function remove_options(a,b){var b=isDefined(b)?s2a(b).slice(1):[];var n=$(a).options.length-1;for(var i=n;i>=0;i--){if(!b.inArray(i)){$(a).options[i]=null;}}}function resize(a,b,c,d,e,f,g){switch(isDefined(f)?f:'C'){case'C':var cw=$rs(d,'width')==''?a[0]:dimvalue(d,'width');var ch=$rs(d,'height')==''?b[0]:dimvalue(d,'height');var tc=c[0]*Math.sqrt((Math.pow(a[1]-cw,2)+Math.pow(b[1]-ch,2))/(Math.pow(a[1]-a[0],2)+Math.pow(b[1]-b[0],2)));c[0]=tc<Infinity?tc:c[0];a[0]=cw;b[0]=ch;delete cw;delete ch;delete tc;case'SFI':style_display(d,a[0]+'px','width');style_display(d,b[0]+'px','height');break;}if($rs(d)!='block'){style_display(e,'none');style_display(d,'block');}if(dimvalue(d,'width')==a[1]&&dimvalue(d,'height')==b[1]){style_display(e,'block');}else{var g=isDefined(g)?g:'F';if(dimvalue(d,'width')!=a[1]){var inc=(a[1]-a[0])*(c[1]/1000)/c[0];if(((dimvalue(d,'width')+inc>a[1])&&a[1]>a[0])||((dimvalue(d,'width')+inc<a[1])&&a[1]<a[0])){style_display(d,a[1]+'px','width');}else{style_display(d,(dimvalue(d,'width')+inc)+'px','width');}}if(dimvalue(d,'height')!=b[1]){var inc=(b[1]-b[0])*(c[1]/1000)/c[0];if(((dimvalue(d,'height')+inc>b[1])&&b[1]>b[0])||((dimvalue(d,'height')+inc<b[1])&&b[1]<b[0])){style_display(d,b[1]+'px','height');}else{style_display(d,(dimvalue(d,'height')+inc)+'px','height');}if(g=='T'){style_display(d,(-(dimvalue(d,'height')/2))+'px','marginTop');}}setTimeout('resize(['+a+'],['+b+'],['+c+'],\''+d+'\',\''+e+'\',\'\',\''+g+'\')',c[1]);}}function return_check(id){if($(id).checked==false){return false;}return true;}function return_fvalue(a,b){return $f(a)[b].value;}function return_html(id){return $(id).innerHTML;}function return_MemOfIdByTag(a,b){return $(a).getElementsByTagName(b);}function return_s_index(id){return $(id).selectedIndex;}function return_s_text(id,opt){return $(id).options[isDefined(opt)?opt:return_s_index(id)].text;}function return_s_value(id,opt){if(return_s_index(id)>-1||isDefined(opt)){return $(id).options[isDefined(opt)?opt:return_s_index(id)].value;}else{return'false';}}function return_value(id){return $(id).value;}function s2a(s,d){s=s.split((isDefined(d)?d:','));var l=s.length;s.splice(0,0,l);return s;}function select_option(id,ind){id=s2a(id);for(var i=1;i<id[0]+1;i++){$(id[i]).selectedIndex=ind;}}function select_radio(f,n,ind,value){$f(f)[n][ind].checked=value;}function setTop(a,b,c,d){var d=isDefined(d)?d:'F';var e=[PageSize('h'),PageScroll('y')];if(e[1]<=b){e[0]=e[0]+e[1]-b;e[1]=b;}if(e[0]>a){e[1]=e[1]+((e[0]-(d=='F'?a:0))/2);}else{e[1]=e[1]+(d=='F'?0:a/2);}style_display(c,e[1]+'px','top');}function str_notEmpty(a){return isDefined(a)&&a!==''?true:false;}function strip(s,c){if(typeof(c)=='object'){c.unshift(c.length);}else{c=s2a(c);}var sl=s.length;for(var x=0;x<sl;x++){for(var i=1;i<c[0]+1;i++){s=s.replace(c[i],'');}}return s;}function style_display(id,value,a){if(typeof(id)=='string'){id=s2a(id);}else{if(typeof(id.length)=='undefined'){id=[1,id];}else{var id2=[id.length];for(var i=0;i<id2[0];i++){id2.push(id[i]);}id=id2;}}var a=isDefined(a)?a:'display';for(var i=1;i<id[0]+1;i++){if($(id[i])){$(id[i]).style[a]=value;}}}function text_value(id,value){id=s2a(id);for(var i=1;i<id[0]+1;i++){$(id[i]).value=value;}}function trim_tag(s,t){if(s.indexOf('<'+t.toLowerCase()+'>')=='0'||s.indexOf('<'+t.toUpperCase()+'>')=='0'){return s.slice(t.length+2,s.length-t.length-3);}else{return s;}}function validate(id,type,min,bgcolor,fcolor){text_value(id,return_value(id).replace(new RegExp(/^\s+/gm),''));text_value(id,return_value(id).replace(new RegExp(/\s+$/gm),''));if(type=='text'){var ret=(return_value(id).length<min)?false:true;}else if(type=='email'){var c=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;var ret=(c.test(return_value(id))==false||return_value(id).length<min)?false:true;}else if(type=='select'){var ret=(return_s_index(id)>min)?true:false;}else{return true;}if(ret==false){style_display(id,bgcolor,'backgroundColor');style_display(id,fcolor,'color');$(id).focus();}else{style_display(id,'','backgroundColor');style_display(id,'','color');}return ret;}function Calc_Payment(){Payment(return_value('Calc_Cost'),return_value('Calc_DownPayment'),return_value('Calc_Interest'),return_value('Calc_Term'),return_s_value('Calc_Term2'),['Calc_MonthlyPayment','Calc_TotalPaid','Calc_TotalInterest']);}function Hide_Calc(){style_display('Calc,Calc_Middle','none');}function Hide_Form(){style_display('OL,Form','none');insert_html('Limit_Value','300');var ids='Form_FName,Form_LName,Form_Phone,Form_Email,Form_CU,Form_Comments,Form_Year,Form_Make,Form_Model,Form_Color';var ids2='Form_PCM,Form_Type,Form_Meeting';text_value(ids,'');select_option(ids2,0);style_display(ids+','+ids2,'','backgroundColor');style_display(ids+','+ids2,'','color');}function Insert_Notice(id,t){switch(_int(t)){case 1:var title='Thank You For Your Request!';var message='We will be contacting you shortly.';break;default:var title='An Error Occured';var message='Please contact the administrator of this website to report this problem.';break;}insert_html(id,'<div class="fcolor4 fsize16 Section_Title">'+title+'</div><div class="height10"></div>'+message+'<div class="height25"></div><input type="button" class="btn btn_Close Sprite" onclick="Hide_Form();">');}function resize_iframe(){style_display('AutoFrame_Loader','none');style_display('AutoFrame','block');style_display('AutoFrame',(PageSize('h')-168)+'px','height');}function Show_Calc(){style_display('Calc','block');resize([270,270],[0,270],[.25,15],'Calc_Middle','Calc_Content');}function Show_Form(){LBox();style_display('Form_Notice,Loader','none');setTop(540,0,'Form','E');resize([600,600],[0,540],[.40,15],'Form','Form_Content','C','T');}function Submit_Form(a){var bgcolor='#003B6C';var fcolor='#FFFFFF';if(!validate('Form_FName','text',3,bgcolor,fcolor)){return;}if(!validate('Form_LName','text',3,bgcolor,fcolor)){return;}if(!validate('Form_Phone','text',10,bgcolor,fcolor)){return;}if(!validate('Form_Email','email',5,bgcolor,fcolor)){return;}style_display('Form_Content','none');style_display('Loader','block');var str='style_display(\'Loader\',\'none\');resize([600,600],[540,175],[.4,15],\'Form\',\'Form_Notice\',\'C\',\'T\');';Ajax('POST','','Insert_Notice(\'Form_Notice\',h.responseText);'+str,'','Insert_Notice(\'Form_Notice\',0);'+str,'/mail.php','Form_FName='+clean_url(return_value('Form_FName'))+'&Form_LName='+clean_url(return_value('Form_LName'))+'&Form_Phone='+clean_url(return_value('Form_Phone'))+'&Form_Email='+clean_url(return_value('Form_Email'))+'&Form_PCM='+clean_url(return_s_value('Form_PCM'))+'&Form_CU='+clean_url(return_value('Form_CU'))+'&Form_Type='+clean_url(return_s_value('Form_Type'))+'&Form_Meeting='+clean_url(return_s_value('Form_Meeting'))+'&Form_Year='+clean_url(return_value('Form_Year'))+'&Form_Make='+clean_url(return_value('Form_Make'))+'&Form_Model='+clean_url(return_value('Form_Model'))+'&Form_Color='+clean_url(return_value('Form_Color'))+'&Form_Comments='+clean_url(return_value('Form_Comments')));}