//<!--
//1@@m11

function EbayHTMLAnchor(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLAnchor";this.base=EbayHTML;this.base(pParent,pName,pName,pDisabled,pCfg);this.getElem=ebHTMLAnchorGetElem;this.enableBase=this.enable;this.enable=ebHTMLAnchorEnable;this.subscribeEvents("onclick");}
function ebHTMLAnchorGetElem(pName)
{var d=this.oDocument.doc,l=null,len=null;l=d.links[pName];if(l)return l;if(d.getElementById)
l=d.getElementById(pName);if(l)return l;if(d.all)
l=d.all[pName];if(l)return l;if(d.layers)
{var lyrs=d.layers;len=lyrs.length;for(var i=0;i<len;i++)
{l=this.getElem(lyrs[i].document,pName);if(l)
return l;}}
len=d.links.length;for(var j=0;j<len;j++)
{l=d.links[j];if(typeof(l.name)=="undefined")
{if(l.onclick)
{var oc=l.onclick.toString();if(oc.indexOf("{#"+pName+"#}")!=-1)
return l;}}
else
{if(l.name==pName)
return l;}
l=null;}
return l;}
function ebHTMLAnchorEnable(pEnable)
{var cur=(pEnable)?"hand":"default";var el=this.eElem;if(el&&el.style)
{el.style.cursor=cur;el.style.color=pEnable?"":"gray";}
this.enableBase(pEnable);}
function setEbayLink(pS)
{return true;}

//2@@m2

function EbayHTMLAnchorFormSubmit(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLAnchorFormSubmit";this.base=EbayHTMLAnchor;this.base(pParent,pName,pDisabled,pCfg);this.sFormName=pCfg.sFormName?pCfg.sFormName:pCfg.formName
this.onclick=ebHTMLAnchorFormSubmitOnclick;}
function ebHTMLAnchorFormSubmitOnclick()
{var p=this.parent;var oF=p.controls[this.sFormName];if(oF)
{oF.submit();}}

//3@@m16

function EbayHTMLBaseCheckboxRadio(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLBaseCheckboxRadio";this.base=EbayHTMLFormElem;this.base(pParent,pName,pDisabled,pCfg);this.bGroup=false;this.bindHTML=ebHTMLBaseCheckboxRadioBindHTML;this.bindEvents=ebHTMLBaseCheckboxRadioBindEvents;this.check=ebHTMLBaseCheckboxRadioCheck;this.selectByIndex=ebHTMLBaseCheckboxRadioSelectByIndex;this.selectByValue=ebHTMLBaseCheckboxRadioSelectByValue;this.isCheckedByValue=ebHTMLBaseCheckboxRadioIsCheckedByValue;this.getValueByIndex=ebHTMLBaseCheckboxRadioGetValueByIndex;this.getIndexByValue=ebHTMLBaseCheckboxRadioGetIndexByValue;this.getValue=null;this.enableBase=this.enable;this.enable=ebHTMLBaseCheckboxRadioEnable;this.setValue=this.selectByValue;this.onBeforeCheck=null;this.onAfterCheck=null;this.subscribeEvents("onclick");}
function ebHTMLBaseCheckboxRadioBindHTML()
{with(this)
{eElem=getElem(sElemName);if(eElem)
{if(eElem.length)
{bGroup=true;var len=eElem.length;for(var i=0;i<len;i++)
assignJSObject(eElem[i]);cleanupMemory=ebHTMLBaseCheckboxRadioCleanupMemory;}
else
{bGroup=false;assignJSObject(eElem);}}
if(bDisabled)
enable(false);}}
function ebHTMLBaseCheckboxRadioCleanupMemory()
{var e=this.eElem;if(e)
{var len=e.length;for(var j=0;j<len;j++)
{for(var i in e[j].jsObjs)
{e[j].jsObjs[i]=null;}
e[j].jsObjs=null;}
this.eElem=null;}}
function ebHTMLBaseCheckboxRadioBindEvents()
{with(this)
{if(!eElem)
return;var e=aBindEvents,len=e.length,fStr;for(var i in e)
{var len2=eElem.length;if(len2&&len2>0)
{for(var ii=0;ii<len2;ii++)
eval("eElem[ii]."+e[i]+" = function(){"+this.bindEventString(e[i],ii)+"}");}
else
{eval("eElem."+e[i]+" = new Function(this.bindEventString(e[i],0))");}}}}
function ebHTMLBaseCheckboxRadioCheck(pChecked,pIndex)
{if(pIndex<0)
return;with(this)
{if(eElem)
{if(bGroup&&typeof(pIndex)=='undefined')
{var len=eElem.length;for(var i=0;i<len;i++)
eElem[i].checked=pChecked;}
else if(bGroup&&eElem[pIndex])
eElem[pIndex].checked=pChecked;else if(!bGroup)
eElem.checked=pChecked;}}}
function ebHTMLBaseCheckboxRadioSelectByIndex(pIdx,pCheck)
{var chx=typeof pCheck!='undefined'?pCheck:true;with(this)
{if(onBeforeCheck)
onBeforeCheck();var e=bGroup?eElem[pIdx]:eElem;if(e)
{e.checked=chx;if(onAfterCheck)
onAfterCheck();}}}
function ebHTMLBaseCheckboxRadioSelectByValue(pVal,pCheck)
{var chx=typeof pCheck!='undefined'?pCheck:true;with(this)
{if(onBeforeCheck)
onBeforeCheck();var e=eElem;if(!e)
return;if(bGroup)
{var len=e.length;for(var i=0;i<len;i++)
{if(e[i].value==pVal)
{e[i].checked=chx;if(onAfterCheck)
onAfterCheck();}}}
else
{if(e.value==pVal)
{e.checked=chx;if(onAfterCheck)
onAfterCheck();}}}}
function ebHTMLBaseCheckboxRadioIsCheckedByValue(pValue)
{with(this)
{var e=eElem;if(e&&bGroup)
{var len=e.length;for(var i=0;i<len;i++)
{if(e[i].value==pValue)
return isChecked(i);}}}}
function ebHTMLBaseCheckboxRadioGetValueByIndex(pIndex)
{with(this)
{var e=eElem;if(e&&bGroup)
return e[pIndex].value;return null;}}
function ebHTMLBaseCheckboxRadioGetIndexByValue(pValue)
{with(this)
{var e=eElem;if(e&&bGroup)
{var len=e.length;for(var i=0;i<len;i++)
{if(e[i].value==pValue)
return i;}}
return-1;}}
function ebHTMLBaseCheckboxRadioEnable(pEnable)
{with(this)
{enableBase(pEnable);if(bGroup)
{var v=pEnable?"true":"false",e=eElem,len=e.length;if(e)
{for(var i=0;i<len;i++)
{e[i].onfocus=new Function("return "+v+";");e[i].disabled=!pEnable;}}}}}

//4@@m8

function EbayHTMLRadio(pParent,pName,pDisabled,pCfg)
{if(!this.objType)
this.objType="EbayHTMLRadio";this.base=EbayHTMLBaseCheckboxRadio;this.base(pParent,pName,pDisabled,pCfg);this.getElem=ebHTMLRadioGetElem;this.getValue=ebHTMLRadioGetValue;this.getSelectedIndex=ebHTMLRadioGetSelectedIndex;}
function ebHTMLRadioGetElem(pName)
{return this.oDocument.getFormElem(pName,"radio");}
function ebHTMLRadioGetValue()
{var e=this.eElem;if(!e){return"";}
if(this.bGroup)
{var len=e.length;for(var i=0;i<len;i++)
{if(e[i].checked)
return e[i].value;}}
else
{if(e.checked)
return e.value;}
return"";}
function ebHTMLRadioGetSelectedIndex()
{var e=this.eElem;if(!this.bGroup)
return 0;else
{var len=e.length;for(var i=0;i<len;i++)
{if(e[i].checked)
return i;}}
return-1;}

//5@@m7

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(),elem=elems[pName];if(elem)
{if(elem.length)
{for(var i=0,len=elem.length;i<len;i++)
elem[i].value=pValue;}
else
elem.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(),len=elems.length;for(i=0;i<len;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;}}}

//6@@m5

function EBayTutorialNavConfig(name)
{if(!this.objType)
this.objType="EBayTutorialNavConfig";this.base=EbayConfig;this.base(name);this.formName="frmTutorial";this.submitLinkName="submitLink";this.submitLinkDisabled=false;this.answerRadioCntrlName="answer";this.answerRadioCntrlDisabled=false;this.topPrevLinkName="topPrevLink";this.topPrevLinkDisabled=false;this.topPrevImageLinkName="topPrevImgLink";this.topNextLinkName="topNextLink";this.topNextLinkDisabled=false;this.topNextImageLinkName="topNextImgLink";this.bottomPrevLinkName="bottomPrevLink";this.bottomPrevLinkDisabled=false;this.bottomPrevImageLinkName="bottomPrevImgLink";this.bottomNextLinkName="bottomNextLink";this.bottomNextLinkDisabled=false;this.bottomNextImageLinkName="bottomNextImgLink";this.correctAnswer="";this.correctAnswerUrl="";this.AnswerExplainedUrl="";this.previousUrl="";this.nextUrl="";this.incorrectAnswer="";this.incorrectAnswerUrl="";this.correctAnswerPage="";this.AnswerExplainedPage="";this.previousPage="";this.nextPage="";this.incorrectAnswerPage="";this.pageType="";this.adjustLinks=ebTutorialNavAdjustLinks;this.adjustUrls=ebTutorialNavAdjustUrls;this.buildPageNames=ebTutorialNavBuildPageNames;this.questionIndex=0;this.urlBasedNavigation=false;this.fileExtension=".html";this.answerPagePrefix="a";this.questionPagePrefix="q";this.answerExplainedPagePrefix="w";this.incorrectAnswerPagePrefix="i";this.useFormToSubmit=false;this.noAnswerSelectedMsg="Please select an answer";this.radioValParamName="sv";this.editFormLinkName="editFormLink";this.editFormLinkDisabled=false;}
function EbayTutorialNav(pParent,pName,pCfg)
{if(!this.objType)
this.objType="EbayTutorialNav";this.base=EbayBaseControl;this.base(pParent,pName);var c=this.oConfig=pCfg?pCfg:null;this.adjustControls=ebTutorialNavAdjustControls;this.go=ebTutorialNavGo;this.submit=ebTutorialNavSubmit;this.previous=ebTutorialNavPrevious;this.next=ebTutorialNavNext;this.checkAnswer=ebTutorialNavCheckAnswer;this.init=function()
{var t=new EbayHTMLAnchor(this,c.topPrevLinkName,c.topPrevLinkDisabled,c);t.onclick=this.previous;t=new EbayHTMLAnchor(this,c.topPrevImageLinkName,c.topPrevLinkDisabled,c);t.onclick=this.previous;t=new EbayHTMLAnchor(this,c.topNextLinkName,c.topNextLinkDisabled,c);t.onclick=this.next;t=new EbayHTMLAnchor(this,c.topNextImageLinkName,c.topNextLinkDisabled,c);t.onclick=this.next;t=new EbayHTMLAnchor(this,c.bottomPrevLinkName,c.bottomPrevLinkDisabled,c);t.onclick=this.previous;t=new EbayHTMLAnchor(this,c.bottomPrevImageLinkName,c.bottomPrevLinkDisabled,c);t.onclick=this.previous
t=new EbayHTMLAnchor(this,c.bottomNextLinkName,c.bottomNextLinkDisabled,c);t.onclick=this.next;t=new EbayHTMLAnchor(this,c.bottomNextImageLinkName,c.bottomNextLinkDisabled,c);t.onclick=this.next;t=new EbayHTMLAnchor(this,c.submitLinkName,c.submitLinkDisabled,c);t.onclick=this.checkAnswer;new EbayHTMLRadio(this,c.answerRadioCntrlName,false,c);new EbayHTMLAnchorFormSubmit(this,c.editFormLinkName,c.editFormLinkDisabled,c);new EbayHTMLForm(this,c.formName,c)}
this.init();}
function ebTutorialNavCheckAnswer()
{var p=this.parent;var c=p.oConfig;var f=p.controls[c.formName];if(!c.useFormToSubmit)
{var cntrl=p.controls[c.answerRadioCntrlName];var s=cntrl.getValue();var a=c.correctAnswer;var caUrl=c.correctAnswerUrl;var icaUrl=c.incorrectAnswerUrl;icaUrl+="?"+c.radioValParamName+"="+s;if(s==a)
{p.go(caUrl);}
else if(s=="")
{p.parent.oDocument.messageBox(c.noAnswerSelectedMsg);}
else
{p.go(icaUrl);}}
else
{p.submit(f);}
return false;}
function ebTutorialNavGo(sUrl)
{this.oDocument.doc.location.href=sUrl;}
function ebTutorialNavSubmit(oForm)
{if(oForm)
{oForm.submit();}}
function ebTutorialNavPrevious()
{this.parent.go(this.oConfig.previousUrl);return false;}
function ebTutorialNavNext()
{this.parent.go(this.oConfig.nextUrl);return false;}
function ebTutorialNavAdjustLinks()
{var b1=b2=b3=b4=b5=false;if(this.pageType=="question"&&this.questionIndex==1)
{b1=b2=b3=b4=true;}
else if(this.pageType=="question"&&this.questionIndex>1)
{b2=b4=true;}
else if(this.pageType=="answer"||this.pageType=="wronganswer"||this.pageType=="incorrect")
{b5=true;}
this.topPrevLinkDisabled=b1;this.topNextLinkDisabled=b2;this.bottomPrevLinkDisabled=b3;this.bottomNextLinkDisabled=b4;this.submitLinkDisabled=b5;}
function ebTutorialNavAdjustControls()
{var cn=this.oConfig.answerRadioCntrlName;if(cn)
{var c=this.controls[cn];if(this.oConfig.pageType=="answer")
{c.selectByValue(this.oConfig.correctAnswer);}
else if(this.oConfig.pageType=="incorrect")
{c.selectByValue(this.parent.oDocument.getQueryValue(this.oConfig.radioValParamName));}}}
function ebTutorialNavAdjustUrls(bURLBasedNav)
{if(!bURLBasedNav)
{var p=this.oGlobals.oEnvironment.sThisPage;var d=p.substr(0,p.lastIndexOf("/")+1);this.correctAnswerUrl=d+this.correctAnswerPage;this.AnswerExplainedUrl=d+this.AnswerExplainedPage;this.previousUrl=d+this.previousPage;if(this.nextUrl=="")
this.nextUrl=d+this.nextPage;this.incorrectAnswerUrl=d+this.incorrectAnswerPage;}}
function ebTutorialNavBuildPageNames()
{var fe=this.fileExtension;var ap=this.answerPagePrefix;var qp=this.questionPagePrefix;var aep=this.answerExplainedPagePrefix;var iap=this.incorrectAnswerPagePrefix;var n=parseInt(this.questionIndex,10);this.correctAnswerPage=ap+n+fe;this.AnswerExplainedPage=aep+n+fe;this.nextPage=qp+(n+1)+fe;this.incorrectAnswerPage=iap+(n)+fe;var t=this.pageType;if(n<1||t=="wronganswer"||t=="incorrect")
this.previousPage=qp+(n)+fe;else
this.previousPage=qp+(n-1)+fe;if(this.pageType=="incorrect")
this.nextPage=this.AnswerExplainedPage;}

//7@@m2

ebay.oDocument.oPage.onBeforeLoad=function()
{var c;var aConfigs=this.parent.aConfigs;for(var oc in aConfigs)
{c=aConfigs[oc];if(c.objType=="EBayTutorialNavConfig")
{c.adjustLinks();c.buildPageNames();c.adjustUrls(false);this.tutorialNav=new EbayTutorialNav(ebay,"tutorialNav",c);break;}}}
ebay.oDocument.oPage.onAfterLoad=function()
{if(this.tutorialNav)
{this.tutorialNav.adjustControls();}}
ebay.oDocument.oPage.createEditLink=function(pLinkText)
{this.oDocument.write("<a name=\"editFormLink\" href=\"#\" onclick=\"setEbayLink('{#editFormLink#}')\">"+pLinkText+"</a>");}
// b=14398900 -->
