//<!--
//1@@m4

function Pop(path,ficenter,price,isMotorcycle)
{var popWinHt="";if((isMotorcycle!="")&&(ficenter!=""))
{path=path+"?isMotorcycle="+isMotorcycle+"&ficenter=1";popWinHt="400";}
if((isMotorcycle!="")&&(ficenter==""))
{path=path+"?isMotorcycle="+isMotorcycle+"&ficenter=";popWinHt="400";}
if((isMotorcycle=="")&&(ficenter!=""))
{path=path+"?isMotorcycle=&ficenter=1";popWinHt="400";}
if((isMotorcycle=="")&&(ficenter==""))
{path=path+"?isMotorcycle=&ficenter=";popWinHt="290";}
if(price!=""){path=path+"&price="+price;}else{path=path+"&price=0";}
hw=window.open(path,"MonthlyPaymentCalc","height="+popWinHt+",width=375,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=no,titlebar=no");hw.focus();return false;}
function roundAmount(n){var s=""+Math.round(n*100)/100
var i=s.indexOf('.')
if(i<0)return s+".00"
var t=s.substring(0,i+1)+s.substring(i+1,i+3)
if(i+2==s.length)t+="0"
return t;}
function stripComma(target){if(null!=target)
{splitstring=target.split(",");if(null!=splitstring)
{target=splitstring[0];for(j=1;j<splitstring.length;j++)
{target+=splitstring[j];}}}
return target;}
function stripNonNumeric(pPrice)
{var tmp="",chr;for(var i=0;i<pPrice.length;i++)
{chr=pPrice.charAt(i);if((chr=='.')||!isNaN(parseInt(chr)))
tmp+=chr;}
return tmp;}
function GetYears(months){return months/12;}
function MonthlyPaymentCalc(){price=document.MonthlyPayment.price.value;price=stripComma(price);APR=stripNonNumeric(document.MonthlyPayment.APR.value);payment=document.MonthlyPayment.payment.value;payment=stripComma(payment);for(var i=0;i<document.MonthlyPayment.months.length;i++){if(document.MonthlyPayment.months[i].selected==true){months=document.MonthlyPayment.months[i].value;}}
APR=APR/100;temp1=(1+(APR/12));temp2=GetYears(months);temp3=Math.pow((temp1),-(temp2*12));if(price.indexOf(".")!=-1){_alert("Decimals should not be entered in the total price box");return false;}else if(payment.indexOf(".")!=-1){_alert("Decimals should not be entered in the down payment box");return false;}else{RemainingPayment=price-payment;if(RemainingPayment>0){EstMonthlyPayment=(RemainingPayment*APR)/(12*(1-temp3));EstMonthlyPayment=roundAmount(EstMonthlyPayment);if(isNaN(EstMonthlyPayment))
EstMonthlyPayment="0.00";}else{EstMonthlyPayment="0.00";}
document.MonthlyPayment.EstMonthlyPayment.value=EstMonthlyPayment;return false;}}
function _alert(str)
{if(typeof(ebay)!="undefined")
ebay.oDocument.messageBox(str);else
alert(str);}

//2@@m10

function EbayHTMLText(pParent,pName,pDisabled,pCfg,bHidden)
{if(!this.objType)
this.objType="EbayHTMLText";this.base=EbayHTMLFormElem;this.base(pParent,pName,pDisabled,pCfg);this.value=ebHTMLTextValue;this.getValue=ebHTMLTextGetValue;this.setValue=ebHTMLTextSetValue;this.select=ebHTMLTextSelect;if(bHidden!=true)
this.subscribeEvents("onchange","onblur","onfocus","onkeydown","onkeyup");}
function ebHTMLTextValue(pVal)
{var e=this.eElem;if(e)
{if(typeof(pVal)=="undefined")
return e.value;else
e.value=pVal;}}
function ebHTMLTextGetValue()
{return this.value();}
function ebHTMLTextSetValue(pVal)
{return this.value(pVal);}
function ebHTMLTextSelect()
{var e=this.eElem;if(e)
e.select();}

//3@@m8

function EbayMotorHeader(pParent,pName)
{if(!this.objType)
this.objType="EbayMotorSearch";this.base=EbayBaseControl;this.base(pParent,pName);this.oCfg=this.oTxt=null;this.init=function()
{with(this)
{var oD=this.parent;oCfg=oD.getConfig("USMotor.HomePage.SearchText");if(!oCfg)
return;oTxt=new EbayHTMLText(this,oCfg.sTxtName);oTxt.subscribeEvents("onmousedown");oTxt._registerEvent("onmousedown","clearText");oTxt._registerEvent("onkeydown","clearText");oTxt.clearText=function()
{if(oCfg.sDefaultText==oTxt.getValue())
{oTxt.setValue("");oTxt.focus(true);}}
var sF="headerSearch",oF;if(typeof(oCfg.sFormName)!="undefined")
sF=oCfg.sFormName;oF=new EbayHTMLForm(this,sF);oF._registerEvent("onsubmit","onSubmit");oF.onSubmit=function()
{if(oCfg.sDefaultText==oTxt.getValue())
oTxt.setValue("");return true;}}}
this.setFocus=function()
{with(this)
{if(oTxt)
{if(oCfg)
oTxt.setValue(oCfg.sDefaultText);}}}
with(this)
{var e=oDocument._getEvent("load");_registerListener(e,EVENT_BEFORE,"init");_registerListener(e,EVENT_AFTER,"setFocus");}}
new EbayMotorHeader(ebay.oDocument,"MotorHeader");

//4@@m5

function EbayHTMLForm(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayHTMLForm";this.base=EbayHTML;this.base(pParent,pName,pName,false,pCfg);this.getElem=function(){return this.getDocElem(arguments[0],'forms');};this.enable=function(){};this.getElementValue=ebHTMLFormGetElementValue;this.setElementValue=ebHTMLFormSetElementValue;this.getElements=ebHTMLFormGetElements;this.getElement=ebHTMLFormGetElement;this.setAction=ebHTMLFormSetAction;this.getAction=ebHTMLFormGetAction;this.setTarget=ebHTMLFormSetTarget;this.getTarget=ebHTMLFormGetTarget;this.submit=ebHTMLFormSubmit;this.clear=ebHTMLFormClear;this.subscribeEvents("onsubmit");this.onBeforeSubmit=null;this.onAfterSubmit=null;}
function ebHTMLFormGetElements()
{var e=this.eElem;return e?e.elements:new Array;}
function ebHTMLFormGetElement(pName)
{var elems=this.getElements();return elems[pName]?elems[pName]:null;}
function ebHTMLFormGetElementValue(pName)
{var elems=this.getElements();if(elems[pName]&&elems[pName].value)
return elems[pName].value;return"";}
function ebHTMLFormSetElementValue(pName,pValue)
{var elems=this.getElements();if(elems[pName])
elems[pName].value=pValue;}
function ebHTMLFormSetAction(pAction)
{var e=this.eElem;if(e)
e.action=pAction;}
function ebHTMLFormGetAction()
{var e=this.eElem;if(e)
return e.action;}
function ebHTMLFormSetTarget(pTarget)
{var e=this.eElem;if(e)
e.target=pTarget;}
function ebHTMLFormGetTarget()
{var e=this.eElem;if(e)
return e.target;}
function ebHTMLFormSubmit()
{if(this.onBeforeSubmit)
this.onBeforeSubmit();var e=this.eElem;if(e)
{e.submit();if(this.onAfterSubmit)
this.onAfterSubmit();}
else
this.throwError("Element '"+this.sElemName+"' does not exist on the page","submit");}
function ebHTMLFormClear()
{var elems=this.getElements();for(i=0;i<elems.length;i++)
{var elem=elems[i];var type=elem.type;switch(type)
{case"text":case"textarea":elem.value="";break;case"checkbox":elem.checked=false;break;case"select-one":elem.selectedIndex=0;}}}
// b=4595612 -->